Transaction Builder API Create an unsigned transaction to merge multiple coins into one coin.


  • signer : <SuiAddress> - the transaction signer's Sui address

  • primary_coin : <ObjectID> - the coin object to merge into, this coin will remain after the transaction

  • coin_to_merge : <ObjectID> - the coin object to be merged, this coin will be destroyed, the balance will be added to `primary_coin`

  • gas : <ObjectID> - gas object to be used in this transaction, node will pick one from the signer's possession if not provided

  • gas_budget : <uint64> - the gas budget, the transaction will fail if the gas cost exceed the budget


  • TransactionBytes : <TransactionBytes>

    • gas : <[ObjectRef]> - the gas object to be used

    • inputObjects : <[InputObjectKind]> - objects to be used in this transaction

    • txBytes : <[Base64]> - BCS serialized transaction data bytes without its type tag, as base-64 encoded string.

Example Request and Result for unsafe_mergeCoins


curl --location 'https://sui-testnet.blastapi.io/<project-id>' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "unsafe_mergeCoins",
    "params": [
        "0x5b14e6b640d6254959803aafff56b3d42c559760f38c3f98a91f557233b8ebc9 ",

Last updated