Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Migrate transaction building from `TxBuilder` to `Wallet::create_psbt`

未关闭
#338 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
cli

调研方向

Read the five listed call sites in src/handlers/offline.rs, src/handlers/dns/mod.rs, and src/handlers/payjoin/mod.rs, then review the bdk_wallet 3.2.0 Wallet::create_psbt and replace_by_fee APIs. Run just pre-push to identify signing, deprecation, and feature-configuration failures; done means all transaction paths use the new APIs and the checks pass.

由索引模型根据 Issue 内容生成。

描述

The plan is to transition bdk_wallet to depreciate TxBuilder and use bdk_tx via Wallet::create_psbt (see https://github.com/bitcoindevkit/bdk_wallet/pull/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 https://github.com/bitcoindevkit/bdk-cli/issues/326#issuecomment-5799371337


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.
主要语言
Rust
星标
142
派生
99
平均合并
5 天 21 小时
30 天内合并 PR
4

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bitcoindevkit/bdk-cli 的其他 Issue

查看 bitcoindevkit/bdk-cli 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。