Bitcoin Forum
April 25, 2024, 12:00:50 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Using payto method via JSON-RPC  (Read 431 times)
crazylol (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
March 14, 2017, 12:57:57 PM
 #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?
1714046450
Hero Member
*
Offline Offline

Posts: 1714046450

View Profile Personal Message (Offline)

Ignore
1714046450
Reply with quote  #2

1714046450
Report to moderator
1714046450
Hero Member
*
Offline Offline

Posts: 1714046450

View Profile Personal Message (Offline)

Ignore
1714046450
Reply with quote  #2

1714046450
Report to moderator
1714046450
Hero Member
*
Offline Offline

Posts: 1714046450

View Profile Personal Message (Offline)

Ignore
1714046450
Reply with quote  #2

1714046450
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714046450
Hero Member
*
Offline Offline

Posts: 1714046450

View Profile Personal Message (Offline)

Ignore
1714046450
Reply with quote  #2

1714046450
Report to moderator
1714046450
Hero Member
*
Offline Offline

Posts: 1714046450

View Profile Personal Message (Offline)

Ignore
1714046450
Reply with quote  #2

1714046450
Report to moderator
1714046450
Hero Member
*
Offline Offline

Posts: 1714046450

View Profile Personal Message (Offline)

Ignore
1714046450
Reply with quote  #2

1714046450
Report to moderator
ThomasV
Moderator
Legendary
*
Offline Offline

Activity: 1896
Merit: 1353



View Profile WWW
March 14, 2017, 03:43:02 PM
 #2

that's an old bug. please update.

Electrum: the convenience of a web wallet, without the risks
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!