PScriptContext
warning
Modified in V2 version
Type that provides the context of a script execution. This includes details about the transaction and the purpose of the script within that transaction.
The Script Context is probably the most important piece of data your script receives. That is because this data is passed directly by the cardano node during the contract evaluation; hence it can always be trusted.
Definition:
export const PScriptContext = pstruct({
PScriptContext: {
tx: PTxInfo.type,
purpose: PScriptPurpose.type
}
});
tx
type: PTxInfo
purpose
type: PScriptPurpose