cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.Skeleton.Datum

Description

This module exposes the notion of datums as they are handled within a TxSkel

Synopsis

Documentation

type DatumConstrs a = (Show a, PrettyCooked a, ToData a, Eq a, Typeable a) 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 txInfoData)

Resolved

Resolve the datum (present from txInfoData)

data DatumKind Source #

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

Instances details
Show DatumKind Source # 
Instance details

Defined in Cooked.Skeleton.Datum

Eq DatumKind Source # 
Instance details

Defined in Cooked.Skeleton.Datum

Ord DatumKind Source # 
Instance details

Defined in Cooked.Skeleton.Datum

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

TxSkelOutNoDatum :: TxSkelOutDatum

use no datum

TxSkelOutSomeDatum :: DatumContent -> DatumKind -> TxSkelOutDatum

use some datum content and associated placement

txSkelOutDatumHash :: TxSkelOutDatum -> Maybe DatumHash Source #

Converts a TxSkelOutDatum into a possible Plutus datum hash

txSkelOutUntypedDatum :: TxSkelOutDatum -> Maybe Datum Source #

Converts a TxSkelOutDatum into a possible Plutus datum

datumContentTypedDatumAT :: DatumConstrs a => AffineTraversal' DatumContent a Source #

Extracts a typed datum for a DatumContent when of the right type

txSkelOutTypedDatumAT :: DatumConstrs a => AffineTraversal' TxSkelOutDatum a Source #

Extracts or changes the inner typed datum of a TxSkelOutDatum