plutus-script-utils-1.2.0.0: Helper/utility functions for writing Plutus scripts.
Safe HaskellNone
LanguageHaskell2010

Plutus.Script.Utils.V2.Scripts

Synopsis

Script data hashes

data Datum #

Instances

Instances details
Eq Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

(==) :: Datum -> Datum -> Bool Source #

(/=) :: Datum -> Datum -> Bool Source #

Ord Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep Datum :: Type -> Type Source #

Methods

from :: Datum -> Rep Datum x Source #

to :: Rep Datum x -> Datum Source #

NFData Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: Datum -> () Source #

Eq Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

(==) :: Datum -> Datum -> Bool

FromData Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

fromBuiltinData :: BuiltinData -> Maybe Datum

Pretty Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: Datum -> Doc ann

prettyList :: [Datum] -> Doc ann

ToData Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

toBuiltinData :: Datum -> BuiltinData

UnsafeFromData Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

unsafeFromBuiltinData :: BuiltinData -> Datum

Lift DefaultUni Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

lift :: Datum -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

typeRep :: Proxy Datum -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep Datum 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep Datum = D1 ('MetaData "Datum" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "Datum" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDatum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))

data DatumHash #

Instances

Instances details
Eq DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

IsString DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep DatumHash :: Type -> Type Source #

NFData DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: DatumHash -> () Source #

Eq DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

(==) :: DatumHash -> DatumHash -> Bool

FromData DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

fromBuiltinData :: BuiltinData -> Maybe DatumHash

Ord DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: DatumHash -> Doc ann

prettyList :: [DatumHash] -> Doc ann

ToData DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

toBuiltinData :: DatumHash -> BuiltinData

UnsafeFromData DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

unsafeFromBuiltinData :: BuiltinData -> DatumHash

Lift DefaultUni DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

lift :: DatumHash -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

typeRep :: Proxy DatumHash -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep DatumHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep DatumHash = D1 ('MetaData "DatumHash" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "DatumHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))

data Redeemer #

Instances

Instances details
Eq Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep Redeemer :: Type -> Type Source #

NFData Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: Redeemer -> () Source #

Eq Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

(==) :: Redeemer -> Redeemer -> Bool

FromData Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

fromBuiltinData :: BuiltinData -> Maybe Redeemer

Pretty Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: Redeemer -> Doc ann

prettyList :: [Redeemer] -> Doc ann

ToData Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

toBuiltinData :: Redeemer -> BuiltinData

UnsafeFromData Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

unsafeFromBuiltinData :: BuiltinData -> Redeemer

Lift DefaultUni Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

lift :: Redeemer -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

typeRep :: Proxy Redeemer -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep Redeemer 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep Redeemer = D1 ('MetaData "Redeemer" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "Redeemer" 'PrefixI 'True) (S1 ('MetaSel ('Just "getRedeemer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))

data RedeemerHash #

Instances

Instances details
Eq RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

IsString RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep RedeemerHash :: Type -> Type Source #

NFData RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: RedeemerHash -> () Source #

Eq RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

fromBuiltinData :: BuiltinData -> Maybe RedeemerHash

Ord RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: RedeemerHash -> Doc ann

prettyList :: [RedeemerHash] -> Doc ann

ToData RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

toBuiltinData :: RedeemerHash -> BuiltinData

UnsafeFromData RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

unsafeFromBuiltinData :: BuiltinData -> RedeemerHash

Lift DefaultUni RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

lift :: RedeemerHash -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

typeRep :: Proxy RedeemerHash -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep RedeemerHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep RedeemerHash = D1 ('MetaData "RedeemerHash" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "RedeemerHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))

datumHash :: Datum -> DatumHash Source #

Hash a 'PV1.Datum builtin data.

dataHash :: BuiltinData -> BuiltinByteString Source #

Hash a BuiltinData

Script hashes

data Validator #

Instances

Instances details
Eq Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep Validator :: Type -> Type Source #

NFData Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: Validator -> () Source #

Serialise Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

encode :: Validator -> Encoding

decode :: Decoder s Validator

encodeList :: [Validator] -> Encoding

decodeList :: Decoder s [Validator]

Pretty Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: Validator -> Doc ann

prettyList :: [Validator] -> Doc ann

type Rep Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep Validator = D1 ('MetaData "Validator" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "Validator" 'PrefixI 'True) (S1 ('MetaSel ('Just "getValidator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Script)))

data ValidatorHash #

Instances

Instances details
Eq ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

IsString ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep ValidatorHash :: Type -> Type Source #

NFData ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: ValidatorHash -> () Source #

Eq ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

fromBuiltinData :: BuiltinData -> Maybe ValidatorHash

Ord ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: ValidatorHash -> Doc ann

prettyList :: [ValidatorHash] -> Doc ann

ToData ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

toBuiltinData :: ValidatorHash -> BuiltinData

UnsafeFromData ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

unsafeFromBuiltinData :: BuiltinData -> ValidatorHash

Lift DefaultUni ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

lift :: ValidatorHash -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

typeRep :: Proxy ValidatorHash -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep ValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep ValidatorHash = D1 ('MetaData "ValidatorHash" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "ValidatorHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))

data MintingPolicy #

Instances

Instances details
Eq MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep MintingPolicy :: Type -> Type Source #

NFData MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: MintingPolicy -> () Source #

Serialise MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

encode :: MintingPolicy -> Encoding

decode :: Decoder s MintingPolicy

encodeList :: [MintingPolicy] -> Encoding

decodeList :: Decoder s [MintingPolicy]

Pretty MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: MintingPolicy -> Doc ann

prettyList :: [MintingPolicy] -> Doc ann

type Rep MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep MintingPolicy = D1 ('MetaData "MintingPolicy" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "MintingPolicy" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMintingPolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Script)))

data MintingPolicyHash #

Instances

Instances details
Eq MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

IsString MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep MintingPolicyHash :: Type -> Type Source #

NFData MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: MintingPolicyHash -> () Source #

Eq MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

fromBuiltinData :: BuiltinData -> Maybe MintingPolicyHash

Ord MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: MintingPolicyHash -> Doc ann

prettyList :: [MintingPolicyHash] -> Doc ann

ToData MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

toBuiltinData :: MintingPolicyHash -> BuiltinData

UnsafeFromData MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

unsafeFromBuiltinData :: BuiltinData -> MintingPolicyHash

Lift DefaultUni MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

lift :: MintingPolicyHash -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

typeRep :: Proxy MintingPolicyHash -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep MintingPolicyHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep MintingPolicyHash = D1 ('MetaData "MintingPolicyHash" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "MintingPolicyHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))

data StakeValidator #

Instances

Instances details
Eq StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep StakeValidator :: Type -> Type Source #

NFData StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: StakeValidator -> () Source #

Serialise StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

encode :: StakeValidator -> Encoding

decode :: Decoder s StakeValidator

encodeList :: [StakeValidator] -> Encoding

decodeList :: Decoder s [StakeValidator]

Pretty StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: StakeValidator -> Doc ann

prettyList :: [StakeValidator] -> Doc ann

type Rep StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep StakeValidator = D1 ('MetaData "StakeValidator" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "StakeValidator" 'PrefixI 'True) (S1 ('MetaSel ('Just "getStakeValidator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Script)))

data StakeValidatorHash #

Instances

Instances details
Eq StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

IsString StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep StakeValidatorHash :: Type -> Type Source #

NFData StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: StakeValidatorHash -> () Source #

Eq StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

fromBuiltinData :: BuiltinData -> Maybe StakeValidatorHash

Ord StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: StakeValidatorHash -> Doc ann

prettyList :: [StakeValidatorHash] -> Doc ann

ToData StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

toBuiltinData :: StakeValidatorHash -> BuiltinData

UnsafeFromData StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

unsafeFromBuiltinData :: BuiltinData -> StakeValidatorHash

Lift DefaultUni StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

lift :: StakeValidatorHash -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

typeRep :: Proxy StakeValidatorHash -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep StakeValidatorHash 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep StakeValidatorHash = D1 ('MetaData "StakeValidatorHash" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "StakeValidatorHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))

scriptHash :: Script -> ScriptHash Source #

Convert a BuiltinsData value to a 'cardano-api' script data value.

For why we depend on `cardano-api`, see note [Hash computation of datums, redeemers and scripts] toCardanoAPIData :: Builtins.BuiltinData -> Script.ScriptData toCardanoAPIData = Script.fromPlutusData . Builtins.builtinDataToData

Hash a Script

Script utilities

scriptCurrencySymbol :: MintingPolicy -> CurrencySymbol Source #

The CurrencySymbol of a MintingPolicy.

toCardanoApiScript :: Script -> Script PlutusScriptV2 Source #

Convert a Script to a 'cardano-api' script.

For why we depend on `cardano-api`, see note [Hash computation of datums, redeemers and scripts]