4 from electrum import Interface
9 print "usage: watch_address <bitcoin_address>"
14 i.send([('blockchain.address.subscribe',[addr])] )
19 method = r.get('method')
20 if method == 'blockchain.address.subscribe':
21 i.send([('blockchain.address.get_history',[addr])])
24 elif method == 'blockchain.address.get_history':
25 confirmed = unconfirmed = 0
35 print "balance:", (confirmed+unconfirmed)/1.e8