merge Coins
suspend fun mergeCoins(signer: SuiAddress, primaryCoin: ObjectId, coinToMerge: ObjectId, gas: ObjectId? = null, gasBudget: Long): TransactionBlockBytes
Create an unsigned transaction to merge multiple coins into one coin.
Return
TransactionBlockBytes The transaction block bytes after the coin merge is completed.
Parameters
signer
The transaction signer's Sui address.
primary Coin
The coin object to merge into, this coin will remain after the transaction.
coin To Merge
The coin object to be merged, this coin will be destroyed, the balance will be added to [primaryCoin].
gas
The gas object to be used in this transaction, node will pick one from the signer's possession if not provided.
gas Budget
The gas budget, the transaction will fail if the gas cost exceed the budget.
Throws
if there is an error during the coin merge process.