2

I am trying understand the multiple wallet.I took the reference from this link

What I want to do ?

Right now in single wallet we can create multiple accounts and each accounts can have multiple addresses using getnewaddress command from -cli

So when we start coin core daemon to load multiple wallet its required to pass wallet file too(correct me if I am wrong here) like below

./hellocoind -wallet=john.dat -wallet=jimmy.dat

Question :

Is it proper way to give multiple wallet with -wallet & argument ? and what if any new wallet created if the daemon has been started with two wallet.

eg. after starting daemon with john & jimmy 's wallet want to create new wallet (jack's wallet).

So in above example do I need to stop(./hellocoin-cli stop) daemon and start daemon again with 3 wallets(./hellocoind -wallet=john.dat -wallet=jimmy.dat -wallet=jack.dat) ?

As I wants to create user wise wallet. Not like single wallet will have multiple accounts.

Other details I am using litecoin source.

For cli I am using like below(correct me if i am doing anything wrong)

./hellocoin-cli -rpcwallet=jimmy.dat listaccounts
{
  "": 0.00000000
}

./hellocoin-cli -rpcwallet=john.dat listaccounts
    {
  "": 49054.98712000,
  "a": 0.00000000
}

For Rest api using as below (correct me if i am doing anything wrong)

curl --user hellocoinrpc:hello108local1234567890 --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaccounts", "params": [] }' -H 'content-type: text/plain;' http://192.168.39.108:2301/wallet/john.dat

Output :

{"result":{"":49054.98712000,"a":0.00000000},"error":null,"id":"curltest"}

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.