4 from electrum import Interface
9 print "usage: watch_address <bitcoin_address>"
12 i = Interface({'server':'electrum.novit.ro:50001:t'})
14 i.send([('blockchain.address.subscribe',[addr])])
17 r = i.responses.get(True, 100000000000)
18 method = r.get('method')
19 if method == 'blockchain.address.subscribe':
20 i.send([('blockchain.address.get_history',[addr])])
21 elif method == 'blockchain.address.get_history':
22 confirmed = unconfirmed = 0
32 print (confirmed+unconfirmed)/1.e8