A script is a small piece of code embedded in certain blockchain systems that defines the rules for verifying a transaction and unlocking funds. In cryptocurrencies like Bitcoin, “Script” is the built-in scripting language used to express spending conditions, such as proving ownership or meeting multi-party approval requirements.
How scripts work in blockchain transactions
In Bitcoin-style systems, funds are not “stored” in an account balance in the traditional sense. Instead, coins are locked to a set of conditions, and a script specifies what must be provided to spend them. A common pattern is that the previous transaction output includes a locking script that describes the conditions, and the new transaction provides an unlocking script that supplies the required data to satisfy those conditions. For example, a typical payment requires a valid digital signature that matches the public key hash associated with the funds, demonstrating the spender controls the corresponding private key.
Common uses and examples
Scripts enable practical features without requiring a full application to run on-chain. Multisignature wallets are a classic example, where a script can require signatures from multiple keys, such as 2-of-3 approvals for a treasury. Time-based conditions are another, where scripts can prevent spending until a certain block height or timestamp, supporting escrow-like arrangements or scheduled releases.
It is also helpful to distinguish Bitcoin Script from general-purpose smart contracts. Bitcoin Script is intentionally limited and focused on verification and spending rules, which reduces complexity and can improve security. Other blockchains may use more expressive programming environments for smart contracts, but the underlying idea is similar: code defines how value can move.
Scripts matter because they are a foundation for transaction security and flexibility, enabling self-enforcing rules for custody, payments, and coordination across the crypto ecosystem.