P2SH32 and Pay to Script
Since May 2023, P2SH32 locks to the double-SHA-256 hash of a redeem script and has a corresponding 32-byte CashAddr payload. The spending input supplies the serialized redeem script. Since May 2026, Pay to Script policy allows arbitrary bare locking bytecode up to 201 bytes. A bare script is visible in the output itself. The same upgrade raised the standard unlocking bytecode limit from 1,650 to 10,000 bytes. P2SH remains supported. Data-carrier outputs have a separate aggregate budget, and bare multisig has additional standardness rules. P2SH32 · Pay to Script
An unlocking script is a Script that is used to prove that a transaction is permitted to spend a given UTXO. This is accomplished by first executing the unlocking script and then executing the locking script for the UTXO referenced by the transaction input. If this execution triggers no failures and leaves a single non-zero (TRUE) value on the stack, the UTXO has been successfully unlocked. One way to look at this is that the unlocking script provides an initial state that acts as an inverse to the previously published locking script.
For more information about how script execution works, see Script. For information on how signatures (which typically go in the unlocking script) are generated, see Transaction Signatures.