Determine node address

+2 votes
I have been able to create two separate VM instances containing multichain servers. After creating a chain on first instance, the next order of instructions is "multichaind chain1@<IP Address>:<Port>" on the second server, which provides instructional text on the console along with the second server's node address. I have been trying to use the multichain JSON-RPC for creating a thin client wrapper for all multichain-cli commands.

Is there a way using the JSON-RPC calls to run the above instruction (multichaind) from the second server, without having to enter it on the console?
asked Jan 11, 2016 by skarred14

1 Answer

+4 votes
You cannot use JSON RPC until you have connected your second node to the first node. When you run the above mentioned code on your second node, it will show your nodes address. Take that address and use it to grant send/receive/mine permissions from the first node.

Once granted, connect to the first node from the second with 'multichaind chainname --daemon'

Then decide which server you want to use for the JSON RPC calls. Checkout '~./multichain/chainname/multichain.conf && params.dat'

Be sure to enable RPC connections from non-localhost. Then take your RPC username and password from one of those docs, you will need it to connect from.

Checkout my explorer (work in progress) for my Multichain-based blockchain. Check app/services/bitcoin_rpc.rb for connection info with RPC. Then check app/controllers/sessions_controller.rb for how the RPC calls are made.

http://github.com/padchain/explorer

Hope this helps!
answered Jan 11, 2016 by mreichardt
Thanks for your comment and a helpful guide. I am able to connect using the command sequence that you have listed. Leveraging JSON-RPC calls as a replacement for most of the multichain-cli calls is what I have been able to establish using C#. However, I was wondering if there is a way to make similar daemon calls programmatically similar to -cli calls
The only RPC calls you can make are relating to multichain-cli calls. Multichaind does not have this possibility.

If my answer helped you sufficiently, which think it has, please select it as a answer :).
...