splitCoin

suspend fun splitCoin(signer: SuiAddress, coinObjectId: ObjectId, splitAmounts: List<Long>, gas: ObjectId? = null, gasBudget: Long): TransactionBlockBytes

Create an unsigned transaction to split a coin object into multiple coins.

Return

TransactionBlockBytes The transaction block bytes after the split is completed.

Parameters

signer

The transaction signer's Sui address.

coinObjectId

The ID of the coin to be split.

splitAmounts

The amounts to split out from the coin.

gas

The 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.

Throws

if there is an error during the split.