]> Untitled Git - bdk-cli/commit
feat(compile): randomize unspendable internal key for taproot descriptor
authorVadim Anufriev <mailbox@vaan.io>
Tue, 24 Mar 2026 17:59:39 +0000 (21:59 +0400)
committerVadim Anufriev <m@vaan.io>
Wed, 27 May 2026 08:33:35 +0000 (12:33 +0400)
commita3ca537661dbb80620355b6dae296a836701f93c
tree4c6cb82f0e4f1f86ac3f70bb3c17bcdeedb681b5
parentdd125049ca17f40aae28dead441660b2c201b495
feat(compile): randomize unspendable internal key for taproot descriptor

Instead of using a fixed NUMS key as the internal key for taproot
descriptors, generate a randomized unspendable key (H + rG) for each
compilation. This improves privacy by preventing observers from
determining whether key path spending is disabled.

The randomness factor `r` is included in the output so the user can
verify that the internal key is derived from the NUMS point.

Also applies `shorten()` globally in pretty mode and uses `?` operator
via dedicated error variants instead of `map_err`.

Tests verify descriptor structure and `r` field uniqueness across
randomized compilations.
Cargo.lock
Cargo.toml
src/error.rs
src/handlers.rs