How to create multiple non wallet address from another node?

+1 vote
Hi, I am a bitcoin enthusiast. I am developing a wallet system for loyalty point. I have not completely understood the multichain that is why you may find my implementations a little wierd. Correct me if i am misleading anywhere in building the system. What i did i am mentioning here:

I have installed multichain on server 1 with IP 1XX.XX.XX.68 & created chain BCHAIN their. I issued assets named CASH & REWARDS with 100000 QTY each.

I have installed multichain on server 2 with IP 1XX.XX.XX.93 and connected it to server 1 so ultimately its client node of server 1. To Its address, i have given grant from server 1.

I have my NodeJS application hosted on server 3 which has whitelisted for connection on both servers. I am using multichain-node to operate from server 3.

I have created a keypair with createKeyPairs command on server 2. Its privateKey i have imported into server 1 keypool & also given grant from server 1 to connect,send & receive.

I am trying to send assets CASH:1000 from server 1 to the address generated from createKeyPair command on server 2 with command sendwithmetadata. Here From address is the admin address of server 1 & to address is the address generated above by keypair process on server 2.  Here transaction is happening but when i see the transaction details from Txid, the assets are not getting transferred. And moreover the admin address & the keypair address are both coming in myaddresses array in the transaction which means its a wallet address and not the non wallet address for server 1.

If my understanding is wrong anywhere please correct me. I am very much frustrated with this issue. Thanks for time.
asked Jan 17, 2018 by Sagar

1 Answer

+1 vote

If you import the private key for an address into a node, than the node will consider it as "my address".

Nonetheless you can check the different address balances using getaddressbalances.

If you're not seeing the balance on node 2, that's because you never imported the private key made with createkeypairs into node 2. The createkeypairs API deliberately does not add the new key to the node's wallet.

answered Jan 17, 2018 by MultiChain