| License | Apache-2.0 |
|---|---|
| Safe Haskell | None |
| Language | GHC2021 |
Singular.State.Records
Contents
Description
What the state validator reads and the builders write: the root-only state
datum, the actions of its mint and the redeemer of its spend, each in the
Plutus Data layout the validator decodes. The layout follows the validator's
types (singular_state/state, singular_state/genesis,
singular_state/fold). The same functions decode a transaction's redeemers,
so a registry's history can be read with the bytes the builders wrote.
Synopsis
- stateDatum :: ByteString -> Data
- decodeStateDatum :: Data -> Maybe ByteString
- genesisRedeemer :: TxIn -> Data
- decodeGenesisRedeemer :: Data -> Maybe TxIn
- foldedRedeemer :: Data
- data Change
- = Register {
- changeRequest :: TxIn
- changeKey :: ByteString
- changeHolding :: Integer
- changeDeposit :: Integer
- changeProof :: [ProofStep]
- | Terminate {
- changeRequest :: TxIn
- changeKey :: ByteString
- changeProof :: [ProofStep]
- = Register {
- foldRedeemer :: TxIn -> [Change] -> Data
- decodeFoldRedeemer :: Data -> Maybe (TxIn, [Change])
The state datum
stateDatum :: ByteString -> Data Source #
The datum of a state output: the root of the registry's trie.
decodeStateDatum :: Data -> Maybe ByteString Source #
The root a state datum carries.
The mint
genesisRedeemer :: TxIn -> Data Source #
The redeemer of the state policy that creates the registry of a seed.
decodeGenesisRedeemer :: Data -> Maybe TxIn Source #
The seed a genesis redeemer names.
foldedRedeemer :: Data Source #
The redeemer of a state policy mint that belongs to a fold: the spend of the state output decides it.
The spend
One registration or termination change, in the validator's Change order.
Constructors
| Register | |
Fields
| |
| Terminate | |
Fields
| |
Instances
| Show Change Source # | |
Defined in Singular.State.Records | |
| Eq Change Source # | |
Defined in Singular.State.Records | |
foldRedeemer :: TxIn -> [Change] -> Data Source #
The redeemer of a state output: the seed that names the registry and the changes.
decodeFoldRedeemer :: Data -> Maybe (TxIn, [Change]) Source #
The seed and the changes a fold redeemer carries.