Expose remaining SignOptions fields in the wallet sign command
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
The issue says the change is confined to SignCommand; start by reading its argument definitions and execute method. Add CLI options for the listed SignOptions fields while preserving library defaults when flags are omitted, and determine how to serialize TapLeavesOptions. Done means CLI users can set each field and omitted options keep their defaults.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Rust
- Stars
- 143
- Forks
- 103
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bitcoindevkit/bdk-cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
bitcoindevkit/bdk-cli#360 ·
Maintainers usually reply within 2 days
-
wallet sign command returns generic error for decoding failuresPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bitcoindevkit/bdk-cli#357 ·
Maintainers usually reply within 2 days
-
Remove "wallet" field from `WalletConfigInner`Possibly taken @Jennycj claimed this 8 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bitcoindevkit/bdk-cli#332 · 2 comments ·
Maintainers usually reply within 2 days
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
bitcoindevkit/bdk-cli#359 ·
Maintainers usually reply within 2 days
-
Add wallet commands that returns a list of unused addressesPossibly taken A pull request linked to this issue is open or already merged. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 38/100
bitcoindevkit/bdk-cli#349 ·
Maintainers usually reply within 2 days
All issues in bitcoindevkit/bdk-cli
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
metasequoiaime/msime#9113 ·
Maintainers usually reply within 1 day
-
area:desktop priority:p2 type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
area: supply-chain
Difficulty 1/5 Under an hour Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Refresh stale docsOpen
Difficulty 1/5 1-3 hours Newbie friendliness 67/100
OpenCarControls/firmware#35 ·