What do you need precisely?
My code don't work
I have a private key in format "5J3NjusByyNidYsWxXXXXXXXXXXXXX"
This private key have founds.
I need to make a program in python to sweep (transfer the total founds in another address) this founds to my electrum wallet.
I test to:
import os
import time
from electrum import Network, Transaction
n = Network()
n.start()
Transaction.sweep(["5J3NjusByyNidYsWxa8CyeX7mqXXXXXXXXXXXXXXXXXXXX"],n,"19yZZdxnmtULAAv8XXXXXXXXXXXXX" ,"0.000001")
But don't work.
I see this error:
Traceback (most recent call last):
File "ProvaTry.py", line 11, in <module>
Transaction.sweep(["5J3NjusByyNidYsWxa8CyeX7mqm4vXXXXXXXXXXXXXXXXXX"],n,"19yZZdxnmtULXXXXXXXXXXXXX" ,"0.000001")
File "/usr/local/lib/python2.7/dist-packages/electrum/transaction.py", line 564, in sweep
u = network.synchronous_get(('blockchain.address.listunspent',[address]))
File "/usr/local/lib/python2.7/dist-packages/electrum/network.py", line 830, in synchronous_get
raise BaseException('Server did not answer')
BaseException: Server did not answer
Any solution???
Thanks