-WIP-electrum-btcp/blocks

14 lines
330 B
Plaintext
Raw Normal View History

2012-03-17 04:51:16 -07:00
#!/usr/bin/env python
2012-05-10 05:38:49 -07:00
from electrum import TcpStratumInterface
2012-03-17 04:51:16 -07:00
2012-05-10 05:38:49 -07:00
i = TcpStratumInterface('ecdsa.org', 50001)
2012-05-17 11:26:37 -07:00
i.init_socket()
2012-03-24 23:53:23 -07:00
i.start()
2012-03-28 14:02:33 -07:00
i.send([('blockchain.numblocks.subscribe',[])])
2012-03-17 04:51:16 -07:00
while True:
2012-03-24 07:23:33 -07:00
r = i.responses.get(True, 100000000000)
2012-05-17 11:26:37 -07:00
if r.get('method') == 'blockchain.numblocks.subscribe':
print r.get('result')