~ubuntu-branches/debian/stretch/electrum/stretch

« back to all changes in this revision

Viewing changes to scripts/get_history

  • Committer: Package Import Robot
  • Author(s): Vasudev Kamath
  • Date: 2013-06-19 21:44:47 UTC
  • Revision ID: package-import@ubuntu.com-20130619214447-8n0u7ryn1ftu25w8
Tags: upstream-1.8
ImportĀ upstreamĀ versionĀ 1.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
import sys
 
4
from electrum import Interface
 
5
 
 
6
try:
 
7
    addr = sys.argv[1]
 
8
except:
 
9
    print "usage: get_history <bitcoin_address>"
 
10
    sys.exit(1)
 
11
 
 
12
i = Interface({'server':'electrum.be:50001:t'})
 
13
i.start()
 
14
h = i.synchronous_get([ ('blockchain.address.get_history',[addr]) ])[0]
 
15
for item in h:
 
16
    print item['tx_hash'], item['height']
 
17