Skip to content

Conversation

ValuedMammal
Copy link
Collaborator

Description

Use the new bdk_tx transaction building library to create PSBTs in BDK Wallet. Primary benefits include the use of bdk_coin_select as well as miniscript::plan module under the hood.

In this PR:

  • Add method create_psbt for Wallet.
  • Add module wallet::psbt_params
  • Add example wallet/examples/psbt.rs

Notes to the reviewers

Still in draft but feel free to comment and make suggestions.

Changelog notice

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@ValuedMammal ValuedMammal moved this to In Progress in BDK Wallet Aug 12, 2025
@ValuedMammal ValuedMammal added this to the Wallet 3.0.0 milestone Aug 12, 2025
@ValuedMammal ValuedMammal self-assigned this Aug 12, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 17239231069

Details

  • 0 of 185 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.0%) to 82.958%

Changes Missing Coverage Covered Lines Changed/Added Lines %
wallet/src/wallet/psbt_params.rs 0 54 0.0%
wallet/src/wallet/mod.rs 0 131 0.0%
Totals Coverage Status
Change from base Build 17132535147: -2.0%
Covered Lines: 6669
Relevant Lines: 8039

💛 - Coveralls

@thunderbiscuit
Copy link
Member

I like the create_psbt name for the function. The Params struct I need to do a quick search but off the top of my head it feels like we have a few of those scattered across the crates named exactly that, so it gets confusing. In my exploration PR I used TransactionParams, but that's a bit long and verbose.

What do you envision the API for replace-by-fee transactions look like in this new bdk-tx world? I'm picturing something like Wallet::create_replacement_psbt which takes a WalletTx and another Params struct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants