Skip to content

LedgerService.GetServiceInfo ​

Query the service for general information about its current state.

Endpoint ​

NetworkHostAuthentication
Mainnetmainnet-grpc.inodra.com:443x-api-key metadata
Testnettestnet-grpc.inodra.com:443x-api-key metadata

Full method name: sui.rpc.v2.LedgerService/GetServiceInfo. Unary: one request, one response. Get a key from the dashboard; the same key works on every protocol.

Request: GetServiceInfoRequest ​

No fields.

Response: GetServiceInfoResponse ​

FieldTypeDescription
chain_idstringThe chain identifier of the chain that this node is on. The chain identifier is the digest of the genesis checkpoint, the checkpoint with sequence number 0.
chainstringHuman-readable name of the chain that this node is on. This is intended to be a human-readable name like mainnet, testnet, and so on.
epochuint64Current epoch of the node based on its highest executed checkpoint.
checkpoint_heightuint64Checkpoint height of the most recently executed checkpoint.
timestampgoogle.protobuf.TimestampUnix timestamp of the most recently executed checkpoint.
lowest_available_checkpointuint64The lowest checkpoint for which checkpoints and transaction data are available.
lowest_available_checkpoint_objectsuint64The lowest checkpoint for which object data is available.
serverstringSoftware version of the service. Similar to the server http header.

grpcurl ​

bash
grpcurl -H "x-api-key: YOUR_API_KEY" \
  -d '{}' \
  mainnet-grpc.inodra.com:443 \
  sui.rpc.v2.LedgerService/GetServiceInfo

Server reflection is enabled, so no proto files are needed for grpcurl. Field masks are written as {"paths": [...]}.

TypeScript ​

typescript
import { GrpcWebFetchTransport, SuiGrpcClient } from '@mysten/sui/grpc'

const transport = new GrpcWebFetchTransport({
  baseUrl: 'https://mainnet-grpc.inodra.com',
  meta: { 'x-api-key': process.env.INODRA_API_KEY! }
})
const client = new SuiGrpcClient({ network: 'mainnet', transport })

const { response } = await client.ledgerService.getServiceInfo({})
console.log(response.chainId, response.checkpointHeight)

@mysten/sui v2 has no typed method for this RPC, so the sample calls the generated client.ledgerService service client. Install with npm install @mysten/sui and set INODRA_API_KEY. The gRPC gateway guide covers native gRPC transport for backends.

Credits ​

1 credit per call. See credits and billing for the full table.

The full-stack Sui data layer.