3 import sys, time, electrum
8 print "usage: watch_address <bitcoin_address>"
12 # 1. start the interface and wait for connection
13 interface = electrum.Interface('electrum.no-ip.org:50002:s')
14 interface.start(wait = True)
15 if not interface.is_connected:
19 # 2. send the subscription
20 callback = lambda _,result: electrum.print_json(result.get('result'))
21 interface.send([('blockchain.address.subscribe',[addr])], callback)