Skip to content

Commit 2501006

Browse files
Bortlesboatclaude
andcommitted
Link guide to bitcoinlib-rpc package
- Update tools/overview.md: pip install instructions, Python API examples - Add Tools section to README.md with quick start - Cross-link repos Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fb80c78 commit 2501006

File tree

2 files changed

+51
-20
lines changed

2 files changed

+51
-20
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ Chapters 1-8 build linearly. Chapters 9-12 expand the picture: how to hold your
5454
3. **Decode the example transactions** — seeing real data makes it click
5555
4. **Use mempool.space** as a visual companion — paste any txid to see it rendered
5656

57+
## Tools
58+
59+
Query your own node with **[bitcoinlib-rpc](https://github.com/Bortlesboat/bitcoinlib-rpc)** — a typed Python wrapper for Bitcoin Core RPC:
60+
61+
```bash
62+
pip install bitcoinlib-rpc
63+
bitcoin-mempool # Fee buckets, congestion analysis
64+
bitcoin-block 939290 # Pool ID, SegWit/Taproot adoption
65+
bitcoin-tx <txid> # Full decode + inscription detection
66+
```
67+
68+
See the [Tools section](tools/overview.md) for details.
69+
5770
## Contributing
5871

5972
Found an error? Open an issue or PR. This is a living document.

tools/overview.md

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
A collection of Python tools for querying and analyzing a local Bitcoin node. These tools complement the guide — every concept discussed in the chapters can be verified using these scripts against your own node.
44

5-
## Requirements
5+
## Install
66

7-
- A fully synced Bitcoin Core or Bitcoin Knots node with `server=1` and `txindex=1`
8-
- Python 3.10+
9-
- `pip install requests`
7+
```bash
8+
pip install bitcoinlib-rpc
9+
```
10+
11+
**Requirements:** A fully synced Bitcoin Core or Bitcoin Knots node with `server=1` and `txindex=1`, Python 3.10+.
12+
13+
**Source:** [github.com/Bortlesboat/bitcoinlib-rpc](https://github.com/Bortlesboat/bitcoinlib-rpc)
1014

1115
## The Toolkit
1216

@@ -21,20 +25,33 @@ A collection of Python tools for querying and analyzing a local Bitcoin node. Th
2125
## Quick Start
2226

2327
```bash
24-
# Clone the tools
25-
git clone https://github.com/Bortlesboat/bitcoin-protocol-tools
26-
cd bitcoin-protocol-tools
28+
pip install bitcoinlib-rpc
2729

28-
# Install dependencies
29-
pip install requests
30+
# CLI tools (auto-detect node via cookie authentication)
31+
bitcoin-status
32+
bitcoin-mempool
33+
bitcoin-block 939290
34+
bitcoin-tx a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d
35+
bitcoin-fees --once
36+
bitcoin-nextblock
37+
```
3038

31-
# Configure (edit config.py with your node's RPC settings)
32-
cp config_example.py config.py
39+
### Python API
3340

34-
# Try it
35-
python mempool_analyzer.py
36-
python block_analyzer.py 939000
37-
python tx_decoder.py <any-txid>
41+
```python
42+
from bitcoinlib_rpc import BitcoinRPC
43+
from bitcoinlib_rpc.mempool import analyze_mempool
44+
from bitcoinlib_rpc.blocks import analyze_block
45+
46+
rpc = BitcoinRPC() # auto-detects cookie auth
47+
48+
mempool = analyze_mempool(rpc)
49+
print(f"Congestion: {mempool.congestion}")
50+
print(f"Next block min fee: {mempool.next_block_min_fee:.1f} sat/vB")
51+
52+
block = analyze_block(rpc, 939290)
53+
print(f"Mined by: {block.pool_name}")
54+
print(f"Taproot adoption: {block.taproot_pct:.1f}%")
3855
```
3956

4057
## Architecture
@@ -58,9 +75,10 @@ All tools share a common RPC client (`rpc.py`) that handles authentication via B
5875
mempool tx block fee_tracker next_block
5976
```
6077

61-
## Coming Soon
78+
## Ecosystem
79+
80+
These tools are part of a larger Bitcoin product suite:
6281

63-
These tools are being packaged as:
64-
- **bitcoinlib-rpc** — A pip-installable Python library with typed returns
65-
- **bitcoin-mcp** — An MCP server so AI agents can query your node
66-
- **Bitcoin Fee Observatory** — A Streamlit dashboard for fee market analytics
82+
- **[bitcoinlib-rpc](https://github.com/Bortlesboat/bitcoinlib-rpc)** — The pip-installable Python library powering these tools (available now)
83+
- **bitcoin-mcp** — An MCP server so AI agents can query your node (coming soon)
84+
- **Bitcoin Fee Observatory** — A Streamlit dashboard for fee market analytics (coming soon)

0 commit comments

Comments
 (0)