sui_getCheckpoints - Sui

Example code for the sui_getCheckpoints JSON-RPC method. Complete guide on how to use sui_getCheckpoints JSON-RPC in GetBlock Web3 documentation.

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.

Parameters

Parameter
Type
Required
Description

cursor

BigInt_for_uint64

No

Paging cursor (sequence number)

limit

uint

No

Maximum items per page

descending_order

boolean

Yes

Sort 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

Field
Type
Description

data

array

Array of checkpoint objects

nextCursor

string

Cursor for next page

hasNextPage

boolean

Whether more results exist

Request Example

cURL
curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "method": "sui_getCheckpoints",
  "params": ["1004", 4, false]
}'

Response Example

Response Parameters

Parameter
Type
Description

data

array

Array of checkpoint summary objects

nextCursor

string

Cursor for next page

hasNextPage

boolean

More 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 Code
Description

-32602

Invalid params - malformed cursor

-32603

Internal error - node issues

SDK Integration

Last updated

Was this helpful?