| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cometa.Governance.Constitution
Description
A constitution's off-chain anchor and optional guardrails script hash.
Assembly is total: Constitution anchor Nothing has no guardrails script.
Synopsis
- data Constitution = Constitution {}
- encodeCbor :: Constitution -> ByteString
- decodeCbor :: ByteString -> Either Error Constitution
Documentation
data Constitution Source #
Immutable metadata and an optional exact 28-byte guardrails hash.
Constructors
| Constitution | |
Fields
| |
Instances
| Show Constitution Source # | |
Defined in Cometa.Governance.Constitution Methods showsPrec :: Int -> Constitution -> ShowS # show :: Constitution -> String # showList :: [Constitution] -> ShowS # | |
| Eq Constitution Source # | |
Defined in Cometa.Governance.Constitution | |
| Ord Constitution Source # | |
Defined in Cometa.Governance.Constitution Methods compare :: Constitution -> Constitution -> Ordering # (<) :: Constitution -> Constitution -> Bool # (<=) :: Constitution -> Constitution -> Bool # (>) :: Constitution -> Constitution -> Bool # (>=) :: Constitution -> Constitution -> Bool # max :: Constitution -> Constitution -> Constitution # min :: Constitution -> Constitution -> Constitution # | |
encodeCbor :: Constitution -> ByteString Source #
Fresh definite CBOR; absence of a guardrails script encodes as null.
decodeCbor :: ByteString -> Either Error Constitution Source #
Decode one complete constitution; invalid schema or trailing bytes returns
InvalidProposalCbor. This returns semantic data.