feat!: Add Electrum protocol v1.6 method support#11
Open
evanlinjin wants to merge 2 commits intobitcoindevkit:masterfrom
Open
feat!: Add Electrum protocol v1.6 method support#11evanlinjin wants to merge 2 commits intobitcoindevkit:masterfrom
evanlinjin wants to merge 2 commits intobitcoindevkit:masterfrom
Conversation
evanlinjin
commented
Jan 30, 2026
39ba059 to
5836c20
Compare
- Add `ServerVersion` request type (`server.version`) - Add optional `mode` parameter to `EstimateFee` (breaking: new field) - Support both pre-1.6 (concatenated hex) and v1.6 (list of hex strings) response formats for `blockchain.block.headers` - Add `BroadcastPackage` request type (`blockchain.transaction.broadcast_package`) - Add `GetMempoolInfo` request type (`mempool.get_info`) - Add missing `Features` to `gen_pending_request_types!` macro Closes bitcoindevkit#8 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
5836c20 to
581156d
Compare
Cover both the pre-1.6 concatenated-hex path and the v1.6 array-of-hex path, asserting they produce equal `Vec<Header>`, plus a sanity check that non-string/non-array inputs are rejected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for Electrum protocol v1.6 methods and response format changes.
ServerVersionrequest type forserver.version(version negotiation)EstimateFeegains an optionalmodeparameter ("ECONOMICAL","CONSERVATIVE", etc.)blockchain.block.headersresponses now support both pre-1.6 (concatenated hex"hex"field) and v1.6 (list of hex strings"headers"field) formatsBroadcastPackagerequest type forblockchain.transaction.broadcast_package(package relay)GetMempoolInforequest type formempool.get_info(replacesblockchain.relayfee)RelayFeedeprecated in favor ofGetMempoolInfoFeaturestogen_pending_request_types!macroBreaking changes
EstimateFeehas a newmode: Option<CowStr>fieldCompletedRequest/FailedRequestfor the added request typesTest plan
cargo testpassescargo clippycleancargo docclean (no warnings)Closes #8
🤖 Generated with Claude Code