Skip to content

LedgerService.BatchGetObjects ​

Batch get objects through sui.rpc.v2.LedgerService/BatchGetObjects on Inodra's Sui gRPC endpoint.

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/BatchGetObjects. Unary: one request, one response. Get a key from the dashboard; the same key works on every protocol.

Request: BatchGetObjectsRequest ​

FieldTypeDescription
requestsrepeated GetObjectRequest
read_maskgoogle.protobuf.FieldMaskMask specifying which fields to read. If no mask is specified, defaults to object_id,version,digest.

Response: BatchGetObjectsResponse ​

FieldTypeDescription
objectsrepeated GetObjectResult

GetObjectResult ​

FieldTypeDescription
objectObject (one of result)
errorgoogle.rpc.Status (one of result)

grpcurl ​

bash
grpcurl -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "requests": [
    {
      "object_id": "0x2"
    }
  ],
  "read_mask": {
    "paths": [
      "object_id",
      "version",
      "digest"
    ]
  }
}' \
  mainnet-grpc.inodra.com:443 \
  sui.rpc.v2.LedgerService/BatchGetObjects

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 { objects } = await client.getObjects({ objectIds: ['0x2', '0x6'] })
console.log(objects)

Uses the typed SuiGrpcClient method from @mysten/sui v2 that calls this RPC. 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 key in the batch. Reads served from the archival tier cost 2x; the response metadata carries x-inodra-backend naming the tier that answered. See credits and billing for the full table.

JSON-RPC equivalent ​

Replaces sui_multiGetObjects. The JSON-RPC to gRPC migration guide has before and after code for the common calls.

The full-stack Sui data layer.