Bitcoin Script
The stack-based spending-condition language used by Bitcoin-family transaction outputs.
- Also known as
- Script
Bitcoin Script is a stack-based language used to define and satisfy transaction-output spending conditions. A validating node evaluates the relevant bytecode and data when a later transaction attempts to spend that output.
Script operations can check signatures and hashes, compare data, perform arithmetic, branch, and enforce time-based or transaction-based conditions. The available operations and limits depend on the specific network and protocol version.
Bitcoin Script is intentionally unlike a general application runtime: execution is deterministic, bounded by validation rules, and attached to UTXO spends rather than a persistent process. Higher-level tools can compile to Script, but generated bytecode still needs review and testing.
Related terms
Explore connected entries beyond the alphabetical index.
Opcode
→An encoded instruction interpreted by a virtual machine or transaction script engine.
Redeem Script
→The script that defines spending conditions for a P2SH output; revealed and executed when the coins are spent.
Smart Contract
→Blockchain-enforced program or script logic that controls how assets or state may change.
CashVM
→An ecosystem name for the stack-based virtual machine that evaluates Bitcoin Cash spending bytecode.