mirror of
https://github.com/romanz/electrs.git
synced 2025-02-24 15:02:21 +01:00
17 lines
383 B
Python
17 lines
383 B
Python
|
#!/usr/bin/env python3
|
||
|
import argparse
|
||
|
import client
|
||
|
import json
|
||
|
|
||
|
def main():
|
||
|
parser = argparse.ArgumentParser()
|
||
|
parser.add_argument("host")
|
||
|
parser.add_argument("port", type=int)
|
||
|
args = parser.parse_args()
|
||
|
|
||
|
conn = client.Client((args.host, args.port))
|
||
|
print(json.dumps(conn.call("blockchain.headers.subscribe")["result"]))
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
main()
|