Sui - Migration Guide from JSON-RPC to gRPC

Sui deprecated JSON-RPC in favor of gRPC; map each JSON-RPC method to its gRPC service, for example sui_getObject to LedgerService/GetObject.

Sui has officially deprecated JSON-RPC in favor of gRPC. The Sui Foundation disabled JSON-RPC on Mainnet full nodes the week of July 27, 2026.

gRPC offers lower latency and smaller payloads via binary Protocol Buffers, real-time streaming, and robust type safety that catches errors at compile time.

This guide will help you transition your application to the high-performance Tatum Sui gRPC Gateway.


Migration Checklist

  1. Get your Tatum API Key: Your existing Tatum API key works for both protocols.
  2. Install Dependencies: Add @grpc/grpc-js and @grpc/proto-loader to your Node.js project.
  3. Download Protos: Clone the official sui-apis repository to get the required .proto files.
  4. Update Authentication: Switch from JSON headers to gRPC metadata using the x-api-key key.
📘

NOTE

For endpoints, setup and Node.js examples, see the Tatum Sui gRPC reference.


Method Mapping: JSON-RPC to gRPC

The transition involves mapping your old method calls to the new gRPC Services.

Checkpoint & Transaction Queries

JSON-RPC MethodgRPC Service / Method
sui_getLatestCheckpointSequenceNumberLedgerService/GetCheckpoint (without a checkpoint ID)
sui_getCheckpointLedgerService/GetCheckpoint
sui_getCheckpointsLedgerService/ListCheckpoints
sui_getTransactionBlockLedgerService/GetTransaction
sui_multiGetTransactionBlocksLedgerService/BatchGetTransactions

Object Queries

JSON-RPC MethodgRPC Service / Method
sui_getObjectLedgerService/GetObject
sui_multiGetObjectsLedgerService/BatchGetObjects
sui_tryGetPastObjectLedgerService/GetObject with version

Balance & Coin Queries

JSON-RPC MethodgRPC Service / Method
suix_getBalanceStateService/GetBalance
suix_getAllBalancesStateService/ListBalances
suix_getCoinsStateService/ListOwnedObjects with object_type 0x2::coin::Coin<T>
suix_getAllCoinsStateService/ListOwnedObjects with object_type 0x2::coin::Coin
suix_getCoinMetadataStateService/GetCoinInfo

Transaction Execution

JSON-RPC MethodgRPC Service / Method
sui_executeTransactionBlockTransactionExecutionService/ExecuteTransaction
sui_dryRunTransactionBlockTransactionExecutionService/SimulateTransaction

Name Service

JSON-RPC MethodgRPC Service / Method
suix_resolveNameServiceAddressNameService/LookupName
suix_resolveNameServiceNamesNameService/ReverseLookupName

Code Comparison: Getting a Checkpoint

In both examples, replace {CHECKPOINT} with a checkpoint sequence number.

Before (JSON-RPC)

This is the call your app made before the migration. Tatum decommissioned its Sui JSON-RPC endpoints after their July 2026 end of life, so this request no longer returns data.

curl --location 'https://sui-mainnet.gateway.tatum.io' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sui_getCheckpoint",
  "params": [
    "{CHECKPOINT}"
  ]
}'

After (gRPC)

gRPC uses binary serialization. While you can still perform "request-response" calls, you benefit from significantly lower latency and smaller payloads.

The same request with grpcurl calls LedgerService/GetCheckpoint. The read_mask selects the fields to return; without it, you get only sequence_number and digest. Leave out sequence_number to get the latest checkpoint.

grpcurl \
  -H "x-api-key: {YOUR_API_KEY}" \
  -d '{ "sequence_number": "{CHECKPOINT}", "read_mask": { "paths": ["sequence_number", "digest", "summary"] } }' \
  sui-mainnet-grpc.gateway.tatum.io:443 \
  sui.rpc.v2.LedgerService/GetCheckpoint

Full nodes keep only recent checkpoints, so an old checkpoint returns NOT_FOUND.

📘

NOTE

For Node.js clients and more examples, see the Tatum Sui gRPC reference.


Key Differences

1. Error Handling

JSON-RPC returns errors in the response body (200 OK with an error object). gRPC uses standard status codes:

  • Code 16 (Unauthenticated): Check your x-api-key.
  • Code 5 (NOT_FOUND): Usually indicates pruned data (historical data no longer on the full node).

2. Numbers are Strings

Large blockchain numbers (like SUI balances and checkpoint sequence numbers) are 64-bit integers. To prevent precision loss, JSON output such as grpcurl's shows them as Strings; in Node.js, load the protos with longs: String in @grpc/proto-loader to get strings too. Always parse them using BigInt().

3. Field Masks

To optimize your app, use read_mask. This allows you to request only the specific fields you need (e.g., just the owner of an object), significantly reducing payload size.


Testing the Migration

Use grpcurl to quickly verify your Tatum connection from the terminal:

grpcurl \
  -H "x-api-key: {YOUR_API_KEY}" \
  sui-mainnet-grpc.gateway.tatum.io:443 \
  sui.rpc.v2.LedgerService/GetCheckpoint
📘

NOTE

Looking for the Tatum Postman Collection? Open the Tatum Sui gRPC Postman collection.



Did this page help you?