Skip to content

Conversation

ValuedMammal
Copy link
Collaborator

@ValuedMammal ValuedMammal commented Aug 12, 2025

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 psbt::params
  • Add example wallet/examples/psbt.rs
  • Add function specifically for RBF transactions.

close #164

Notes to the reviewers

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

Changelog notice

TBD

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'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

coveralls commented Aug 26, 2025

Pull Request Test Coverage Report for Build 17304985958

Details

  • 151 of 198 (76.26%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 84.699%

Changes Missing Coverage Covered Lines Changed/Added Lines %
wallet/src/psbt/params.rs 43 58 74.14%
wallet/src/wallet/mod.rs 108 140 77.14%
Totals Coverage Status
Change from base Build 17132535147: -0.2%
Covered Lines: 6820
Relevant Lines: 8052

💛 - 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.

Redesign TxBuilder
3 participants