Author Topic: Create user with RPC command  (Read 2323 times)

0 Members and 1 Guest are viewing this topic.

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
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.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline dev

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

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
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.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline dev

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?


Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
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:

Code: [Select]
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.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline dev

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