unsafe_mergeCoins
Action required: Support for Sui JSON-RPC will end on September 25, 2026. Please migrate to Sui gRPC before then to avoid disruption. You can find our migration guide here.
Constructs a BCS-encoded transaction block that merges the balance of coin_to_merge into primary_coin.
This transaction must be signed and then submitted using a separate execute call. The gas object must be owned by the signer.
Path Parameters
docs-demoFor higher throughput, create your own API key
Request
The transaction signer's Sui address.
The coin object to merge into. This coin will remain after the transaction.
The coin object to be merged. It will be destroyed and its balance added to primary_coin.
The gas object to be used. If omitted, the node will auto-select one from the signer's owned coins.
The gas budget for the transaction. The transaction fails if gas used exceeds this.
Responses
200
The unsigned transaction block that merges coins.