Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RPC command for 3D objects to be submitted on the blockchain #3

Closed
3Dpass opened this issue Mar 2, 2022 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request

Comments

@3Dpass
Copy link
Collaborator

3Dpass commented Mar 2, 2022

Motivation

In order to ensure of working the NODE stand alone without GUI, there has to be the RPC command to submit 3D objects on the network.

Suggested Solution

A new additional command has to be added on top of the existing RPC ones.

@3Dpass 3Dpass added the enhancement New feature or request label Mar 2, 2022
@3Dpass 3Dpass added this to the Official launch testnet milestone Mar 2, 2022
@3Dpass
Copy link
Collaborator Author

3Dpass commented May 24, 2022

RPC is added: https://github.com/3Dpass/3DP/blob/dev/nodes/poscan-consensus/src/mining_rpc.rs

In order to submit a 3D model on the mining input you have to use RPC in the following format:

{
    "jsonrpc":"2.0",
    "id":1",
    "method":"push_mining_object",
    "params": [
        1,
        "o\n
v 0.05508197844028473 0.7671535015106201 -0.14178061485290527\n
v 0.05349433422088623 0.764365017414093 -0.10946107655763626\n
v 0.04743874818086624 0.7608485817909241 -0.07884219288825989\n
            ]
}

Where as one of the parameters is the content of 3D model in .obj format, but with \n added at the end of each line.

v 0.05508197844028473 0.7671535015106201 -0.14178061485290527\n
v 0.05349433422088623 0.764365017414093 -0.10946107655763626\n
v 0.04743874818086624 0.7608485817909241 -0.07884219288825989\n

@3Dpass 3Dpass closed this as completed May 24, 2022
mishk pushed a commit that referenced this issue Jul 25, 2022
* Use `--locked` by default in installation instructions

* Update README.md

Co-authored-by: Andrew Jones <ascjones@gmail.com>

Co-authored-by: Andrew Jones <ascjones@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant