BitShares Forum
Main => Technical Support => Topic started by: dev on November 17, 2015, 06:08:19 pm
-
Hello,
We are trying to integrate with wallet-cli with RPC commands but having problems with sending request like create user, transaction. Do we need to send such commands to v1 or v0 API? Should we connect node to public server(what address)?
Thanks in advance,
Dev
-
We are trying to integrate with wallet-cli with RPC commands but having problems with sending request like create user, transaction. Do we need to send such commands to v1 or v0 API? Should we connect node to public server(what address)?
If you have the cli_wallet running with an unlocked lifetime account, you should be able to issue commands like this:
curl --data-ascii '{"id":0,"method":"register_account","params":["new_account","owner-public-key","active-public-key","registrar","referrer",0,true]}' http://127.0.0.1:8088/rpc
You must start the cli_wallet with option -H 127.0.0.1:8088 to make the HTTP-RPC port available.
-
http://docs.bitshares.eu/bitshares/user/Account-Create.html
-
Thank you for your answer.
I'm facing another problem now. Users can be created, but seems in local database only. How can I link my node to the public blockchain? Also everytime I restart witness_node it starts with "NEW CHAIN", how can I avoid it?
-
Where did you get the witness_node executable? Are you using the correct version?
Not sure about "NEW CHAIN", but your node should connect to the network all by itself.
-
Where did you get the witness_node executable? Are you using the correct version?
Not sure about "NEW CHAIN", but your node should connect to the network all by itself.
my commands are:
./witness_node --rpc-endpoint "127.0.0.1:8090" --enable-stale-production -w \""1.6.0"\" \""1.6.1"\" \""1.6.2"\" \""1.6.3"\" \""1.6.4"\"
./cli_wallet
-
Where did you get the witness_node executable? Are you using the correct version?
./witness_node --rpc-endpoint "127.0.0.1:8090" --enable-stale-production -w \""1.6.0"\" \""1.6.1"\" \""1.6.2"\" \""1.6.3"\" \""1.6.4"\"
This is most likely wrong.
Either you have a test version of the witness_node, in which case you cannot connect to the live network.
Or this is the correct version, in which case you shouldn't know the private keys of the init witnesses and therefore cannot produce blocks using the witness ids on that command line.
You should download from here: https://github.com/bitshares/bitshares-2/releases/tag/v2.0.151101
Use that witness_node (but without the --enable-stale-production and -w ... options). The rest looks fine.