Passing a wallet to rpcwallet in bitcoind JSON RPC

1

I want to set a wallet as default wallet in the commands that run with json-rpc calls. the -rpcwallet=blah sets the blah wallet as the wallet which command will run on it; how can I simulate the similar thing with sending a JSON-RPC request?

When I sending the request, for example curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/, but it run on default wallet. how can I pass the wallet as a parameter in my request?

2 8

Posted 2018-12-15T14:17:53.147

Reputation: 145

Answers

3

To query a specific wallet, set the URL to be

http://127.0.0.1:8332/wallet/<wallet_name>

arubi

Posted 2018-12-15T14:17:53.147

Reputation: 1 460