plutus-ledger-0.1.0.0: Wallet API
Safe HaskellNone
LanguageHaskell2010

Ledger

Synopsis

Documentation

data ExBudget Source #

Constructors

ExBudget 

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

Associated Types

type Rep ExBudget :: Type -> Type Source #

Semigroup ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Monoid ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

NFData ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

rnf :: ExBudget -> () Source #

ToJSON ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

FromJSON ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Pretty ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

pretty :: ExBudget -> Doc ann Source #

prettyList :: [ExBudget] -> Doc ann Source #

Lift ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

PrettyBy config ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

prettyBy :: config -> ExBudget -> Doc ann Source #

prettyListBy :: config -> [ExBudget] -> Doc ann Source #

type Rep ExBudget 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

type Rep ExBudget = D1 ('MetaData "ExBudget" "PlutusCore.Evaluation.Machine.ExBudget" "plutus-core-0.1.0.0-2XLgUgaJ2q72oJTCJd5lmc" '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 ExMemory Source #

Counts size in machine words.

Constructors

ExMemory CostingInteger 

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

Associated Types

type Rep ExMemory :: Type -> Type Source #

Semigroup ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Monoid ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

NFData ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

rnf :: ExMemory -> () Source #

ToJSON ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

FromJSON 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

Methods

pretty :: ExMemory -> Doc ann Source #

prettyList :: [ExMemory] -> Doc ann Source #

Lift ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

PrettyBy config ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

prettyBy :: config -> ExMemory -> Doc ann Source #

prettyListBy :: config -> [ExMemory] -> Doc ann Source #

type Rep ExMemory 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

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

newtype ExCPU Source #

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

Constructors

ExCPU CostingInteger 

Instances

Instances details
Eq ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

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

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

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

Associated Types

type Rep ExCPU :: Type -> Type Source #

Methods

from :: ExCPU -> Rep ExCPU x Source #

to :: Rep ExCPU x -> ExCPU Source #

Semigroup ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Monoid ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

NFData ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

rnf :: ExCPU -> () Source #

ToJSON ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

FromJSON ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Pretty ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

pretty :: ExCPU -> Doc ann Source #

prettyList :: [ExCPU] -> Doc ann Source #

Lift ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

PrettyBy config ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

prettyBy :: config -> ExCPU -> Doc ann Source #

prettyListBy :: config -> [ExCPU] -> Doc ann Source #

type Rep ExCPU 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

type Rep ExCPU = D1 ('MetaData "ExCPU" "PlutusCore.Evaluation.Machine.ExMemory" "plutus-core-0.1.0.0-2XLgUgaJ2q72oJTCJd5lmc" 'True) (C1 ('MetaCons "ExCPU" '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

Associated Types

type Rep SatInt :: Type -> Type Source #

NFData SatInt 
Instance details

Defined in Data.SatInt

Methods

rnf :: SatInt -> () Source #

FiniteBits 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

FromField SatInt 
Instance details

Defined in Data.SatInt

Prim 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-0.1.0.0-2XLgUgaJ2q72oJTCJd5lmc" 'True) (C1 ('MetaCons "SI" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSatInt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

spendsOutput :: TxInfo -> TxId -> Integer -> Bool Source #

Check if the pending transaction spends a specific transaction output (identified by the hash of a transaction and an index into that transactions' outputs)

ownCurrencySymbol :: ScriptContext -> CurrencySymbol Source #

The CurrencySymbol of the current validator script.

valueProduced :: TxInfo -> Value Source #

Get the total value of outputs produced by this transaction.

valueSpent :: TxInfo -> Value Source #

Get the total value of inputs spent by this transaction.

signsTransaction :: Signature -> PubKey -> TxInfo -> Bool Source #

Check if the provided signature is the result of signing the pending transaction (without witnesses) with the given public key.

adaLockedBy :: TxInfo -> ValidatorHash -> Ada Source #

Get the total amount of Ada locked by the given validator in this transaction.

valuePaidTo :: TxInfo -> PubKeyHash -> Value Source #

Get the total value paid to a public key address by a pending transaction.

pubKeyOutputsAt :: PubKeyHash -> TxInfo -> [Value] Source #

Get the values paid to a public key address by a pending transaction.

valueLockedBy :: TxInfo -> ValidatorHash -> Value Source #

Get the total value locked by the given validator in this transaction.

scriptOutputsAt :: ValidatorHash -> TxInfo -> [(DatumHash, Value)] Source #

Get the list of TxOut outputs of the pending transaction at a given script address.

ownHash :: ScriptContext -> ValidatorHash Source #

Get the hash of the validator script that is currently being validated.

ownHashes :: ScriptContext -> (ValidatorHash, DatumHash) Source #

Get the validator and datum hashes of the output that is curently being validated

pubKeyOutput :: TxOut -> Maybe PubKeyHash Source #

Get the public key hash that locks the transaction output, if any.

txSignedBy :: TxInfo -> PubKeyHash -> Bool Source #

Check if a transaction was signed by the given public key.

findContinuingOutputs :: ScriptContext -> [Integer] Source #

Finds all the outputs that pay to the same script address that we are currently spending from, if any.

findDatumHash :: Datum -> TxInfo -> Maybe DatumHash Source #

Find the hash of a datum, if it is part of the pending transaction's hashes

findDatum :: DatumHash -> TxInfo -> Maybe Datum Source #

Find the data corresponding to a data hash, if there is one

findOwnInput :: ScriptContext -> Maybe TxInInfo Source #

Find the input currently being validated.

data TxInInfo Source #

An input of a pending transaction.

Instances

Instances details
Eq TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Associated Types

type Rep TxInInfo :: Type -> Type Source #

Pretty TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

pretty :: TxInInfo -> Doc ann Source #

prettyList :: [TxInInfo] -> Doc ann Source #

UnsafeFromData TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Eq TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

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

Lift DefaultUni TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Typeable DefaultUni TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

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

data ScriptPurpose Source #

Purpose of the script that is currently running

Instances

Instances details
Eq ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Associated Types

type Rep ScriptPurpose :: Type -> Type Source #

Pretty ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

UnsafeFromData ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Eq ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Lift DefaultUni ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Typeable DefaultUni ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

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 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Associated Types

type Rep TxInfo :: Type -> Type Source #

Pretty TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

pretty :: TxInfo -> Doc ann Source #

prettyList :: [TxInfo] -> Doc ann Source #

UnsafeFromData TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Eq TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

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

Lift DefaultUni TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Typeable DefaultUni TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

data ScriptContext Source #

Instances

Instances details
Eq ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Associated Types

type Rep ScriptContext :: Type -> Type Source #

Pretty ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

UnsafeFromData ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

ToData ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Eq ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Lift DefaultUni ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Typeable DefaultUni ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

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

updateUtxoCollateral :: Tx -> Map TxOutRef TxOut -> Map TxOutRef TxOut Source #

Update a map of unspent transaction outputs and signatures for a failed transaction using its collateral inputs.

spentOutputs :: Tx -> Set TxOutRef Source #

The transaction output references consumed by a transaction.

pubKeyHashTxOut :: Value -> PubKeyHash -> TxOut Source #

Create a transaction output locked by a public key.

isPayToScriptOut :: TxOut -> Bool Source #

Whether the output is a pay-to-script output.

isPubKeyOut :: TxOut -> Bool Source #

Whether the output is a pay-to-pubkey output.

outValue :: Lens' TxOut Value Source #

The value of a transaction output. | TODO: Compute address again

outAddress :: Lens' TxOut Address Source #

The address of a transaction output.

txOutPubKey :: TxOut -> Maybe PubKeyHash Source #

The public key attached to a TxOut, if there is one.

txOutDatum :: TxOut -> Maybe DatumHash Source #

The datum attached to a TxOut, if there is one.

scriptTxIns :: Fold (Set TxIn) TxIn Source #

Filter to get only the script inputs.

pubKeyTxIns :: Fold (Set TxIn) TxIn Source #

Filter to get only the pubkey inputs.

scriptTxIn :: TxOutRef -> Validator -> Redeemer -> Datum -> TxIn Source #

A transaction input that spends a "pay to script" output, given witnesses.

pubKeyTxIn :: TxOutRef -> TxIn Source #

A transaction input that spends a "pay to public key" output, given the witness.

inScripts :: TxIn -> Maybe (Validator, Redeemer, Datum) Source #

Validator, redeemer, and data scripts of a transaction input that spends a "pay to script" output.

inType :: Lens' TxIn (Maybe TxInType) Source #

The type of a transaction input.

inRef :: Lens' TxIn TxOutRef Source #

The TxOutRef spent by a transaction input.

validValuesTx :: Tx -> Bool Source #

Check that all values in a transaction are non-negative.

validRange :: Lens' Tx SlotRange Source #

The validity range of a transaction.

outputs :: Lens' Tx [TxOut] Source #

The outputs of a transaction.

collateralInputs :: Lens' Tx (Set TxIn) Source #

The collateral inputs of a transaction for paying fees when validating the transaction fails.

inputs :: Lens' Tx (Set TxIn) Source #

The inputs of a transaction.

data Tx Source #

A transaction, including witnesses for its inputs.

Constructors

Tx 

Fields

Instances

Instances details
Eq Tx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

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

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

Show Tx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic Tx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep Tx :: Type -> Type Source #

Methods

from :: Tx -> Rep Tx x Source #

to :: Rep Tx x -> Tx Source #

Semigroup Tx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

(<>) :: Tx -> Tx -> Tx Source #

sconcat :: NonEmpty Tx -> Tx Source #

stimes :: Integral b => b -> Tx -> Tx Source #

Monoid Tx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

mempty :: Tx Source #

mappend :: Tx -> Tx -> Tx Source #

mconcat :: [Tx] -> Tx Source #

NFData Tx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: Tx -> () Source #

ToJSON Tx 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromJSON Tx 
Instance details

Defined in Plutus.V1.Ledger.Tx

ByteArrayAccess Tx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

length :: Tx -> Int Source #

withByteArray :: Tx -> (Ptr p -> IO a) -> IO a Source #

copyByteArrayToPtr :: Tx -> Ptr p -> IO () Source #

ToSchema Tx Source # 
Instance details

Defined in Ledger.Orphans

Serialise Tx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Pretty Tx Source # 
Instance details

Defined in Ledger.Tx

Methods

pretty :: Tx -> Doc ann Source #

prettyList :: [Tx] -> Doc ann Source #

type Rep Tx 
Instance details

Defined in Plutus.V1.Ledger.Tx

data TxStripped Source #

A transaction without witnesses for its inputs.

Constructors

TxStripped 

Fields

Instances

Instances details
Eq TxStripped 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxStripped 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxStripped 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxStripped :: Type -> Type Source #

Serialise TxStripped 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxStripped 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxStripped = D1 ('MetaData "TxStripped" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" 'False) (C1 ('MetaCons "TxStripped" 'PrefixI 'True) ((S1 ('MetaSel ('Just "txStrippedInputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set TxOutRef)) :*: S1 ('MetaSel ('Just "txStrippedOutputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxOut])) :*: (S1 ('MetaSel ('Just "txStrippedMint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Value) :*: S1 ('MetaSel ('Just "txStrippedFee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Value))))

data ScriptTag Source #

A tag indicating the type of script that we are pointing to. NOTE: Cert/Reward are not supported right now.

Constructors

Spend 
Mint 
Cert 
Reward 

Instances

Instances details
Eq ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep ScriptTag :: Type -> Type Source #

NFData ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: ScriptTag -> () Source #

ToJSON ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromJSON ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

ToSchema ScriptTag Source # 
Instance details

Defined in Ledger.Orphans

Serialise ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep ScriptTag = D1 ('MetaData "ScriptTag" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" 'False) ((C1 ('MetaCons "Spend" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mint" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Cert" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Reward" 'PrefixI 'False) (U1 :: Type -> Type)))

data RedeemerPtr Source #

A redeemer pointer is a pair of a script type tag t and an index i, picking out the ith script of type t in the transaction.

Instances

Instances details
Eq RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep RedeemerPtr :: Type -> Type Source #

NFData RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: RedeemerPtr -> () Source #

ToJSON RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

ToJSONKey RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromJSON RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromJSONKey RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

ToSchema RedeemerPtr Source # 
Instance details

Defined in Ledger.Orphans

Serialise RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep RedeemerPtr = D1 ('MetaData "RedeemerPtr" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" 'False) (C1 ('MetaCons "RedeemerPtr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScriptTag) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))

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 
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxOutRef :: Type -> Type Source #

NFData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: TxOutRef -> () Source #

ToJSON TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

ToJSONKey TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromJSON TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromJSONKey TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

ToSchema TxOutRef Source # 
Instance details

Defined in Ledger.Orphans

Serialise TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Pretty TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

pretty :: TxOutRef -> Doc ann Source #

prettyList :: [TxOutRef] -> Doc ann Source #

UnsafeFromData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

ToData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Eq TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

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

Lift DefaultUni TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Typeable DefaultUni TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOutRef = D1 ('MetaData "TxOutRef" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" '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 TxInType Source #

The type of a transaction input.

Constructors

ConsumeScriptAddress !Validator !Redeemer !Datum

A transaction input that consumes a script address with the given validator, redeemer, and datum.

ConsumePublicKeyAddress

A transaction input that consumes a public key address.

ConsumeSimpleScriptAddress

Consume a simple script

Instances

Instances details
Eq TxInType 
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxInType 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxInType 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxInType 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxInType :: Type -> Type Source #

NFData TxInType 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: TxInType -> () Source #

ToJSON TxInType 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromJSON TxInType 
Instance details

Defined in Plutus.V1.Ledger.Tx

ToSchema TxInType Source # 
Instance details

Defined in Ledger.Orphans

Serialise TxInType 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxInType 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxInType = D1 ('MetaData "TxInType" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" 'False) (C1 ('MetaCons "ConsumeScriptAddress" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Validator) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Redeemer) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Datum))) :+: (C1 ('MetaCons "ConsumePublicKeyAddress" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConsumeSimpleScriptAddress" 'PrefixI 'False) (U1 :: Type -> Type)))

data TxIn Source #

A transaction input, consisting of a transaction output reference and an input type.

Constructors

TxIn 

Instances

Instances details
Eq TxIn 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

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

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

Ord TxIn 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxIn 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxIn 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxIn :: Type -> Type Source #

Methods

from :: TxIn -> Rep TxIn x Source #

to :: Rep TxIn x -> TxIn Source #

NFData TxIn 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: TxIn -> () Source #

ToJSON TxIn 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromJSON TxIn 
Instance details

Defined in Plutus.V1.Ledger.Tx

ToSchema TxIn Source # 
Instance details

Defined in Ledger.Orphans

Serialise TxIn 
Instance details

Defined in Plutus.V1.Ledger.Tx

Pretty TxIn 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

pretty :: TxIn -> Doc ann Source #

prettyList :: [TxIn] -> Doc ann Source #

type Rep TxIn 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxIn = D1 ('MetaData "TxIn" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" 'False) (C1 ('MetaCons "TxIn" 'PrefixI 'True) (S1 ('MetaSel ('Just "txInRef") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxOutRef) :*: S1 ('MetaSel ('Just "txInType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TxInType))))

data TxOut Source #

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

Instances

Instances details
Eq TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

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

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

Show TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxOut :: Type -> Type Source #

Methods

from :: TxOut -> Rep TxOut x Source #

to :: Rep TxOut x -> TxOut Source #

NFData TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: TxOut -> () Source #

ToJSON TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromJSON TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

ToSchema TxOut Source # 
Instance details

Defined in Ledger.Orphans

Serialise TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Pretty TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

pretty :: TxOut -> Doc ann Source #

prettyList :: [TxOut] -> Doc ann Source #

UnsafeFromData TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromData TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

ToData TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Eq TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

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

Lift DefaultUni TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Typeable DefaultUni TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOut = D1 ('MetaData "TxOut" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" 'False) (C1 ('MetaCons "TxOut" 'PrefixI 'True) (S1 ('MetaSel ('Just "txOutAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Address) :*: (S1 ('MetaSel ('Just "txOutValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Just "txOutDatumHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe DatumHash)))))

data TxOutTx Source #

A TxOut along with the Tx it comes from, which may have additional information e.g. the full data script that goes with the TxOut.

Constructors

TxOutTx 

Fields

Instances

Instances details
Eq TxOutTx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxOutTx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxOutTx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxOutTx :: Type -> Type Source #

ToJSON TxOutTx 
Instance details

Defined in Plutus.V1.Ledger.Tx

FromJSON TxOutTx 
Instance details

Defined in Plutus.V1.Ledger.Tx

Serialise TxOutTx 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOutTx 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOutTx = D1 ('MetaData "TxOutTx" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" 'False) (C1 ('MetaCons "TxOutTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "txOutTxTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tx) :*: S1 ('MetaSel ('Just "txOutTxOut") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOut)))

stakingCredential :: Address -> Maybe StakingCredential Source #

The staking credential of an address (if any)

scriptHashAddress :: ValidatorHash -> Address Source #

The address that should be used by a transaction output locked by the given validator script hash.

toValidatorHash :: Address -> Maybe ValidatorHash Source #

The validator hash of the address, if any

toPubKeyHash :: Address -> Maybe PubKeyHash Source #

The PubKeyHash of the address, if any

data Address Source #

Address with two kinds of credentials, normal and staking.

Instances

Instances details
Eq Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Ord Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Show Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Generic Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Associated Types

type Rep Address :: Type -> Type Source #

NFData Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Methods

rnf :: Address -> () Source #

Hashable Address 
Instance details

Defined in Plutus.V1.Ledger.Address

ToJSON Address 
Instance details

Defined in Plutus.V1.Ledger.Address

ToJSONKey Address 
Instance details

Defined in Plutus.V1.Ledger.Address

FromJSON Address 
Instance details

Defined in Plutus.V1.Ledger.Address

FromJSONKey Address 
Instance details

Defined in Plutus.V1.Ledger.Address

ToSchema Address Source # 
Instance details

Defined in Ledger.Orphans

Serialise Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Pretty Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Methods

pretty :: Address -> Doc ann Source #

prettyList :: [Address] -> Doc ann Source #

UnsafeFromData Address 
Instance details

Defined in Plutus.V1.Ledger.Address

FromData Address 
Instance details

Defined in Plutus.V1.Ledger.Address

ToData Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Eq Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Methods

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

Lift DefaultUni Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Typeable DefaultUni Address 
Instance details

Defined in Plutus.V1.Ledger.Address

type Rep Address 
Instance details

Defined in Plutus.V1.Ledger.Address

type Rep Address = D1 ('MetaData "Address" "Plutus.V1.Ledger.Address" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" '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 Signature Source #

A message with a cryptographic signature.

Constructors

Signature 

Instances

Instances details
Eq Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Ord Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Show Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Generic Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Associated Types

type Rep Signature :: Type -> Type Source #

NFData Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Methods

rnf :: Signature -> () Source #

ToJSON Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

FromJSON Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

ToSchema Signature Source # 
Instance details

Defined in Ledger.Orphans

Serialise Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Pretty Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Methods

pretty :: Signature -> Doc ann Source #

prettyList :: [Signature] -> Doc ann Source #

UnsafeFromData Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

FromData Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

ToData Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Ord Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Eq Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Lift DefaultUni Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Typeable DefaultUni Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

type Rep Signature 
Instance details

Defined in Plutus.V1.Ledger.Crypto

type Rep Signature = D1 ('MetaData "Signature" "Plutus.V1.Ledger.Crypto" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" 'True) (C1 ('MetaCons "Signature" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSignature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))

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 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Ord PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Show PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

IsString PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Generic PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Associated Types

type Rep PubKeyHash :: Type -> Type Source #

NFData PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Methods

rnf :: PubKeyHash -> () Source #

Hashable PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

ToJSON PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

ToJSONKey PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

FromJSON PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

FromJSONKey PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Newtype PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Associated Types

type O PubKeyHash Source #

ToSchema PubKeyHash Source # 
Instance details

Defined in Ledger.Orphans

Serialise PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Pretty PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

UnsafeFromData PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

FromData PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

ToData PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Ord PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Eq PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Lift DefaultUni PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Typeable DefaultUni PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

type Rep PubKeyHash 
Instance details

Defined in Plutus.V1.Ledger.Crypto

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

Defined in Plutus.V1.Ledger.Crypto

newtype PubKey Source #

A cryptographic public key.

Constructors

PubKey 

Instances

Instances details
Eq PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Ord PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Show PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

IsString PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Generic PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Associated Types

type Rep PubKey :: Type -> Type Source #

NFData PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Methods

rnf :: PubKey -> () Source #

ToJSON PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

ToJSONKey PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

FromJSON PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

FromJSONKey PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Newtype PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Associated Types

type O PubKey Source #

ToSchema PubKey Source # 
Instance details

Defined in Ledger.Orphans

Serialise PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Pretty PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Methods

pretty :: PubKey -> Doc ann Source #

prettyList :: [PubKey] -> Doc ann Source #

UnsafeFromData PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

FromData PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

ToData PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Ord PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Eq PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Methods

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

Lift DefaultUni PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

Typeable DefaultUni PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

type Rep PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

type Rep PubKey = D1 ('MetaData "PubKey" "Plutus.V1.Ledger.Crypto" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" 'True) (C1 ('MetaCons "PubKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPubKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LedgerBytes)))
type O PubKey 
Instance details

Defined in Plutus.V1.Ledger.Crypto

type O PubKey = GO (Rep PubKey)

unitRedeemer :: Redeemer Source #

() as a redeemer.

unitDatum :: Datum Source #

() as a datum.

runMintingPolicyScript :: MonadError ScriptError m => Context -> MintingPolicy -> Redeemer -> m (ExBudget, [Text]) Source #

Evaluate a MintingPolicy with its Context and Redeemer, returning the log.

runScript :: MonadError ScriptError m => Context -> Validator -> Datum -> Redeemer -> m (ExBudget, [Text]) Source #

Evaluate a Validator with its Context, Datum, and Redeemer, returning the log.

evaluateScript :: MonadError ScriptError m => Script -> m (ExBudget, [Text]) Source #

Evaluate a script, returning the trace log.

fromCompiledCode :: CompiledCode a -> Script Source #

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

scriptSize :: Script -> Integer Source #

The size of a Script. No particular interpretation is given to this, other than that it is proportional to the serialized size of the script.

newtype Script Source #

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

Instances

Instances details
Eq Script 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord Script 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show Script 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic Script 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep Script :: Type -> Type Source #

NFData Script 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: Script -> () Source #

ToJSON Script 
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromJSON Script 
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToSchema Script Source # 
Instance details

Defined in Ledger.Orphans

Serialise Script 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep Script 
Instance details

Defined in Plutus.V1.Ledger.Scripts

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

data ScriptError Source #

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
Eq ScriptError 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show ScriptError 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic ScriptError 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep ScriptError :: Type -> Type Source #

NFData ScriptError 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: ScriptError -> () Source #

ToJSON ScriptError 
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromJSON ScriptError 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep ScriptError 
Instance details

Defined in Plutus.V1.Ledger.Scripts

newtype Validator Source #

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

Constructors

Validator 

Fields