Home › Tools › Bitcoin Script opcodes

Bitcoin Script opcodes list

A searchable reference of every Bitcoin Script opcode: its hex and decimal value, what it does on the stack, whether it's active, disabled or reserved, and the BIPs that introduced or changed it, including the tapscript rules from BIP 342.

Updated · 5 min read

Free, and runs entirely in your browser: nothing you type is sent anywhere.

All opcodes

OpcodeHexGroupDescriptionStateBIPs
OP_0 (OP_FALSE)0x00ConstantsPushes an empty byte array, which counts as zero and false. Also the witness version of SegWit v0 outputs: OP_0 <20 or 32 bytes> (BIP 141).active
OP_PUSHBYTES_1-OP_PUSHBYTES_750x01-0x4bConstantsThe opcode is itself a length: the next 1 to 75 bytes are pushed onto the stack as one item. Bitcoin Core has no names for these; explorers often show them as OP_PUSHBYTES_N.active
OP_PUSHDATA10x4cConstantsThe next byte gives the number of bytes to push (0 to 255). The shortest way to push 76 to 255 bytes.active
OP_PUSHDATA20x4dConstantsThe next two bytes (little-endian) give the number of bytes to push. Stack items are limited to 520 bytes.active
OP_PUSHDATA40x4eConstantsThe next four bytes (little-endian) give the number of bytes to push. Rarely useful, because stack items are limited to 520 bytes.active
OP_1NEGATE0x4fConstantsPushes the number -1 onto the stack.active
OP_RESERVED0x50ReservedFails the script if executed; harmless in a branch that isn't executed. In tapscript it is OP_SUCCESS80 (BIP 342).reservedBIP 342
OP_1 (OP_TRUE)0x51ConstantsPushes the number 1 (true). Also the witness version of Taproot outputs: OP_1 <32 bytes> (BIP 341).active
OP_2-OP_160x52-0x60ConstantsPush the numbers 2 to 16 (OP_N is 0x50 + N). Used in multisig scripts (OP_2 <key1> <key2> <key3> OP_3 OP_CHECKMULTISIG) and as SegWit versions 2 to 16, which BIP 141 keeps free for future upgrades.active
OP_NOP0x61Flow controlDoes nothing.active
OP_VER0x62ReservedFails the script if executed; harmless in a branch that isn't executed. In tapscript it is OP_SUCCESS98 (BIP 342).reservedBIP 342
OP_IF0x63Flow controlPops the top item and runs the following statements only if it is true. In tapscript the item must be exactly empty or 0x01 (the MINIMALIF rule, BIP 342).activeBIP 342
OP_NOTIF0x64Flow controlPops the top item and runs the following statements only if it is false. Same MINIMALIF rule as OP_IF in tapscript.activeBIP 342
OP_VERIF0x65ReservedFails the script whenever it appears, even in a branch that isn't executed, because if/else opcodes are always evaluated. Not an OP_SUCCESS in tapscript.reserved
OP_VERNOTIF0x66ReservedLike OP_VERIF: fails the script whenever it appears, even in a branch that isn't executed.reserved
OP_ELSE0x67Flow controlRuns the following statements only if the statements after the matching OP_IF, OP_NOTIF or previous OP_ELSE were not run.active
OP_ENDIF0x68Flow controlEnds an if/else block. A script with an unbalanced OP_IF or OP_ENDIF fails.active
OP_VERIFY0x69Flow controlFails the script unless the top item is true; if it is, the item is removed. Opcodes ending in VERIFY combine a check with this step.active
OP_RETURN0x6aFlow controlEnds the script with failure. An output whose script starts with OP_RETURN can never be spent, so it is used to embed small pieces of data, and Bitcoin Core leaves such outputs out of the UTXO set.active
OP_TOALTSTACK0x6bStackMoves the top item to the alternate stack (the altstack).active
OP_FROMALTSTACK0x6cStackMoves the top item of the altstack back to the main stack.active
OP_2DROP0x6dStackRemoves the top two items.active
OP_2DUP0x6eStackDuplicates the top two items: x1 x2 becomes x1 x2 x1 x2.active
OP_3DUP0x6fStackDuplicates the top three items.active
OP_2OVER0x70StackCopies the pair of items two places down to the top: x1 x2 x3 x4 becomes x1 x2 x3 x4 x1 x2.active
OP_2ROT0x71StackMoves the fifth and sixth items to the top: x1 x2 x3 x4 x5 x6 becomes x3 x4 x5 x6 x1 x2.active
OP_2SWAP0x72StackSwaps the top two pairs of items: x1 x2 x3 x4 becomes x3 x4 x1 x2.active
OP_IFDUP0x73StackDuplicates the top item if it is not zero.active
OP_DEPTH0x74StackPushes the number of items on the stack.active
OP_DROP0x75StackRemoves the top item. Often follows OP_CHECKLOCKTIMEVERIFY and OP_CHECKSEQUENCEVERIFY, which leave their argument on the stack.active
OP_DUP0x76StackDuplicates the top item. The first opcode of every P2PKH output script.active
OP_NIP0x77StackRemoves the second item from the top: x1 x2 becomes x2.active
OP_OVER0x78StackCopies the second item to the top: x1 x2 becomes x1 x2 x1.active
OP_PICK0x79StackPops a number n, then copies the item n places down to the top.active
OP_ROLL0x7aStackPops a number n, then moves the item n places down to the top.active
OP_ROT0x7bStackRotates the top three items to the left: x1 x2 x3 becomes x2 x3 x1.active
OP_SWAP0x7cStackSwaps the top two items.active
OP_TUCK0x7dStackCopies the top item below the second one: x1 x2 becomes x2 x1 x2.active
OP_CAT0x7eSpliceConcatenates the top two items. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. BIP 347 proposes re-enabling it in tapscript by redefining OP_SUCCESS126, the same opcode value.disabledBIP 347, BIP 342
OP_SUBSTR0x7fSpliceReturns a section of a byte string. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS127 (BIP 342).disabledBIP 342
OP_LEFT0x80SpliceKeeps only the bytes to the left of a given point. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS128 (BIP 342).disabledBIP 342
OP_RIGHT0x81SpliceKeeps only the bytes to the right of a given point. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS129 (BIP 342).disabledBIP 342
OP_SIZE0x82SplicePushes the length in bytes of the top item, leaving the item in place.active
OP_INVERT0x83Bitwise logicFlips every bit of the top item. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS131 (BIP 342).disabledBIP 342
OP_AND0x84Bitwise logicBitwise AND of the top two items. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS132 (BIP 342).disabledBIP 342
OP_OR0x85Bitwise logicBitwise OR of the top two items. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS133 (BIP 342).disabledBIP 342
OP_XOR0x86Bitwise logicBitwise exclusive OR of the top two items. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS134 (BIP 342).disabledBIP 342
OP_EQUAL0x87Bitwise logicPops two items and pushes 1 if they are byte-for-byte equal, otherwise an empty array (false). Ends every P2SH output script.active
OP_EQUALVERIFY0x88Bitwise logicOP_EQUAL followed by OP_VERIFY: fails the script unless the two items are equal. Checks the key hash in P2PKH scripts.active
OP_RESERVED10x89ReservedFails the script if executed. In tapscript it is OP_SUCCESS137 (BIP 342).reservedBIP 342
OP_RESERVED20x8aReservedFails the script if executed. In tapscript it is OP_SUCCESS138 (BIP 342).reservedBIP 342
OP_1ADD0x8bArithmeticAdds 1 to the top number. Arithmetic inputs are limited to 4-byte signed integers.active
OP_1SUB0x8cArithmeticSubtracts 1 from the top number.active
OP_2MUL0x8dArithmeticMultiplies the top number by 2. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS141 (BIP 342).disabledBIP 342
OP_2DIV0x8eArithmeticDivides the top number by 2. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS142 (BIP 342).disabledBIP 342
OP_NEGATE0x8fArithmeticFlips the sign of the top number.active
OP_ABS0x90ArithmeticReplaces the top number with its absolute value.active
OP_NOT0x91ArithmeticPushes 1 if the top number is 0, otherwise 0.active
OP_0NOTEQUAL0x92ArithmeticPushes 0 if the top number is 0, otherwise 1.active
OP_ADD0x93ArithmeticPops a and b and pushes a + b.active
OP_SUB0x94ArithmeticPops a and b (b on top) and pushes a - b.active
OP_MUL0x95ArithmeticMultiplies two numbers. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS149 (BIP 342).disabledBIP 342
OP_DIV0x96ArithmeticDivides one number by another. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS150 (BIP 342).disabledBIP 342
OP_MOD0x97ArithmeticReturns the remainder of a division. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS151 (BIP 342).disabledBIP 342
OP_LSHIFT0x98ArithmeticShifts a number left by a number of bits. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS152 (BIP 342).disabledBIP 342
OP_RSHIFT0x99ArithmeticShifts a number right by a number of bits. Disabled since 2010: a script that contains it fails, even in a branch that isn't executed. In tapscript it is OP_SUCCESS153 (BIP 342).disabledBIP 342
OP_BOOLAND0x9aArithmeticPushes 1 if both of the top two numbers are non-zero, otherwise 0.active
OP_BOOLOR0x9bArithmeticPushes 1 if either of the top two numbers is non-zero, otherwise 0.active
OP_NUMEQUAL0x9cArithmeticPushes 1 if the top two numbers are equal, otherwise 0. Tapscript k-of-n multisig scripts end with k OP_NUMEQUAL.active
OP_NUMEQUALVERIFY0x9dArithmeticOP_NUMEQUAL followed by OP_VERIFY.active
OP_NUMNOTEQUAL0x9eArithmeticPushes 1 if the top two numbers are not equal, otherwise 0.active
OP_LESSTHAN0x9fArithmeticPops a and b (b on top) and pushes 1 if a < b, otherwise 0.active
OP_GREATERTHAN0xa0ArithmeticPops a and b and pushes 1 if a > b, otherwise 0.active
OP_LESSTHANOREQUAL0xa1ArithmeticPops a and b and pushes 1 if a ≤ b, otherwise 0.active
OP_GREATERTHANOREQUAL0xa2ArithmeticPops a and b and pushes 1 if a ≥ b, otherwise 0.active
OP_MIN0xa3ArithmeticPushes the smaller of the top two numbers.active
OP_MAX0xa4ArithmeticPushes the larger of the top two numbers.active
OP_WITHIN0xa5ArithmeticPops x, min and max and pushes 1 if min ≤ x < max, otherwise 0.active
OP_RIPEMD1600xa6CryptoReplaces the top item with its RIPEMD-160 hash (20 bytes).active
OP_SHA10xa7CryptoReplaces the top item with its SHA-1 hash (20 bytes).active
OP_SHA2560xa8CryptoReplaces the top item with its SHA-256 hash (32 bytes). Used for hash locks, where spending requires revealing a secret preimage.active
OP_HASH1600xa9CryptoReplaces the top item with RIPEMD-160(SHA-256(x)), 20 bytes. Used by P2PKH and P2SH output scripts.active
OP_HASH2560xaaCryptoReplaces the top item with SHA-256(SHA-256(x)), 32 bytes.active
OP_CODESEPARATOR0xabCryptoChanges what later signature checks commit to: in legacy and SegWit v0 scripts, only the script after the last executed OP_CODESEPARATOR is signed; in tapscript, its position is included in the signature message (BIP 342).activeBIP 143, BIP 342
OP_CHECKSIG0xacCryptoPops a public key and a signature and pushes 1 if the signature is valid for this transaction, or false if the signature is empty. ECDSA in legacy and SegWit v0 scripts; Schnorr (BIP 340) in tapscript, where any other invalid signature fails the script (BIP 342).activeBIP 66, BIP 143, BIP 340, BIP 342
OP_CHECKSIGVERIFY0xadCryptoOP_CHECKSIG followed by OP_VERIFY: fails the script unless the signature is valid.activeBIP 66, BIP 143, BIP 342
OP_CHECKMULTISIG0xaeCryptoChecks m signatures against n public keys (at most 20 keys). An old bug makes it pop one extra item, which must be empty (BIP 147). Disabled in tapscript (BIP 342), where OP_CHECKSIGADD replaces it.activeBIP 66, BIP 147, BIP 342
OP_CHECKMULTISIGVERIFY0xafCryptoOP_CHECKMULTISIG followed by OP_VERIFY. Also disabled in tapscript (BIP 342).activeBIP 147, BIP 342
OP_NOP10xb0ReservedDoes nothing; kept for soft-fork upgrades, and scripts that use it are non-standard. BIP 12 (OP_EVAL) proposed redefining it.nopBIP 12
OP_CHECKLOCKTIMEVERIFY (OP_CLTV, OP_NOP2)0xb1LocktimeFails unless the transaction's nLockTime has reached the value on top of the stack (a block height or a time), so the output can't be spent before then. Redefined OP_NOP2 in a soft fork (BIP 65); leaves its argument on the stack.activeBIP 65
OP_CHECKSEQUENCEVERIFY (OP_CSV, OP_NOP3)0xb2LocktimeFails unless the input's relative lock-time (its nSequence, BIP 68) is at least the value on top of the stack, so the output must age a number of blocks or a period of time first. Redefined OP_NOP3 (BIP 112); leaves its argument on the stack.activeBIP 112, BIP 68
OP_NOP40xb3ReservedDoes nothing today. BIP 119 proposes redefining it as OP_CHECKTEMPLATEVERIFY (CTV), and BIP 116 proposed it for MERKLEBRANCHVERIFY.nopBIP 119, BIP 116
OP_NOP5-OP_NOP100xb4-0xb9ReservedDo nothing; kept so a soft fork can redefine them, as BIP 65 and BIP 112 did with OP_NOP2 and OP_NOP3. Scripts that use them are non-standard.nop
OP_CHECKSIGADD0xbaTapscriptTapscript only: pops a public key, a number n and a signature, and pushes n + 1 if the signature is valid or n if it is empty. Replaces OP_CHECKMULTISIG: <key1> OP_CHECKSIG <key2> OP_CHECKSIGADD <key3> OP_CHECKSIGADD 2 OP_NUMEQUAL is a 2-of-3.activeBIP 342
OP_SUCCESSx0xbb-0xfeTapscriptIn tapscript, opcodes 80, 98, 126-129, 131-134, 137-138, 141-142, 149-153 and 187-254 (decimal) are renamed OP_SUCCESS80 to OP_SUCCESS254: their mere presence makes the script succeed, so a soft fork can give any of them new rules (BIP 342). Outside tapscript, 0xbb-0xfe are unassigned and fail if executed.reservedBIP 342, BIP 347, BIP 348, BIP 349, BIP 442, BIP 443, BIP 446
OP_INVALIDOPCODE0xffReservedNot a real opcode: the name Bitcoin Core uses for byte 0xff. The script fails if it is executed, in tapscript too.reserved

