Can you grab the wallet address of the second server without first having to connect to a chain?

+2 votes

Hello,

In the 'Getting Started' guide, 2. Connecting to a blockchain states that after the second server runs multichaind chain1@[ip-address]:[port], you'll be shown a message containing an address in the node's wallet. 

1. Is there anywhere else we can get the node's wallet address, without having to try to connect to a chain? The api commands I see all require something like multichain-cli [chain name] getaddresses

2. Out of curiosity, is the node's wallet address the server's public key? 

Thank you!

asked Sep 24 by M.Green

1 Answer

0 votes

By default, the wallet self-generates a random address at the time it attempts to connect to a chain for the first time. So before this, it does not have an address at all.

However you do have another option, of generating an address elsewhere, and then initializing the MultiChain node's wallet with this externally generated address (via its corresponding private key). For example, you can do this using a MultiChain cold node as described here:

https://www.multichain.com/developers/cold-nodes-wallets/

After creating a private key + address on the cold node using createkeypairs, you can start a regular MultiChain with that private key using the initprivkey runtime parameter.

answered Sep 25 by MultiChain
...