P2SH
P2SH, or Pay to Script Hash, is a type of Bitcoin transaction output that defers the details of the spending conditions to a separate script stored off the blockchain. It was introduced as part of a Bitcoin Improvement Proposal (BIP16) in 2012 to simplify and reduce the size of complex spending rules, such as multisignature requirements. In a P2SH output, the scriptPubKey contains a hash of a redeem script: OP_HASH160 <20-byte script hash> OP_EQUAL. The corresponding address is the Base58Check encoding of that script hash, and on mainnet these P2SH addresses typically begin with the digit 3.
When funds locked with a P2SH output are spent, the spending transaction must include, in its unlocking
Common use cases include multisignature wallets (such as 2-of-3 or 3-of-5 schemes), time-locked or condition-based spending,