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

PlutusLedgerApi.V2.Data.Contexts

Synopsis

Pending transactions and related types

data TxInfo Source #

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

Instances

Instances details
Generic TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Associated Types

type Rep TxInfoTypeType Source #

Methods

fromTxInfoRep TxInfo x Source #

toRep TxInfo x → TxInfo Source #

Show TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

FromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

ToData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

UnsafeFromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Pretty TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Methods

prettyTxInfoDoc ann Source #

prettyList ∷ [TxInfo] → Doc ann Source #

Lift DefaultUni TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Typeable DefaultUni TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

type Rep TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

type Rep TxInfo = D1 ('MetaData "TxInfo" "PlutusLedgerApi.V2.Data.Contexts" "plutus-ledger-api-1.39.0.0-inplace" 'True) (C1 ('MetaCons "TxInfo_6989586621680817915" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))

data ScriptContext Source #

The context that the currently-executing script can access.

Instances

Instances details
Generic ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Associated Types

type Rep ScriptContextTypeType Source #

Show ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

FromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

ToData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

UnsafeFromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Pretty ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Lift DefaultUni ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Typeable DefaultUni ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

type Rep ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

type Rep ScriptContext = D1 ('MetaData "ScriptContext" "PlutusLedgerApi.V2.Data.Contexts" "plutus-ledger-api-1.39.0.0-inplace" 'True) (C1 ('MetaCons "ScriptContext_6989586621680819023" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))

data ScriptPurpose Source #

Purpose of the script that is currently running

Instances

Instances details
Generic ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

Associated Types

type Rep ScriptPurposeTypeType Source #

Show ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

Eq ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

Eq ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

FromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

ToData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

UnsafeFromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

Pretty ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

Lift DefaultUni ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

Typeable DefaultUni ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

type Rep ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Contexts

type Rep ScriptPurpose = D1 ('MetaData "ScriptPurpose" "PlutusLedgerApi.V1.Data.Contexts" "plutus-ledger-api-1.39.0.0-inplace" 'True) (C1 ('MetaCons "ScriptPurpose_6989586621680783942" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))

newtype TxId Source #

A transaction ID, i.e. the hash of a transaction. Hashed with BLAKE2b-256. 32 byte.

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

Constructors

TxId 

Instances

Instances details
IsString TxId Source #

from hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

fromStringStringTxId Source #

Generic TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Associated Types

type Rep TxIdTypeType Source #

Methods

fromTxIdRep TxId x Source #

toRep TxId x → TxId Source #

Show TxId Source #

using hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

showsPrecIntTxIdShowS Source #

showTxIdString Source #

showList ∷ [TxId] → ShowS Source #

NFData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

rnfTxId → () Source #

Eq TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

(==)TxIdTxIdBool Source #

(/=)TxIdTxIdBool Source #

Ord TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

compareTxIdTxIdOrdering Source #

(<)TxIdTxIdBool Source #

(<=)TxIdTxIdBool Source #

(>)TxIdTxIdBool Source #

(>=)TxIdTxIdBool Source #

maxTxIdTxIdTxId Source #

minTxIdTxIdTxId Source #

Eq TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

(==)TxIdTxIdBool Source #

FromData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

ToData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

UnsafeFromData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Ord TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

compareTxIdTxIdOrdering Source #

(<)TxIdTxIdBool Source #

(<=)TxIdTxIdBool Source #

(>)TxIdTxIdBool Source #

(>=)TxIdTxIdBool Source #

maxTxIdTxIdTxId Source #

minTxIdTxIdTxId Source #

Pretty TxId Source #

using hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

prettyTxIdDoc ann Source #

prettyList ∷ [TxId] → Doc ann Source #

Lift DefaultUni TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Typeable DefaultUni TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

type Rep TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

type Rep TxId = D1 ('MetaData "TxId" "PlutusLedgerApi.V1.Data.Tx" "plutus-ledger-api-1.39.0.0-inplace" 'True) (C1 ('MetaCons "TxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))

data TxOut Source #

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

Instances

Instances details
Generic TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

Associated Types

type Rep TxOutTypeType Source #

Methods

fromTxOutRep TxOut x Source #

toRep TxOut x → TxOut Source #

Show TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

Eq TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

Methods

(==)TxOutTxOutBool Source #

(/=)TxOutTxOutBool Source #

Eq TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

Methods

(==)TxOutTxOutBool Source #

FromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

ToData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

UnsafeFromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

Pretty TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

Methods

prettyTxOutDoc ann Source #

prettyList ∷ [TxOut] → Doc ann Source #

Lift DefaultUni TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

Typeable DefaultUni TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

type Rep TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Tx

type Rep TxOut = D1 ('MetaData "TxOut" "PlutusLedgerApi.V2.Data.Tx" "plutus-ledger-api-1.39.0.0-inplace" 'True) (C1 ('MetaCons "TxOut_6989586621680768021" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))

data TxOutRef Source #

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

Instances

Instances details
Generic TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Associated Types

type Rep TxOutRefTypeType Source #

Show TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

NFData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

rnfTxOutRef → () Source #

Eq TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Ord TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Eq TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

(==)TxOutRefTxOutRefBool Source #

FromData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

ToData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

UnsafeFromData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Pretty TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

prettyTxOutRefDoc ann Source #

prettyList ∷ [TxOutRef] → Doc ann Source #

Lift DefaultUni TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Typeable DefaultUni TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

type Rep TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

type Rep TxOutRef = D1 ('MetaData "TxOutRef" "PlutusLedgerApi.V1.Data.Tx" "plutus-ledger-api-1.39.0.0-inplace" 'True) (C1 ('MetaCons "TxOutRef_6989586621680742764" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))

pattern TxOutRefTxIdIntegerTxOutRef Source #

data TxInInfo Source #

An input of a pending transaction.

Instances

Instances details
Generic TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Associated Types

type Rep TxInInfoTypeType Source #

Show TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Eq TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Eq TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Methods

(==)TxInInfoTxInInfoBool Source #

FromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

ToData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

UnsafeFromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Pretty TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Methods

prettyTxInInfoDoc ann Source #

prettyList ∷ [TxInInfo] → Doc ann Source #

Lift DefaultUni TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

Typeable DefaultUni TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

type Rep TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Data.Contexts

type Rep TxInInfo = D1 ('MetaData "TxInInfo" "PlutusLedgerApi.V2.Data.Contexts" "plutus-ledger-api-1.39.0.0-inplace" 'True) (C1 ('MetaCons "TxInInfo_6989586621680816787" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))

pattern TxInInfoTxOutRefTxOutTxInInfo Source #

findOwnInputScriptContextMaybe TxInInfo Source #

Find the input currently being validated.

findDatumDatumHashTxInfoMaybe Datum Source #

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

findDatumHashDatumTxInfoMaybe DatumHash Source #

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

findTxInByTxOutRefTxOutRefTxInfoMaybe TxInInfo Source #

Given a UTXO reference and a transaction (TxInfo), resolve it to one of the transaction's inputs (TxInInfo). Note: this only searches the true transaction inputs and not the referenced transaction inputs.

findContinuingOutputsScriptContextList Integer Source #

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

getContinuingOutputsScriptContextList TxOut Source #

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

Validator functions

pubKeyOutputsAtPubKeyHashTxInfoList Value Source #

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

valuePaidToTxInfoPubKeyHashValue Source #

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

spendsOutputTxInfoTxIdIntegerBool 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)

txSignedByTxInfoPubKeyHashBool Source #

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

valueSpentTxInfoValue Source #

Get the total value of inputs spent by this transaction.

valueProducedTxInfoValue Source #

Get the total value of outputs produced by this transaction.

ownCurrencySymbolScriptContextCurrencySymbol Source #

The CurrencySymbol of the current validator script.