sui_getLatestCheckpointSequenceNumber{deprecated} - Sui
This method returns the sequence number of the latest checkpoint that has been executed on the SUI network. This provides a quick way to determine the current height of the blockchain without fetching full checkpoint data. It's useful for monitoring network progress and synchronization status.
This method is deprecated
Parameters
- None
Returns
| Field | Type | Description |
|---|---|---|
| result | string | The latest checkpoint sequence number |
Request Example
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_getLatestCheckpointSequenceNumber",
"params": []
}'javascriptconst axios = require('axios');
const url = 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/';
const payload = {
jsonrpc: '2.0',
id: 'getblock.io',
method: 'sui_getLatestCheckpointSequenceNumber',
params: []
};
axios.post(url, payload, {
headers: { 'Content-Type': 'application/json' }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));pythonimport requests
import json
url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"
payload = {
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getLatestCheckpointSequenceNumber",
"params": []
}
response = requests.post(url, headers={"Content-Type": "application/json"}, json=payload)
print(response.json())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_getLatestCheckpointSequenceNumber",
"params": []
});
let response = client
.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
.header("Content-Type", "application/json")
.json(&payload)
.send()
.await?;
let result: serde_json::Value = response.json().await?;
println!("{:#?}", result);
Ok(())
}Response Example
json{
"jsonrpc": "2.0",
"result": "507021",
"id": "getblock.io"
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| result | string | Latest checkpoint sequence number as a string |
Use Cases
- Monitor blockchain height and progress
- Check node synchronization status
- Implement polling for new checkpoints
- Calculate finality depth for transactions
- Display network status in dashboards
Error Handling
| Error Code | Description |
|---|---|
| -32603 | Internal error - node processing issues |
| -32000 | Server error - RPC endpoint unavailable |
SDK Integration
typescriptimport { SuiClient } from '@mysten/sui/client';
const client = new SuiClient({ url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' });
const latestCheckpoint = await client.getLatestCheckpointSequenceNumber();
console.log(latestCheckpoint);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 seq = sui.read_api().get_latest_checkpoint_sequence_number().await?;
println!("{}", seq);
Ok(())
}