You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin#23480: Add rawtr() descriptor for P2TR with specified (tweaked) output key
544b433 Add wallet tests for spending rawtr() (Pieter Wuille)
e1e3081 If P2TR tweaked key is available, sign with it (Pieter Wuille)
8d9670c Add rawtr() descriptor for P2TR with unknown tweak (Pieter Wuille)
Pull request description:
It may be useful to be able to represent P2TR outputs in descriptors whose script tree and/or internal key aren't known. This PR does that, by adding a `rawtr(KEY)` descriptor, where the KEY represents the output key directly. If the private key corresponding to that output key is known, it also permits signing with it.
I'm not convinced this is desirable, but presumably "tr(KEY)" sounds more intended for direct use than "rawtr(KEY)".
ACKs for top commit:
achow101:
ACK 544b433
sanket1729:
code review ACK 544b433
w0xlt:
reACK bitcoin@544b433
Tree-SHA512: 0de08de517468bc22ab0c00db471ce33144f5dc211ebc2974c6ea95709f44e830532ec5cdb0128c572513d352120bd651c4559516d4500b5b0a3d257c4b45aca
Copy file name to clipboardExpand all lines: doc/descriptors.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,7 @@ Descriptors consist of several types of expressions. The top level expression is
77
77
-`tr(KEY)` or `tr(KEY,TREE)` (top level only): P2TR output with the specified key as internal key, and optionally a tree of script paths.
78
78
-`addr(ADDR)` (top level only): the script which ADDR expands to.
79
79
-`raw(HEX)` (top level only): the script whose hex encoding is HEX.
80
+
-`rawtr(KEY)` (top level only): P2TR output with the specified key as output key. NOTE: while it's possible to use this to construct wallets, it has several downsides, like being unable to prove no hidden script path exists. Use at your own risk.
@@ -87,7 +88,7 @@ Descriptors consist of several types of expressions. The top level expression is
87
88
- Followed by the actual key, which is either:
88
89
- Hex encoded public keys (either 66 characters starting with `02` or `03` for a compressed pubkey, or 130 characters starting with `04` for an uncompressed pubkey).
89
90
- Inside `wpkh` and `wsh`, only compressed public keys are permitted.
90
-
- Inside `tr`, x-only pubkeys are also permitted (64 hex characters).
91
+
- Inside `tr` and `rawtr`, x-only pubkeys are also permitted (64 hex characters).
91
92
-[WIF](https://en.bitcoin.it/wiki/Wallet_import_format) encoded private keys may be specified instead of the corresponding public key, with the same meaning.
92
93
-`xpub` encoded extended public key or `xprv` encoded extended private key (as defined in [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)).
93
94
- Followed by zero or more `/NUM` unhardened and `/NUM'` hardened BIP32 derivation steps.
0 commit comments