Expose remaining SignOptions fields in the wallet sign command
维护者通常 1 天内回复
评估
调研方向
issue 说明更改仅限于 SignCommand;首先阅读其参数定义和 execute 方法。为列出的 SignOptions 字段添加 CLI 选项,并在省略标志时保留库的默认值,同时确定如何序列化 TapLeavesOptions。完成标准是 CLI 用户可以设置每个字段,且被省略的选项保留其默认值。
由索引模型根据 Issue 内容生成。
描述
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
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bitcoindevkit/bdk-cli 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
bitcoindevkit/bdk-cli#362 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
bitcoindevkit/bdk-cli#360 ·
维护者通常 1 天内回复
-
wallet sign command returns generic error for decoding failures可能已有人在做 @emma31-dev 于 2 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
bitcoindevkit/bdk-cli#357 ·
维护者通常 1 天内回复
-
Remove "wallet" field from `WalletConfigInner`可能已有人在做 @Jennycj 于 10 天前认领。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 72/100
bitcoindevkit/bdk-cli#332 · 2 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 3/5 1-2 天 新手友好度 55/100
bitcoindevkit/bdk-cli#359 · 1 条评论 ·
维护者通常 1 天内回复
查看 bitcoindevkit/bdk-cli 的全部 Issue
相似的 Issue
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug P2
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
cssparser-color: debug assertion in hsl_to_rgb for a hue that overflows f32可能已有人在做 @BartWaardenburg 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 64/100
servo/rust-cssparser#460 ·
-
`-w -r <range>` fails empty range but changed working tree可能已有人在做 @dajiaohuang 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复