Types of transaction script
Bitcoin currently creates two different basic scriptSig/scriptPubKey pairs. There are complex transaction scripts that are used rarely in Bitcoin transactions. Pay-to-PubKeyHash (P2PKH) and Pay-to-Script-Hash (P2SH) are the most popular scripts. The majority of the scripts executed in the Bitcoin network use P2PKH as their transaction script.
P2PKH
Bitcoin transactions create an output transaction with a public key hash called P2PKH. The public key hash denotes the Bitcoin public address of the corresponding private key that a user holds. The user creates a locking script with the recipient's public address. No-one other than the holder of the corresponding private key will be able to claim the transaction output. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access