Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Add wallet commands that returns a list of unused addresses

Aberta
#349 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 3 dias

@emma31-dev já está trabalhando nisso.

Desde 17/10/2026.

  • #355 de @emma31-dev — aberto

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
38/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
rust
Domínio
backend, cli

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
142
Forks
103
Merge médio
5d 12h
PRs com merge (30d)
6

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de bitcoindevkit/bdk-cli

Todas as issues de bitcoindevkit/bdk-cli

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.