StateService/ListOwnedObjects - SUI
Example code for the StateService/ListOwnedObjects gRPC method. Complete guide on how to use StateService/ListOwnedObjects gRPC method in GetBlock Web3 documentation.
Request Fields
Field
Type
Required
Description
Request Example
# Clone the official proto files first (one-time setup):
# git clone https://github.com/MystenLabs/sui-apis.git && cd sui-apis
grpcurl \
-import-path proto \
-proto sui/rpc/v2/state_service.proto \
-H "x-grpc-web: 1" \
-d '{
"owner": "0xb871a42470b59c7184033a688f883cf24eb5e66eae1db62319bab27adb30b873",
"object_type": "0x2::coin::Coin<0x2::sui::SUI>",
"page_size": 50,
"read_mask": {
"paths": [
"object_id",
"version",
"object_type"
]
}
}' \
go.getblock.io:443/<ACCESS-TOKEN> \
sui.rpc.v2.StateService/ListOwnedObjectsResponse Example
Response Fields
Field
Type
Description
Use Cases
Error Handling
Status Code
Numeric
Cause
SDK Integration
Was this helpful?