ListCheckpoints - Sui
ListCheckpoints. Streams checkpoints in a range, with optional transaction filters.
ListCheckpoints - sui [Value: 20CU]
Server-streaming. Lists checkpoints in a range, optionally filtered by the transactions they contain. Every frame carries a resume watermark.
gRPC: sui.rpc.v2.LedgerService/ListCheckpoints
Use cases
- Backfill checkpoint data
- Find checkpoints touching an address
- Resume indexing from a cursor
Constraints
- Server-streaming response
- Server caps the item limit
- Filter matches any contained transaction
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
grpcurl \
-H "x-drpc-key: {API-KEY}" \
-H "x-drpc-chain: sui" \
-d '{
"start_checkpoint": "1000000",
"end_checkpoint": "1000010",
"read_mask": "digest,summary"
}' \
grpc.drpc.live:443 \
sui.rpc.v2.LedgerService/ListCheckpointsResponse
200
{
"checkpoint": {
"digest": "3nV8xK2pQ7rT5wY1zB4cD6fG9hJ2kL5mN8qR1sU4vX7y",
"summary": {
"digest": "3nV8xK2pQ7rT5wY1zB4cD6fG9hJ2kL5mN8qR1sU4vX7y",
"epoch": "18",
"sequence_number": "1000000",
"total_network_transactions": "4519823",
"content_digest": "9aB3cD6eF1gH4iJ7kL0mN3oP6qR9sT2uV5wX8yZ1aB4c",
"previous_digest": "7zY4xW1vU8tS5rQ2pO9nM6lK3jI0hG7fE4dC1bA8zY5x",
"timestamp": "2023-05-21T08:14:52.331Z"
}
},
"watermark": {
"cursor": "AAAAAAAPQkA=",
"checkpoint": "1000000",
"cursor_position": { "checkpoint": "1000000" }
}
}
...
{
"watermark": {
"cursor": "AAAAAAAPQkk=",
"checkpoint": "1000009",
"cursor_position": { "checkpoint": "1000009" }
},
"end": { "reason": "QUERY_END_REASON_CHECKPOINT_BOUND" }
}Request params
object
read_maskstring
Optional. google.protobuf.FieldMask with the fields to return, as comma-separated paths. Defaults to `sequence_number,digest`. Use `*` to return all fields.
start_checkpointstring
Optional. Start of the checkpoint range (inclusive). Defaults to genesis.
end_checkpointstring
Optional. End of the checkpoint range (exclusive). Defaults to the current indexed ledger tip.
filterobject
Optional. Filter in disjunctive normal form: `terms` (OR) of `literals` (AND). Each literal sets one predicate: `sender`, `affected_address`, `affected_object`, `move_call`, `emit_module`, `event_type`, `event_stream_head` or `package_write`, and optional `negated`.
optionsobject
Optional. Query options.
object
limitinteger
Maximum number of items to return. The server caps this value.
afterstring
Cursor (bytes, base64) to resume after, for ascending queries.
beforestring
Cursor (bytes, base64) to resume before, for descending queries.
orderingstring
`ORDERING_ASCENDING` (default) or `ORDERING_DESCENDING`.
Response
200
A stream of frames. Each frame carries a watermark and, optionally, one checkpoint.Response params
object
checkpointobject
One matching checkpoint. Not set on progress-only frames.
object
sequence_numberstring
The checkpoint sequence number.
digeststring
Digest of the checkpoint summary.
summaryobject
Checkpoint summary.
object
epochstring
Epoch of the checkpoint.
sequence_numberstring
Sequence number of the checkpoint.
total_network_transactionsstring
Total number of transactions committed since genesis, including this checkpoint.
content_digeststring
Digest of the checkpoint contents.
previous_digeststring
Digest of the previous checkpoint.
epoch_rolling_gas_cost_summaryobject
Running total of gas costs in the epoch.
timestampstring
Timestamp of the checkpoint (RFC 3339).
end_of_epoch_dataobject
Only present in the final checkpoint of an epoch.
signatureobject
Aggregated quorum signature from the validator committee that certified the checkpoint.
contentsobject
Checkpoint contents: the set of transactions committed to in the checkpoint.
transactionsarray_of_objects
Transactions included in the checkpoint.
objectsobject
Objects referenced as inputs or produced as outputs by the checkpoint's transactions. When requested, objects appear here and not in `transactions.objects`.
watermarkobject
Progress watermark, present on every frame.
object
cursorstring
Opaque resume cursor (bytes, base64), set on every watermark. Pass it back unchanged as `options.after` (ascending) or `options.before` (descending) to resume.
checkpointstring
Inclusive boundary checkpoint the scan has fully covered. Unset until the first checkpoint is fully covered.
cursor_positionobject
Resume point in ledger coordinates: `checkpoint`, `transaction_index`, `event_index`. Set by servers that support it.
endobject
Set exactly once, on the final frame of a successful stream. `reason`: `QUERY_END_REASON_ITEM_LIMIT`, `QUERY_END_REASON_SCAN_LIMIT`, `QUERY_END_REASON_CHECKPOINT_BOUND`, `QUERY_END_REASON_CURSOR_BOUND` or `QUERY_END_REASON_LEDGER_TIP`.