get_sui_latest_checkpoint
Retrieve the current checkpoint sequence number for Sui blockchain networks to monitor chain progress and synchronize applications.
Instructions
Get latest checkpoint sequence number
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | Network type (defaults to mainnet) |
Implementation Reference
- src/handlers/sui-handlers.ts:439-453 (handler)Executes the get_sui_latest_checkpoint tool by extracting the network parameter, calling SuiService.getLatestCheckpoint, and formatting the response for the MCP tool.case 'get_sui_latest_checkpoint': { const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await suiService.getLatestCheckpoint(network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
- src/handlers/sui-handlers.ts:208-221 (schema)Input schema and metadata definition for the get_sui_latest_checkpoint tool, part of the tools array registered via registerSuiHandlers.{ name: 'get_sui_latest_checkpoint', description: 'Get latest checkpoint sequence number', inputSchema: { type: 'object', properties: { network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, }, },
- src/services/sui-service.ts:255-272 (helper)Core implementation in SuiService that performs the RPC call to sui_getLatestCheckpointSequenceNumber via the blockchain service.async getLatestCheckpoint( network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<EndpointResponse> { const service = this.blockchainService.getServiceByBlockchain('sui', network); if (!service) { return { success: false, error: `Sui service not found for ${network}`, }; } return this.blockchainService.callRPCMethod( service.id, 'sui_getLatestCheckpointSequenceNumber', [] ); }