tx.txbuilder.lockassets
Home > @blaze-cardano/tx > TxBuilder > lockAssets
TxBuilder.lockAssets() method
Locks a specified amount of assets to a script. The difference between 'pay' and 'lock' is that you pay to a public key/user, and you lock at a script. This method ensures that the address is valid and the assets are locked to the script.
Signature:
lockAssets(address: Address, value: Value, datum: Datum, scriptReference?: Script): TxBuilder;
Parameters
Parameter |
Type |
Description |
---|---|---|
address |
Address |
The address to lock the assets to. |
value |
Value |
The value of the assets to lock. |
datum |
Datum |
The datum to be associated with the locked assets. |
scriptReference |
Script |
(Optional) The reference to the script to lock the assets to. |
Returns:
{TxBuilder} The same transaction builder