7 print "usage: watch_address <bitcoin_address>"
9 i = interface.TcpStratumInterface('ecdsa.org', 50001)
11 i.send([('blockchain.address.subscribe',[addr])])
14 r = i.responses.get(True, 100000000000)
15 method = r.get('method')
16 if method == 'blockchain.address.subscribe':
17 i.send([('blockchain.address.get_history',[addr])])
18 elif method == 'blockchain.address.get_history':
19 confirmed = unconfirmed = 0
29 print (confirmed+unconfirmed)/1.e8