Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Covenant UTXO types

📝 Draft. This chapter has not been reviewed yet — content may be incomplete or change.

Problem. Define an on-chain state whose address is a Taproot output built from one or more Simplicity programs.

🚧 This recipe is a stub. Outline of what it will cover:

  • The script block as the tool reads it: type: "simplicity", a source path to the .simf file, and a compile_params map wiring manifest params onto the program's param::* names (e.g. { "PUB_KEY": "PUBKEY" }).
  • How the tool turns that into an address: compile the .simf → CMR → a Taproot output with a NUMS internal key, so the key-path is unspendable and every spend goes through the script.
  • Covenant address determinism: same .simf + same params + same debug_symbols → same address, always. The P2TR(NUMS, tapbranch(...)) construction.
  • params on the type and args at each site: closing a UTXO type's scope so its address derivation reads only what it declares.
  • extra_leaves for appending additional taproot leaves.

In the meantime, UtxoType and UtxoScript in the field reference list every key, and examples/last_will is the smallest covenant with more than one leaf.