Using a Shared gRPC Endpoint for Sui Node.
General gRPC Capability and Functional Background
Sui gRPC API provides high-performance access to network data via gRPC interfaces. It serves as a powerful tool for developers who need to:
- Lower latency and higher throughput – gRPC leverages HTTP/2 and binary Protobuf encoding for faster, more efficient communication than JSON-RPC.
- Strongly typed APIs – Protocol buffer definitions enable compile-time safety and reduce integration errors. Native streaming support – Clients can subscribe to real-time data (e.g., checkpoints or events) without polling.
- Reduced resource consumption – Efficient serialization and connection reuse lower bandwidth and CPU usage.
- Multi-language client generation – Auto-generated SDKs in Go, Rust, Python, TypeScript, and more simplify integration.
- Early access to advanced features – New Sui capabilities will be exposed first or exclusively via gRPC.
Support areas
- supported networks:sui-mainnet,sui-testnet
- supported methods:
- sui.rpc.v2.LedgerService/GetServiceInfo
- sui.rpc.v2.LedgerService/GetObject
- sui.rpc.v2.LedgerService/BatchGetObjects
- sui.rpc.v2.LedgerService/GetTransaction
- sui.rpc.v2.LedgerService/BatchGetTransactions
- sui.rpc.v2.LedgerService/GetCheckpoint
- sui.rpc.v2.LedgerService/GetEpoch
- sui.rpc.v2.MovePackageService/GetPackage
- sui.rpc.v2.MovePackageService/GetDatatype
- sui.rpc.v2.MovePackageService/GetFunction
- sui.rpc.v2.MovePackageService/ListPackageVersions
- sui.rpc.v2.NameService/LookupName
- sui.rpc.v2.NameService/ReverseLookupName
- sui.rpc.v2.SignatureVerificationService/VerifySignature
- sui.rpc.v2.StateService/ListDynamicFields
- sui.rpc.v2.StateService/ListOwnedObjects
- sui.rpc.v2.StateService/GetCoinInfo
- sui.rpc.v2.StateService/GetBalance
- sui.rpc.v2.StateService/ListBalances
- sui.rpc.v2.SubscriptionService/SubscribeCheckpoints
- sui.rpc.v2.TransactionExecutionService/ExecuteTransaction
- sui.rpc.v2.TransactionExecutionService/SimulateTransaction
Integration Method
- grpc endpoint:https://grpc.zan.top
- Metadata:
- x-token: api key(Required)
- x-network: ecosystem network(Required:sui-mainnet,sui-testnet)
Integration Example Guide
- Steps
# Example for Linux AMD64 > wget https://github.com/fullstorydev/grpcurl/releases/download/v1.9.3/grpcurl_1.9.3_linux_x86_64.tar.gz tar -xvf grpcurl_1.9.3_linux_x86_64.tar.gz > mv grpcurl /usr/local/bin/ > grpcurl --version grpcurl v1.9.3 # Clone the repository with minimal depth > git clone https://github.com/MystenLabs/sui-apis.git --depth=1 # Copy the proto files to your working directory > cp -r sui-apis/proto .
- SubscribeCheckpoints
grpcurl -proto sui/rpc/v2/subscription_service.proto \ -d '{"read_mask": {"paths": ["sequence_number","digest","network_total_transactions","previous_digest"]}}' \ -H "x-token: api_key" \ -H "x-network: sui-mainnet" \ grpc.zan.top:443 \ sui.rpc.v2.SubscriptionService/SubscribeCheckpoints
- GetObject
grpcurl -proto sui/rpc/v2/ledger_service.proto \ -d '{ "object_id": "0x27c4fdb3b846aa3ae4a65ef5127a309aa3c1f466671471a806d8912a18b253e8" }' \ -H "x-token: api_key" \ -H "x-network: sui-mainnet" \ grpc.zan.top:443 \ sui.rpc.v2.LedgerService/GetObject
proto
https://github.com/MystenLabs/sui-apis/tree/main/proto
