sui_getCheckpoint{deprecated} - Sui

This method returns checkpoint information for a specified checkpoint ID or sequence number. Checkpoints are certified snapshots of blockchain state, fundamental to SUI's consensus mechanism.

This method is deprecated

Parameters

ParameterTypeRequiredDescriptionDefault/Supported Values
idstringYesCheckpoint digest or sequence numberValid checkpoint identifier

Request Example

curl

bashcurl --location --request POST https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/ \
--header 'Content-Type: application/json' \
--data-raw '{
  "jsonrpc": "2.0",
  "method": "sui_getCheckpoint",
  "params": ["1000"],
  "id": "getblock.io"
}'

example.py

pythonimport requests
url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"
payload = {"jsonrpc": "2.0", "method": "sui_getCheckpoint", "params": ["1000"], "id": "getblock.io"}
response = requests.post(url, headers={"Content-Type": "application/json"}, json=payload)
print("Result:", response.json().get("result"))

example.js

javascriptconst axios = require('axios');
axios.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/", {
  jsonrpc: "2.0", method: "sui_getCheckpoint", params: ["1000"], id: "getblock.io"
}).then(r => console.log("Result:", r.data.result));

main.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_getCheckpoint", "params": ["1000"]});
    let response = client.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/").json(&payload).send().await?;
    println!("Response: {:?}", response.text().await?);
    Ok(())
}

Response

response.json

json{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "result": {
    "epoch": "5000",
    "sequenceNumber": "1000",
    "digest": "G6Dtzr1ZSfHFhotGsTE3cLENa7L1ooe1BBvknAUsARbV",
    "networkTotalTransactions": "792385",
    "previousDigest": "6tBy8RXZKrdrB4XkMQn7J3MNG4fQCo9XcRduFFvYrL5Z",
    "timestampMs": "1676911928",
    "transactions": ["mN8YNBgVR3wB7vfXmjVgDRF4oqxVRRjzmJ6U4mzbq77"],
    "validatorSignature": "wAAA..."
  }
}

Reponse Parameters

ParameterTypeDescription
result.epochstringEpoch number
result.sequenceNumberstringCheckpoint sequence number
result.digeststringCheckpoint digest
result.networkTotalTransactionsstringCumulative transaction count
result.timestampMsstringCheckpoint timestamp
result.transactionsarrayTransaction digests

Use Cases

  1. Block Explorer: Display checkpoint details and included transactions.
  2. Finality Verification: Confirm transactions are finalized in checkpoints.
  3. Network Sync: Track and verify blockchain state synchronization.

Common Errors

ErrorDescriptionSolution
NotFoundCheckpoint does not existVerify checkpoint ID

SDK Integration

TypeScript (Sui SDK)

typescriptimport { SuiClient } from '@mysten/sui/client';
const client = new SuiClient({ url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' });
const checkpoint = await client.getCheckpoint({ id: '1000' });
console.log(checkpoint);