What is Bitcoin Script?

Bitcoin Script is the small programming language that decides who can spend each coin. Every transaction output carries a locking script (the scriptPubKey). To spend it, a transaction supplies unlocking data, in the scriptSig or, since SegWit, in the witness. Every node runs the two together, and the spend is valid only if the script finishes without failing and leaves true on the stack.

A script is a list of opcodes, each one byte, and data pushes. There are no loops and no jumps backwards, so every script runs in a predictable, bounded time. Most outputs use a few standard templates (the address checker shows the script behind any address), but the same opcodes also build multisig, timelocks and Lightning channels.

How opcodes execute on the stack

Script is stack-based: values are piled up, and each opcode takes its inputs from the top of the pile and puts its result back.

  • Push opcodes put data on the stack. Bytes 0x01 to 0x4b push that many following bytes; OP_PUSHDATA1, 2 and 4 handle longer data; OP_0 and OP_1 to OP_16 push small numbers.
  • Operations pop values and push results. OP_ADD pops two numbers and pushes their sum; OP_EQUAL pops two items and pushes 1 or false.
  • VERIFY variants, such as OP_EQUALVERIFY, fail the script at once unless the result is true, instead of pushing it.
  • OP_IF, OP_NOTIF, OP_ELSE and OP_ENDIF choose which statements run.

