Skip to content

feat: upgrade BDK to 2.3.0 and wrap new APIs#14

Merged
darioAnongba merged 7 commits intomainfrom
feat/upgrade-bdk-2.3.0
Feb 24, 2026
Merged

feat: upgrade BDK to 2.3.0 and wrap new APIs#14
darioAnongba merged 7 commits intomainfrom
feat/upgrade-bdk-2.3.0

Conversation

@darioAnongba
Copy link
Collaborator

Summary

Upgrades BDK dependencies and wraps new APIs introduced in bdk_wallet 2.1.0-2.3.0.

Dependency Upgrades

  • bdk_wallet: 2.0.0 → 2.3.0
  • bdk_esplora: 0.22.0 → 0.22.1

New API Wrappers

Wallet::create_from_two_path_descriptor (BIP-389)

  • Creates a wallet from a single multipath descriptor with both receive and change paths
  • Example: wpkh([fingerprint/path]xpub.../<0;1>/*)

TxBuilder::exclude_below_confirmations(min_confirms)

  • Excludes UTXOs from transactions with fewer than min_confirms confirmations
  • Useful for building transactions that only spend confirmed outputs

TxBuilder::exclude_unconfirmed()

  • Shorthand for exclude_below_confirmations(1)

Notable upstream changes (2.1.0 → 2.3.0)

  • BIP-389 two-path multipath descriptor support (2.1.0)
  • Wallet events on apply_update (2.2.0) — planned for follow-up PR
  • apply_block_events and apply_block_connected_to_events (2.3.0) — planned for follow-up PR
  • signer module deprecated (2.2.0)
  • build_fee_bump fix for missing parent txid (2.3.0)

Follow-up PRs planned

  1. Wrap wallet events API (apply_update returning events)
  2. Wrap apply_block_events / apply_block_connected_to_events
  3. Expand API surface coverage for existing BDK methods

Toshi added 3 commits February 24, 2026 16:39
Upgrades:
- bdk_wallet: 2.0.0 -> 2.3.0
- bdk_esplora: 0.22.0 -> 0.22.1

Notable changes in bdk_wallet 2.1.0-2.3.0:
- BIP-389 two-path multipath descriptor support
- TxBuilder::exclude_unconfirmed and exclude_below_confirmations
- Wallet events on apply_update (2.2.0)
- apply_block_events and apply_block_connected_to_events (2.3.0)
- build_fee_bump fix for missing parent txid (2.3.0)
- signer module deprecated (2.2.0)
Adds support for creating a wallet from a BIP-389 two-path multipath
descriptor. This allows users to specify a single descriptor with both
receive and change paths (e.g. wpkh(xpub.../<0;1>/*)) instead of
providing two separate descriptors.

Wraps BdkWallet::create_from_two_path_descriptor introduced in
bdk_wallet 2.1.0.
Adds two new methods to TxBuilder for filtering UTXOs by confirmation
status:

- exclude_below_confirmations(min_confirms): excludes outpoints from
  transactions with fewer than min_confirms confirmations
- exclude_unconfirmed(): shorthand for exclude_below_confirmations(1)

These methods mirror the BDK wallet 2.1.0 API and compute the excluded
set based on the wallet's current chain tip height.
@darioAnongba darioAnongba self-assigned this Feb 24, 2026
Toshi added 3 commits February 24, 2026 18:43
bdk_wallet 2.2.0 deprecated the signer module (including SignOptions)
in favor of bitcoin::psbt::Psbt::sign(). However, Wallet::sign still
requires SignOptions internally, so we add #[allow(deprecated)] until
BDK provides a full migration path.

Added documentation noting the deprecation status and migration plan.
Comprehensive guide covering architecture, build/test instructions,
CI pipeline, dependency management, coding conventions, and known
issues. Useful for both human contributors and AI agents working
on the codebase.
Instead of reimplementing the UTXO filtering logic locally, store the
min_confirmations parameter and pass it to BDK's TxBuilder in finish().
This follows the same delegation pattern used by all other builder
methods.
@darioAnongba
Copy link
Collaborator Author

Addressed review comments in c0cfcb9:

  • tx_builder.rs: No longer reimplementing the UTXO filtering logic. Now stores min_confirmations as a field and delegates to BDK's TxBuilder::exclude_below_confirmations() in finish(), following the same pattern as all other builder methods.
  • wallet.rs SignOptions: Acknowledged — keeping #[allow(deprecated)] for now, will remove once we migrate (tracked in refactor: migrate away from deprecated SignOptions (signer module) #15).

@darioAnongba darioAnongba marked this pull request as ready for review February 24, 2026 22:06
@darioAnongba darioAnongba merged commit 4bcf525 into main Feb 24, 2026
10 checks passed
@darioAnongba darioAnongba deleted the feat/upgrade-bdk-2.3.0 branch February 24, 2026 22:09
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.

1 participant