1
I'm building a website which will allow every user to make deposits and transact with Bitcoin, how will I be able to get the balance of a specific wallet. I currently know these commands:
$bitcoin->createwallet("wallet_name");
But to get the wallet info of that specific wallet is confusing for me, according to the documentation the getwalletinfo RPC takes no parameters. So my question is how do you get wallet information of a specific wallet?
how would that look in PHP? – frogman578 – 2019-07-27T12:00:34.370
1I don't do PHP, but it should just be a matter of update the URL you are sending the request to so that it includes the wallet path. – Raghav Sood – 2019-07-27T13:14:16.727
I tried to run this in command line:
bitcoin-cli getwalletinfo "home/username/bitcoin/wallets/testwallet"which returns anerror code– frogman578 – 2019-07-28T21:20:15.630Just for clarification, my OS is linux – frogman578 – 2019-07-28T21:20:31.733
If you are using bitcoin-cli, you need to set the
-rpcwallet=<wallet_name>parameter - the url based selection is for applications using the RPC interface directly – Raghav Sood – 2019-07-28T21:28:33.870so if i were to use it via my application i'd still have to have that in the
bitcoin.conf? – frogman578 – 2019-07-28T21:36:26.450The bitcoin folder and their wallets aren't located within the server directory – frogman578 – 2019-07-28T21:37:29.957
again how do I do it in the url when my bitcoin sevrer isn't located within my web server? – frogman578 – 2019-07-29T18:53:55.253