PTxInfo
The modifications in PTxInfo
from V2 version are highlighted.
It includes all the information (details about inputs, outputs, fees, minting, certificates, and various associated data) about a transaction in which the script is included.
Definition:
export const PTxInfo = pstruct({
PTxInfo: {
inputs: list( PTxInInfo.type ),
refInputs: list( PTxInInfo.type ),
outputs: list( PTxOut.type ),
fee: int, // lovelaces
/** mint has no lovelaces entry */
mint: PValue.type,
certificates: list( PCertificate.type ),
withdrawals: map( PCredential.type, int ),
interval: PPOSIXTimeRange.type,
signatories: list( PPubKeyHash.type ),
redeemers: map( PScriptPurpose.type, data ),
datums: map( PDatumHash.type, data ),
id: PTxId.type,
votes: map( PVoter.type, map( PTxOutRef.type, PVote.type ) ),
proposalProcedures: list( PProposalProcedure.type ),
currentTreasury: PMaybe( int ).type,
treasuryDonation: PMaybe( int ).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:
refInputs
Reference inputs of the transaction. These UTXOs are referenced but not consumed by the transaction. This additional context/information maybe necessary for the contract logic but do not directly affect the transaction's output.
type: list( PTxInInfo.type )
elements's type:
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 specified in lovelaces
type: TermInt
mint
Includes all tokens minted/burned in the transaction.
type: PValue.type
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
certificates
List of certificates associated with the transaction.
type: list( PCertificate.type )
elements's type: PCertificate
withdrawals
Map of withdrawals made during the transaction
type: map( PCredential.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
redeemers
Map of redeemers associated with specific script purposes
type: map( PScriptPurpose.type, data )
elements's types:
PScriptPurpose
data
datums
Map of datums identified by their hashes
type: map( PDatumHash.type, data )
elements's types:
PDatumHash
data
id
The unique identifier of the transaction, used to reference and track the specific transaction on the blockchain.
type: PTxId.type
votes
Map of votes cast in the transaction
type: map( PVoter.type, map( PTxOutRef.type, PVote.type ) )
elements's types:
proposalProcedures
List of proposal procedures included in the transaction
type: list( PProposalProcedure.type )
elements's types:
currentTreasury
(Optional) Current treasury amount
type: PMaybe( int ).type
treasuryDonation
(Optional) Treasury donation amount
type: PMaybe( int ).type