Skip to main content

PTxInfo

warning

Modified in V2 version

It is the first field of the PScriptContext structure.

It includes all the information regarding the transaction in which the script is included.

definition:

export const PTxInfo = pstruct({
PTxInfo: {
inputs: list( PTxInInfo.type ),
outputs: list( PTxOut.type ),
fee: PValue.type,
mint: PValue.type,
dCertificates: list( PDCert.type ),
withdrawals: list( pair( PStakingCredential.type, int ) ),
interval: PPOSIXTimeRange.type,
signatories: list( PPubKeyHash.type ),
datums: list( pair( PDatumHash.type, data ) ),
id: PTxId.type
}
})

Values implements all the properties defined on the TermList utility term.

inputs​

List of transaction inputs. Each input representing an unspent transaction output (UTXO) consumed by the current transaction.

type: list( PTxInInfo.type )

elements's type: PTxInInfo

outputs​

List of transaction outputs. Each output represents a new UTXO created by the transaction.

type: list( PTxOut.type )

elements's type: PTxOut

fee​

Transaction fee paid for processing the transaction. Despite being only a value it always includes a single entry which represents the lovelaces paid as fees.

type: PValue.type

mint​

Includes all tokens minted/burned in the transaction.

type: PValue.type

ADA entry

Being a value directly constructed by the node it always includes an entry for lovelaces

Since lovelaces can't be minted/burned the quantity will always be 0

dCertificates​

List of delegation certificates included in the transaction.

type: list( PDCert.type )

elements's type: PDCert

withdrawals​

A list of withdrawals from staking rewards. Each entry consists of a staking credential and the amount withdrawn.

type: list( pair( PStakingCredential.type, int ) )

elements's types:

interval​

Time interval during which the transaction is valid.

type: PPOSIXTimeRange.type

signatories​

A list of public key hashes of the parties that have signed the transaction to validate it.

type: list( PPubKeyHash.type )

elements's type: PPubKeyHash

datums​

A list of datums associated with the transaction. Each datum consists of a datum hash and the actual data, providing additional context or information for the transaction

type: list( pair( PDatumHash.type, data ) )

elements's types:

id​

The unique identifier of the transaction, used to reference and track the specific transaction on the blockchain.

type: PTxId.type