sui_getCheckpoint - Sui
Example code for the sui_getCheckpoint JSON-RPC method. Complete guide on how to use sui_getCheckpoint JSON-RPC in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Default/Supported Values
curl --location --request POST https://go.getblock.io/<ACCESS-TOKEN>/ \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "sui_getCheckpoint",
"params": ["1000"],
"id": "getblock.io"
}'import requests
url = "https://go.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"))const axios = require('axios');
axios.post("https://go.getblock.io/<ACCESS-TOKEN>/", {
jsonrpc: "2.0", method: "sui_getCheckpoint", params: ["1000"], id: "getblock.io"
}).then(r => console.log("Result:", r.data.result));use 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://go.getblock.io/<ACCESS-TOKEN>/").json(&payload).send().await?;
println!("Response: {:?}", response.text().await?);
Ok(())
}Response
{
"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
Parameter
Type
Description
Use Cases
Common Errors
Error
Description
Solution
SDK Integration
Last updated
Was this helpful?