sui_getCheckpoints{deprecated} - Sui
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.
This method is deprecated
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| 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) |
The descending_order parameter is required and controls whether results are returned with newest checkpoints first (true) or oldest first (false).
Returns
| Field | Type | Description |
|---|---|---|
| data | array | Array of checkpoint objects |
| nextCursor | string | Cursor for next page |
| hasNextPage | boolean | Whether more results exist |
Request Example
cURL
bashcurl -X POST https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getCheckpoints",
"params": ["1004", 4, false]
}'request.js
javascriptconst axios = require('axios');
const payload = {
jsonrpc: '2.0',
id: 'getblock.io',
method: 'sui_getCheckpoints',
params: ['1004', 4, false]
};
axios.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', payload)
.then(response => console.log(response.data));request.py
pythonimport requests
payload = {
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getCheckpoints",
"params": ["1004", 4, False]
}
response = requests.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/", json=payload)
print(response.json())request.rs
rustuse reqwest::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let payload = json!({
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getCheckpoints",
"params": ["1004", 4, false]
});
let response = client.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
.json(&payload).send().await?;
println!("{}", response.text().await?);
Ok(())
}Response Example
response.json
json{
"jsonrpc": "2.0",
"result": {
"data": [
{
"epoch": "5000",
"sequenceNumber": "1005",
"digest": "9zA7Q9Ka1ykvYjSQGhQCdCf32FZkcWNWx7L22JczXGsk",
"networkTotalTransactions": "792385",
"timestampMs": "1676911928",
"transactions": ["7RudGLkQDBNJyqrptkrNU66Zd3pvq8MHVAHYz9WpBm59"]
}
],
"nextCursor": "1008",
"hasNextPage": true
},
"id": "getblock.io"
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| 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
| Error Code | Description |
|---|---|
| -32602 | Invalid params - malformed cursor |
| -32603 | Internal error - node issues |
SDK Integration
sui-typescript.ts
typescriptimport { SuiClient } from '@mysten/sui/client';
const client = new SuiClient({ url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' });
const checkpoints = await client.getCheckpoints({ cursor: '1004', limit: 4 });
console.log(checkpoints);sui-rust.rs
rustuse sui_sdk::SuiClientBuilder;
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let sui = SuiClientBuilder::default().build("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/").await?;
let checkpoints = sui.read_api().get_checkpoints(Some("1004".into()), Some(4), false).await?;
println!("{:?}", checkpoints);
Ok(())
}