Home › Topics › Wallets › BIP 384

BIP 384: combo() Output Script Descriptors

Also known as: BIP384, BIP-0384.

In plain English: Defines a 'combo' descriptor that, from a single key, describes all the common address types that key could be used with. This is handy for wallets that need to find coins sent to any of those formats, for example when importing an old key.

Status
Deployed
Type
Specification
Layer
Applications
Authors
Pieter Wuille, Ava Chow
Assigned
Last changed
Requires
BIP 380
Topics
Wallets
Source
bip-0384.mediawiki on GitHub · Markdown

Full specification

Abstract

This document specifies combo() output script descriptors. These take a key and produce P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH output scripts if applicable to the key.

This BIP is licensed under the BSD 2-clause license.

Motivation

In order to make the transition from traditional key based wallets to descriptor based wallets easier, it is useful to be able to take a key and produce the scripts which have traditionally been produced by wallet software.

Specification

A new top level script expression is defined: combo(KEY). This expression can only be used as a top level expression. It takes a single key expression as an argument and produces either 2 or 4 output scripts, depending on the key. A combo() expression always produces a P2PK and P2PKH script, the same as putting the key in both a pk() and a pkh() expression. If the key is/has a compressed public key, then P2WPKH and P2SH-P2WPKH scripts are also produced, the same as putting the key in both a wpkh() and sh(wpkh()) expression.

Test Vectors

Valid descriptors followed by the scripts they produce. Descriptors involving derived child keys will have the 0th, and 1st scripts in additional sub-bullets.

  • combo(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1)
    • 2103a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bdac
    • 76a9149a1c78a507689f6f54b847ad1cef1e614ee23f1e88ac
    • 00149a1c78a507689f6f54b847ad1cef1e614ee23f1e
    • a91484ab21b1b2fd065d4504ff693d832434b6108d7b87
  • combo(04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)
    • 4104a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235ac
    • 76a914b5bd079c4d57cc7fc28ecf8213a6b791625b818388ac
  • combo([01234567]xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL)
    • 2102d2b36900396c9282fa14628566582f206a5dd0bcc8d5e892611806cafb0301f0ac
    • 76a91431a507b815593dfc51ffc7245ae7e5aee304246e88ac
    • 001431a507b815593dfc51ffc7245ae7e5aee304246e
    • a9142aafb926eb247cb18240a7f4c07983ad1f37922687
  • combo(xprvA2JDeKCSNNZky6uBCviVfJSKyQ1mDYahRjijr5idH2WwLsEd4Hsb2Tyh8RfQMuPh7f7RtyzTtdrbdqqsunu5Mm3wDvUAKRHSC34sJ7in334/*)
    • Child 0
      • 2102df12b7035bdac8e3bab862a3a83d06ea6b17b6753d52edecba9be46f5d09e076ac
      • 76a914f90e3178ca25f2c808dc76624032d352fdbdfaf288ac
      • 0014f90e3178ca25f2c808dc76624032d352fdbdfaf2
      • a91408f3ea8c68d4a7585bf9e8bda226723f70e445f087
    • Child 1
      • 21032869a233c9adff9a994e4966e5b821fd5bac066da6c3112488dc52383b4a98ecac
      • 76a914a8409d1b6dfb1ed2a3e8aa5e0ef2ff26b15b75b788ac
      • 0014a8409d1b6dfb1ed2a3e8aa5e0ef2ff26b15b75b7
      • a91473e39884cb71ae4e5ac9739e9225026c99763e6687

Invalid descriptors

  • combo() in sh : sh(combo(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd))
  • combo() in wsh : wsh(combo(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd))
  • Script in combo(): combo(pkh(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd))

Backwards Compatibility

combo() descriptors use the format and general operation specified in 380. As this is a wholly new descriptor, it is not compatible with any implementation. However the scripts produced are standard scripts so existing software are likely to be familiar with them.

Reference Implementation

combo() descriptors have been implemented in Bitcoin Core since version 0.17.

Questions about BIP 384

What is BIP 384?

BIP 384, “combo() Output Script Descriptors”, is a specification Bitcoin Improvement Proposal written by Pieter Wuille and Ava Chow and assigned in June 2021. Defines a 'combo' descriptor that, from a single key, describes all the common address types that key could be used with. This is handy for wallets that need to find coins sent to any of those formats, for example when importing an old key.

Is BIP 384 active?

Yes. BIP 384 has the status Deployed, which means it is live: adopted by the Bitcoin network or by widely used software.

Who wrote BIP 384?

BIP 384 was written by Pieter Wuille and Ava Chow. Its number was assigned on June 27, 2021.

What does BIP 384 build on?

BIP 384 requires BIP 380 (Output Script Descriptors General Operation). Read it first to understand this proposal.

Which BIPs build on BIP 384?

1 other BIP references BIP 384: BIP 380 (Output Script Descriptors General Operation).

Where can I read the full BIP 384 specification?

The complete text of BIP 384 is on this page, taken unchanged from the official bitcoin/bips repository on GitHub. It is also available as Markdown and JSON.

BIPs that build on BIP 384

  • BIP 380: Output Script Descriptors General Operation: Deployed. Output script descriptors are a compact text language for describing exactly which addresses a wallet owns and how they are spent. This document defines their general syntax and checksum, giving…

Learn more

Guides

Related proposals