Sui gRPC is a high-performance API for interacting with the Sui blockchain using Protocol Buffers and gRPC. It provides typed, efficient access to objects, transactions, balances, Move packages, and more.
Sui gRPC offers advantages over the JSON-RPC API:
- Strongly typed: Protocol Buffers provide strict typing and schema validation
- Efficient serialization: Binary encoding reduces payload size compared to JSON
- Streaming support: Subscribe to real-time checkpoint updates with server-streaming RPCs
- Field masking: Request only the fields you need with
read_maskto reduce response size - Batch operations: Fetch multiple objects or transactions in a single request
Query objects, transactions, checkpoints, and epochs through the LedgerService.
| gRPC method | JSON-RPC equivalent |
|---|---|
GetObject | sui_getObject |
BatchGetObjects | sui_multiGetObjects |
GetTransaction | sui_getTransactionBlock |
BatchGetTransactions | sui_multiGetTransactionBlocks |
GetCheckpoint | sui_getCheckpoint |
GetEpoch | No equivalent |
GetServiceInfo | sui_getChainIdentifier |
Execute and simulate transactions through the TransactionExecutionService.
| gRPC method | JSON-RPC equivalent |
|---|---|
ExecuteTransaction | sui_executeTransactionBlock |
SimulateTransaction | sui_dryRunTransactionBlock, sui_devInspectTransactionBlock |
Query coin balances, dynamic fields, and owned objects through the StateService.
| gRPC method | JSON-RPC equivalent |
|---|---|
GetBalance | suix_getBalance |
ListBalances | suix_getAllBalances, suix_getCoins, suix_getAllCoins |
GetCoinInfo | suix_getCoinMetadata, suix_getTotalSupply |
ListDynamicFields | suix_getDynamicFields |
ListOwnedObjects | suix_getOwnedObjects |
Inspect Move packages, functions, and data types through the MovePackageService.
| gRPC method | JSON-RPC equivalent |
|---|---|
GetPackage | sui_getNormalizedMoveModulesByPackage |
GetFunction | sui_getNormalizedMoveFunction, sui_getMoveFunctionArgTypes |
GetDatatype | sui_getNormalizedMoveStruct |
ListPackageVersions | No equivalent |
Resolve SuiNS names through the NameService.
| gRPC method | JSON-RPC equivalent |
|---|---|
LookupName | suix_resolveNameServiceAddress |
ReverseLookupName | suix_resolveNameServiceNames |
Stream real-time checkpoint data through the SubscriptionService.
| gRPC method | JSON-RPC equivalent |
|---|---|
SubscribeCheckpoints | No equivalent |
Verify user signatures through the SignatureVerificationService.
| gRPC method | JSON-RPC equivalent |
|---|---|
VerifySignature | No equivalent |
Check out the quickstart guide to make your first gRPC call.