I'm using Electrum daemon 2.9.3 with Ubuntu 16.04 and tried with the command:
curl --data-binary '{"id":"curltext","method":"payto","params":{"destination":"TO_ADDRESS", "amount":"0.001"}}' http://127.0.0.1:7777
And it returns:
{"error": {"message": "Server error: File \"/usr/local/lib/python2.7/dist-packages/electrum/bitcoin.py\", line 768, in deserialize_xkey | TypeError: object of type 'NoneType' has no len()", "code": -32603}, "jsonrpc": "2.0", "id": "curltext"}
you need to load a wallet file first.
please read the docs
I loaded the wallet @ecdsa. I used electrum daemon load_wallet -w my_wallet, it returned true.
Yeah. My wallet's definitely loaded.
Exact same error. getbalance in RPC works just fine.
After further review, it worked when I added the 'password' variable with my wallet password.
As for "read the docs," the documentation on the RPC interface is absent.
It worked for me too after I added the 'password' field.
I think the error message should be more specific, and the docs too.
Most helpful comment
After further review, it worked when I added the 'password' variable with my wallet password.
As for "read the docs," the documentation on the RPC interface is absent.