Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Expose remaining SignOptions fields in the wallet sign command

Đang mở Phù hợp với người mới
#358 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
cli

Hướng nghiên cứu

Issue cho biết thay đổi chỉ giới hạn ở SignCommand; trước tiên hãy đọc các định nghĩa đối số và phương thức execute. Thêm các tùy chọn CLI cho những trường SignOptions được liệt kê, giữ nguyên giá trị mặc định của thư viện khi bỏ qua các flag, đồng thời xác định cách tuần tự hóa TapLeavesOptions. Công việc hoàn tất khi người dùng CLI có thể thiết lập từng trường và các tùy chọn bị bỏ qua vẫn giữ giá trị mặc định.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
142
Fork
103
Merge trung bình
4 ngày 8 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bitcoindevkit/bdk-cli

Tất cả issue của bitcoindevkit/bdk-cli

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.