Skip to content

common: add taproot singlesig descriptor support#146

Open
Antisys wants to merge 1 commit intoBlockstream:masterfrom
Antisys:add-taproot-singlesig
Open

common: add taproot singlesig descriptor support#146
Antisys wants to merge 1 commit intoBlockstream:masterfrom
Antisys:add-taproot-singlesig

Conversation

@Antisys
Copy link
Copy Markdown

@Antisys Antisys commented Mar 28, 2026

Summary

  • Add Singlesig::Taproot variant generating eltr descriptors with BIP-86 derivation path (86h/{coin_type}h/0h)
  • Wire --kind taproot through CLI, UniFFI bindings, and WASM
  • Add DescriptorType::Tr handling for Jade address verification and WalletType::Taproot to the RPC model
  • Fix Ledger get_receive_address_single wallet policy descriptor — was hardcoded to wpkh(@0/**) regardless of variant, which also affected the pre-existing ShWpkh path

Example generated descriptor:

ct(slip77(9c8e4f05...),eltr([73c5da0a/86h/1h/0h]tpubDDfv.../<0;1>/*))#ee7drqqd

Closes #31

Test plan

  • cargo test --lib — all unit tests pass
  • cargo clippy --all-targets -- -D warnings — zero warnings
  • New singlesig_from_str test covers FromStr for all three variants
  • New taproot_singlesig_desc_format test verifies descriptor format, coin type, and successful parse into WolletDescriptor for both mainnet/testnet and Slip77/Elip151

🤖 Generated with Claude Code

Add `Singlesig::Taproot` variant that generates `eltr` descriptors
with BIP-86 derivation path (`86h/{coin_type}h/0h`).

- Wire `--kind taproot` through CLI, bindings, and WASM
- Add `DescriptorType::Tr` handling for Jade address verification
- Add `WalletType::Taproot` to RPC model
- Fix Ledger `get_receive_address_single` to vary the wallet policy
  descriptor by variant — was previously hardcoded to `wpkh(@0/**)`
  which also affected the pre-existing `ShWpkh` path

Closes Blockstream#31

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Singlesig descriptor: add taproot support

1 participant