|
22 | 22 | // they can be included inside by changing public keys to private keys (WIF
|
23 | 23 | // format), and changing xpubs by xprvs.
|
24 | 24 | //
|
25 |
| -// 1. Examples |
26 |
| -// |
27 |
| -// A P2PK descriptor with a fixed public key: |
28 |
| -// - pk(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798) |
29 |
| -// |
30 |
| -// A P2SH-P2WSH-P2PKH descriptor with a fixed public key: |
31 |
| -// - sh(wsh(pkh(02e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13))) |
32 |
| -// |
33 |
| -// A bare 1-of-2 multisig descriptor: |
34 |
| -// - multi(1,022f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4,025cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc) |
35 |
| -// |
36 |
| -// A chain of P2PKH outputs (this needs the corresponding private key to derive): |
37 |
| -// - pkh(xpub68Gmy5EdvgibQVfPdqkBBCHxA5htiqg55crXYuXoQRKfDBFA1WEjWgP6LHhwBZeNK1VTsfTFUHCdrfp1bgwQ9xv5ski8PX9rL2dZXvgGDnw/1'/2/*) |
38 |
| -// |
39 |
| -// 2. Grammar description: |
40 |
| -// |
41 |
| -// X: xpub or xprv encoded extended key |
42 |
| -// I: decimal encoded integer |
43 |
| -// H: Hex encoded byte array |
44 |
| -// A: Address in P2PKH, P2SH, or Bech32 encoding |
45 |
| -// |
46 |
| -// S (Scripts): |
47 |
| -// * pk(P): Pay-to-pubkey (P2PK) output for public key P. |
48 |
| -// * pkh(P): Pay-to-pubkey-hash (P2PKH) output for public key P. |
49 |
| -// * wpkh(P): Pay-to-witness-pubkey-hash (P2WPKH) output for public key P. |
50 |
| -// * sh(S): Pay-to-script-hash (P2SH) output for script S |
51 |
| -// * wsh(S): Pay-to-witness-script-hash (P2WSH) output for script S |
52 |
| -// * combo(P): combination of P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH for public key P. |
53 |
| -// * multi(I,L): k-of-n multisig for given public keys |
54 |
| -// * addr(A): Output to address |
55 |
| -// * raw(H): scriptPubKey with raw bytes |
56 |
| -// |
57 |
| -// P (Public keys): |
58 |
| -// * H: fixed public key (or WIF-encoded private key) |
59 |
| -// * E: extended public key |
60 |
| -// * E/*: (ranged) all unhardened direct children of an extended public key |
61 |
| -// * E/*': (ranged) all hardened direct children of an extended public key |
62 |
| -// |
63 |
| -// L (Comma-separated lists of public keys): |
64 |
| -// * P |
65 |
| -// * L,P |
66 |
| -// |
67 |
| -// E (Extended public keys): |
68 |
| -// * X |
69 |
| -// * E/I: unhardened child |
70 |
| -// * E/I': hardened child |
71 |
| -// * E/Ih: hardened child (alternative notation) |
72 |
| -// |
73 |
| -// The top level is S. |
| 25 | +// Reference documentation about the descriptor language can be found in |
| 26 | +// doc/descriptors.md. |
74 | 27 |
|
75 | 28 | /** Interface for parsed descriptor objects. */
|
76 | 29 | struct Descriptor {
|
|
0 commit comments