sdk.txbuilder.lockassets
Home > @blaze-cardano/sdk > 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 | The address to lock the assets to. | |
| value | Value | The value of the assets to lock. | 
| datum | The datum to be associated with the locked assets. | |
| scriptReference | (Optional) The reference to the script to lock the assets to. | 
Returns:
{TxBuilder} The same transaction builder