What Is the Role of “scriptPubKey” in the UTXO Model?
The scriptPubKey, also known as the locking script, is a piece of code attached to a UTXO (output) that sets the conditions for its spending. It defines the required inputs, such as a specific public key and a valid signature, that must be provided in the unlocking script (scriptSig) of a future transaction to spend that UTXO.
Essentially, it dictates who can spend the funds and how.