sdk.txbuilder.providescript
Home > @blaze-cardano/sdk > TxBuilder > provideScript
TxBuilder.provideScript() method
Adds a script to the transaction's script scope. If the script is already provided via a reference script, it will not be explicitly used again. This method ensures that each script is only included once in the transaction, either directly or by reference, to optimize the transaction size and processing.
Signature:
provideScript(script: Script): TxBuilder;
Parameters
Parameter |
Type |
Description |
---|---|---|
script |
The script to be added to the transaction's script scope. |
Returns:
{TxBuilder} The same transaction builder