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

Improve error message / accept descriptor key expressions in descriptor command

Đang mở
#303 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
rust
Lĩnh vực
cli

Hướng nghiên cứu

Trước tiên, hãy chạy reproducer đã được ghi lại cho key derive và descriptor, sau đó lần theo các điểm vào bdk-cli key derive, descriptor và wallet config để so sánh cách các đầu vào của chúng được phân tích. Công việc được coi là hoàn tất khi các biểu thức khóa của descriptor либо được descriptor chấp nhận trực tiếp, либо bị từ chối kèm giải thích rõ ràng về biểu diễn được mong đợi, với các bài kiểm thử lệnh bao phủ hành vi đã chọn.

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

bdk-cli key derive returns a descriptor key expression (e.g. [fingerprint/path]xpub.../*), while bdk-cli descriptor expects a raw xpub/xprv. Passing the output of key derive directly to descriptor results in:

BIP32 error: base58 encoding error

The error doesn't explain that the input is a descriptor key expression rather than a raw extended key.

It would be helpful if descriptor either:-

  • detected descriptor key expressions and emitted a more descriptive error or
  • accepted descriptor key expressions directly.

Use case

A natural workflow is:

key restore
    ↓
key derive
    ↓
descriptor

Since key derive produces a key intended for descriptors, it's reasonable to expect its output to be consumable by descriptor.

Instead, users encounter a low-level Base58 parsing error without any indication that the command expects a different representation.


Additional context

Reproducer:

bdk-cli key derive --xprv "tprv..." --derivation_path "m/84h/1h/0h"

Output:

[bd2eb472/84'/1'/0']tprv.../*

Then:

bdk-cli descriptor --type wpkh "[bd2eb472/84'/1'/0']tprv.../*"

produces:

BIP32 error: base58 encoding error

The same descriptor key expression works correctly when wrapped in a descriptor and passed to:

bdk-cli wallet config --ext-descriptor "wpkh([bd2eb472/84'/1'/0']tprv.../*)"

which suggests the underlying parsing is already supported in that context.

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

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.