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.

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.

Parameters

Parameter
Type
Required
Description
Default/Supported Values

id

string

Yes

Checkpoint digest or sequence number

Valid checkpoint identifier

Request Example

curl
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"
}'

Response

response.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

Parameter
Type
Description

result.epoch

string

Epoch number

result.sequenceNumber

string

Checkpoint sequence number

result.digest

string

Checkpoint digest

result.networkTotalTransactions

string

Cumulative transaction count

result.timestampMs

string

Checkpoint timestamp

result.transactions

array

Transaction 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

Error
Description
Solution

NotFound

Checkpoint does not exist

Verify checkpoint ID

SDK Integration

Last updated

Was this helpful?