singular_state_fold_fixtures
Shared fixtures of the Singular fold tests.
Every token name a transaction carries, every proof and every root is
obtained from the producers at run time: the role names from
singular_state/preimage, the roots and proofs from the Merkle Patricia
Forestry library through the proof builders of singular_state_proof_fixtures. A fold
scenario names the registry’s seed, the keys already registered and the
registrations folded now; the transaction, the redeemer and the proofs
are derived from it, so a test changes one part of a valid fold and
nothing else.
The keys differ in the first nibble of their hash, so the proof builders, which describe a root with one leaf per first nibble, describe every trie built here.
Types
One registration as the booker commits it: the key, the request input that carries the approval, and the holding the token is delivered to.
Constructors
-
Registration { key: ByteArray, request: OutputReference, holding_address: Address, datum: Data, deposit: Int, holding_lovelace: Int, }
A fold: the registry’s seed, the keys already registered, and the registrations folded now, in order.
Constructors
-
Scenario { seed: OutputReference, before: List<ByteArray>, registrations: List<Registration>, }
Constants
Functions
The proof that inserts key into the trie that holds exactly existing. When
existing already holds the key, no such proof exists; the proof returned is
the one a booker would build against the trie without the key, which shows
the key absent from a trie that is not the one in the state.
The trie that holds exactly keys, each bound to the active leaf. A key listed
twice is bound once, so a scenario that registers a key twice still has a
continuing state to build.
An address with the payment credential of holding_script_a and a stake
credential.
The approval name the booker commits for registration in registry.
The request input that carries the approval of registration.
The holding output the fold delivers the token of registration to.
The state output of the registry created from seed that holds keys.
The index of the output of the nth registration: after an ordinary
output and the continuing state.
The changes of the fold, each with the proof against the trie as the earlier changes advanced it.
The mint of the fold: one token for each key, and each approval burned.