mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 01:43:29 +01:00
Add script for tx lookup
This commit is contained in:
parent
511df736fc
commit
19aefd998e
16
contrib/get_tx.py
Executable file
16
contrib/get_tx.py
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import client
|
||||
import json
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("txid")
|
||||
args = parser.parse_args()
|
||||
|
||||
conn = client.Client(("localhost", 50001))
|
||||
tx = conn.call("blockchain.transaction.get", args.txid, True)["result"]
|
||||
print(json.dumps(tx))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in New Issue
Block a user