transferObject

suspend fun transferObject(signer: SuiAddress, objectId: ObjectId, gas: ObjectId? = null, gasBudget: Long, recipient: SuiAddress): TransactionBlockBytes

Create an unsigned transaction to transfer an object from one address to another. The object's type must allow public transfers.

Return

TransactionBlockBytes The transaction block bytes after the transfer is completed.

Parameters

signer

The transaction signer's Sui address.

objectId

The ID of the object being transferred.

gas

object to be used in this transaction, node will pick one from the signer's possession if not provided

gasBudget

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

recipient

The SUI address of the recipient account.

Throws

if there is an error during the transfer.