Script Types

Documentation for Script Types

Overview

Script types determine the behavior of the transaction's scriptPubKey and scriptSig.

Available Script Types

P2PK (Pay-to-Public-Key)

P2PK is the simplest script type, which pays to a public key. It is used to send bitcoins directly to a public key.

P2PKH (Pay-to-Public-Key-Hash)

P2PKH is the most common script type, which pays to a public key hash. It is used to send bitcoins to a hashed public key.

P2SH (Pay-to-Script-Hash)

P2SH is a script type that pays to a hashed script. It is used to send bitcoins to a script.

P2WSH (Pay-to-Witness-Script-Hash)

P2WSH is a script type that pays to a hashed witness script. It is used to send bitcoins to a witness script.

P2WPKH (Pay-to-Witness-Public-Key-Hash)

P2WPKH is a script type that pays to a hashed witness public key. It is used to send bitcoins to a witness public key.

P2TR (Pay-to-Taproot)

P2TR is a script type that pays to a taproot output. It is used to send bitcoins to a taproot output.

Last updated: 2025-06-02