Sui
sui.rpc.v2.LedgerService/BatchGetObjects40 Credits
Return a list of objects by ID
Parameter
| Name | Typ | Beschreibung |
|---|---|---|
| requests | GetObjectRequest[] | Objects to fetch, each with its own object_id, optional version and optional read_mask. |
| read_mask | google.protobuf.FieldMask | Shared fields of every Object to return. Defaults to object_id,version,digest. (optional) |
Rückgabewert
Typ
BatchGetObjectsResponse
objects: one GetObjectResult per request, in order, holding either the object or an error.
Codebeispiele
# the key of the endpoint goes in the x-token header; add -proto <file> when the node has no gRPC reflection
grpcurl \
-H 'x-token: 7c9e6679-7425-40de-944b-e07fc1f90ae7' \
-d '{
"requests": [
{
"object_id": "0x6"
},
{
"object_id": "0x5"
}
],
"read_mask": "object_id,version,digest"
}' \
grpc-holy-burned-sky-sui-mainnet.rpcnode.dev:443 \
sui.rpc.v2.LedgerService/BatchGetObjects