Taproot Fields for PSBT



Summary:

A developer named Sjors is confused about why PSBT_IN_TAP_BIP32_DERIVATION and PSBT_OUT_TAP_BIP32_DERIVATION contain not only the derivation path for the xonlypubkey but also the tapleaf merkle path. He thought that it might be necessary for a signer to guess which script leaves they can sign with their own keys, but realized that you cannot know that without actually seeing the script. Andrew Chow proposed a BIP that defines new fields for Taproot support in PSBT. The details of the proposal can be found on GitHub at https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki. The proposal includes Taproot Key BIP 32 Derivation Path for both PSBT_IN_TAP_BIP32_DERIVATION and PSBT_OUT_TAP_BIP32_DERIVATION with a 32 byte X-only public key. These fields include a compact size unsigned integer representing the number of leaf hashes followed by a list of leaf hashes, followed by the master key fingerprint concatenated with the derivation path of the public key. Public keys are those needed to spend this output. The leaf hashes are of the leaves which involve this public key.


Updated on: 2023-06-14T23:25:35.220141+00:00