Skip to main content
Version: Next

tx.txbuilder.getscriptdata

Home > @blaze-cardano/tx > TxBuilder > getScriptData

TxBuilder.getScriptData() method

Generates a script data hash for the transaction if there are any datums or redeemers present. This hash is crucial for the validation of Plutus scripts in the transaction.

Signature:

protected getScriptData(tw: TransactionWitnessSet): IScriptData | undefined;

Parameters

Parameter

Type

Description

tw

TransactionWitnessSet

The transaction witness set containing Plutus data.

Returns:

IScriptData | undefined

{IScriptData | undefined} The full lscript data if datums or redeemers are present, otherwise undefined.