---
title: "BIP 446 (OP_TEMPLATEHASH) — definition | Nuri Glossary"
description: "A proposed covenant opcode that commits to a transaction template, a simpler alternative to CTV."
lang: "en"
type: "glossary-term"
canonical: "https://nuri.com/glossary/bip-446"
---

# BIP 446 (OP_TEMPLATEHASH)

A proposed covenant opcode that commits to a transaction template, a simpler alternative to CTV.

## Basically

BIP 446 is a cleaner alternative to CTV for Taproot. It lets you check that a transaction follows a fixed template before it spends bitcoin.

## Key Takeaways

- BIP 446 introduces OP_TEMPLATEHASH, a new Tapscript opcode that pushes a hash of the spending transaction onto the stack, enabling covenant-style constraints without pre-signed transactions.
- It serves as a Taproot-native alternative to BIP 119 (OP_CHECKTEMPLATEVERIFY), reusing BIP 341 sighash components to avoid quadratic hashing while committing to the transaction annex.
- Gregory Sanders, Antoine Poinsot, and Steven Roose authored BIP 446, which entered Draft status in March 2026 and targets second-layer protocol improvements including Lightning, Ark, and Discreet Log Contracts.

## What Is BIP 446?

BIP 446 is a draft Bitcoin Improvement Proposal that defines a new opcode called OP_TEMPLATEHASH for use within Tapscript. The opcode computes a hash of the transaction spending the output and pushes that hash onto the stack. Scripts can compare this hash against a committed value to enforce a specific transaction template, controlling which outputs it creates, what locktime it uses, and how its inputs are sequenced.
The proposal was authored by Gregory Sanders (instagibbs), Antoine Poinsot (darosior), and Steven Roose. It was submitted as a pull request to the Bitcoin BIPs repository in September 2025 and merged on March 17, 2026 as a Draft specification. OP_TEMPLATEHASH is designed as a soft fork that only tightens block validation rules, so no block valid under the new rules would be invalid under current consensus.
The core motivation is to replace pre-signed transactions in second-layer protocols. A script can enforce the transaction structure directly instead of requiring all parties to exchange and store signatures for every possible future state. This reduces interactivity, storage requirements, and protocol complexity for systems like Lightning channels, Ark, and Discreet Log Contracts.

## How It Works

OP_TEMPLATEHASH redefines the existing OP_SUCCESS206 (opcode 0xce) within the Tapscript execution environment. It is not available in legacy Script or SegWit v0 contexts. A Tapscript interpreter encountering this opcode computes a tagged hash of specific transaction fields and pushes the resulting 32-byte value onto the stack.

## The Template Hash Construction

The hash uses a BIP 340/BIP 341-style tagged hash with the tag "TemplateHash". The preimage includes the following fields:
The hashed preimage is 77 bytes without an annex and 109 bytes with an annex. All integers use 4-byte little-endian encoding.

## What It Omits

Several fields present in BIP 341 signature messages are intentionally excluded. These exclusions are deliberate.

## Stack Behaviour

OP_TEMPLATEHASH pushes a value onto the stack rather than acting as an assertion. CTV (OP_CHECKTEMPLATEVERIFY) instead verifies and consumes a hash from the stack. This design changes what scripts can do with the hash.
The push-based approach is more composable because the hash can be used as input to other opcodes. This enables patterns like rebindable signatures, where a signature covers the template hash rather than the full transaction. This approach is central to the companion proposal BIP 448, which bundles OP_TEMPLATEHASH with OP_CHECKSIGFROMSTACK and OP_INTERNALKEY to enable next-transaction commitments and rebindable signatures.

## BIP 446 vs. BIP 119 (CTV)

Both proposals aim to enable transaction template verification. They differ in scope, design philosophy, and technical trade-offs.
The Tapscript-only scope is a deliberate design choice. The authors argue that limiting the opcode to Taproot reduces the attack surface and avoids complications with legacy script contexts. Taproot scriptSigs must be empty, so dropping the scriptSig commitment is safe and still provides txid stability in the single-input case.
OP_TEMPLATEHASH has a known trade-off: it cannot be used in the BitVM construction where CTV can, because it does not commit to scriptSigs. The Bitcoin covenant activation path forward research article gives a deeper analysis of how both proposals fit into the broader covenant debate.

## Lightning Network Optimisation

Second-stage HTLC transactions in current Lightning channel designs require both channel parties to exchange and store a signature for every HTLC in every channel state. OP_TEMPLATEHASH can replace the 2-of-2 multisig requirement for these transactions, reducing the number of signatures that must be exchanged per state update.

## LN-Symmetry (eltoo)

The LN-Symmetry protocol replaces Lightning's penalty-based revocation with update transactions that can supersede each other. OP_TEMPLATEHASH reduces the round trips required in this protocol by enabling rebindable update transactions when combined with OP_CHECKSIGFROMSTACK.

## Ark Protocol

Ark uses shared UTXOs that are divided into virtual UTXOs. Recipients currently need to be online to co-sign when receiving a VTXO. OP_TEMPLATEHASH makes receiving non-interactive because the covenant enforces the correct transaction structure without requiring the recipient's signature at creation time.

## Discreet Log Contracts

Discreet Log Contracts (DLCs) require pre-signing a large number of possible outcome transactions. OP_TEMPLATEHASH can significantly reduce this overhead by enforcing payout structures through script rather than through stored signatures.

## Vaults

Transaction templates can enforce time-delayed spending paths, creating vault constructions where funds must pass through an intermediate unvaulting step before reaching their final destination. The delay provides a recovery window if keys are compromised.

## BIP 448: The Deployment Bundle

BIP 448 proposes deploying OP_TEMPLATEHASH alongside two additional opcodes: BIP 348 OP_CHECKSIGFROMSTACK (CSFS) and BIP 349 OP_INTERNALKEY. The authors argue that OP_TEMPLATEHASH alone may not justify a soft fork, but the bundle enables powerful new patterns:

## Draft Status

BIP 446 is a Draft proposal with no defined activation timeline or miner signaling parameters. The opcode has been implemented in Bitcoin Inquisition for signet testing, but there is no consensus on when or whether it will be activated on mainnet. Developers should treat it as experimental.

## Annex Commitment Debate

The decision to commit to the Taproot annex is controversial, and some developers worry it could conflict with future annex uses such as cross-input signature aggregation (CISA). Others argue the annex should be committed to consistently with how Taproot sighashes handle it. Future soft forks could introduce a variant opcode that skips the annex commitment if needed.

## No Amount Commitment

OP_TEMPLATEHASH does not commit to input amounts. The omission provides flexibility for recovering from underfunded commitments, but the opcode alone cannot enforce that a specific amount is being spent. Use cases requiring amount verification need additional script logic or complementary opcodes.

## Tapscript-Only Limitation

Restricting OP_TEMPLATEHASH to Tapscript means it cannot be used in legacy or SegWit v0 scripts. The restriction is intentional to reduce complexity and attack surface, but existing non-Taproot outputs cannot use the opcode. All parties must use Taproot addresses to benefit from template verification.

## Competing Proposals

BIP 446 exists alongside several other covenant proposals, including BIP 119 (CTV), OP_CAT, OP_TXHASH, and APO. The Bitcoin community has not reached consensus on which approach or combination to activate. This uncertainty means developers building on any single proposal face the risk that a different one may ultimately be adopted.

## Why It Matters

Transaction template verification is a foundational primitive for Bitcoin's scaling roadmap. Second-layer protocols must otherwise rely on pre-signed transactions that require interactivity, storage overhead, and complex state management. OP_TEMPLATEHASH offers a path to simpler, more efficient layer-2 constructions by moving transaction structure enforcement into Bitcoin Script itself.
Protocols like Spark could use covenant primitives to enable new design patterns that reduce trust assumptions and improve user experience. BIP 446 or an alternative could constrain future transactions at the script level, significantly expanding what Bitcoin can enforce trustlessly.
The glossary entry is for informational purposes only and does not constitute financial or investment advice. You should always do your own research before using any protocol or technology.
Part of the [Nuri glossary](https://nuri.com/glossary), which defines 1876 Bitcoin, Lightning, wallet, stablecoin and payment terms.
