sdk.txbuilder.getscriptdata
Home > @blaze-cardano/sdk > 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 |
The transaction witness set containing Plutus data. |
Returns:
IScriptData | undefined
{IScriptData | undefined} The full lscript data if datums or redeemers are present, otherwise undefined.