sdk.computescriptdata
Home > @blaze-cardano/sdk > computeScriptData
computeScriptData() function
Calculates the correct script data hash for a transaction
Separate from the getScriptData
method in TxBuilder
to allow for more thorough testing This is heavily documented here: https://github.com/IntersectMBO/cardano-ledger/blob/master/eras/conway/impl/cddl-files/conway.cddl\#L423-L490
Signature:
declare function computeScriptData(redeemers: Redeemers, datums: ReturnType<TransactionWitnessSet["plutusData"]>, // TODO: weird import shenanigans
usedCostModels: Costmdls): IScriptData | undefined;
Parameters
Parameter |
Type |
Description |
---|---|---|
redeemers |
The redeemers of the transaction | |
datums |
ReturnType<TransactionWitnessSet["plutusData"]> |
The datums in the witness set of the transaction |
usedCostModels |
The cost models for any languages used in the transaction |
Returns:
IScriptData | undefined