mirror of
https://github.com/bitcoin/bips.git
synced 2025-03-04 11:08:05 +01:00
Specify BIP 384: Combo descriptors
This commit is contained in:
parent
608f40b498
commit
f52f1e82e5
3 changed files with 58 additions and 0 deletions
|
@ -1078,6 +1078,13 @@ Those proposing changes should consider that ultimately consent may rest with th
|
|||
| Pieter Wuille, Andrew Chow
|
||||
| Informational
|
||||
| Draft
|
||||
|-
|
||||
| [[bip-0384.mediawiki|384]]
|
||||
| Applications
|
||||
| combo() Output Script Descriptors
|
||||
| Pieter Wuille, Andrew Chow
|
||||
| Informational
|
||||
| Draft
|
||||
|}
|
||||
|
||||
<!-- IMPORTANT! See the instructions at the top of this page, do NOT JUST add BIPs here! -->
|
||||
|
|
|
@ -258,4 +258,7 @@ This Table lists all available Script expressions and the BIPs specifying them.
|
|||
|-
|
||||
| <tt>sortedmulti(NUM, KEY, ..., KEY)</tt>
|
||||
| [[bip-0383.mediawiki|383]]
|
||||
|-
|
||||
| <tt>combo(KEY)</tt>
|
||||
| [[bip-0384.mediawiki|384]]
|
||||
|}
|
||||
|
|
48
bip-0384.mediawiki
Normal file
48
bip-0384.mediawiki
Normal file
|
@ -0,0 +1,48 @@
|
|||
<pre>
|
||||
BIP: 384
|
||||
Layer: Applications
|
||||
Title: combo() Output Script Descriptors
|
||||
Author: Pieter Wuille <pieter@wuille.net>
|
||||
Andrew Chow <andrew@achow101.com>
|
||||
Comments-Summary: No comments yet.
|
||||
Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0384
|
||||
Status: Draft
|
||||
Type: Informational
|
||||
Created: 2021-06-27
|
||||
License: BSD-2-Clause
|
||||
</pre>
|
||||
|
||||
==Abstract==
|
||||
|
||||
This document specifies <tt>combo()</tt> output script descriptors.
|
||||
These take a key and produce P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH output scripts if applicable to the key.
|
||||
|
||||
==Copyright==
|
||||
|
||||
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: <tt>combo(KEY)</tt>.
|
||||
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 <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.
|
||||
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.
|
||||
|
||||
==Test Vectors==
|
||||
|
||||
TBD
|
||||
|
||||
==Backwards Compatibility==
|
||||
|
||||
<tt>combo()</tt> descriptors use the format and general operation specified in [[bip-0380.mediawiki|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 Implemntation==
|
||||
|
||||
<tt>combo</tt> descriptors have been implemented in Bitcoin Core since version 0.17.
|
Loading…
Add table
Reference in a new issue