BIP: 371
Layer: Applications
Title: Taproot Fields for PSBT
Author: Andrew Chow
Comments-Summary: No comments yet.
Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0371
Status: Draft
Type: Standards Track
Created: 2021-06-21
License: BSD-2-Clause
==Introduction==
===Abstract===
This document proposes additional fields for BIP 174 PSBTv0 and BIP 370 PSBTv2 that allow for
BIP 340/341/342 Taproot data to be included in a PSBT of any version. These will be fields for
signatures and scripts that are relevant to the creation of Taproot inputs.
===Copyright===
This BIP is licensed under the 2-clause BSD license.
===Motivation===
BIPs 340, 341, and 342 specify Taproot which provides a wholly new way to create and spend Bitcoin outputs.
The existing PSBT fields are unable to support Taproot due to the new signature algorithm and the method
by which scripts are embedded inside of a Taproot output. Therefore new fields must be defined to allow
PSBTs to carry the information necessary for signing Taproot inputs.
==Specification==
The new per-input types are defined as follows:
{|
! Name
!
!
! Description
!
! Description
! Versions Requiring Inclusion
! Versions Requiring Exclusion
! Versions Allowing Inclusion
|-
| Taproot Key Spend Signature
| PSBT_IN_TAP_KEY_SIG = 0x13
| None
| No key data ['''Why is there no key data for PSBT_IN_TAP_KEY_SIG'''The signature in a key path spend corresponds directly with the pubkey provided in the output script. Thus it is not necessary to provide any metadata that attaches the key path spend signature to a particular pubkey.]
|
| The 64 or 65 byte Schnorr signature for key path spending a Taproot output. Finalizers should remove this field after PSBT_IN_FINAL_SCRIPTWITNESS is constructed.
|
|
| 0, 2
|-
| Taproot Script Spend Signature
| PSBT_IN_TAP_SCRIPT_SIG = 0x14
|
| A 32 byte X-only public key involved in a leaf script concatenated with the 32 byte hash of the leaf it is part of.
|
| The 64 or 65 byte Schnorr signature for this pubkey and leaf combination. Finalizers should remove this field after PSBT_IN_FINAL_SCRIPTWITNESS is constructed.
|
|
| 0, 2
|-
| Taproot Leaf Script
| PSBT_IN_TAP_LEAF_SCRIPT = 0x15
|
| The control block for this leaf as specified in BIP 341. The control block contains the merkle tree path to this leaf.
|