From: merge-script Date: Sun, 28 Jun 2026 02:59:56 +0000 (+0100) Subject: Merge bitcoindevkit/bdk-cli#225: feat(compile): compile taproot descriptor with rando... X-Git-Url: http://internal-gitweb-vhost/blockdata/script/encode/-script/scripts/static/struct.ElectrumArgs.html?a=commitdiff_plain;p=bdk-cli Merge bitcoindevkit/bdk-cli#225: feat(compile): compile taproot descriptor with randomized unspendable internal key 03f6b98d4b0af77fc8a60104a4e1f5cdae3b0c1c test(handlers): drop redundant cfg gate on test module (Vadim Anufriev) be6bb4b4049ced27ac6d937dd3e47dc5e0182303 docs: add pre-push recipe description to README (Vadim Anufriev) 6e113b1325e264cc4547bd6c3bad890ea6006722 docs(contributing): update CONTRIBUTING.md (Vadim Anufriev) 29ef2e2912a6503086682c33b7ffda21f4c0eed7 refactor(compile): lazy compilation and use pipe for readability (Vadim Anufriev) a3ca537661dbb80620355b6dae296a836701f93c feat(compile): randomize unspendable internal key for taproot descriptor (Vadim Anufriev) dd125049ca17f40aae28dead441660b2c201b495 chore(deps): make shlex a non-optional dependency (Vadim Anufriev) Pull request description: ### Description Part of #218 Implements randomization of the unspendable internal key for taproot descriptors. This is the first part of #218, which consists of two parts: 1. **This PR**: Randomize unspendable internal key for taproot descriptor 2. **Follow-up**: Add verification command to ensure internal key is derived from NUMS key Split into separate PRs for easier review and iteration, and to allow independent discussion of the verification command implementation, as one of the possible approaches could introduce breaking changes. ### Notes to the reviewers The `compile` command now returns an additional `r` field for taproot descriptors (`-t tr`), containing the randomly generated internal key. Each compilation will produce a different internal key instead of using a fixed NUMS key. Example output for taproot (first execution): ``` -> % bdk-cli compile "pk(A)" -t tr { "descriptor": "tr(2dd09dd0355f4b2d5a4886de599786f3c0211652373221c87aba1cd1f7f1e593,pk(A))#anvu48aj", "r": "275a58827bd0ad459d6f92e083ddc3d99a03076155691680eb8f3b06380cdcfd" } ``` Same descriptor compiled again produces different `r` and internal key: ``` -> % bdk-cli compile "pk(A)" -t tr { "descriptor": "tr(801078f69dae7d95631723d4d13e6c32911633d227dcfc24c6b7e32e1e533e6c,pk(A))#f79rr82j", "r": "5e3ac63bb20d6a4bfff645279cc63a7472e18066da8826b13cbcb23aecb5c401" } ``` Other descriptor types remain unchanged: ``` -> % bdk-cli compile "pk(A)" -t sh { "descriptor": "sh(pk(A))#k80zhe7s" } ``` ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [x] I've added tests for the new feature * [ ] I've added docs for the new feature * [ ] I've updated `CHANGELOG.md` Top commit has no ACKs. Tree-SHA512: 333a7e82007dfe2344f14fb8e1fb7b3f5c19d99677251a97f7909a285607c399aeacfbbca089117677a859da6dfc55a4853b36f1773ed3e70292433e27bfcfd0 --- 0906b27782d3e452ab1d110afba0ca5963015383