Skip to main content

unsafe_pay

POST

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.
param[0]
signerstringrequired
The transaction signer's Sui address
param[1]
inputCoinsarrayrequired
The Sui coins to be used in this transaction
param[2]
recipientsarrayrequired
The recipients' addresses, the length of this vector must be the same as amounts.
param[3]
amountsarrayrequired
The amounts to be transferred to recipients, following the same order
param[4]
gasstringrequired
Gas object to be used in this transaction, node will pick one from the signer's possession if not provided
param[5]
gasBudgetstringrequired
The gas budget, the transaction will fail if the gas cost exceed the budget
Responses
jsonrpcstring
idinteger
the gas objects to be used
digestobjectrequired
objectIdobjectrequired
versionobjectrequired
inputObjectsarrayrequired
objects to be used in this transaction
txBytesstringrequired
BCS serialized transaction data bytes without its type tag, as base-64 encoded string.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Bad Request"
}
cURL
curl -X POST 'https://sui-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "unsafe_pay",
"params": [
null,
[],
[],
[],
null,
null
]
}'