sui_getCheckpoints - Sui
Example code for the sui_getCheckpoints JSON-RPC method. Complete guide on how to use sui_getCheckpoints JSON-RPC in GetBlock Web3 documentation.
This method returns a paginated list of checkpoints on the SUI network. Checkpoints are certified snapshots of blockchain state and are fundamental to SUI's consensus mechanism. This method allows efficient traversal of checkpoint history.
Parameters
cursor
BigInt_for_uint64
No
Paging cursor (sequence number)
limit
uint
No
Maximum items per page
descending_order
boolean
Yes
Sort order (true for newest first)
Returns
data
array
Array of checkpoint objects
nextCursor
string
Cursor for next page
hasNextPage
boolean
Whether more results exist
Request Example
curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getCheckpoints",
"params": ["1004", 4, false]
}'const axios = require('axios');
const payload = {
jsonrpc: '2.0',
id: 'getblock.io',
method: 'sui_getCheckpoints',
params: ['1004', 4, false]
};
axios.post('https://go.getblock.io/<ACCESS-TOKEN>/', payload)
.then(response => console.log(response.data));import requests
payload = {
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getCheckpoints",
"params": ["1004", 4, False]
}
response = requests.post("https://go.getblock.io/<ACCESS-TOKEN>/", json=payload)
print(response.json())Response Example
Response Parameters
data
array
Array of checkpoint summary objects
nextCursor
string
Cursor for next page
hasNextPage
boolean
More checkpoints available
Use Cases
Build block explorers with checkpoint navigation
Sync historical blockchain data
Monitor checkpoint production rate
Audit checkpoint sequence integrity
Error Handling
-32602
Invalid params - malformed cursor
-32603
Internal error - node issues
SDK Integration
Last updated
Was this helpful?