Read and verify Bitcoin from your terminal. Zero dependencies, no Bitcoin Core required.
Reads the chain through the Mempool.space public API, or your own Mempool instance, and checks what it can by computation: address checksums offline, and a transaction against its block's Merkle proof and proof of work.
The $320M Liquid Network drain was negotiated on-chain. Two of its messages, decoded live — read the whole story.
Quick start
pipx install btc-toolkit # or: pip install btc-toolkit · uv tool install btc-toolkit · brew install devdavidejesus/tap/btc-toolkit
btc-toolkit fees # current fee rates
btc-toolkit opreturn f4ac7abcb689df30ec5e8d829733622f389ca91367c47b319bc582e653cd8cab
btc-toolkit verify c103de95817b43f2df635ec6f35ff126ca26a7c6d20570c4b01866b2b3e69a19 # check it is in a block
btc-toolkit validate bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq # offline: nothing sent
Try it without installing anything: uvx btc-toolkit block 0. Options go after the command (btc-toolkit fees -n signet).
Python 3.11+, no dependencies; shell completions for
bash, zsh and fish are in completions/ (the Homebrew formula installs them).
Commands
| Command | Description |
|---|---|
btc-toolkit opreturn <txid> |
Decode OP_RETURN messages from a transaction |
btc-toolkit tx <txid> |
Transaction details: status, fees, size, input/output totals, RBF |
btc-toolkit address <address> |
Aggregated overview: type, balance, lifetime totals |
btc-toolkit balance <address> |
Confirmed + unconfirmed balance of any address |
btc-toolkit fees |
Recommended fee rates + mempool backlog |
btc-toolkit block <height|hash|latest> |
Block metadata by height, hash, or latest |
btc-toolkit utxo <address> |
Unspent outputs of any address |
btc-toolkit verify <txid> |
Check a transaction is in a block by computation: its Merkle proof and the header's proof of work |
btc-toolkit decode <rawtx> |
Decode a raw transaction offline (or --txid: fetch it and check its hash) |
btc-toolkit validate <address> |
Check an address offline: checksum, network, type — nothing is sent |
btc-toolkit inscription <txid> |
Ordinals inscription envelopes in a transaction: content type, size, SHA-256, text |
Every command, option and example: command reference.
What it verifies, and what it doesn't
Inspect Bitcoin data. Verify what you can. Know what you trust.
- Offline, nothing sent:
validate, anddecodegiven a raw transaction, work only from the bytes you give them. - Checked by computation:
verifyrecomputes the txid, the Merkle root and the proof of work instead of taking the API's "confirmed" on faith. - Reported by the API: the other commands show what a Mempool API says — mempool.space by default, or
your own instance on your own node with
--api-url, so no third party sees your queries.
No command validates blocks or follows the most-work chain; for that, run Bitcoin Core.
What each command computes and what it trusts: command reference;
threat model: SECURITY.md.
verify — check a transaction is in a block
btc-toolkit verify c103de95817b43f2df635ec6f35ff126ca26a7c6d20570c4b01866b2b3e69a19
✓ VERIFIED means the block header carries strong proof of work; ⚠ CONSISTENT, WEAK WORK means everything
matches but that work is cheap to fake. With --json, scripts that must reject forged proofs should require
"work": "strong". How it works: command reference.
Scripting
Every command takes --json and has stable exit codes (0 ok · 1 network/API failure or a failed verify ·
2 invalid input); the commands that take a txid, address or block read many items from stdin or --file:
cat txids.txt | btc-toolkit tx - --json | jq -r '.fee_rate_sat_vb'
Every command is also a typed Python function: docs/python-api.md. Output schemas:
docs/json-schema.md.
Copy-paste jq recipes: docs/cookbook.md.
Seen in the wild
- I Read a $320M Ransom Negotiation From My Terminal:
the Liquid Network drain, negotiated on-chain via OP_RETURN, every message decoded with
opreturn. - 49 Messages to a Thief: the OP_RETURN messages sent to the wallet holding 562 BTC from the Coldcard hack.
Listed on bitcoin.org's Development page, among the developer tools in Jameson Lopp's Bitcoin resources, and in awesome-osint and awesome-blockchain.
Roadmap
Next: testnet4 (#64), plain Esplora backends
(#65) and a --json cookbook (#63).
Out of scope, for good: keys, signing, broadcasting and runtime dependencies. Past releases: CHANGELOG.
Support
btc-toolkit is free, MIT-licensed and has no sponsor. If it's useful to you, you can support its development on-chain:
Bitcoin: bc1qulq8xfcmgxxumjx3yndkfktqgw2exh0rym45sn
(Public address — donations are visible on-chain, as everything here is.)
Contributing
Bug reports, ideas and pull requests are welcome: issues ·
CONTRIBUTING.md (stdlib only, tests with every change, claims verifiable on-chain).
Licensed under MIT · Built by @devdavidejesus
"Don't Trust, Verify."
Metadata
Release files for btc-toolkit 1.8.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| btc_toolkit-1.8.3.tar.gz | 89.7 kB | With provenance | Details for btc_toolkit-1.8.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| btc_toolkit-1.8.3-py3-none-any.whl | Python 3 | none | any | Details for btc_toolkit-1.8.3-py3-none-any.whl |
Total release size: 143.0 kB
Release files / btc_toolkit-1.8.3.tar.gz
| Download URL | btc_toolkit-1.8.3.tar.gz |
|---|---|
| Size | 89.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d450df2cbf7f578009d232974147678d73abbb06cf5f1516c6a98c18b65b81dd
|
|
BLAKE2b-256 checksum How to use checksums |
aec1b5e7e39ca0f0ca6d6b8b468020d47b55c717ec838752dee42f99d1d6ff9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / btc_toolkit-1.8.3-py3-none-any.whl
| Download URL | btc_toolkit-1.8.3-py3-none-any.whl |
|---|---|
| Size | 53.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b760d3049399baf1bedf7a0a333b51d35b27d54bdda6b6ee67ab952a24e43966
|
|
BLAKE2b-256 checksum How to use checksums |
0e85ffe50b96571f55b527b11f2744b983ff3d7dcf2ea36e4b7808ed2bda7842
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for btc-toolkit 1.8.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for btc_toolkit-1.8.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.