plutus-ledger-api-1.36.0.0: Interface to the Plutus ledger for the Cardano ledger.
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusLedgerApi.V1.Scripts

Description

Functions for working with scripts on the ledger.

Synopsis

Documentation

data ScriptError Source #

A higher-level evaluation error.

Constructors

EvaluationError ![Text] !String

Expected behavior of the engine (e.g. user-provided error)

EvaluationException !String !String

Unexpected behavior of the engine (a bug)

Instances

Instances details
Generic ScriptError Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Rep ScriptError :: Type -> Type Source #

Show ScriptError Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

NFData ScriptError Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

rnf :: ScriptError -> () Source #

Eq ScriptError Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

HasBlueprintDefinition ScriptError Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Unroll ScriptError :: [Type]

Methods

definitionId :: DefinitionId

type Rep ScriptError Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Rep ScriptError = D1 ('MetaData "ScriptError" "PlutusLedgerApi.V1.Scripts" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'False) (C1 ('MetaCons "EvaluationError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "EvaluationException" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)))
type Unroll ScriptError Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Unroll ScriptError = Insert ScriptError (GUnroll (IfStuckRep (RepIsStuckError ScriptError :: Type -> Type) (Rep ScriptError)))

newtype Redeemer Source #

Redeemer is a wrapper around Data values that are used as redeemers in transaction inputs.

Constructors

Redeemer 

Instances

Instances details
Generic Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Rep Redeemer :: Type -> Type Source #

Show Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

NFData Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

rnf :: Redeemer -> () Source #

Eq Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Ord Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

HasBlueprintDefinition Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Unroll Redeemer :: [Type]

Methods

definitionId :: DefinitionId

Eq Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

FromData Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

ToData Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

UnsafeFromData Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Pretty Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

pretty :: Redeemer -> Doc ann

prettyList :: [Redeemer] -> Doc ann

Serialise Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

encode :: Redeemer -> Encoding

decode :: Decoder s Redeemer

encodeList :: [Redeemer] -> Encoding

decodeList :: Decoder s [Redeemer]

HasBlueprintSchema Redeemer referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

schema :: Schema referencedTypes

Lift DefaultUni Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

Typeable DefaultUni Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

type Rep Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Rep Redeemer = D1 ('MetaData "Redeemer" "PlutusLedgerApi.V1.Scripts" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'True) (C1 ('MetaCons "Redeemer" 'PrefixI 'True) (S1 ('MetaSel ('Just "getRedeemer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))
type Unroll Redeemer Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Unroll Redeemer = Insert Redeemer (GUnroll (IfStuckRep (RepIsStuckError Redeemer :: Type -> Type) (Rep Redeemer)))

newtype Datum Source #

Datum is a wrapper around Data values which are used as data in transaction outputs.

Constructors

Datum 

Instances

Instances details
Generic Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Rep Datum :: Type -> Type Source #

Methods

from :: Datum -> Rep Datum x Source #

to :: Rep Datum x -> Datum Source #

Show Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

NFData Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

rnf :: Datum -> () Source #

Eq Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

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

Ord Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

HasBlueprintDefinition Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Unroll Datum :: [Type]

Methods

definitionId :: DefinitionId

Eq Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

FromData Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

ToData Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

UnsafeFromData Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Pretty Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

pretty :: Datum -> Doc ann

prettyList :: [Datum] -> Doc ann

Serialise Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

encode :: Datum -> Encoding

decode :: Decoder s Datum

encodeList :: [Datum] -> Encoding

decodeList :: Decoder s [Datum]

HasBlueprintSchema Datum referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

schema :: Schema referencedTypes

Lift DefaultUni Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

Typeable DefaultUni Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

type Rep Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Rep Datum = D1 ('MetaData "Datum" "PlutusLedgerApi.V1.Scripts" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'True) (C1 ('MetaCons "Datum" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDatum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))
type Unroll Datum Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Unroll Datum = Insert Datum (GUnroll (IfStuckRep (RepIsStuckError Datum :: Type -> Type) (Rep Datum)))

newtype Context Source #

Information about the state of the blockchain and about the transaction that is currently being validated, represented as a value in Data.

Constructors

Context BuiltinData 

Instances

Instances details
Show Context Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Pretty Context Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

pretty :: Context -> Doc ann

prettyList :: [Context] -> Doc ann

newtype DatumHash Source #

Type representing the BLAKE2b-256 hash of a datum. 32 bytes.

This is a simple type without any validation, use with caution. You may want to add checks for its invariants. See the Shelley ledger specification.

Instances

Instances details
IsString DatumHash Source #

from hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Scripts

Generic DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Rep DatumHash :: Type -> Type Source #

Show DatumHash Source #

using hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Scripts

NFData DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

rnf :: DatumHash -> () Source #

Eq DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Ord DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

HasBlueprintDefinition DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Unroll DatumHash :: [Type]

Methods

definitionId :: DefinitionId

Eq DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

FromData DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

ToData DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

UnsafeFromData DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Ord DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Pretty DatumHash Source #

using hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

pretty :: DatumHash -> Doc ann

prettyList :: [DatumHash] -> Doc ann

HasBlueprintSchema DatumHash referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

schema :: Schema referencedTypes

Lift DefaultUni DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

Typeable DefaultUni DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

type Rep DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Rep DatumHash = D1 ('MetaData "DatumHash" "PlutusLedgerApi.V1.Scripts" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'True) (C1 ('MetaCons "DatumHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))
type Unroll DatumHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Unroll DatumHash = Insert DatumHash (GUnroll (IfStuckRep (RepIsStuckError DatumHash :: Type -> Type) (Rep DatumHash)))

newtype RedeemerHash Source #

Type representing the BLAKE2b-256 hash of a redeemer. 32 bytes.

This is a simple type without any validation, use with caution. You may want to add checks for its invariants. See the Shelley ledger specification.

Instances

Instances details
IsString RedeemerHash Source #

from hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Scripts

Generic RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Rep RedeemerHash :: Type -> Type Source #

Show RedeemerHash Source #

using hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Scripts

NFData RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

rnf :: RedeemerHash -> () Source #

Eq RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Ord RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

HasBlueprintDefinition RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Unroll RedeemerHash :: [Type]

Methods

definitionId :: DefinitionId

Eq RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

FromData RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

ToData RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

UnsafeFromData RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Ord RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Pretty RedeemerHash Source #

using hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

pretty :: RedeemerHash -> Doc ann

prettyList :: [RedeemerHash] -> Doc ann

HasBlueprintSchema RedeemerHash referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

schema :: Schema referencedTypes

Lift DefaultUni RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

Typeable DefaultUni RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

type Rep RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Rep RedeemerHash = D1 ('MetaData "RedeemerHash" "PlutusLedgerApi.V1.Scripts" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'True) (C1 ('MetaCons "RedeemerHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))
type Unroll RedeemerHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Unroll RedeemerHash = Insert RedeemerHash (GUnroll (IfStuckRep (RepIsStuckError RedeemerHash :: Type -> Type) (Rep RedeemerHash)))

newtype ScriptHash Source #

Type representing the BLAKE2b-224 hash of a script. 28 bytes.

This is a simple type without any validation, use with caution. You may want to add checks for its invariants. See the Shelley ledger specification.

Instances

Instances details
IsString ScriptHash Source #

from hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Scripts

Generic ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Rep ScriptHash :: Type -> Type Source #

Show ScriptHash Source #

using hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Scripts

NFData ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

rnf :: ScriptHash -> () Source #

Eq ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Ord ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

HasBlueprintDefinition ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Associated Types

type Unroll ScriptHash :: [Type]

Methods

definitionId :: DefinitionId

Eq ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

(==) :: ScriptHash -> ScriptHash -> Bool

FromData ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

ToData ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

UnsafeFromData ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Ord ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Pretty ScriptHash Source #

using hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

pretty :: ScriptHash -> Doc ann

prettyList :: [ScriptHash] -> Doc ann

HasBlueprintSchema ScriptHash referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

schema :: Schema referencedTypes

Lift DefaultUni ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

Typeable DefaultUni ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

Methods

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

type Rep ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Rep ScriptHash = D1 ('MetaData "ScriptHash" "PlutusLedgerApi.V1.Scripts" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'True) (C1 ('MetaCons "ScriptHash" 'PrefixI 'True) (S1 ('MetaSel ('Just "getScriptHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))
type Unroll ScriptHash Source # 
Instance details

Defined in PlutusLedgerApi.V1.Scripts

type Unroll ScriptHash = Insert ScriptHash (GUnroll (IfStuckRep (RepIsStuckError ScriptHash :: Type -> Type) (Rep ScriptHash)))