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

Expose remaining SignOptions fields in the wallet sign command

未关闭 适合新手
#358 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@emma31-dev 已经在做这个了。

开始于 2026年10月21日。

  • #365 来自 @emma31-dev —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
cli

调研方向

issue 说明更改仅限于 SignCommand;首先阅读其参数定义和 execute 方法。为列出的 SignOptions 字段添加 CLI 选项,并在省略标志时保留库的默认值,同时确定如何序列化 TapLeavesOptions。完成标准是 CLI 用户可以设置每个字段,且被省略的选项保留其默认值。

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

描述

enhancement

Describe the enhancement

The wallet sign command only exposes assume_height and trust_witness_utxo. The remaining fields on bdk_wallet::SignOptions: allow_all_sighashes, try_finalize, sign_with_tap_internal_key, and allow_grinding, tap_leaves_options are fixed at their defaults, so CLI users have no way to change them. This request adds a flag for each, using Option<bool> and Option<TapLeavesOptions> for tap_leaves_options so that omitting a flag preserves the library default.

Use case

allow_all_sighashes is needed to sign PSBTs using anything other than SIGHASH_ALL, which currently fails through the CLI. try_finalize = false is needed for multisig, where finalizing after the first signature blocks the second signer from adding theirs. remove_partial_sigs = false preserves partial signatures between signing rounds. sign_with_tap_internal_key and allow_grinding are useful for Taproot debugging and signature comparison. Together these make the CLI usable for collaborative signing, which is currently only possible by calling the library directly.

Additional context

The change is confined to SignCommand. Each field follows the existing pattern:

#[arg(env = "ALLOW_ALL_SIGHASHES", long = "allow_all_sighashes")]
pub allow_all_sighashes: Option<bool>,
// Other args

and feeds into SignOptions in execute:

let signopt = SignOptions {
    assume_height: self.assume_height,
    trust_witness_utxo: self.trust_witness_utxo.unwrap_or(false),
    allow_all_sighashes: self.allow_all_sighashes.unwrap_or(false),
    tap_leaves_options: self.tap_leaves_options.unwrap_or_default(),
    try_finalize: self.try_finalize.unwrap_or_default(),
    sign_with_tap_internal_key: self.sign_with_tap_internal_key.unwrap_or_default(),
    allow_grinding: self.allow_grinding.unwrap_or_default(),
};

tap_leaves_options would require a manual serializer though.

主要语言
Rust
星标
143
派生
103
平均合并
2 天 9 小时
30 天内合并 PR
5

环境准备

从这里开始

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

bitcoindevkit/bdk-cli 的其他 Issue

查看 bitcoindevkit/bdk-cli 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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