61 / 691DESC

Output Descriptor

Output script descriptor

An Output Descriptor is a machine-readable description of a set of Bitcoin output scripts and the keys needed to derive them. It lets a wallet reproduce an address policy precisely, rather than merely restoring one key or address.

A descriptor is not an address, seed, or wallet file. An expression such as wpkh(...) specifies the scriptPubKey type, key source, derivation, and optional range; wallet state such as the last-used index and scan birthday must be backed up separately.

An Output Descriptor describes a set of scriptPubKeys and the information required to derive or spend them. wpkh(KEY) denotes native SegWit outputs from that key. The descriptor itself is not a Bitcoin address, a seed, or a complete wallet backup.

Functions pk(), pkh(), wpkh(), sh(), wsh(), addr(), and raw() specify the exact output script. Nesting such as sh(wpkh(KEY)) changes the scriptPubKey and address, so the same xpub under a different wrapper defines a different wallet.

A key may carry an origin [fingerprint/path], followed by an xpub and further derivation. Key origin helps a signer match the correct path, but a fingerprint is neither cryptographic identity nor device authentication; verify exports over a trusted channel.

The /* wildcard creates a ranged descriptor and requires a range when deriving. Multipath notation such as <0;1> can combine receive and change branches. The descriptor alone does not retain next index, used addresses, gap limit, or scan birthday.

The eight characters after # are the BIP 380 descriptor checksum. They catch many substitutions, transpositions, and typing errors, but are not a signature, encryption, or proof of origin; an attacker can recompute a valid checksum after changing the expression.

A public descriptor containing xpub data supports watching and derivation without signing. A descriptor containing xprv, WIF, or other private material can enable spending and must be protected like a seed. getdescriptorinfo returns a canonical public form and hasprivatekeys.

multi(k,...) preserves the listed key order, so reordering changes the script and addresses. sortedmulti(k,...) sorts keys lexicographically at each derivation. A backup must preserve threshold, every cosigner, key origins, and wrapper; one seed is insufficient.

tr(KEY) describes a Taproot key path, while tr(KEY,TREE) adds a script-path tree. Tree shape changes the Merkle root and address, so an unordered script list is insufficient. Miniscript or multi_a can express conditions but do not replace the full descriptor.

importdescriptors accepts a checksummed descriptor plus timestamp, active, internal, range, and next_index metadata. Timestamp controls the scan start; a late birthday can hide older history until a correct rescan. Not all of this wallet state lives inside the expression.

Before receiving funds, run getdescriptorinfo and inspect checksum, isrange, issolvable, and hasprivatekeys. Use deriveaddresses for several external and change addresses and compare them with the source wallet or hardware-wallet display. Test a complete restore before relying on the backup. Sources: BIP 380 — Generic Output Script Descriptors; BIP 383 — multi() and sortedmulti() Descriptors; BIP 386 — tr() Output Script Descriptors; Bitcoin Core — Output Descriptors; Bitcoin Core RPC — importdescriptors.

For the clearest picture, read this entry together with Bitcoin wallet, Watch-only Wallet, Multisig, PSBT, Miniscript, Bitcoin. The reverse links also lead from Watch-only Wallet, Extended Public Key (xpub), PSBT, Miniscript.

DOC · 001BIP 380 — Generic Output Script DescriptorsSpecificationDOC · 002BIP 383 — multi() and sortedmulti() DescriptorsSpecificationDOC · 003BIP 386 — tr() Output Script DescriptorsSpecificationDOC · 004Bitcoin Core — Output DescriptorsDocumentationDOC · 005Bitcoin Core RPC — importdescriptorsDocumentation
Reviewed 1 August 2026Source-first · No investment advice