singular_state/genesis
Genesis of a registry state.
Responsibility
The decision sites of the model’s genesis: one function per guard, and
genesis, which conjoins them for the mint handler of the state script.
Dependencies
singular_state/state for recognition and the mint comparison;
singular_state/preimage for the state token name.
Assumptions
The ledger runs the mint handler only when the state policy is among the minted policies, and spends an input at most once.
Invariants
A registry state is created only by spending its seed once, minting exactly one state token named from that seed and nothing else under the state policy, into exactly one recognised state output with the empty root.
Types
The redeemer of the state policy: the genesis of a registry, or a mint that belongs to a fold, whose spend handler decides it.
Constructors
-
Genesis { seed: OutputReference } -
Folded
Functions
Model guard genesisSeed: the seed is spent by exactly one input.
Model guard genesisInvocation: the state policy is among the minted
policies.
Model guard genesisMint: the whole state-policy mint is exactly one
state token named from the seed.
state_candidates(
state_policy: PolicyId,
seed: OutputReference,
outputs: List<Output>,
) -> List<Output>
The outputs that carry the state token named from seed.
Model guard genesisOutput: exactly one candidate, and it is a
recognised state.
Model guard genesisEmpty: every candidate carries the empty root.