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

PlutusLedgerApi.V2.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.

Constructors

TxInfo 

Fields

Instances

Instances details
Generic TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Associated Types

type Rep TxInfo :: Type -> Type Source #

Show TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Eq TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

HasBlueprintDefinition TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Associated Types

type Unroll TxInfo :: [Type]

Methods

definitionId :: DefinitionId

FromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

ToData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

UnsafeFromData TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Pretty TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

pretty :: TxInfo -> Doc ann

prettyList :: [TxInfo] -> Doc ann

(HasSchemaDefinition [TxInInfo] referencedTypes, HasSchemaDefinition [TxOut] referencedTypes, HasSchemaDefinition Value referencedTypes, HasSchemaDefinition [DCert] referencedTypes, HasSchemaDefinition (Map StakingCredential Integer) referencedTypes, HasSchemaDefinition POSIXTimeRange referencedTypes, HasSchemaDefinition [PubKeyHash] referencedTypes, HasSchemaDefinition (Map ScriptPurpose Redeemer) referencedTypes, HasSchemaDefinition (Map DatumHash Datum) referencedTypes, HasSchemaDefinition TxId referencedTypes) => HasBlueprintSchema TxInfo referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

schema :: Schema referencedTypes

Lift DefaultUni TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

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

Typeable DefaultUni TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

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

type Rep TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

