Author

Topic: Using payto method via JSON-RPC (Read 452 times)

legendary
Activity: 1896
Merit: 1353
March 14, 2017, 10:43:02 AM
#2
that's an old bug. please update.
newbie
Activity: 5
Merit: 0
March 14, 2017, 07:57:57 AM
#1
Hi all!

Is there a way to use methods "payto" and "signtransaction" (and maybe others methods, that require prompt a password) via electrum daemon and JSON?

For example, if I want to create transaction, I execute a command:
Code:
electrum payto my4qNK7VYdeFWdWkynv7XB3xmf6U4BfQAc 0.1 -f 0 --testnet -W SOME_PASS
and all works good.

But, if I'm trying to do this via JSON-RPC I have an error.
Request:
Code:
curl --data-binary '{"id":"curltext","method":"payto","params":{"destination":"mwLmd5xMnKkf4bBUa6MDrg4HYQaazoHtkj", "amount":"0.1"}}' http://127.0.0.1:5555
Response:
Code:
{"error": {"message": "Server error:   File \"/usr/local/lib/python2.7/dist-packages/electrum/bitcoin.py\", line 733, in deserialize_xkey | TypeError: object of type 'NoneType' has no len()", "code": -32603}, "jsonrpc": "2.0", "id": "curltext"}

Is there a way to send password via JSON-RPC?
Jump to: