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_requestAddStake"
required
JSON-RPC method name.
params
object
required
Create an unsigned transaction to stake SUI to a validator.Positional parameters for unsafe_requestAddStake:
  • params[0]: The Sui address of the transaction signer.
  • params[1]: List of Coin<SUI> object IDs to be staked.
  • params[2]: Amount to stake. If omitted, the full balance of all coins will be used.
  • params[3]: The validator’s Sui address.
  • params[4]: Optional gas object ID. If not provided, a gas object will be auto-selected.
  • params[5]: Gas budget for the transaction.

Returns

result
object
The unsigned transaction block for the stake operation.
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_requestAddStake",
    "params": [
      "0xabc123456789defabc123456789defabc123456789defabc123456789defabcd",
      [],
      "100000000",
      "0xval123456789abcdef123456789abcdef123456789abcdef123456789abcdef",
      "0xgasobject1234567890abcdef",
      "50000"
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {}
}