Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various 'Wallet' RPC Calls Require URL with '/wallet/<wallet-name>' appended #122

Open
apleroy opened this issue Feb 9, 2022 · 1 comment

Comments

@apleroy
Copy link

apleroy commented Feb 9, 2022

I'm new to Bitcoin/Blockchain so please forgive me if I'm missing something obvious here...

And thank you so much for your fantastic C#/.NET library and samples.

I am going through the sample program in the DemoClient and am having trouble with many of the RPC commands that are categorized as Wallet RPC methods.

For example, calling CoinService.GetBalance(); throws an error like outlined here: https://stackoverflow.com/questions/64324893/wallet-file-not-specified-must-request-wallet-rpc-through-wallet-filename-ur

I can replicate this using Postman locally getting the same error message: "Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path)."

To work around and fix this, I made some local changes to update the RpcConnector > MakeRequest() method to add the appended url. So the final call looks something like this (I'm using RegTest and Bitcoin Core v22.0):

POST MyRpcUserName:MyRpcPw@localhost:18332/wallet/RegTestWallet2
Body: {"jsonrpc":"1.0","id":"rpc","method":"getbalance", "params":[]}

This same pattern applies for Wallet methods such as:
getbalance
gettransaction
listreceivedbyaddress

I'm hoping to confirm that this is a known issue or perhaps a change in Bitcoin Core that requires updates on the client library? Happy to help add a PR for some extension methods if this is helpful. Thanks again

@leandrobattochio
Copy link

Seems like this lib is dead? Not worth using it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants