Skip to main content

Parameters

chainId
string
default:"sui"
required
Unique identifier for a blockchain network.
id
number
default:1
required
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"unsafe_payAllSui"
required
JSON-RPC method name.
params
object
required
Create an unsigned transaction to send all SUI coins to a recipient.Positional parameters for unsafe_payAllSui:
  • params[0]: The Sui address of the transaction signer.
  • params[1]: List of SUI coin object IDs to be used, including the gas coin.
  • params[2]: The recipient’s Sui address.
  • params[3]: The gas budget for the transaction.

Returns

result
object
Unsigned transaction block for sending all SUI coins to a recipient.
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=sui \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "unsafe_payAllSui",
    "params": [
      "0xabcde1234567890abcde1234567890abcde1234567890abcde1234567890abcd",
      [
        "0xcoin1",
        "0xcoin2",
        "0xcoin3"
      ],
      "0xrecipientaddress1234567890abcdefabcdef1234567890abcdef",
      "100000"
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {}
}