csharp-monero-rpc-client icon indicating copy to clipboard operation
csharp-monero-rpc-client copied to clipboard

MoneroWalletClient return Method not found error on CreateAsync

Open MRayp opened this issue 2 years ago • 3 comments

Hi, I want to create a wallet but it always return this error: "Error experienced when making RPC call in OpenWalletAsync. JsonRpcError: Method not found". I'm using this public node: xmr.moneromerch.com:18089 and my code is var walletClient = await MoneroWalletClient.CreateAsync("xmr.moneromerch.com", 18089, "mytestwallet", "mytestpassword"); is there any way to create wallet and address offline?

MRayp avatar Jun 12 '22 06:06 MRayp

I didn't see a way to create a new wallet but added a CreateNewWalletAsync in my forked copy in: https://github.com/ryn0/csharp-monero-rpc-client

ryn0 avatar Nov 03 '22 18:11 ryn0

@ryn0 even with your release, this error still occurs.

var walletClient = await MoneroWalletClient.CreateAsync(MoneroNetwork.Mainnet, "cool_name", "something_secure");

Error: JsonRpcException - MethodNotFound

is there another work around...

william1benn avatar May 20 '23 20:05 william1benn

For anyone else that comes across this issue, its when using public nodes, RPC calls are going to be restricted or wallet RPC commands are not going to accept connections. That is why you get the error as Method Not Found since its not a known method to the node.

In my case I was able to download the monero wallet cli / wallet rpc daemons (google / monero site) and then run the RPC commands using these docs https://www.getmonero.org/resources/developer-guides/wallet-rpc.html - Running wallet RPC locally I was then able to use localhost http://127.0.0.1:18089/ to connect and run the wallet RPC based commands in this dotnet package.

start the RPC daemon with this command monero-wallet-rpc --testnet --wallet-file . --rpc-bind-port 18089 --disable-rpc-login (this is using the test network, also you will connect to a public/private node here). wallet rpc --> public node.

  • monero-wallet-rpc --help to get a list of helpful command.

Would be nice if these things were outlined, either way hope this helps someone.

william1benn avatar May 21 '23 15:05 william1benn