mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Merge #14161: doc/descriptors.md tweaks
eeeaa29214 descriptors.md: Refer to descriptors as describing instead of matching (Russell Yanofsky) eb49412562 doc/descriptors.md tweaks (Russell Yanofsky) Pull request description: Add some implementation details, and tweak phrasing in examples section to be more explicit about how expressions are used for matching. Tree-SHA512: a9dc7bc0fc370548189a789f31c04bd11103cdd2a99bcb909fa1b1dfa4e78509813dad5d5c9e3db98d66929f45cb5704f5c46ab4cbd800fef22cd8465f80ef33
This commit is contained in:
parent
a5add5a87e
commit
b10e68ab8c
@ -34,10 +34,10 @@ Output descriptors currently support:
|
||||
|
||||
## Examples
|
||||
|
||||
- `pk(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)` represents a P2PK output.
|
||||
- `combo(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)` represents a P2PK, P2PKH
|
||||
- `multi(1,022f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4,025cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc)` represents a bare *1-of-2* multisig.
|
||||
- `pkh(xpub68Gmy5EdvgibQVfPdqkBBCHxA5htiqg55crXYuXoQRKfDBFA1WEjWgP6LHhwBZeNK1VTsfTFUHCdrfp1bgwQ9xv5ski8PX9rL2dZXvgGDnw/1'/2)` refers to a single P2PKH output, using child key *1'/2* of the specified xpub.
|
||||
- `pk(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)` describes a P2PK output with the specified public key.
|
||||
- `combo(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)` describes any P2PK, P2PKH with the specified public key.
|
||||
- `multi(1,022f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4,025cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc)` describes a bare *1-of-2* multisig with the specified public key.
|
||||
- `pkh(xpub68Gmy5EdvgibQVfPdqkBBCHxA5htiqg55crXYuXoQRKfDBFA1WEjWgP6LHhwBZeNK1VTsfTFUHCdrfp1bgwQ9xv5ski8PX9rL2dZXvgGDnw/1'/2)` describes a P2PKH output with child key *1'/2* of the specified xpub.
|
||||
- `pkh([d34db33f/44'/0'/0']xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL/1/*)` describes a set of P2PKH outputs, but additionally specifies that the specified xpub is a child of a master with fingerprint `d34db33f`, and derived using path `44'/0'/0'`.
|
||||
|
||||
## Reference
|
||||
@ -96,6 +96,15 @@ on Bitcoin's OP_CHECKMULTISIG opcode. To support these, we introduce the
|
||||
multisig policy, where any *k* out of the *n* provided public keys must
|
||||
sign.
|
||||
|
||||
Key order is significant. A `multi()` expression describes a multisig script
|
||||
with keys in the specified order, and in a search for TXOs, it will not match
|
||||
outputs with multisig scriptPubKeys that have the same keys in a different
|
||||
order. Also, to prevent a combinatorial explosion of the search space, if more
|
||||
than one of the `multi()` key arguments is a BIP32 wildcard path ending in `/*`
|
||||
or `*'`, the `multi()` expression only matches multisig scripts with the `i`th
|
||||
child key from each wildcard path in lockstep, rather than scripts with any
|
||||
combination of child keys from each wildcard path.
|
||||
|
||||
### BIP32 derived keys and chains
|
||||
|
||||
Most modern wallet software and hardware uses keys that are derived using
|
||||
@ -106,7 +115,7 @@ path consists of a sequence of 0 or more integers (in the range
|
||||
*0..2<sup>31</sup>-1*) each optionally followed by `'` or `h`, and
|
||||
separated by `/` characters. The string may optionally end with the
|
||||
literal `/*` or `/*'` (or `/*h`) to refer to all unhardened or hardened
|
||||
child keys instead.
|
||||
child keys in a configurable range (by default `0-1000`, inclusive).
|
||||
|
||||
Whenever a public key is described using a hardened derivation step, the
|
||||
script cannot be computed without access to the corresponding private
|
||||
@ -151,7 +160,7 @@ steps, or for dumping wallet descriptors including private key material.
|
||||
|
||||
In order to easily represent the sets of scripts currently supported by
|
||||
existing Dash Core wallets, a convenience function `combo` is
|
||||
provided, which takes as input a public key, and constructs the P2PK and
|
||||
provided, which takes as input a public key, and describes a set of P2PK and
|
||||
P2PKH scripts for that key.
|
||||
|
||||
### Checksums
|
||||
|
Loading…
Reference in New Issue
Block a user