1

I am trying to use monerod and monero-wallet-rpc to run RPC commands to my Monero daemon with curl.

I have run monerod and monero-wallet-rpc in the following way:

1) ./monerod

...
You are now synchronized with the network. You may now start monero-wallet-cli.

2) ./monero-wallet-rpc --rpc-bind-port 28083 --wallet-dir monerowallet --disable-rpc-login

This is the RPC monero wallet. It needs to connect to a monero daemon to work correctly. 
...
Starting wallet rpc server

3) curl -X POST http://127.0.0.1:28083/json_rpc -d '{"jsonrpc":"2.0","method":"getbalance","id":"test"}' -H Content-Type: application/json"

The response returns an error that the Monero wallet file cannot be found:

code: -13
message: No wallet file

What step am I missing? My wallet file monerowallet is in the same folder as monerod and monero-wallet-rpc

1 Answer 1

3

I was running the command with the wrong parameters. I should have used --wallet-file instead of --wallet-dir when running monero-wallet-rpc.

My corrected command:

./monero-wallet-rpc --rpc-bind-port 28083 --wallet-file monerowallet \
    --password mycoolpassword --disable-rpc-login
1
  • 1
    I'm not sure why we still allow --password to be supplied as an argument. On a multi-user system, this exposes your password. I'd recommend using --prompt-for-password if you can.
    – jtgrassie
    Commented Mar 13, 2019 at 1:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.