Connect to a Wallet running on another node

+2 votes
Hi,

I am having two nodes.

Node1 - Is running blockchain and has wallet1.

Node2 - Is having wallet2.

I am having a Java code running on Node1, which connects with the blockchain.

I am executing shell commands from java code to connect with the blockchain.

I am able to get assets present in Wallet1.

But how can I fetch the assets present in Wallet2 (considering code is present on node1).

Following command does not work on Node1:

multichain-cli chain6 getaddressbalances <wallet-2-address>

Regards

Anuj
asked Feb 8, 2016 by anuj

1 Answer

0 votes
 
Best answer

You need to use the importaddress API to add the other address to node 1, so it will start tracking its balance. This is called a "watch-only address".

answered Feb 9, 2016 by MultiChain
selected Feb 10, 2016 by anuj
...