StateService.ListDynamicFields
List dynamic fields through sui.rpc.v2.StateService/ListDynamicFields on Inodra's Sui gRPC endpoint.
Endpoint
| Network | Host | Authentication |
|---|---|---|
| Mainnet | mainnet-grpc.inodra.com:443 | x-api-key metadata |
| Testnet | testnet-grpc.inodra.com:443 | x-api-key metadata |
Full method name: sui.rpc.v2.StateService/ListDynamicFields. Unary: one request, one response. Get a key from the dashboard; the same key works on every protocol.
Request: ListDynamicFieldsRequest
Request message for NodeService.ListDynamicFields
| Field | Type | Description |
|---|---|---|
parent | string | Required. The UID of the parent, which owns the collections of dynamic fields. |
page_size | uint32 | The maximum number of dynamic fields to return. The service may return fewer than this value. If unspecified, at most 50 entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
page_token | bytes | A page token, received from a previous ListDynamicFields call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDynamicFields must match the call that provided the page token. |
read_mask | google.protobuf.FieldMask | Mask specifying which fields to read. If no mask is specified, defaults to parent,field_id. |
Response: ListDynamicFieldsResponse
Response message for NodeService.ListDynamicFields
| Field | Type | Description |
|---|---|---|
dynamic_fields | repeated DynamicField | Page of dynamic fields owned by the specified parent. |
next_page_token | bytes | A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. |
DynamicField
| Field | Type | Description |
|---|---|---|
kind | DynamicField.DynamicFieldKind | |
parent | string | ObjectId of this dynamic field's parent. |
field_id | string | ObjectId of this dynamic field. |
field_object | Object | The field object itself |
name | Bcs | The dynamic field's "name" |
value | Bcs | The dynamic field's "value" |
value_type | string | The type of the dynamic field "value". If this is a dynamic object field then this is the type of the object itself (which is a child of this field), otherwise this is the type of the value of this field. |
child_id | string | The ObjectId of the child object when a child is a dynamic object field. The presence or absence of this field can be used to determine if a child is a dynamic field or a dynamic child object |
child_object | Object | The object itself when a child is a dynamic object field. |
grpcurl
grpcurl -H "x-api-key: YOUR_API_KEY" \
-d '{
"parent": "string",
"page_size": 20,
"read_mask": {
"paths": [
"parent",
"field_id"
]
}
}' \
mainnet-grpc.inodra.com:443 \
sui.rpc.v2.StateService/ListDynamicFieldsServer reflection is enabled, so no proto files are needed for grpcurl. Field masks are written as {"paths": [...]}.
The body is a template: replace the literal string values with your own values before the call succeeds.
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 { dynamicFields, cursor } = await client.listDynamicFields({
parentId: '0x5',
limit: 20
})
console.log(dynamicFields, cursor)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 item actually returned; an empty page bills the 1-credit minimum. See credits and billing for the full table.
JSON-RPC equivalent
Replaces suix_getDynamicFields. The JSON-RPC to gRPC migration guide has before and after code for the common calls.