Alchemy Logo

unsafe_mergeCoins

POST
/{apiKey}

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

apiKeystringrequireddefaults to docs-demo

For higher throughput, create your own API key

Request

signerstringrequired

The transaction signer's Sui address.

primary_coinstringrequired

The coin object to merge into. This coin will remain after the transaction.

coin_to_mergestringrequired

The coin object to be merged. It will be destroyed and its balance added to primary_coin.

gasstringoptional

The gas object to be used. If omitted, the node will auto-select one from the signer's owned coins.

gas_budgetstringrequired

The gas budget for the transaction. The transaction fails if gas used exceeds this.

Responses

200

The unsigned transaction block that merges coins.

Was this page helpful?