Skip to main content
Version: Next

tx.txbuilder.providescript

Home > @blaze-cardano/tx > 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

Script

The script to be added to the transaction's script scope.

Returns:

TxBuilder

{TxBuilder} The same transaction builder