feat!: Add Electrum protocol v1.6 method support#11
Open
evanlinjin wants to merge 5 commits intobitcoindevkit:masterfrom
Open
feat!: Add Electrum protocol v1.6 method support#11evanlinjin wants to merge 5 commits intobitcoindevkit:masterfrom
evanlinjin wants to merge 5 commits intobitcoindevkit:masterfrom
Conversation
Eliminate the duplicated AsyncPendingRequest/BlockingPendingRequest 21-variant enums by replacing them with a single concrete PendingRequest struct that uses a Box<dyn FnOnce> handler to type-erase the response dispatch logic. This makes State non-generic, collapses AsyncBatchRequest/BlockingBatchRequest into a single BatchRequest, and removes all async/blocking-specific type aliases for response channels. BatchRequest gains request_async() and request_blocking() convenience methods that create channels internally and return receivers, so callers no longer need to wire up channels manually. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ules - Rename types: SatisfiedRequest → CompletedRequest, ErroredRequest → FailedRequest, RawNotificationOrResponse → RawIncoming, MaybeBatch → RawOneOrMany, State → RequestTracker - Rename methods: process_incoming → handle_incoming, into_satisfied → into_completed, into_errored → into_failed - Add request_async/request_blocking convenience methods to BatchRequest - Remove dead BatchRequestError type - Merge batch_request.rs into pending_request.rs - Extract wire types from lib.rs into protocol.rs - Remove Mutex from PendingRequest in favor of Send + Sync bounds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Move async/blocking type aliases from lib.rs into the client module. Delete 4 unused aliases (AsyncEventSender, AsyncRequestReceiver, BlockingRequestReceiver, BlockingEventSender). Re-export only the client structs and error types at the crate root. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- 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`) - Deprecate `RelayFee` in favor of `GetMempoolInfo` - 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>
evanlinjin
commented
Jan 30, 2026
- Replace EstimateFee mode Option<CowStr> with EstimateFeeMode enum (Conservative, Economical) - Change BroadcastPackage to take Vec<bitcoin::Transaction> instead of Vec<String>, matching BroadcastTx's pattern of consensus-encoding internally 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <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