Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add wallet commands that returns a list of unused addresses

Aperta
#349 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend, cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
142
Fork
103
Merge medio
5g 21h
PR unite (30g)
7

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bitcoindevkit/bdk-cli

Tutte le issue di bitcoindevkit/bdk-cli

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.