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

Add wallet commands that returns a list of unused addresses

Đang mở
#349 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 4 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
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend, cli

Hướng nghiên cứu

Start by reading the existing wallet unused_address command and how it calls bdk_wallet::Wallet::list_unused_addresses. Add a plural unused_addresses command that returns all revealed but unused addresses; consider the mentioned --keychain_kind flag with External as the default. The issue asks whether this should replace or accompany the singular command, so settle that design question before implementation.

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
Currently bdk-cli can only return the last unused address from a wallet when long standing account could contain multiple unused addresses. The bdk_wallet::Wallet already provides list_unused_addresses method, which returns an iterator of revealed-but-unused addresses. This feature request exposes that method via the CLI. The current command is:

cargo run wallet -w test_user1 unused_address

it returns something like:

{
  "address": "tb1q0aj7vx0lxy.....scjveq6",
  "index": 0
}

Use case
If a wallet builds a transaction involving many New internal addresses but that transaction is never broadcast, then all of these addresses can now easily be used in a later transaction via the new unused_addresses subcommand. The singular method cannot solve this. The list method does, because it surfaces all the stranded addresses so they can be reused.

Additional context
Alongside this issue the KeychainKind is hardcoded into it as KeychainKind::External. It might be about time to bring the --keychain_kind flag to see both kinds and keep KeychainKind::External as default.

I plan to work on this issue myself but I want to know if this should replace the current subcommand or exist alongside it.

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

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.