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) andcreate_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.