unsafe_pay
Send Coin<T> to a list of addresses, where T can be any coin type, following a list of amounts, The object specified in the gas field will be used to pay the gas fee for the transaction. The gas object can not appear in input_coins. If the gas object is not specified, the RPC server will auto-select one.
Parameters
signer·SuiAddress· requiredthe transaction signer's Sui addressinput_coins·ObjectID[] · requiredthe Sui coins to be used in this transactionrecipients·SuiAddress[] · requiredthe recipients' addresses, the length of this vector must be the same as amounts.amounts·BigInt<u64>[] · requiredthe amounts to be transferred to recipients, following the same ordergas·ObjectID· optionalgas object to be used in this transaction, node will pick one from the signer's possession if not providedgas_budget·BigInt<u64>· requiredthe gas budget, the transaction will fail if the gas cost exceed the budget
Result
TransactionBlockBytes·TransactionBlockBytesgas·ObjectRef[] · requiredthe gas objects to be usedinputObjects·InputObjectKind[] · requiredobjects to be used in this transactiontxBytes·Base64· requiredBCS serialized transaction data bytes without its type tag, as base-64 encoded string.
Example
Replace each <param> with a value of the type listed under Parameters.
Request
bash
curl https://mainnet-api.inodra.com/v1/jsonrpc \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "unsafe_pay",
"params": [
"<signer>",
"<input_coins>",
"<recipients>",
"<amounts>",
"<gas_budget>"
]
}'