Python library to handle conversion between TxRef <-> TxID using the Blockcypher API. Tested in Python3
Transaction References, TxRefs, are encoded in Bech32. To learn more about it, see this BIP
Tests
- Run
python3 tests.py
Usage:
-
Add txidbech32.py to your imports:
import txidbech32
-
Use
txidbech32.txRefDecode( "yourTxRefHere" )
to retrieve a TxId from a bech32 encoded TxRef. -
Use
txidbech32.txidToBech32( "yourTxIDHere" , "mainnet | testnet" )
See examples.py and tests.py for detailed usage examples.