Skip to content

Conversation

@oleonardolima
Copy link
Collaborator

No description provided.

acidbunny21 and others added 2 commits December 19, 2025 15:25
- 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`.
@oleonardolima oleonardolima self-assigned this Dec 19, 2025
@oleonardolima oleonardolima added the enhancement New feature or request label Dec 19, 2025
@coveralls
Copy link

coveralls commented Dec 19, 2025

Pull Request Test Coverage Report for Build 20379104504

Details

  • 33 of 107 (30.84%) changed or added relevant lines in 3 files are covered.
  • 8 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-4.2%) to 86.428%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/api.rs 0 12 0.0%
src/async.rs 14 44 31.82%
src/blocking.rs 19 51 37.25%
Files with Coverage Reduction New Missed Lines %
src/async.rs 1 76.13%
src/blocking.rs 7 75.44%
Totals Coverage Status
Change from base Build 20348214326: -4.2%
Covered Lines: 1401
Relevant Lines: 1621

💛 - Coveralls

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

Labels

enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants