plutus-ledger-api-1.0.0.1: Interface to the Plutus ledger for the Cardano ledger.
Safe Haskell None
Language Haskell2010

Plutus.V1.Ledger.Api

Description

The interface to Plutus V1 for the ledger.

Synopsis

Scripts

type SerializedScript = ShortByteString Source #

Scripts to the ledger are serialised bytestrings.

data Script Source #

A script on the chain. This is an opaque type as far as the chain is concerned.

Instances

Instances details
Eq Script Source #

Note [Using Flat inside CBOR instance of Script] `plutus-ledger` uses CBOR for data serialisation and `plutus-core` uses Flat. The choice to use Flat was made to have a more efficient (most wins are in uncompressed size) data serialisation format and use less space on-chain.

To make `plutus-ledger` work with scripts serialised with Flat, and keep the CBOR format otherwise we have defined a Serialise instance for Script, which is a wrapper over Programs serialised with Flat. The instance will see programs as an opaque ByteString, which is the result of encoding programs using Flat.

Because Flat is not self-describing and it gets used in the encoding of Programs, data structures that include scripts (for example, transactions) no-longer benefit for CBOR's ability to self-describe it's format.

Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord Script Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show Script Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic Script Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

NFData Script Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Serialise Script Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep Script Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep Script = D1 (' MetaData "Script" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "Script" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unScript") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Program DeBruijn DefaultUni DefaultFun ()))))

fromCompiledCode :: CompiledCode a -> Script Source #

Turn a CompiledCode (usually produced by compile ) into a Script for use with this package.

Validating scripts

isScriptWellFormed :: ProtocolVersion -> SerializedScript -> Bool Source #

Check if a Script is "valid" according to a protocol version. At the moment this means "deserialises correctly", which in particular implies that it is (almost certainly) an encoded script and the script does not mention any builtins unavailable in the given protocol version.

Running scripts

evaluateScriptRestricting Source #

Arguments

:: ProtocolVersion
-> VerboseMode

Whether to produce log output

-> EvaluationContext

The cost model that should already be synced to the most recent cost-model-params coming from the current protocol

-> ExBudget

The resource budget which must not be exceeded during evaluation

-> SerializedScript

The script to evaluate

-> [ Data ]

The arguments to the script

-> ( LogOutput , Either EvaluationError ExBudget )

Evaluates a script, with a cost model and a budget that restricts how many resources it can use according to the cost model. Also returns the budget that was actually used.

Can be used to calculate budgets for scripts, but even in this case you must give a limit to guard against scripts that run for a long time or loop.

evaluateScriptCounting Source #

Arguments

:: ProtocolVersion
-> VerboseMode

Whether to produce log output

-> EvaluationContext

The cost model that should already be synced to the most recent cost-model-params coming from the current protocol

-> SerializedScript

The script to evaluate

-> [ Data ]

The arguments to the script

-> ( LogOutput , Either EvaluationError ExBudget )

Evaluates a script, returning the minimum budget that the script would need to evaluate successfully. This will take as long as the script takes, if you need to limit the execution time of the script also, you can use evaluateScriptRestricting , which also returns the used budget.

Protocol version

Verbose mode and log output

data VerboseMode Source #

A simple toggle indicating whether or not we should produce logs.

Constructors

Verbose
Quiet

type LogOutput = [ Text ] Source #

The type of log output: just a list of Text .

Costing-related types

data ExBudget Source #

Instances

Instances details
Eq ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Show ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Generic ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Semigroup ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Monoid ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

ToJSON ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

FromJSON ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

NFData ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

NoThunks ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Pretty ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Lift ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

PrettyBy config ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

type Rep ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

type Rep ExBudget = D1 (' MetaData "ExBudget" "PlutusCore.Evaluation.Machine.ExBudget" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' False ) ( C1 (' MetaCons "ExBudget" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "exBudgetCPU") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedUnpack ) ( Rec0 ExCPU ) :*: S1 (' MetaSel (' Just "exBudgetMemory") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedUnpack ) ( Rec0 ExMemory )))

newtype ExCPU Source #

Counts CPU units in picoseconds: maximum value for SatInt is 2^63 ps, or appproximately 106 days.

Instances

Instances details
Eq ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Num ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Ord ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Show ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Generic ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Semigroup ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Monoid ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

ToJSON ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

FromJSON ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

NFData ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

NoThunks ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Pretty ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Lift ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

PrettyBy config ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

type Rep ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

type Rep ExCPU = D1 (' MetaData "ExCPU" "PlutusCore.Evaluation.Machine.ExMemory" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' True ) ( C1 (' MetaCons "ExCPU" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 CostingInteger )))

newtype ExMemory Source #

Counts size in machine words.

Instances

Instances details
Eq ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Num ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Ord ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Show ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Generic ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Semigroup ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Monoid ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

ToJSON ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

FromJSON ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

NFData ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

NoThunks ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

ExMemoryUsage ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Pretty ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Lift ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

PrettyBy config ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

type Rep ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

type Rep ExMemory = D1 (' MetaData "ExMemory" "PlutusCore.Evaluation.Machine.ExMemory" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' True ) ( C1 (' MetaCons "ExMemory" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 CostingInteger )))

data SatInt Source #

Instances

Instances details
Bounded SatInt
Instance details

Defined in Data.SatInt

Enum SatInt
Instance details

Defined in Data.SatInt

Eq SatInt
Instance details

Defined in Data.SatInt

Integral SatInt
Instance details

Defined in Data.SatInt

Num SatInt

In the Num instance, we plug in our own addition, multiplication and subtraction function that perform overflow-checking.

Instance details

Defined in Data.SatInt

Ord SatInt
Instance details

Defined in Data.SatInt

Read SatInt
Instance details

Defined in Data.SatInt

Real SatInt
Instance details

Defined in Data.SatInt

Show SatInt
Instance details

Defined in Data.SatInt

Generic SatInt
Instance details

Defined in Data.SatInt

ToJSON SatInt
Instance details

Defined in Data.SatInt

FromJSON SatInt
Instance details

Defined in Data.SatInt

Bits SatInt
Instance details

Defined in Data.SatInt

FiniteBits SatInt
Instance details

Defined in Data.SatInt

NFData SatInt
Instance details

Defined in Data.SatInt

FromField SatInt
Instance details

Defined in Data.SatInt

Prim SatInt
Instance details

Defined in Data.SatInt

NoThunks SatInt
Instance details

Defined in Data.SatInt

ExMemoryUsage SatInt
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Lift SatInt
Instance details

Defined in Data.SatInt

type Rep SatInt
Instance details

Defined in Data.SatInt

type Rep SatInt = D1 (' MetaData "SatInt" "Data.SatInt" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' True ) ( C1 (' MetaCons "SI" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unSatInt") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Int )))

Cost model

data EvaluationContext Source #

An opaque type that contains all the static parameters that the evaluator needs to evaluate a script. This is so that they can be computed once and cached, rather than recomputed on every evaluation.

There are two sets of parameters: one is with immediate unlifting and the other one is with deferred unlifting. We have to keep both of them, because depending on the language version either one has to be used or the other. We also compile them separately due to all the inlining and optimization that need to happen for things to be efficient.

mkEvaluationContext :: MonadError CostModelApplyError m => CostModelParams -> m EvaluationContext Source #

Build the EvaluationContext .

The input is a Map of strings to cost integer values (aka CostModelParams , CostModel ) See Note [Inlining meanings of builtins].

costModelParamNames :: Set Text Source #

The set of valid names that a cost model parameter can take for this language version. It is used for the deserialization of CostModelParams .

Context types

data ScriptContext Source #

Instances

Instances details
Eq ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Pretty ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

UnsafeFromData ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Eq ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Lift DefaultUni ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Typeable DefaultUni ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep ScriptContext = D1 (' MetaData "ScriptContext" "Plutus.V1.Ledger.Contexts" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' False ) ( C1 (' MetaCons "ScriptContext" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "scriptContextTxInfo") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 TxInfo ) :*: S1 (' MetaSel (' Just "scriptContextPurpose") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ScriptPurpose )))

data ScriptPurpose Source #

Purpose of the script that is currently running

Instances

Instances details
Eq ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Pretty ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

UnsafeFromData ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Eq ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Lift DefaultUni ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Typeable DefaultUni ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Supporting types used in the context types

ByteStrings

data BuiltinByteString Source #

An opaque type representing Plutus Core ByteStrings.

Instances

Instances details
Eq BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

Data BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> BuiltinByteString -> c BuiltinByteString Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c BuiltinByteString Source #

toConstr :: BuiltinByteString -> Constr Source #

dataTypeOf :: BuiltinByteString -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c BuiltinByteString ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c BuiltinByteString ) Source #

gmapT :: ( forall b. Data b => b -> b) -> BuiltinByteString -> BuiltinByteString Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> BuiltinByteString -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> BuiltinByteString -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> BuiltinByteString -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> BuiltinByteString -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source #

Ord BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

Show BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

Semigroup BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

Monoid BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

Hashable BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

NFData BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

ByteArray BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

ByteArrayAccess BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

Pretty BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

ToData BuiltinByteString
Instance details

Defined in PlutusTx.IsData.Class

FromData BuiltinByteString
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData BuiltinByteString
Instance details

Defined in PlutusTx.IsData.Class

Monoid BuiltinByteString
Instance details

Defined in PlutusTx.Monoid

Semigroup BuiltinByteString
Instance details

Defined in PlutusTx.Semigroup

Ord BuiltinByteString
Instance details

Defined in PlutusTx.Ord

Eq BuiltinByteString
Instance details

Defined in PlutusTx.Eq

Serialise BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Internal

FromBuiltin BuiltinByteString ByteString
Instance details

Defined in PlutusTx.Builtins.Class

ToBuiltin ByteString BuiltinByteString
Instance details

Defined in PlutusTx.Builtins.Class

Bytes

newtype LedgerBytes Source #

Instances

Instances details
Eq LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

Ord LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

Show LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

IsString LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

Generic LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

NFData LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

Pretty LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

ToData LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

FromData LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

UnsafeFromData LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

Ord LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

Eq LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

Lift DefaultUni LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

Typeable DefaultUni LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

type Rep LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

type Rep LedgerBytes = D1 (' MetaData "LedgerBytes" "Plutus.V1.Ledger.Bytes" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "LedgerBytes" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getLedgerBytes") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinByteString )))

Certificates

data DCert Source #

A representation of the ledger DCert. Some information is digested, and not included

Constructors

DCertDelegRegKey StakingCredential
DCertDelegDeRegKey StakingCredential
DCertDelegDelegate

Fields

DCertPoolRegister

A digest of the PoolParams

Fields

DCertPoolRetire PubKeyHash Integer

The retiremant certificate and the Epoch N

DCertGenesis

A really terse Digest

DCertMir

Another really terse Digest

Instances

Instances details
Eq DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

Ord DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

Show DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

Generic DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

NFData DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

Pretty DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

ToData DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

FromData DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

UnsafeFromData DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

Eq DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

Lift DefaultUni DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

Typeable DefaultUni DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

type Rep DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

type Rep DCert = D1 (' MetaData "DCert" "Plutus.V1.Ledger.DCert" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' False ) (( C1 (' MetaCons "DCertDelegRegKey" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 StakingCredential )) :+: ( C1 (' MetaCons "DCertDelegDeRegKey" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 StakingCredential )) :+: C1 (' MetaCons "DCertDelegDelegate" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 StakingCredential ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PubKeyHash )))) :+: (( C1 (' MetaCons "DCertPoolRegister" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PubKeyHash ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PubKeyHash )) :+: C1 (' MetaCons "DCertPoolRetire" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PubKeyHash ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Integer ))) :+: ( C1 (' MetaCons "DCertGenesis" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "DCertMir" ' PrefixI ' False ) ( U1 :: Type -> Type ))))

Credentials

data StakingCredential Source #

Staking credential used to assign rewards

Instances

Instances details
Eq StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Ord StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Show StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Generic StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

NFData StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Pretty StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

ToData StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

FromData StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

UnsafeFromData StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Eq StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Lift DefaultUni StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Typeable DefaultUni StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

type Rep StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

data Credential Source #

Credential required to unlock a transaction output

Constructors

PubKeyCredential PubKeyHash

The transaction that spends this output must be signed by the private key

ScriptCredential ValidatorHash

The transaction that spends this output must include the validator script and be accepted by the validator.

Instances

Instances details
Eq Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Ord Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Show Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Generic Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

NFData Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Pretty Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

ToData Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

FromData Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

UnsafeFromData Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Eq Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Lift DefaultUni Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Typeable DefaultUni Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

type Rep Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

Value

newtype Value Source #

A cryptocurrency value. This is a map from CurrencySymbol s to a quantity of that currency.

Operations on currencies are usually implemented pointwise . That is, we apply the operation to the quantities for each currency in turn. So when we add two Value s the resulting Value has, for each currency, the sum of the quantities of that particular currency in the argument Value . The effect of this is that the currencies in the Value are "independent", and are operated on separately.

Whenever we need to get the quantity of a currency in a Value where there is no explicit quantity of that currency in the Value , then the quantity is taken to be zero.

See note [Currencies] for more details.

Instances

Instances details
Eq Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Data Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Value -> c Value Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c Value Source #

toConstr :: Value -> Constr Source #

dataTypeOf :: Value -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c Value ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c Value ) Source #

gmapT :: ( forall b. Data b => b -> b) -> Value -> Value Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Value -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Value -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Value -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Value -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Value -> m Value Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Value -> m Value Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Value -> m Value Source #

Show Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Generic Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Semigroup Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Monoid Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

NFData Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Pretty Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

ToData Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

FromData Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

UnsafeFromData Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

JoinSemiLattice Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

MeetSemiLattice Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

AdditiveSemigroup Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

AdditiveMonoid Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

AdditiveGroup Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Monoid Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Group Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Semigroup Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Eq Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Module Integer Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Lift DefaultUni Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Typeable DefaultUni Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

type Rep Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

type Rep Value = D1 (' MetaData "Value" "Plutus.V1.Ledger.Value" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "Value" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getValue") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Map CurrencySymbol ( Map TokenName Integer )))))

newtype CurrencySymbol Source #

Instances

Instances details
Eq CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Data CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> CurrencySymbol -> c CurrencySymbol Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c CurrencySymbol Source #

toConstr :: CurrencySymbol -> Constr Source #

dataTypeOf :: CurrencySymbol -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c CurrencySymbol ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c CurrencySymbol ) Source #

gmapT :: ( forall b. Data b => b -> b) -> CurrencySymbol -> CurrencySymbol Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> CurrencySymbol -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> CurrencySymbol -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> CurrencySymbol -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> CurrencySymbol -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> CurrencySymbol -> m CurrencySymbol Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> CurrencySymbol -> m CurrencySymbol Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> CurrencySymbol -> m CurrencySymbol Source #

Ord CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Show CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

IsString CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Generic CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

NFData CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Pretty CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

ToData CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

FromData CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

UnsafeFromData CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Ord CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Eq CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Lift DefaultUni CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Typeable DefaultUni CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

type Rep CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

type Rep CurrencySymbol = D1 (' MetaData "CurrencySymbol" "Plutus.V1.Ledger.Value" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "CurrencySymbol" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unCurrencySymbol") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinByteString )))

newtype TokenName Source #

ByteString of a name of a token, shown as UTF-8 string when possible

Instances

Instances details
Eq TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Data TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> TokenName -> c TokenName Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c TokenName Source #

toConstr :: TokenName -> Constr Source #

dataTypeOf :: TokenName -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c TokenName ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c TokenName ) Source #

gmapT :: ( forall b. Data b => b -> b) -> TokenName -> TokenName Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> TokenName -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> TokenName -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> TokenName -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> TokenName -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> TokenName -> m TokenName Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> TokenName -> m TokenName Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> TokenName -> m TokenName Source #

Ord TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Show TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

IsString TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Generic TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

NFData TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Pretty TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

ToData TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

FromData TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

UnsafeFromData TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Ord TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Eq TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Lift DefaultUni TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

Typeable DefaultUni TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

type Rep TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

type Rep TokenName = D1 (' MetaData "TokenName" "Plutus.V1.Ledger.Value" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "TokenName" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unTokenName") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinByteString )))

singleton :: CurrencySymbol -> TokenName -> Integer -> Value Source #

Make a Value containing only the given quantity of the given currency.

Time

newtype POSIXTime Source #

POSIX time is measured as the number of milliseconds since 1970-01-01T00:00:00Z

Instances

Instances details
Enum POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Eq POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Integral POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Num POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Ord POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Real POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Show POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Generic POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

NFData POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Pretty POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Enum POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

ToData POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

FromData POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

UnsafeFromData POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

AdditiveSemigroup POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

AdditiveMonoid POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

AdditiveGroup POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Ord POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Eq POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Lift DefaultUni POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

Typeable DefaultUni POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

type Rep POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

type Rep POSIXTime = D1 (' MetaData "POSIXTime" "Plutus.V1.Ledger.Time" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "POSIXTime" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getPOSIXTime") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Integer )))

Types for representing transactions

data Address Source #

Address with two kinds of credentials, normal and staking.

Instances

Instances details
Eq Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

Ord Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

Show Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

Generic Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

NFData Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

Pretty Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

ToData Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

FromData Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

UnsafeFromData Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

Eq Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

Lift DefaultUni Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

Typeable DefaultUni Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

type Rep Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

type Rep Address = D1 (' MetaData "Address" "Plutus.V1.Ledger.Address" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' False ) ( C1 (' MetaCons "Address" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "addressCredential") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Credential ) :*: S1 (' MetaSel (' Just "addressStakingCredential") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe StakingCredential ))))

newtype PubKeyHash Source #

The hash of a public key. This is frequently used to identify the public key, rather than the key itself.

Instances

Instances details
Eq PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

Ord PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

Show PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

IsString PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

Generic PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

NFData PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

Pretty PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

ToData PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

FromData PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

UnsafeFromData PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

Ord PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

Eq PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

Lift DefaultUni PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

Typeable DefaultUni PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

type Rep PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

type Rep PubKeyHash = D1 (' MetaData "PubKeyHash" "Plutus.V1.Ledger.Crypto" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "PubKeyHash" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getPubKeyHash") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinByteString )))

newtype TxId Source #

A transaction ID, using a SHA256 hash as the transaction id.

Instances

Instances details
Eq TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

IsString TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxId :: Type -> Type Source #

NFData TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Pretty TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

ToData TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

FromData TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

UnsafeFromData TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Eq TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Lift DefaultUni TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Typeable DefaultUni TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxId = D1 (' MetaData "TxId" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "TxId" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getTxId") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinByteString )))

data TxInfo Source #

A pending transaction. This is the view as seen by validator scripts, so some details are stripped out.

Constructors

TxInfo

Fields

Instances

Instances details
Eq TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Pretty TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

UnsafeFromData TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Eq TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Lift DefaultUni TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Typeable DefaultUni TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

data TxOut Source #

A transaction output, consisting of a target address, a value, and optionally a datum hash.

Instances

Instances details
Eq TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

NFData TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Pretty TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

ToData TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

FromData TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

UnsafeFromData TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Eq TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Lift DefaultUni TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Typeable DefaultUni TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

data TxOutRef Source #

A reference to a transaction output. This is a pair of a transaction reference, and an index indicating which of the outputs of that transaction we are referring to.

Constructors

TxOutRef

Fields

Instances

Instances details
Eq TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

NFData TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Pretty TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

ToData TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

FromData TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

UnsafeFromData TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Eq TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Lift DefaultUni TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Typeable DefaultUni TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOutRef = D1 (' MetaData "TxOutRef" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' False ) ( C1 (' MetaCons "TxOutRef" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "txOutRefId") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 TxId ) :*: S1 (' MetaSel (' Just "txOutRefIdx") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Integer )))

data TxInInfo Source #

An input of a pending transaction.

Instances

Instances details
Eq TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Pretty TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

UnsafeFromData TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Eq TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Lift DefaultUni TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

Typeable DefaultUni TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep TxInInfo = D1 (' MetaData "TxInInfo" "Plutus.V1.Ledger.Contexts" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' False ) ( C1 (' MetaCons "TxInInfo" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "txInInfoOutRef") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 TxOutRef ) :*: S1 (' MetaSel (' Just "txInInfoResolved") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 TxOut )))

Intervals

data Interval a Source #

An interval of a s.

The interval may be either closed or open at either end, meaning that the endpoints may or may not be included in the interval.

The interval can also be unbounded on either side.

Instances

Instances details
Functor Interval Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Methods

fmap :: (a -> b) -> Interval a -> Interval b Source #

( Typeable DefaultUni a, Lift DefaultUni ( LowerBound a), Lift DefaultUni ( UpperBound a)) => Lift DefaultUni ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Eq a => Eq ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => Ord ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Show a => Show ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Generic ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Associated Types

type Rep ( Interval a) :: Type -> Type Source #

NFData a => NFData ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Pretty a => Pretty ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

ToData a => ToData ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

FromData a => FromData ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

UnsafeFromData a => UnsafeFromData ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => JoinSemiLattice ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => MeetSemiLattice ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => BoundedJoinSemiLattice ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => BoundedMeetSemiLattice ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Eq a => Eq ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Typeable DefaultUni Interval Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( Interval a) = D1 (' MetaData "Interval" "Plutus.V1.Ledger.Interval" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' False ) ( C1 (' MetaCons "Interval" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "ivFrom") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( LowerBound a)) :*: S1 (' MetaSel (' Just "ivTo") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( UpperBound a))))

data Extended a Source #

A set extended with a positive and negative infinity.

Instances

Instances details
Functor Extended Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Methods

fmap :: (a -> b) -> Extended a -> Extended b Source #

( Typeable DefaultUni a, Lift DefaultUni a) => Lift DefaultUni ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Eq a => Eq ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => Ord ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Show a => Show ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Generic ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Associated Types

type Rep ( Extended a) :: Type -> Type Source #

NFData a => NFData ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Pretty a => Pretty ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

ToData a => ToData ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

FromData a => FromData ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

UnsafeFromData a => UnsafeFromData ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => Ord ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Eq a => Eq ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Typeable DefaultUni Extended Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( Extended a) = D1 (' MetaData "Extended" "Plutus.V1.Ledger.Interval" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' False ) ( C1 (' MetaCons "NegInf" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "Finite" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)) :+: C1 (' MetaCons "PosInf" ' PrefixI ' False ) ( U1 :: Type -> Type )))

type Closure = Bool Source #

Whether a bound is inclusive or not.

data UpperBound a Source #

The upper bound of an interval.

Instances

Instances details
Functor UpperBound Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

( Typeable DefaultUni a, Lift DefaultUni ( Extended a)) => Lift DefaultUni ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Eq a => Eq ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => Ord ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Show a => Show ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Generic ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Associated Types

type Rep ( UpperBound a) :: Type -> Type Source #

NFData a => NFData ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Pretty a => Pretty ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

ToData a => ToData ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

FromData a => FromData ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

UnsafeFromData a => UnsafeFromData ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => Ord ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Eq a => Eq ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Typeable DefaultUni UpperBound Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

data LowerBound a Source #

The lower bound of an interval.

Instances

Instances details
Functor LowerBound Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

( Typeable DefaultUni a, Lift DefaultUni ( Extended a)) => Lift DefaultUni ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Eq a => Eq ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => Ord ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Show a => Show ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Generic ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Associated Types

type Rep ( LowerBound a) :: Type -> Type Source #

NFData a => NFData ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Pretty a => Pretty ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

ToData a => ToData ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

FromData a => FromData ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

UnsafeFromData a => UnsafeFromData ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Ord a => Ord ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Eq a => Eq ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

Typeable DefaultUni LowerBound Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

type Rep ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

always :: Interval a Source #

An Interval that covers every slot.

from :: a -> Interval a Source #

from a is an Interval that includes all values that are greater than or equal to a .

to :: a -> Interval a Source #

to a is an Interval that includes all values that are smaller than or equal to a .

Newtypes for script/datum types and hash types

newtype Validator Source #

Validator is a wrapper around Script s which are used as validators in transaction outputs.

Instances

Instances details
Eq Validator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord Validator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show Validator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic Validator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

NFData Validator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty Validator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Serialise Validator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep Validator Source #
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-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "Validator" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getValidator") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Script )))

newtype ValidatorHash Source #

Script runtime representation of a Digest SHA256 .

Instances

Instances details
Eq ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

IsString ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

NFData ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Eq ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Lift DefaultUni ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Typeable DefaultUni ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep ValidatorHash Source #
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-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "ValidatorHash" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinByteString )))

newtype MintingPolicy Source #

MintingPolicy is a wrapper around Script s which are used as validators for minting constraints.

Instances

Instances details
Eq MintingPolicy Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord MintingPolicy Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show MintingPolicy Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic MintingPolicy Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

NFData MintingPolicy Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty MintingPolicy Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Serialise MintingPolicy Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep MintingPolicy Source #
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-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "MintingPolicy" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getMintingPolicy") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Script )))

newtype MintingPolicyHash Source #

Script runtime representation of a Digest SHA256 .

Instances

Instances details
Eq MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

IsString MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

NFData MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Eq MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Lift DefaultUni MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Typeable DefaultUni MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep MintingPolicyHash Source #
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-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "MintingPolicyHash" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinByteString )))

newtype StakeValidator Source #

StakeValidator is a wrapper around Script s which are used as validators for withdrawals and stake address certificates.

Instances

Instances details
Eq StakeValidator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord StakeValidator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show StakeValidator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic StakeValidator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

NFData StakeValidator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty StakeValidator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Serialise StakeValidator Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep StakeValidator Source #
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-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "StakeValidator" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getStakeValidator") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Script )))

newtype StakeValidatorHash Source #

Script runtime representation of a Digest SHA256 .

Instances

Instances details
Eq StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

IsString StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

NFData StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Eq StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Lift DefaultUni StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Typeable DefaultUni StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep StakeValidatorHash Source #
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-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "StakeValidatorHash" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinByteString )))

newtype Redeemer Source #

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

Instances

Instances details
Eq Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

NFData Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Eq Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Lift DefaultUni Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Typeable DefaultUni Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep Redeemer Source #
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-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "Redeemer" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getRedeemer") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinData )))

newtype RedeemerHash Source #

Script runtime representation of a Digest SHA256 .

Instances

Instances details
Eq RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

IsString RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

NFData RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Eq RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Lift DefaultUni RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Typeable DefaultUni RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep RedeemerHash Source #
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-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "RedeemerHash" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinByteString )))

newtype Datum Source #

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

Constructors

Datum

Instances

Instances details
Eq Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

NFData Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Eq Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Lift DefaultUni Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Typeable DefaultUni Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep Datum Source #
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-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "Datum" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getDatum") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinData )))

newtype DatumHash Source #

Script runtime representation of a Digest SHA256 .

Instances

Instances details
Eq DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

IsString DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

NFData DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Eq DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Lift DefaultUni DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

Typeable DefaultUni DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep DatumHash Source #
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-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "DatumHash" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinByteString )))

Data

data Data Source #

A generic "data" type.

The main constructor Constr represents a datatype value in sum-of-products form: Constr i args represents a use of the i th constructor along with its arguments.

The other constructors are various primitives.

Instances

Instances details
Eq Data
Instance details

Defined in PlutusCore.Data

Data Data
Instance details

Defined in PlutusCore.Data

Methods

gfoldl :: ( forall d b. Data0 d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Data -> c Data Source #

gunfold :: ( forall b r. Data0 b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c Data Source #

toConstr :: Data -> Constr Source #

dataTypeOf :: Data -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data0 d => c (t d)) -> Maybe (c Data ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data0 d, Data0 e) => c (t d e)) -> Maybe (c Data ) Source #

gmapT :: ( forall b. Data0 b => b -> b) -> Data -> Data Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data0 d => d -> r') -> Data -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data0 d => d -> r') -> Data -> r Source #

gmapQ :: ( forall d. Data0 d => d -> u) -> Data -> [u] Source #

gmapQi :: Int -> ( forall d. Data0 d => d -> u) -> Data -> u Source #

gmapM :: Monad m => ( forall d. Data0 d => d -> m d) -> Data -> m Data Source #

gmapMp :: MonadPlus m => ( forall d. Data0 d => d -> m d) -> Data -> m Data Source #

gmapMo :: MonadPlus m => ( forall d. Data0 d => d -> m d) -> Data -> m Data Source #

Ord Data
Instance details

Defined in PlutusCore.Data

Show Data
Instance details

Defined in PlutusCore.Data

Generic Data
Instance details

Defined in PlutusCore.Data

Associated Types

type Rep Data :: Type -> Type Source #

NFData Data
Instance details

Defined in PlutusCore.Data

ExMemoryUsage Data
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Pretty Data
Instance details

Defined in PlutusCore.Data

Serialise Data
Instance details

Defined in PlutusCore.Data

PrettyBy ConstConfig Data
Instance details

Defined in PlutusCore.Pretty.PrettyConst

HasConstantIn DefaultUni term => MakeKnownIn DefaultUni term Data
Instance details

Defined in PlutusCore.Default.Universe

HasConstantIn DefaultUni term => ReadKnownIn DefaultUni term Data
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeAst DefaultUni Data => KnownTypeAst DefaultUni Data
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Data
Instance details

Defined in PlutusCore.Default.Universe

type Rep Data
Instance details

Defined in PlutusCore.Data

type ToBinds Data
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds Data = ToBinds (ElaborateBuiltin Data )
type ToHoles Data
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles Data = ToHoles (ElaborateBuiltin Data )

data BuiltinData Source #

A type corresponding to the Plutus Core builtin equivalent of Data .

The point of this type is to be an opaque equivalent of Data , so as to ensure that it is only used in ways that the compiler can handle.

As such, you should use this type in your on-chain code, and in any data structures that you want to be representable on-chain.

For off-chain usage, there are conversion functions builtinDataToData and dataToBuiltinData , but note that these will not work on-chain.

Instances

Instances details
Eq BuiltinData
Instance details

Defined in PlutusTx.Builtins.Internal

Data BuiltinData
Instance details

Defined in PlutusTx.Builtins.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> BuiltinData -> c BuiltinData Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c BuiltinData Source #

toConstr :: BuiltinData -> Constr Source #

dataTypeOf :: BuiltinData -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c BuiltinData ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c BuiltinData ) Source #

gmapT :: ( forall b. Data b => b -> b) -> BuiltinData -> BuiltinData Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> BuiltinData -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> BuiltinData -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> BuiltinData -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> BuiltinData -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source #

Ord BuiltinData
Instance details

Defined in PlutusTx.Builtins.Internal

Show BuiltinData
Instance details

Defined in PlutusTx.Builtins.Internal

NFData BuiltinData
Instance details

Defined in PlutusTx.Builtins.Internal

Pretty BuiltinData
Instance details

Defined in PlutusTx.Builtins.Internal

ToData BuiltinData
Instance details

Defined in PlutusTx.IsData.Class

FromData BuiltinData
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData BuiltinData
Instance details

Defined in PlutusTx.IsData.Class

Eq BuiltinData
Instance details

Defined in PlutusTx.Eq

FromBuiltin BuiltinData BuiltinData
Instance details

Defined in PlutusTx.Builtins.Class

ToBuiltin BuiltinData BuiltinData
Instance details

Defined in PlutusTx.Builtins.Class

ToBuiltin [( BuiltinData , BuiltinData )] ( BuiltinList ( BuiltinPair BuiltinData BuiltinData ))
Instance details

Defined in PlutusTx.Builtins.Class

ToBuiltin [ BuiltinData ] ( BuiltinList BuiltinData )
Instance details

Defined in PlutusTx.Builtins.Class

ToBuiltin ( BuiltinData , BuiltinData ) ( BuiltinPair BuiltinData BuiltinData )
Instance details

Defined in PlutusTx.Builtins.Class

class ToData a where Source #

A typeclass for types that can be converted to and from BuiltinData .

Instances

Instances details
( TypeError (' Text "Int is not supported, use Integer instead") :: Constraint ) => ToData Int
Instance details

Defined in PlutusTx.IsData.Class

ToData Integer
Instance details

Defined in PlutusTx.IsData.Class

ToData Void
Instance details

Defined in PlutusTx.IsData.Class

ToData Rational
Instance details

Defined in PlutusTx.Ratio

ToData BuiltinByteString
Instance details

Defined in PlutusTx.IsData.Class

ToData BuiltinData
Instance details

Defined in PlutusTx.IsData.Class

ToData DiffMilliSeconds Source #
Instance details

Defined in Plutus.V1.Ledger.Time

ToData POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

ToData LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

ToData StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData ScriptHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToData Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

ToData AssetClass Source #
Instance details

Defined in Plutus.V1.Ledger.Value

ToData TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

ToData CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

ToData PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

ToData Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

ToData StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

ToData DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

ToData Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

ToData TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

ToData TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

ToData TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

ToData TxOut Source #
Instance details

Defined in Plutus.V2.Ledger.Tx

ToData OutputDatum Source #
Instance details

Defined in Plutus.V2.Ledger.Tx

ToData ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData ScriptContext Source #
Instance details

Defined in Plutus.V2.Ledger.Contexts

ToData TxInfo Source #
Instance details

Defined in Plutus.V2.Ledger.Contexts

ToData TxInInfo Source #
Instance details

Defined in Plutus.V2.Ledger.Contexts

ToData a => ToData [a]
Instance details

Defined in PlutusTx.IsData.Class

ToData a => ToData ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

ToData a => ToData ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

ToData a => ToData ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

ToData a => ToData ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

( ToData k, ToData v) => ToData ( Map k v)
Instance details

Defined in PlutusTx.AssocMap

class FromData a where Source #

Methods

fromBuiltinData :: BuiltinData -> Maybe a Source #

Convert a value from BuiltinData , returning Nothing if this fails.

Instances

Instances details
( TypeError (' Text "Int is not supported, use Integer instead") :: Constraint ) => FromData Int
Instance details

Defined in PlutusTx.IsData.Class

FromData Integer
Instance details

Defined in PlutusTx.IsData.Class

FromData Void
Instance details

Defined in PlutusTx.IsData.Class

FromData Rational
Instance details

Defined in PlutusTx.Ratio

FromData BuiltinByteString
Instance details

Defined in PlutusTx.IsData.Class

FromData BuiltinData
Instance details

Defined in PlutusTx.IsData.Class

FromData DiffMilliSeconds Source #
Instance details

Defined in Plutus.V1.Ledger.Time

FromData POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

FromData LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

FromData StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData ScriptHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromData Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

FromData AssetClass Source #
Instance details

Defined in Plutus.V1.Ledger.Value

FromData TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

FromData CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

FromData PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

FromData Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

FromData StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

FromData DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

FromData Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

FromData TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

FromData TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

FromData TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

FromData TxOut Source #
Instance details

Defined in Plutus.V2.Ledger.Tx

FromData OutputDatum Source #
Instance details

Defined in Plutus.V2.Ledger.Tx

FromData ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData ScriptContext Source #
Instance details

Defined in Plutus.V2.Ledger.Contexts

FromData TxInfo Source #
Instance details

Defined in Plutus.V2.Ledger.Contexts

FromData TxInInfo Source #
Instance details

Defined in Plutus.V2.Ledger.Contexts

FromData a => FromData [a]
Instance details

Defined in PlutusTx.IsData.Class

FromData a => FromData ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

FromData a => FromData ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

FromData a => FromData ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

FromData a => FromData ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

( FromData k, FromData v) => FromData ( Map k v)
Instance details

Defined in PlutusTx.AssocMap

class UnsafeFromData a where Source #

Methods

unsafeFromBuiltinData :: BuiltinData -> a Source #

Convert a value from BuiltinData , calling error if this fails. This is typically much faster than fromBuiltinData .

When implementing this function, make sure to call unsafeFromBuiltinData rather than fromBuiltinData when converting substructures!

Instances

Instances details
( TypeError (' Text "Int is not supported, use Integer instead") :: Constraint ) => UnsafeFromData Int
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData Integer
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData Void
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData Rational
Instance details

Defined in PlutusTx.Ratio

UnsafeFromData BuiltinByteString
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData BuiltinData
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData DiffMilliSeconds Source #
Instance details

Defined in Plutus.V1.Ledger.Time

UnsafeFromData POSIXTime Source #
Instance details

Defined in Plutus.V1.Ledger.Time

UnsafeFromData LedgerBytes Source #
Instance details

Defined in Plutus.V1.Ledger.Bytes

UnsafeFromData StakeValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData MintingPolicyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData RedeemerHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData DatumHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData ValidatorHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData ScriptHash Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData Redeemer Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData Datum Source #
Instance details

Defined in Plutus.V1.Ledger.Scripts

UnsafeFromData Value Source #
Instance details

Defined in Plutus.V1.Ledger.Value

UnsafeFromData AssetClass Source #
Instance details

Defined in Plutus.V1.Ledger.Value

UnsafeFromData TokenName Source #
Instance details

Defined in Plutus.V1.Ledger.Value

UnsafeFromData CurrencySymbol Source #
Instance details

Defined in Plutus.V1.Ledger.Value

UnsafeFromData PubKeyHash Source #
Instance details

Defined in Plutus.V1.Ledger.Crypto

UnsafeFromData Credential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

UnsafeFromData StakingCredential Source #
Instance details

Defined in Plutus.V1.Ledger.Credential

UnsafeFromData DCert Source #
Instance details

Defined in Plutus.V1.Ledger.DCert

UnsafeFromData Address Source #
Instance details

Defined in Plutus.V1.Ledger.Address

UnsafeFromData TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

UnsafeFromData TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

UnsafeFromData TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

UnsafeFromData TxOut Source #
Instance details

Defined in Plutus.V2.Ledger.Tx

UnsafeFromData OutputDatum Source #
Instance details

Defined in Plutus.V2.Ledger.Tx

UnsafeFromData ScriptContext Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

UnsafeFromData TxInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

UnsafeFromData ScriptPurpose Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

UnsafeFromData TxInInfo Source #
Instance details

Defined in Plutus.V1.Ledger.Contexts

UnsafeFromData ScriptContext Source #
Instance details

Defined in Plutus.V2.Ledger.Contexts

UnsafeFromData TxInfo Source #
Instance details

Defined in Plutus.V2.Ledger.Contexts

UnsafeFromData TxInInfo Source #
Instance details

Defined in Plutus.V2.Ledger.Contexts

UnsafeFromData a => UnsafeFromData [a]
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData a => UnsafeFromData ( LowerBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

UnsafeFromData a => UnsafeFromData ( UpperBound a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

UnsafeFromData a => UnsafeFromData ( Extended a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

UnsafeFromData a => UnsafeFromData ( Interval a) Source #
Instance details

Defined in Plutus.V1.Ledger.Interval

( UnsafeFromData k, UnsafeFromData v) => UnsafeFromData ( Map k v)
Instance details

Defined in PlutusTx.AssocMap

toData :: ToData a => a -> Data Source #

Convert a value to Data .

fromData :: FromData a => Data -> Maybe a Source #

Convert a value from Data , returning Nothing if this fails.

Errors

data EvaluationError Source #

Errors that can be thrown when evaluating a Plutus script.

Constructors

CekError ( CekEvaluationException NamedDeBruijn DefaultUni DefaultFun )

An error from the evaluator itself

DeBruijnError FreeVariableError

An error in the pre-evaluation step of converting from de-Bruijn indices

CodecError DeserialiseFailure

A serialisation error

IncompatibleVersionError ( Version ())

An error indicating a version tag that we don't support TODO: make this error more informative when we have more information about what went wrong

CostModelParameterMismatch

An error indicating that the cost model parameters didn't match what we expected