BIP Proposals for Output Script Descriptors



Summary:

Andrew Chow has submitted a pull request for review on his BIPs fork, which formalizes the Output Script Descriptors available in Bitcoin Core into BIPs. He has split it into seven BIPs, where the first one is informational and the following six specify the actual descriptors themselves.The general operation of Output Script Descriptors introduces a generic solution to issues with traditional wallet backups. Output Script Descriptors introduce a solution to these issues by specifying script types explicitly through the use of Script Expressions and key derivation paths explicitly in Key Expressions.The document specifies wpkh() and wsh() output script descriptors for P2WPKH and P2WSH respectively. These expressions allow specifying those formats as a descriptor. The Non-Segwit Output Script Descriptors BIP outlines three new script expressions: pk(), pkh(), and sh(). It also specifies the tr() output script descriptors, which take a key and optionally a tree of scripts and produce a P2TR output script. The Tree Expression represents a tree of scripts.The multi-sig output script descriptors are discussed in the MultiSig Output Script Descriptors BIP, which outlines a new script expression called multi(), producing a multisig output script. This document describes the multi() and sortedmulti() output script descriptors, which allow for specifying multisig scripts using a threshold and one or more public keys. The combo() output script descriptors take a key and produce P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH output scripts if applicable to the key. The raw() and addr() output script descriptors allow for wrapping any arbitrary output script or an address into a descriptor, respectively.Jeremy Rubin commented on the PR, suggesting that Andrew open up some WIP PRs to collect feedback. Bitcoin Core has implemented pk(), pkh(), sh(), and tr() descriptors since version 0.17 and version 22.0. The BIPs have been licensed under BSD-2-Clause. The documents state that there are no comments yet, and the test vectors are still to be determined. While they are not compatible with any existing implementation, the scripts produced are standard scripts so existing software is likely to be familiar with them.


Updated on: 2023-05-21T03:00:57.023407+00:00