Description: P2SH, which stands for ‘Pay to Script Hash’, is a type of address in the Bitcoin network that allows for the creation of more complex transaction scripts. Unlike standard Bitcoin addresses, which are typically associated with a single public key, P2SH addresses enable users to send funds to a script that may require multiple signatures or meet specific conditions before the funds can be spent. This is achieved by using a hash of the script, meaning the full script is not revealed until an attempt is made to spend the Bitcoin. This feature provides greater flexibility and security, allowing for the implementation of mechanisms such as multisig (multiple signatures) and other types of conditional spending. P2SH addresses start with the number ‘3’, distinguishing them from P2PKH (Pay to Public Key Hash) addresses, which start with ‘1’. In summary, P2SH is a powerful tool in the Bitcoin ecosystem that allows users to create more sophisticated and secure transactions, adapting to various needs and use cases.
History: P2SH was introduced in 2012 as part of Bitcoin Core version 0.6.0. The implementation of P2SH was driven by the need to enhance transaction functionality in Bitcoin, allowing users to create more complex scripts without revealing their content until needed. This advancement was significant for the development of more advanced applications on the Bitcoin network, such as multisig transactions, which require approval from multiple parties before Bitcoin can be spent.
Uses: P2SH is primarily used to implement multisig transactions, where multiple parties must sign a transaction before Bitcoin can be spent. It can also be used to create simple smart contracts, where specific conditions must be met for funds to be released. This allows users to establish more complex and secure agreements on the Bitcoin network.
Examples: A practical example of P2SH is a multisig address that requires at least three out of five signers to approve a transaction before Bitcoin can be spent. Another example is a contract that releases funds only if certain conditions are met, such as the verification of an external event.