Skip to main content

Single-Key Descriptors

Basic P2PK output with a public key:
With extended public key:
Standard P2PKH (legacy addresses):
P2PKH with HD key derivation:
With key origin and wildcard:
Native SegWit (bech32):
Wrapped in P2SH (P2SH-P2WPKH):
Generate all compatible output types for a single key:
This creates: P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH outputs.

Multisig Descriptors

1-of-2 multisig:
2-of-2 P2SH multisig:
2-of-2 with sorted keys:
2-of-3 SegWit multisig:
P2SH-P2WSH 1-of-3 multisig:
1-of-2 P2WSH multisig with HD derivation:
Sorted 1-of-2 (key order determined lexicographically):
2-of-3 multisig with receiving (0) and change (1) paths:

Taproot Descriptors

Simple P2TR with internal key:
P2TR with two script paths:
2-of-2 Taproot multisig with sorted keys:
MuSig2 multisig with key derivation:

Miniscript Descriptors

4-of-4 multisig that “decays” to 3-of-4, 2-of-4, and 1-of-4 at future block heights:
This policy:
  • Starts as 4-of-4 before block 840000
  • Becomes 3-of-4 after block 840000
  • Becomes 2-of-4 after block 1050000
  • Becomes 1-of-4 after block 1260000

Special Cases

Reference an existing address:
Use a raw hex-encoded script:
This example creates an OP_RETURN output.
Overly complex (but valid) P2SH-P2WSH-P2PKH:
Note: While technically valid, this type of nesting is unnecessarily complex and not recommended for production use.

Practical Wallet Setup

SegWit wallet with receiving and change addresses:
Derivation path follows BIP84 standard for native SegWit.
Watch-only multisig for cold storage:
Follows BIP48 derivation for multisig wallets.

Testing and Validation

Validate and add checksums to descriptors:
Derive addresses from a descriptor:
This generates addresses at indices 0-10.