From 5403ff90d69c82cb22b0a6f969f8c4ec601569b1 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Sun, 27 Jun 2021 18:49:44 -0400 Subject: Specify BIP 385: Raw and addr descriptors --- bip-0385.mediawiki | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 bip-0385.mediawiki (limited to 'bip-0385.mediawiki') diff --git a/bip-0385.mediawiki b/bip-0385.mediawiki new file mode 100644 index 0000000..2469eb0 --- /dev/null +++ b/bip-0385.mediawiki @@ -0,0 +1,57 @@ +
+  BIP: 385
+  Layer: Applications
+  Title: raw() and addr() Output Script Descriptors
+  Author: Pieter Wuille 
+          Andrew Chow 
+  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
+
+ +==Abstract== + +This document specifies raw() and addr() output script descriptors. +raw() encapsulates a raw script as a descriptor. +addr() 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: raw() and addr(). + +===raw()=== + +The raw(HEX) 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 HEX. + +===addr()=== + +The addr(ADDR) 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 ADDR. + +==Test Vectors== + +TBD + +==Backwards Compatibility== + +raw() and addr() 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== + +raw() and addr descriptors have been implemented in Bitcoin Core since version 0.17. -- cgit v1.2.3