Skip to content

Commit da3e117

Browse files
committed
Address review comments
1 parent 162c675 commit da3e117

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

bip-wallet-policies.mediawiki

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ Each element of the key origin information vector is a <tt>KEY</tt> expression.
201201

202202
The wallet policy is invalid if any placeholder expression with additional derivation steps is used when the corresponding key information is not an xpub.
203203

204+
A wallet policy must have at least one key placeholder and the corresponding key.
205+
204206
The key information vector should be ordered so that placeholder <tt>@i</tt> never appear for the first time before an occurrence of <tt>@j</tt> for some j < i</tt>; for example, the first placeholder is always <tt>@0</tt>, the next one is <tt>@1</tt>, etc.
205207

206208
=== Descriptor derivation ===
@@ -229,7 +231,7 @@ Avoiding key reuse among different wallet accounts is also extremely important,
229231

230232
== Examples ==
231233

232-
In the examples in this section, the vector of key information items is omitted. See the test vectors below for a complete
234+
In the examples in this section, the vector of key information items is omitted. See the test vectors below for complete examples.
233235

234236
Common single-signature account patterns:
235237
* <tt>pkh(@0/**)</tt> (legacy).
@@ -239,10 +241,10 @@ Common single-signature account patterns:
239241
240242
Common multisignature schemes:
241243
* <tt>wsh(multi(2,@0,@1))</tt> - SegWit 2-of-2 multisignature, keys in order.
242-
* <tt>sh(sortedmulti(2,@0,@1,@3))</tt> - Legacy 2-of-3 multisignature, sorted keys.
244+
* <tt>sh(sortedmulti(2,@0,@1,@2))</tt> - Legacy 2-of-3 multisignature, sorted keys.
243245
244246
Some miniscript policies in <tt>wsh</tt>:
245-
* <tt>wsh(and_v(v:pk(key_user),or_d(pk(key_service),older(12960))))</tt> - Trust-minimized second factor, degrading to a single signature after about 90 days.
247+
* <tt>wsh(and_v(v:pk(@0),or_d(pk(@1),older(12960))))</tt> - Trust-minimized second factor, degrading to a single signature after about 90 days.
246248
* <tt>wsh(thresh(3,pk(@0/**),s:pk(@1/**),s:pk(@2/**),sln:older(12960)))</tt> - A 3-of-3 wallet that becomes a 2-of-3 if coins are not spent for about 90 days.
247249
* <tt>wsh(t:or_c(pk(@0/**),and_v(v:pk(@1/**),or_c(pk(@2/**),v:hash160(00112233445566778899aabbccddeeff00112233)))))</tt> - BOLT #3 offered HTLC policy.
248250
* <tt>wsh(andor(pk(@0/**),or_i(and_v(v:pkh(@1/**),hash160(00112233445566778899aabbccddeeff00112233)),older(1008)),pk(@2/**)))</tt> - BOLT #3 received HTLC policy.
@@ -295,7 +297,7 @@ TBD: add examples with taproot scripts and miniscript.
295297

296298
== Backwards Compatibility ==
297299

298-
The <tt>@</tt> character used for key placeholders is not part of the syntax of output script descriptors, therefore any valid descriptor template is not a valid descriptor template. Vice versa, any descriptor template with at least one key placeholder is not a valid output script descriptor.
300+
The <tt>@</tt> character used for key placeholders is not part of the syntax of output script descriptors, therefore any valid output descriptor with at least one `KEY` expression is not a valid descriptor template. Vice versa, any descriptor template with at least one key placeholder is not a valid output script descriptor.
299301

300302
Adoption of wallet policies in software and harder wallets is opt-in. Conversion from wallet policies to the corresponding descriptors is programmatically extremely easy, and conversion from descriptors to wallet policies (when respecting the required patterns) can be automated. See the reference implementation below for some examples of conversion.
301303

0 commit comments

Comments
 (0)