Skip to content

Migrate transaction building from TxBuilder to Wallet::create_psbt #338

Open

Description

@vadim-anfv

The plan is to transition bdk_wallet to depreciate TxBuilder and use bdk_tx via Wallet::create_psbt (see bitcoindevkit/bdk_wallet#516). So I'd suggest adding the check to bdk-tx and updating bdk-cli to enable the Wallet::create_psbt experimental feature and using it. But that all will need to be done in new PRs.

Originally posted by @notmandatory in #326 (comment)


This issue is about moving bdk-cli to Wallet::create_psbt from bdk_wallet 3.2.0. The tx size check discussed in the same thread is out of scope here.

bdk-cli is on bdk_wallet 3.1.0 and builds every transaction with TxBuilder. Wallet::create_psbt is available in 3.2.0, behind the bdk-tx feature and the --cfg bdk_wallet_unstable rustflag.

Call sites to migrate:

  • CreateTxCommand in src/handlers/offline.rs
  • CreateSpTxCommand in src/handlers/offline.rs
  • BumpFeeCommand in src/handlers/offline.rs, the only one using build_fee_bump
  • CreateDnsTxCommand in src/handlers/dns/mod.rs
  • PayjoinManager::send_payjoin in src/handlers/payjoin/mod.rs

Notes:

  • Wallet::replace_by_fee is the counterpart for bump_fee.
  • The bump also hits deprecations outside tx building, which -D warnings in CI turns into blockers: Wallet::sign, Wallet::get_signers, Wallet::policies, TxBuilder::policy_path and LoadParams::extract_keys.
  • The bump alone already breaks just pre-push: every test that signs a PSBT fails with Signer error: Missing non-witness UTXO, to be sorted out as part of this work.

Activity

  1. added this to the CLI 4.1.0 milestone on Sep 28, 2026
  2. h4vismat commented on Oct 14, 2026

    @h4vismat

    Hello, I'd like to work on this issue. Can I pick this up?

  3. vadim-anfv commented on Oct 14, 2026

    @vadim-anfv
    CollaboratorAuthor

    Hello, I'd like to work on this issue. Can I pick this up?

    Hi @h4vismat!

    In general, you don't need to ask - feel free to pick up an issue if:

    • it has no assignee
    • no active PR references it (you can see this in the issue timeline)
    • a maintainer or collaborator has approved it, and it's not still under discussion

    All of the above applies here, so go ahead!

  4. tvpeter commented on Oct 14, 2026

    @tvpeter
    Collaborator

    In general, you don't need to ask - feel free to pick up an issue if:

    • it has no assignee
    • no active PR references it (you can see this in the issue timeline)
    • a maintainer or collaborator has approved it, and it's not still under discussion

    All of the above applies here, so go ahead!

    While all the above conditions are applicable, the PR will touch a large part of the codebase, so I would prefer an existing contributor to work on this issue.

    Thank you @h4vismat for showing interest in the issue.

  5. h4vismat commented on Oct 14, 2026

    @h4vismat

    Well, if you guys agree I can start working on the issue and afterwards ask for a review. However, if you think an existing contributor should take this, I will see if I can take up another issue, okay?

  6. vadim-anfv commented on Oct 15, 2026

    @vadim-anfv
    CollaboratorAuthor

    Well, if you guys agree I can start working on the issue and afterwards ask for a review. However, if you think an existing contributor should take this, I will see if I can take up another issue, okay?

    @h4vismat my bad, I mixed this issue up with a different one when I replied. Looking at it again I agree with @tvpeter: this one touches a large part of the codebase and is not a good first contribution here. Sorry for the back and forth.

    The checklist itself still holds as general guidance for picking up issues in this repo, so feel free to use it. I just applied it to the wrong issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      In Progress

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions