P2TR-KP

(pay to taproot - keypath)

A Pay-to-TapRoot - KeyPath script is a P2TR output scriptPubKey that was unlocked with the keypath. P2TR outputs have both a straight-forward keypath unlockable with a Schnorr Signature & a tree of scripts (called scriptpath) that require much more data to unlock. Below is an example of the former.

OP_Code(s) Review

P2TR - KeyPath requires only two (2) pieces of data & four (4) op_codes as P2PKH. However, as we see in the first step below, the initial formatting for the ScriptPubKey is different.

# WitnessScript

<OP_64>

[schnorr-signature]

# PubKeyScript

<OP_PUSHDATA>

[taproot-output]

Step 1

Deserialize the locking script to get the taproot key