2012-06-14 12:11:37 -07:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import sys
|
2012-10-11 11:10:12 -07:00
|
|
|
from electrum import Interface
|
2012-06-14 12:11:37 -07:00
|
|
|
|
|
|
|
try:
|
|
|
|
addr = sys.argv[1]
|
|
|
|
except:
|
|
|
|
print "usage: get_history <bitcoin_address>"
|
|
|
|
sys.exit(1)
|
|
|
|
|
2012-11-27 00:16:27 -08:00
|
|
|
i = Interface({'server':'electrum.be:50001:t'})
|
2012-06-14 12:11:37 -07:00
|
|
|
i.start()
|
2012-10-19 05:16:02 -07:00
|
|
|
h = i.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
|
|
|
|