Skip to content

feat: add decode_xpub tool#30

Closed
ThomsenDrake wants to merge 3 commits into
Bortlesboat:mainfrom
ThomsenDrake:feat/decode-xpub
Closed

feat: add decode_xpub tool#30
ThomsenDrake wants to merge 3 commits into
Bortlesboat:mainfrom
ThomsenDrake:feat/decode-xpub

Conversation

@ThomsenDrake
Copy link
Copy Markdown
Contributor

Implements issue #2. Adds decode_xpub tool that derives addresses from xpub/ypub/zpub/tpub using Bitcoin Core descriptor RPCs.

Drake Thomsen and others added 3 commits April 11, 2026 23:31
Implements the bitcoin://fees/history resource from issue Bortlesboat#3, returning
a 7-day hourly fee rate time-series from the Satoshi API indexed endpoint.

Changes:
- Add resource_fees_history() using /api/v1/fees/history endpoint
- Returns period, hourly buckets (timestamp, fast/medium/slow sat/vB), 7d stats
- Graceful fallback when indexed API is unavailable (502, timeout, etc.)
- Add test_resource_fees_history_success (mocks API response)
- Add test_resource_fees_history_api_error_fallback (mocks 502 error)

Tested: 126 tests passing (full suite).
Implements bitcoin-mcp issue Bortlesboat#2.

- Accepts xpub/ypub/zpub/tpub and returns network, key type,
  fingerprint, depth, and derived addresses with BIP-32 paths
- Uses Bitcoin Core getdescriptorinfo + deriveaddresses RPCs
- Falls back to Satoshi API when no local node is available
- Explicitly rejects extended private keys (xprv etc.)
- Clamp derive_count to [1, 20] range
- 7 new tests covering error cases and descriptor construction
- Tool is watch-only: never processes private key material
@ThomsenDrake
Copy link
Copy Markdown
Contributor Author

👋 Bortlesboat — PR #29 merged, thank you! This is the follow-up for issue #2 (decode_xpub).

Implements a tool that:

  • Accepts xpub/ypub/zpub/tpub format extended public keys
  • Returns network, key type, fingerprint, depth, and derived addresses with BIP-32 paths
  • Uses Bitcoin Core's getdescriptorinfo + deriveaddresses RPCs (Satoshi API fallback)
  • Explicitly rejects xprv/ypub etc. to prevent accidental private key exposure
  • 7 new tests added

No urgency — just here when you're ready for review. Happy to address any feedback.

@Bortlesboat
Copy link
Copy Markdown
Owner

Closing this as superseded by #31, which consolidates the open backlog work into one maintainer sweep. Thank you for the contribution and the concrete issue coverage here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants