covenants.diy
An interactive research and development environment for designing, analyzing, and evaluating Bitcoin covenant
constructions and covenant-based protocols. Wire nodes into a graph and it builds the taproot output,
assembles the tapscript, computes the sighash, and steps through script execution, entirely in the browser.
Signet and regtest only.
Covenant opcodes
CTV · CSFS · CAT · APO · TEMPLATEHASH · INTERNALKEY · PAIRCOMMIT · TXHASH · CCV · VAULT
Worked examples
Hot and cold Two leaves, one spendable now and one after a delay taproot
Vault, with CTV A delay to notice a theft, and a cold path to stop it BIP-119
Congestion control One transaction commits to a tree of payouts BIP-119
Vault, with OP_VAULT Rewrite one leaf to withdraw, and keep a way to stop it BIP-345
Ark Many balances in one coin, any owner can exit alone BIP-119
Delegation Hand someone one spend without handing them your key BIP-348
Oracle payout An attestation decides whether, never where BIP-348 + 119
Rebindable state Three opcodes, and the update leaf is three bytes BIP-448
Rebindable state, the older way The same channel, using an ANYPREVOUT key type BIP-118
Merkle proof A script folds a leaf back into a root it commits to BIP-347
CAT-only covenant A covenant with no CSFS, using a signature the script builds itself BIP-347
Recursive covenant A coin that can only be spent back into itself BIP-347 + 348
Loading the editor…
The editor needs JavaScript and WebAssembly. The source is MIT licensed at
github.com/askii21m/covenants-diy .