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

ParameterTypeRequiredDescription
cursorBigInt_for_uint64NoPaging cursor (sequence number)
limituintNoMaximum items per page
descending_orderbooleanYesSort 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

FieldTypeDescription
dataarrayArray of checkpoint objects
nextCursorstringCursor for next page
hasNextPagebooleanWhether 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

ParameterTypeDescription
dataarrayArray of checkpoint summary objects
nextCursorstringCursor for next page
hasNextPagebooleanMore 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 CodeDescription
-32602Invalid params - malformed cursor
-32603Internal 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(())
}