| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cooked.Skeleton.Datum
Contents
Description
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
Type constraints
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 types
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
Optics
datumKindResolvedP :: Prism' DatumKind DatumResolved Source #
Builds or retrieves the DatumResolved of a DatumKind
txSkelOutDatumKindAT :: AffineTraversal' TxSkelOutDatum DatumKind Source #
Focuses on the optional DatumKind of a TxSkelOutDatum
txSkelOutDatumResolvedAT :: AffineTraversal' TxSkelOutDatum DatumResolved Source #
Focuses on the optional 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 #
Retrieves the optional Datum of a TxSkelOutDatum
txSkelOutDatumDatumHashAF :: AffineFold TxSkelOutDatum DatumHash Source #
Retrieves the optional DatumHash of a TxSkelOutDatum
txSkelOutDatumOutputDatumG :: Getter TxSkelOutDatum OutputDatum Source #
Retrieves the OutputDatum of a TxSkelOutDatum