mirror of
https://github.com/bitcoin/bips.git
synced 2025-06-30 12:42:43 +00:00
Specify BIP 385: Raw and addr descriptors
This commit is contained in:
parent
f52f1e82e5
commit
5403ff90d6
@ -1085,6 +1085,13 @@ Those proposing changes should consider that ultimately consent may rest with th
|
|||||||
| Pieter Wuille, Andrew Chow
|
| Pieter Wuille, Andrew Chow
|
||||||
| Informational
|
| Informational
|
||||||
| Draft
|
| Draft
|
||||||
|
|-
|
||||||
|
| [[bip-0385.mediawiki|385]]
|
||||||
|
| Applications
|
||||||
|
| raw() and addr() 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! -->
|
<!-- IMPORTANT! See the instructions at the top of this page, do NOT JUST add BIPs here! -->
|
||||||
|
@ -261,4 +261,10 @@ This Table lists all available Script expressions and the BIPs specifying them.
|
|||||||
|-
|
|-
|
||||||
| <tt>combo(KEY)</tt>
|
| <tt>combo(KEY)</tt>
|
||||||
| [[bip-0384.mediawiki|384]]
|
| [[bip-0384.mediawiki|384]]
|
||||||
|
|-
|
||||||
|
| <tt>raw(HEX)</tt>
|
||||||
|
| [[bip-0385.mediawiki|385]]
|
||||||
|
|-
|
||||||
|
| <tt>addr(ADDR)</tt>
|
||||||
|
| [[bip-0385.mediawiki|385]]
|
||||||
|}
|
|}
|
||||||
|
57
bip-0385.mediawiki
Normal file
57
bip-0385.mediawiki
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<pre>
|
||||||
|
BIP: 385
|
||||||
|
Layer: Applications
|
||||||
|
Title: raw() and addr() 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-0385
|
||||||
|
Status: Draft
|
||||||
|
Type: Informational
|
||||||
|
Created: 2021-06-27
|
||||||
|
License: BSD-2-Clause
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
==Abstract==
|
||||||
|
|
||||||
|
This document specifies <tt>raw()</tt> and <tt>addr()</tt> output script descriptors.
|
||||||
|
<tt>raw()</tt> encapsulates a raw script as a descriptor.
|
||||||
|
<tt>addr()</tt> encapsulates an address as a descriptor.
|
||||||
|
|
||||||
|
==Copyright==
|
||||||
|
|
||||||
|
This BIP is licensed under the BSD 2-clause license.
|
||||||
|
|
||||||
|
==Motivation==
|
||||||
|
|
||||||
|
In order to make descriptors maximally compatible with scripts in use today, it is useful to be able to wrap any arbitrary output script or an address into a descriptor.
|
||||||
|
|
||||||
|
==Specification==
|
||||||
|
|
||||||
|
Two new script expressions are defined: <tt>raw()</tt> and <tt>addr()</tt>.
|
||||||
|
|
||||||
|
===<tt>raw()</tt>===
|
||||||
|
|
||||||
|
The <tt>raw(HEX)</tt> expression can only be used as a top level descriptor.
|
||||||
|
As the argument, it takes a hex string representing a Bitcoin script.
|
||||||
|
The output script produced by this descriptor is the script represented by <tt>HEX</tt>.
|
||||||
|
|
||||||
|
===<tt>addr()</tt>===
|
||||||
|
|
||||||
|
The <tt>addr(ADDR)</tt> expression can only be used as a top level descriptor.
|
||||||
|
It takes an address as its single argument.
|
||||||
|
The output script produced by this descriptor is the output script produced by the address <tt>ADDR</tt>.
|
||||||
|
|
||||||
|
==Test Vectors==
|
||||||
|
|
||||||
|
TBD
|
||||||
|
|
||||||
|
==Backwards Compatibility==
|
||||||
|
|
||||||
|
<tt>raw()</tt> and <tt>addr()</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.
|
||||||
|
The reuse of existing Bitcoin addresses allows for this to be more easily implemented.
|
||||||
|
|
||||||
|
==Reference Implemntation==
|
||||||
|
|
||||||
|
<tt>raw()</tt> and <tt>addr</tt> descriptors have been implemented in Bitcoin Core since version 0.17.
|
Loading…
x
Reference in New Issue
Block a user