Overview
Output Script Descriptors are a compact, human-readable notation for describing exactly which scripts a wallet can sign for and how keys are derived. Introduced primarily through the work on Bitcoin Core, descriptors replace the older "dump all keys" approach to wallet backup and portability with a precise, composable language.
How Descriptors Work
A descriptor string encodes three key pieces of information: the script template, the key origin information, and a checksum for error detection.
Descriptor Structure:
┌─────────────────────────────────────────────────┐
│ wpkh([d34db33f/84h/0h/0h]xpub.../0/*)#checksum │
│ ─┬── ──────┬──────────── ──┬─── ─┬─ ──┬──── │
│ │ │ │ │ │ │
│ script key origin xpub path checksum │
│ type (fingerprint │
│ + derivation) │
└─────────────────────────────────────────────────┘
Common descriptor functions include:
pk(KEY)— bare public keypkh(KEY)— P2PKH outputwpkh(KEY)— P2WPKH native SegWit outputsh(wpkh(KEY))— nested SegWittr(KEY)— P2TR Taproot outputmulti(k, KEY1, KEY2, ...)— k-of-n multisigsortedmulti(k, KEY1, KEY2, ...)— multisig with sorted keys
Why Descriptors Matter
Before descriptors, exporting a wallet required dumping every individual private key or relying on xpub/xprv strings with implicit assumptions about derivation paths. This created compatibility headaches between different wallet software. Descriptors make wallet configuration fully explicit and portable, eliminating ambiguity.
Relationship to Miniscript
Output Script Descriptors and Miniscript are complementary technologies. While descriptors describe which scripts a wallet uses and how keys are derived, Miniscript provides a structured way to express the spending conditions within those scripts. Together they enable wallets to reason about complex Bitcoin Script policies in a safe, composable way.
Common Misconception
Descriptors are not just for advanced or multisig wallets. Even a simple single-key wallet benefits from descriptors because they unambiguously record the address type and derivation path, preventing the common problem of importing a seed into different software and seeing different addresses.