transferSui

suspend fun transferSui(signer: SuiAddress, suiObjectId: ObjectId, gasBudget: Long, recipient: SuiAddress, amount: Long): TransactionBlockBytes

Create an unsigned transaction to send SUI coin object to a Sui address. The SUI object is also used as the gas object.

Return

TransactionBlockBytes The transaction block bytes after the transfer is completed.

Parameters

signer

The transaction signer's Sui address.

suiObjectId

The Sui coin object to be used in this transaction.

gasBudget

The gas budget, the transaction will fail if the gas cost exceed the budget.

recipient

The SUI address of the recipient account.

amount

The amount to be split out and transferred.

Throws

if there is an error during the transfer.