type Rep TxInfo = D1 ('MetaData "TxInfo" "PlutusLedgerApi.V2.Contexts" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'False) (C1 ('MetaCons "TxInfo" 'PrefixI 'True) (((S1 ('MetaSel ('Just "txInfoInputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxInInfo]) :*: (S1 ('MetaSel ('Just "txInfoReferenceInputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxInInfo]) :*: S1 ('MetaSel ('Just "txInfoOutputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxOut]))) :*: (S1 ('MetaSel ('Just "txInfoFee") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: (S1 ('MetaSel ('Just "txInfoMint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Just "txInfoDCert") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DCert])))) :*: ((S1 ('MetaSel ('Just "txInfoWdrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map StakingCredential Integer)) :*: (S1 ('MetaSel ('Just "txInfoValidRange") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTimeRange) :*: S1 ('MetaSel ('Just "txInfoSignatories") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PubKeyHash]))) :*: (S1 ('MetaSel ('Just "txInfoRedeemers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map ScriptPurpose Redeemer)) :*: (S1 ('MetaSel ('Just "txInfoData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map DatumHash Datum)) :*: S1 ('MetaSel ('Just "txInfoId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId))))))
type Unroll TxInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

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

data ScriptContext Source #

The context that the currently-executing script can access.

Constructors

ScriptContext 

Fields

Instances

Instances details
Generic ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Associated Types

type Rep ScriptContext :: Type -> Type Source #

Show ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Eq ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

FromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

ToData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

UnsafeFromData ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Pretty ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

pretty :: ScriptContext -> Doc ann

prettyList :: [ScriptContext] -> Doc ann

(HasSchemaDefinition TxInfo referencedTypes, HasSchemaDefinition ScriptPurpose referencedTypes) => HasBlueprintSchema ScriptContext referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

schema :: Schema referencedTypes

Lift DefaultUni ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

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

Typeable DefaultUni ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

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

type Rep ScriptContext Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

type Rep ScriptContext = D1 ('MetaData "ScriptContext" "PlutusLedgerApi.V2.Contexts" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" '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
Generic ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

Associated Types

type Rep ScriptPurpose :: Type -> Type Source #

Show ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

Eq ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

Ord ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

HasBlueprintDefinition ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

Associated Types

type Unroll ScriptPurpose :: [Type]

Methods

definitionId :: DefinitionId

Eq ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

FromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

ToData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

UnsafeFromData ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

Pretty ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

Methods

pretty :: ScriptPurpose -> Doc ann

prettyList :: [ScriptPurpose] -> Doc ann

(HasSchemaDefinition CurrencySymbol referencedTypes, HasSchemaDefinition TxOutRef referencedTypes, HasSchemaDefinition StakingCredential referencedTypes, HasSchemaDefinition DCert referencedTypes) => HasBlueprintSchema ScriptPurpose referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

Methods

schema :: Schema referencedTypes

Lift DefaultUni ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

Methods

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

Typeable DefaultUni ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

Methods

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

type Rep ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

type Unroll ScriptPurpose Source # 
Instance details

Defined in PlutusLedgerApi.V1.Contexts

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

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.

Constructors

TxId 

Instances

Instances details
IsString TxId Source #

from hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Tx

Generic TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Associated Types

type Rep TxId :: Type -> Type Source #

Methods

from :: TxId -> Rep TxId x Source #

to :: Rep TxId x -> TxId Source #

Show TxId Source #

using hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Tx

NFData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

rnf :: TxId -> () Source #

Eq TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

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

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

Ord TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

HasBlueprintDefinition TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Associated Types

type Unroll TxId :: [Type]

Methods

definitionId :: DefinitionId

Eq TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

(==) :: TxId -> TxId -> Bool

FromData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

ToData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

UnsafeFromData TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Ord TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

compare :: TxId -> TxId -> Ordering

(<) :: TxId -> TxId -> Bool

(<=) :: TxId -> TxId -> Bool

(>) :: TxId -> TxId -> Bool

(>=) :: TxId -> TxId -> Bool

max :: TxId -> TxId -> TxId

min :: TxId -> TxId -> TxId

Pretty TxId Source #

using hex encoding

Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

pretty :: TxId -> Doc ann

prettyList :: [TxId] -> Doc ann

HasSchemaDefinition BuiltinByteString referencedTypes => HasBlueprintSchema TxId referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

schema :: Schema referencedTypes

Lift DefaultUni TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

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

Typeable DefaultUni TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

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

type Rep TxId Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

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

Defined in PlutusLedgerApi.V1.Tx

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

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.Tx

Associated Types

type Rep TxOut :: Type -> Type Source #

Methods

from :: TxOut -> Rep TxOut x Source #

to :: Rep TxOut x -> TxOut Source #

Show TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

NFData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

Methods

rnf :: TxOut -> () Source #

Eq TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

Methods

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

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

HasBlueprintDefinition TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

Associated Types

type Unroll TxOut :: [Type]

Methods

definitionId :: DefinitionId

Eq TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

Methods

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

FromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

ToData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

UnsafeFromData TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

Pretty TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

Methods

pretty :: TxOut -> Doc ann

prettyList :: [TxOut] -> Doc ann

(HasSchemaDefinition Address referencedTypes, HasSchemaDefinition Value referencedTypes, HasSchemaDefinition OutputDatum referencedTypes, HasSchemaDefinition (Maybe ScriptHash) referencedTypes) => HasBlueprintSchema TxOut referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

Methods

schema :: Schema referencedTypes

Lift DefaultUni TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

Methods

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

Typeable DefaultUni TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

Methods

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

type Rep TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

type Rep TxOut = D1 ('MetaData "TxOut" "PlutusLedgerApi.V2.Tx" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" '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 "txOutDatum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OutputDatum) :*: S1 ('MetaSel ('Just "txOutReferenceScript") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ScriptHash)))))
type Unroll TxOut Source # 
Instance details

Defined in PlutusLedgerApi.V2.Tx

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

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.

Constructors

TxOutRef 

Fields

Instances

Instances details
Generic TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Associated Types

type Rep TxOutRef :: Type -> Type Source #

Show TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

NFData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

rnf :: TxOutRef -> () Source #

Eq TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Ord TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

HasBlueprintDefinition TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Associated Types

type Unroll TxOutRef :: [Type]

Methods

definitionId :: DefinitionId

Eq TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

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

FromData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

ToData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

UnsafeFromData TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Pretty TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

pretty :: TxOutRef -> Doc ann

prettyList :: [TxOutRef] -> Doc ann

(HasSchemaDefinition TxId referencedTypes, HasSchemaDefinition Integer referencedTypes) => HasBlueprintSchema TxOutRef referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

schema :: Schema referencedTypes

Lift DefaultUni TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

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

Typeable DefaultUni TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

Methods

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

type Rep TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

type Rep TxOutRef = D1 ('MetaData "TxOutRef" "PlutusLedgerApi.V1.Tx" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'False) (C1 ('MetaCons "TxOutRef" 'PrefixI 'True) (S1 ('MetaSel ('Just "txOutRefId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId) :*: S1 ('MetaSel ('Just "txOutRefIdx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))
type Unroll TxOutRef Source # 
Instance details

Defined in PlutusLedgerApi.V1.Tx

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

data TxInInfo Source #

An input of a pending transaction.

Instances

Instances details
Generic TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Associated Types

type Rep TxInInfo :: Type -> Type Source #

Show TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Eq TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

HasBlueprintDefinition TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Associated Types

type Unroll TxInInfo :: [Type]

Methods

definitionId :: DefinitionId

Eq TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

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

FromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

ToData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

UnsafeFromData TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Pretty TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

pretty :: TxInInfo -> Doc ann

prettyList :: [TxInInfo] -> Doc ann

(HasSchemaDefinition TxOutRef referencedTypes, HasSchemaDefinition TxOut referencedTypes) => HasBlueprintSchema TxInInfo referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

schema :: Schema referencedTypes

Lift DefaultUni TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

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

Typeable DefaultUni TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

Methods

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

type Rep TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

type Rep TxInInfo = D1 ('MetaData "TxInInfo" "PlutusLedgerApi.V2.Contexts" "plutus-ledger-api-1.36.0.0-5YP34Z4WNIC2QzLmhyGjha" 'False) (C1 ('MetaCons "TxInInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "txInInfoOutRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef) :*: S1 ('MetaSel ('Just "txInInfoResolved") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOut)))
type Unroll TxInInfo Source # 
Instance details

Defined in PlutusLedgerApi.V2.Contexts

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

findOwnInput :: ScriptContext -> Maybe TxInInfo Source #

Find the input currently being validated.

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

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

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

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

findTxInByTxOutRef :: TxOutRef -> TxInfo -> Maybe 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.

findContinuingOutputs :: ScriptContext -> [Integer] Source #

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

getContinuingOutputs :: ScriptContext -> [TxOut] Source #

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

Validator functions

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

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

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

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

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)

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

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

valueSpent :: TxInfo -> Value Source #

Get the total value of inputs spent by this transaction.

valueProduced :: TxInfo -> Value Source #

Get the total value of outputs produced by this transaction.

ownCurrencySymbol :: ScriptContext -> CurrencySymbol Source #

The CurrencySymbol of the current validator script.