-
Notifications
You must be signed in to change notification settings - Fork 68
feat(client)!: update broadcast API #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
oleonardolima
wants to merge
2
commits into
bitcoindevkit:master
Choose a base branch
from
oleonardolima:refactor/broadcast-api-to-return-txid
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat(client)!: update broadcast API #151
oleonardolima
wants to merge
2
commits into
bitcoindevkit:master
from
oleonardolima:refactor/broadcast-api-to-return-txid
Conversation
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
- adds new `submit_package` API to `AsyncClient` and `BlockingClient`, it has been added to esplora by `Blockstream/electrs#159`. - adds new `SubmitPackageResult`, `TxResult` and `MempoolFeesSubmitPackage` API structures. - changes the `post_request_hex` method to `post_request_bytes`, now handling `query_params` and having `Response` as return type. - updates the internals of `broadcast` to use new `post_request` and `post_request_bytes`, without breaking it's API.
- updates the return type of `broadcast` API. BREAKING CHANGE: changes the `broadcast` method to return the `txid` for broadcasted transaction, on both `AsyncClient` and `BlockingClient`.
Pull Request Test Coverage Report for Build 20379104504Details
💛 - Coveralls |
5 tasks
8 tasks
oleonardolima
added a commit
that referenced
this pull request
Jan 5, 2026
…ync client cf64f97 feat(client): add new `submit_package` API (acidbunny21) Pull request description: ### Description Add new `submit_package` method to both `BlockingClient` and `AsyncClient`, as it's now supported by Esplora API, see: Blockstream/electrs#119, Blockstream/electrs#159. Also, adds new `SubmitPackageResult`, `TxResult`, and `MempoolFeesSubmitPackage` API structures. It updates the internal `post_request_hex` method to `post_request_bytes`, now handling `query_params` and having `Response` as return type. Additionally, updates the internals of `broadcast` to utilize the new `post_request` and `post_request_bytes` without breaking its API. ### Notes to the reviewers As mentioned in the PR comments, I updated the original commit by `@acidbunny21` by: - (i) adding `@ValuedMammal`'s suggested fixes; - (ii) removing the breaking change on the `broadcast` API, it's now a follow-up in #151. ### Changelog notice ``` ### Added - feat(client): add new `submit_package` API to `BlockingClient` and `AsyncClient` - feat(api): add new `SubmitPackageResult`, `TxResult`, and `MempoolFeesSubmitPackage` API structures ### Changed - feat(client): update the `post_request_hex` method to `post_request_bytes`, now handling `query_params` and having `Response` as return type. - feat(client): update the internals of the `broadcast` method to use new `post_request` and `post_request_bytes`, with no breaking change. ``` ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `just p` before pushing #### New Features: * [ ] I've added tests for the new feature > The PR does not add new tests for the `submit_package` API, as it's not yet supported by `electrsd`, it's tracked by: #152 * [x] I've added docs for the new feature ACKs for top commit: ValuedMammal: ACK cf64f97; used `git range-diff` luisschwab: re-ACK cf64f97 Tree-SHA512: cfc0a4ad3d119f52e503facbfcb3666c9fa521707d76016cb506bc4ad5261e0a9d1e9fdfcfcaa6de329b44535bc428c76d7dba47e437a0877a828786420ac1a3
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.
No description provided.