| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Cooked.Skeleton.Datum
Description
This module exposes the notion of datums as they are handled within a
 TxSkel
Synopsis
- type DatumConstrs datum = (Show datum, PrettyCooked datum, ToData datum, FromData datum, Eq datum, Typeable datum)
 - data DatumResolved
 - data DatumKind
 - data TxSkelOutDatum where
- NoTxSkelOutDatum :: TxSkelOutDatum
 - SomeTxSkelOutDatum :: DatumConstrs dat => dat -> DatumKind -> TxSkelOutDatum
 
 - datumKindResolvedP :: Prism' DatumKind DatumResolved
 - txSkelOutDatumKindAT :: AffineTraversal' TxSkelOutDatum DatumKind
 - txSkelOutDatumResolvedAT :: AffineTraversal' TxSkelOutDatum DatumResolved
 - txSkelOutDatumTypedAT :: (DatumConstrs a, DatumConstrs b) => AffineTraversal TxSkelOutDatum TxSkelOutDatum a b
 - txSkelOutDatumDatumAF :: AffineFold TxSkelOutDatum Datum
 - txSkelOutDatumDatumHashAF :: AffineFold TxSkelOutDatum DatumHash
 - txSkelOutDatumOutputDatumG :: Getter TxSkelOutDatum OutputDatum
 
Documentation
type DatumConstrs datum = (Show datum, PrettyCooked datum, ToData datum, FromData datum, Eq datum, Typeable datum) Source #
Type constraints that must be satisfied by the datum content
data DatumResolved Source #
Whether the datum should be resolved in the transaction
Constructors
| NotResolved | Do not resolve the datum (absent from   | 
| Resolved | Resolve the datum (present from   | 
Instances
| Show DatumResolved Source # | |
Defined in Cooked.Skeleton.Datum Methods showsPrec :: Int -> DatumResolved -> ShowS # show :: DatumResolved -> String # showList :: [DatumResolved] -> ShowS #  | |
| Eq DatumResolved Source # | |
Defined in Cooked.Skeleton.Datum Methods (==) :: DatumResolved -> DatumResolved -> Bool # (/=) :: DatumResolved -> DatumResolved -> Bool #  | |
| Ord DatumResolved Source # | |
Defined in Cooked.Skeleton.Datum Methods compare :: DatumResolved -> DatumResolved -> Ordering # (<) :: DatumResolved -> DatumResolved -> Bool # (<=) :: DatumResolved -> DatumResolved -> Bool # (>) :: DatumResolved -> DatumResolved -> Bool # (>=) :: DatumResolved -> DatumResolved -> Bool # max :: DatumResolved -> DatumResolved -> DatumResolved # min :: DatumResolved -> DatumResolved -> DatumResolved #  | |
Options on how to include the datum in the transaction
Constructors
| Inline | Include the full datum in the UTxO  | 
| Hashed DatumResolved | Only include the datum hash in the UTxO. Resolve, or do not resolve, the full datum in the transaction body.  | 
Instances
| Show DatumKind Source # | |
| Eq DatumKind Source # | |
| Ord DatumKind Source # | |
data TxSkelOutDatum where Source #
Datums to be placed in TxSkel outputs, which are either
 empty, or composed of a datum content and its placement
Constructors
| NoTxSkelOutDatum :: TxSkelOutDatum | use no datum  | 
| SomeTxSkelOutDatum :: DatumConstrs dat => dat -> DatumKind -> TxSkelOutDatum | use some datum content and associated placement  | 
Instances
datumKindResolvedP :: Prism' DatumKind DatumResolved Source #
Builds a DatumKind from a DatumResolved or optionally retrieves it
txSkelOutDatumKindAT :: AffineTraversal' TxSkelOutDatum DatumKind Source #
Extracts or changes the DatumKind of a TxSkelOutDatum
txSkelOutDatumResolvedAT :: AffineTraversal' TxSkelOutDatum DatumResolved Source #
Extracts or changes the DatumResolved of a TxSkelOutDatum
txSkelOutDatumTypedAT :: (DatumConstrs a, DatumConstrs b) => AffineTraversal TxSkelOutDatum TxSkelOutDatum a b Source #
Extracts, or sets, the typed datum of a TxSkelOutDatum. This is attempted
 in two ways: first, we try to simply cast the content, and then, if it fails,
 we serialise the content and then attempt to deserialise it to the right
 type. This second case is specifically useful when the current content is an
 BuiltinData itself directly, but it can also be used in the cornercase
 when both types have compatible serialized representation.
txSkelOutDatumDatumAF :: AffineFold TxSkelOutDatum Datum Source #
Converts a TxSkelOutDatum into a possible Datum
txSkelOutDatumDatumHashAF :: AffineFold TxSkelOutDatum DatumHash Source #
Converts a TxSkelOutDatum into a possible DatumHash
txSkelOutDatumOutputDatumG :: Getter TxSkelOutDatum OutputDatum Source #
Converts a TxSkelOutDatum into an OutputDatum