electrum-bitcoinprivate/scripts/get_history

18 lines
339 B
Plaintext
Raw Normal View History

2012-06-14 12:11:37 -07:00
#!/usr/bin/env python
import sys
2013-10-06 03:28:45 -07:00
from electrum import Network
2012-06-14 12:11:37 -07:00
try:
addr = sys.argv[1]
2013-11-10 12:30:57 -08:00
except Exception:
2012-06-14 12:11:37 -07:00
print "usage: get_history <bitcoin_address>"
sys.exit(1)
2013-10-06 03:28:45 -07:00
n = Network()
n.start(wait=True)
h = n.synchronous_get([ ('blockchain.address.get_history',[addr]) ])[0]
for item in h:
2012-11-06 13:20:54 -08:00
print item['tx_hash'], item['height']
2012-06-14 12:11:37 -07:00