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

Instance, state & constructors

๐Ÿ“ Draft. This chapter has not been reviewed yet โ€” content may be incomplete or change.

Problem. Deploy a contract once and then act on it repeatedly โ€” persisting the compile params and tracking the live UTXO set across transactions.

๐Ÿšง This recipe is a stub. Outline of what it will cover:

  • The three-file model in practice: manifest / instance / state.
  • Classes: grouping methods under a typed contract with fields.
  • Constructors (is_constructor: true) and create_instance: writing the instance file with resolved field values.
  • The state file: how covenant outputs are added and spent inputs removed after each broadcast.
  • provided_inputs: pre-filling a counterparty's UTXO inline (the website-to-wallet integration pattern).

See Spec.md ยง12โ€“13 in the meantime.