Skip to content

Commit f52f1e8

Browse files
committed
Specify BIP 384: Combo descriptors
1 parent 608f40b commit f52f1e8

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

README.mediawiki

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,13 @@ Those proposing changes should consider that ultimately consent may rest with th
10781078
| Pieter Wuille, Andrew Chow
10791079
| Informational
10801080
| Draft
1081+
|-
1082+
| [[bip-0384.mediawiki|384]]
1083+
| Applications
1084+
| combo() Output Script Descriptors
1085+
| Pieter Wuille, Andrew Chow
1086+
| Informational
1087+
| Draft
10811088
|}
10821089

10831090
<!-- IMPORTANT! See the instructions at the top of this page, do NOT JUST add BIPs here! -->

bip-0380.mediawiki

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,4 +258,7 @@ This Table lists all available Script expressions and the BIPs specifying them.
258258
|-
259259
| <tt>sortedmulti(NUM, KEY, ..., KEY)</tt>
260260
| [[bip-0383.mediawiki|383]]
261+
|-
262+
| <tt>combo(KEY)</tt>
263+
| [[bip-0384.mediawiki|384]]
261264
|}

bip-0384.mediawiki

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<pre>
2+
BIP: 384
3+
Layer: Applications
4+
Title: combo() Output Script Descriptors
5+
Author: Pieter Wuille <[email protected]>
6+
Andrew Chow <[email protected]>
7+
Comments-Summary: No comments yet.
8+
Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0384
9+
Status: Draft
10+
Type: Informational
11+
Created: 2021-06-27
12+
License: BSD-2-Clause
13+
</pre>
14+
15+
==Abstract==
16+
17+
This document specifies <tt>combo()</tt> output script descriptors.
18+
These take a key and produce P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH output scripts if applicable to the key.
19+
20+
==Copyright==
21+
22+
This BIP is licensed under the BSD 2-clause license.
23+
24+
==Motivation==
25+
26+
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.
27+
28+
==Specification==
29+
30+
A new top level script expression is defined: <tt>combo(KEY)</tt>.
31+
This expression can only be used as a top level expression.
32+
It takes a single key expression as an argument and produces either 2 or 4 output scripts, depending on the key.
33+
A <tt>combo()</tt> expression always produces a P2PK and P2PKH script, the same as putting the key in both a <tt>pk()</tt> and a <tt>pkh()</tt> expression.
34+
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 <tt>wpkh()</tt> and <tt>sh(wpkh())</tt> expression.
35+
36+
==Test Vectors==
37+
38+
TBD
39+
40+
==Backwards Compatibility==
41+
42+
<tt>combo()</tt> descriptors use the format and general operation specified in [[bip-0380.mediawiki|380]].
43+
As this is a wholly new descriptor, it is not compatible with any implementation.
44+
However the scripts produced are standard scripts so existing software are likely to be familiar with them.
45+
46+
==Reference Implemntation==
47+
48+
<tt>combo</tt> descriptors have been implemented in Bitcoin Core since version 0.17.

0 commit comments

Comments
 (0)