Numbers used in arithmetic are limited to 4 bytes. Stack items are limited to 520 bytes and the stack to 1,000 items. Legacy and SegWit v0 scripts are also limited to 10,000 bytes and 201 non-push opcodes; tapscript (BIP 342) drops those two limits and budgets signature checks by witness size instead.

A worked example: P2PKH step by step

A P2PKH output (an address starting with 1) locks coins with OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG, 25 bytes in hex: 76 a9 14 <20 bytes> 88 ac. The spender provides <sig> <pubKey>. Run together (top of the stack on the right):

Step Item Stack afterwards
1 <sig> sig
2 <pubKey> sig pubKey
3 OP_DUP sig pubKey pubKey
4 OP_HASH160 sig pubKey hash
5 <pubKeyHash> sig pubKey hash pubKeyHash
6 OP_EQUALVERIFY sig pubKey (fails here if the hashes differ)
7 OP_CHECKSIG 1 (true if the signature is valid)

The spender proved they have the public key that hashes to the one in the output, and a signature for this transaction made with its private key.

Disabled opcodes: OP_CAT and the 2010 cleanup

Early Bitcoin had more opcodes. In 2010 a single change disabled OP_CAT and others for splicing, bitwise logic and arithmetic, after worries that scripts could use huge amounts of memory or time (BIP 441 ties this to CVE-2010-5137). Fifteen remain disabled: OP_CAT, OP_SUBSTR, OP_LEFT, OP_RIGHT, OP_INVERT, OP_AND, OP_OR, OP_XOR, OP_2MUL, OP_2DIV, OP_MUL, OP_DIV, OP_MOD, OP_LSHIFT and OP_RSHIFT.

