0
I'm very new to Bitcoin development, using its RPC API.
I created a wallet using
{
"method": "createwallet",
"params": {
"wallet_name": "/wallets/walletA"
}
}
Now I want to get info about this wallet. I try to use the getwalletinfo command.
But it seems you can't specify the wallet name/path when running this command? You have to "load" the wallet first (using loadwallet)?
This is the part I do not understand. Let's say I have created 10 wallets and I try to run a getwalletinfo command in a multithreaded environment... How can I make sure I target the right wallet? Do I really have to send a loadwallet request to specify the wallet I want to work on, before getting info about it?
What will occure if I want to get information about "walletA" so I run loadwallet walletA, but before I can run getwalletinfo to get its info, a loadwallet walletB request is made?
I have been unable to make this work. Maybe because I'm on Windows with backslahes in paths. I tried everything: url encoding, escaping backslahes, etc. I even looked at Bitcoin code, and I'm not sure paths are properly managed when following
/wallet/in urls! In the end, I decided to use thewalletdirconfig inbitcoin.confin order to specify the directory where wallets will be created. And I only use the name of a wallet (no path) in the RPC/wallet/[wallet_name]url. This works. Hope it helps someone, one day. – electrotype – 2019-09-21T13:57:54.690By the way, thanks for your help Raghav! :-) – electrotype – 2019-09-21T19:59:38.250