Disabled is stricter than reserved. A script that merely contains a disabled opcode fails, even in a branch that never runs. Reserved opcodes such as OP_RESERVED and OP_VER only fail when executed, except OP_VERIF and OP_VERNOTIF, which fail wherever they appear. In tapscript, OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY are disabled too; OP_CHECKSIGADD replaces them with a form that allows batch verification of signatures.

How soft forks add new opcodes

A new opcode must not make any previously invalid transaction valid, or it would be a hard fork. Bitcoin has two ways to add one as a soft fork.

Redefining OP_NOPs

OP_NOP1 and OP_NOP4 to OP_NOP10 do nothing, and nodes treat scripts using them as non-standard. A soft fork can give one a check that either fails the script or does nothing. That is how OP_CHECKLOCKTIMEVERIFY (Peter Todd's BIP 65, active from block 388,381 in December 2015) replaced OP_NOP2, and OP_CHECKSEQUENCEVERIFY (BIP 112, block 419,328 in July 2016) replaced OP_NOP3. Because a NOP can't change the stack, both leave their argument in place, which is why scripts follow them with OP_DROP.

OP_SUCCESSx in tapscript

BIP 342, by Pieter Wuille, Jonas Nick and Anthony Towns, activated with Taproot at block 709,632 (14 November 2021). It renamed 87 unused, reserved or disabled opcode values to OP_SUCCESSx: a tapscript that contains one succeeds unconditionally. A later soft fork can give any of them real rules, and unlike a NOP upgrade the new opcode may push results onto the stack. Tapscript can also be extended with new leaf versions and new public key types.

Opcode proposals

Several BIPs propose new opcodes, many aimed at covenants, which restrict how coins can be spent next. Each would need a soft fork to take effect.

Opcode Would redefine BIP Authors
OP_CHECKTEMPLATEVERIFY OP_NOP4 (0xb3) BIP 119 Jeremy Rubin
OP_CAT OP_SUCCESS126 (0x7e) BIP 347 Ethan Heilman, Armin Sabouri
OP_CHECKSIGFROMSTACK OP_SUCCESS204 (0xcc) BIP 348 Brandon Black, Jeremy Rubin
OP_INTERNALKEY OP_SUCCESS203 (0xcb) BIP 349 Brandon Black, Jeremy Rubin
OP_TXHASH OP_SUCCESS189 (0xbd) BIP 346 Steven Roose, Brandon Black
OP_CHECKCONTRACTVERIFY OP_SUCCESS187 (0xbb) BIP 443 Salvatore Ingala
OP_PAIRCOMMIT OP_SUCCESS205 (0xcd) BIP 442 moonsettler, Brandon Black
OP_TEMPLATEHASH OP_SUCCESS206 (0xce) BIP 446 Gregory Sanders, Antoine Poinsot, Steven Roose

BIP 441 takes another route: a new tapscript leaf version (0xc2) that restores the disabled opcodes, limited by the "varops" cost budget of BIP 440. The covenants guide and the BIP 119 vs BIP 347 comparison explain the trade-offs.

Frequently asked questions

What is an opcode in Bitcoin?

An opcode is a one-byte instruction in Bitcoin Script, the language that locks every coin. Each opcode works on a stack of values: OP_DUP copies the top item, OP_HASH160 hashes it, OP_CHECKSIG checks a signature. A transaction can spend an output only if running its script, with the data the spender supplies, ends without failing and leaves true on the stack.

How many opcodes does Bitcoin Script have?

An opcode is one byte, so there are 256 possible values. Values 0x00 to 0xba (187 of them) have a meaning, and 75 of those (0x01 to 0x4b) simply push that many bytes of data. Fifteen are disabled, a handful are reserved or upgrade NOPs, and 0xbb to 0xff are unassigned. In tapscript, 87 values are OP_SUCCESSx upgrade hooks.

What does OP_RETURN do?

OP_RETURN (0x6a) ends the script with failure. An output whose script starts with OP_RETURN can therefore never be spent, which makes it a place to embed a small amount of data in a transaction, such as a commitment or a protocol marker. Bitcoin Core leaves these provably unspendable outputs out of the UTXO set.

What is OP_CHECKSIG?

OP_CHECKSIG (0xac) pops a public key and a signature and pushes true if the signature is valid for the spending transaction. In legacy and SegWit v0 scripts it checks an ECDSA signature; in tapscript (BIP 342) it checks a Schnorr signature (BIP 340). It ends every P2PKH script, and OP_CHECKSIGVERIFY is the version that fails the script instead of pushing false.

Why was OP_CAT disabled?

OP_CAT, which joins two stack items, was disabled in 2010 together with other splice, bitwise and arithmetic opcodes, over concerns that scripts could use excessive memory or computation. BIP 347 notes that repeating OP_DUP OP_CAT could double an item's size each time. It proposes re-enabling OP_CAT in tapscript only, where the 520-byte limit on stack items bounds that growth.

Which opcodes did Taproot add or change?

Tapscript (BIP 342) added OP_CHECKSIGADD (0xba) for multisig, disabled OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY, switched OP_CHECKSIG and OP_CHECKSIGVERIFY to Schnorr signatures, and turned 87 unused opcode values into OP_SUCCESSx, so future soft forks can add opcodes cleanly. These rules apply only inside Taproot script paths.

BIPs in this article

  • BIP 342 (Tapscript): Validation of Taproot Scripts: Deployed. Specifies Tapscript, the updated scripting rules used when a Taproot output is spent through one of its hidden alternative conditions. It switches signature checks to Schnorr, removes some old…
  • BIP 65: OP_CHECKLOCKTIMEVERIFY: Deployed. Adds OP_CHECKLOCKTIMEVERIFY, a script command that keeps coins unspendable until a chosen date or block height. It enables time-locked savings, escrow with deadlines, and payment channels such as…
  • BIP 112: CHECKSEQUENCEVERIFY: Deployed. Introduces CHECKSEQUENCEVERIFY, a script instruction that lets coins be locked until a certain amount of time has passed since they were received. This 'relative timelock' is a key building block…
  • BIP 347: OP_CAT in Tapscript: Complete. Brings back OP_CAT, an instruction that joins two pieces of data together, which was disabled in Bitcoin's early days over security concerns. Re-enabled only inside Taproot scripts, this simple…
  • BIP 119 (OP_CHECKTEMPLATEVERIFY): CHECKTEMPLATEVERIFY: Draft. Proposes CHECKTEMPLATEVERIFY, a script instruction that restricts coins so they can only be spent in a transaction matching a predetermined template. This 'covenant' could enable vaults that protect…
  • BIP 348 (OP_CHECKSIGFROMSTACK): CHECKSIGFROMSTACK: Draft. Adds an instruction letting Bitcoin scripts verify a signature over any piece of data, not just over the spending transaction itself. That opens the door to things like delegating spending rights,…
  • BIP 349: OP_INTERNALKEY: Draft. Adds a small script instruction that places a Taproot output's 'internal key', the main key behind the output, onto the script's working data. It saves space by avoiding repeating that key inside…
  • BIP 346: OP_TXHASH: Draft. Proposes a new script instruction, OP_TXHASH, that lets a script look at selected details of the transaction trying to spend it, such as its outputs or amounts. Combined with a way to check…
  • BIP 443: OP_CHECKCONTRACTVERIFY: Draft. Proposes OP_CHECKCONTRACTVERIFY, an instruction that lets coins carry embedded data and restrict where they can be sent next and with what data. This lets users build multi-step contracts, such as…
  • BIP 442: OP_PAIRCOMMIT: Draft. Proposes OP_PAIRCOMMIT, a script instruction that combines two pieces of data into a single secure fingerprint (hash). This compact way of committing to data could make certain smart contracts and…
  • BIP 446: OP_TEMPLATEHASH: Draft. Proposes OP_TEMPLATEHASH, a Taproot script instruction that produces a fingerprint of the transaction spending a coin. Scripts can use it to require that coins be spent only in a specific pre-agreed…
  • BIP 441: Restoration of disabled script (Tapleaf 0xC2): Draft. Proposes a new Taproot script version that restores many of Bitcoin's original script instructions disabled in 2010 and greatly loosens limits on data size. To avoid the denial-of-service risks that…
  • BIP 147 (NULLDUMMY): Dealing with dummy stack element malleability: Deployed. Fixes a quirk in Bitcoin's multisignature opcode, which consumes an extra unused value that anyone could modify without invalidating the transaction. Requiring that value to be empty removes one…
  • BIP 141 (SegWit): Segregated Witness (Consensus layer): Deployed. Defines Segregated Witness (SegWit), which moves signatures into a separate "witness" section of each transaction while remaining compatible with older nodes. This fixed transaction malleability,…

Learn more

Guides

Free tools

Glossary