> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate Sui from JSON-RPC to gRPC and GraphQL

> Sui Foundation's public endpoints no longer serve JSON-RPC, and Sui removes JSON-RPC from the full node code in mid-October 2026. Migrate call by call to gRPC and GraphQL on Chainstack, where all three interfaces run on the same node.

Sui is deprecating JSON-RPC, and Sui Foundation's **public** endpoints no longer serve it. On Chainstack, your Sui node serves JSON-RPC and gRPC on the **same endpoint**, and Sui Mainnet Global Nodes also serve GraphQL on it. You migrate call by call — keep using JSON-RPC while you port each call to gRPC or GraphQL, with no provider switch and no re-sync.

<Warning>
  JSON-RPC calls to Sui Foundation's public endpoint `fullnode.mainnet.sui.io` return `-32601 Method not found`. Sui removes JSON-RPC from the full node code in mid-October 2026.
</Warning>

Sui retires JSON-RPC on Mainnet in stages, per [Sui's migration guide](https://docs.sui.io/develop/accessing-data/json-rpc-migration):

| Milestone | Date |
| - | - |
| JSON-RPC disabled on Sui Foundation's Mainnet full nodes | Week of Jul 27, 2026 |
| Sui stops publishing JSON-RPC snapshots | End of Aug 2026 |
| Implicit fallback to the archival service disconnected | End of Sep 2026 |
| Full decommission of JSON-RPC from full nodes, including code removal | Mid-Oct 2026 |

Sui publishes this timeline for mainnet only and does not give a separate testnet date.

## What is being deprecated

Sui deprecates JSON-RPC in two steps. Sui Foundation has already turned off JSON-RPC on its **public** endpoints. In mid-October 2026, Sui removes JSON-RPC from the full node code itself. Your **Chainstack Sui endpoint still serves JSON-RPC**, so you can keep calling it while you port your code to gRPC and GraphQL on the same endpoint — plan to finish that move rather than stay on JSON-RPC.

gRPC and GraphQL are the interfaces Sui supports going forward. gRPC uses HTTP/2 and Protocol Buffers for binary serialization, which makes payloads smaller and adds server-side streaming — you subscribe to new checkpoints instead of polling for them.

On Chainstack, the migration is **JSON-RPC → gRPC and GraphQL**, and all three run on the same node:

* Move performance-sensitive and streaming workloads to **gRPC** — backends, indexers, typed clients, low-latency lookups, transaction submission, and checkpoint streaming.
* Move filtered and paginated queries to **GraphQL** on Mainnet — transactions by address, events by type, and objects by owner and type. These are the methods with no gRPC equivalent. See [Sui GraphQL endpoint](/docs/sui-graphql-endpoint).
* Keep anything you have not ported yet on **JSON-RPC**. Your Chainstack endpoint still serves it, including on Testnet, which does not serve GraphQL.

## Chainstack Sui endpoints

All three interfaces are on the same node. Copy your JSON-RPC endpoint (shown below as `YOUR_CHAINSTACK_ENDPOINT`, with its auth token built in) from Chainstack — see [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials). The gRPC endpoint is the host and port below, and the GraphQL endpoint is the JSON-RPC endpoint with `/graphql` appended.

| Interface | Endpoint | Authentication |
| - | - | - |
| JSON-RPC (HTTPS) | `YOUR_CHAINSTACK_ENDPOINT` | auth token or basic auth, built into the endpoint |
| gRPC | `sui-mainnet.core.chainstack.com:443` | `x-token` metadata header |
| GraphQL (Mainnet) | `YOUR_CHAINSTACK_ENDPOINT/graphql` | auth token, basic auth, or `x-token` header |

Testnet gRPC is `sui-testnet.core.chainstack.com:443`; Testnet has no GraphQL endpoint. For every authentication option, see [Authentication methods available on Chainstack](/docs/authentication-methods-for-different-scenarios). See [Sui tooling](/docs/sui-tooling) for SDK setup and per-language connection code.

## Method mapping

Sui's gRPC API is organized into services under `sui.rpc.v2`. Most read and write JSON-RPC methods map directly to a gRPC call. The query methods with no gRPC equivalent map to GraphQL on Mainnet. A few analytics methods come from Sui's indexer, and neither interface serves them. The tables below give the path for each common JSON-RPC method.

### Maps to gRPC

| JSON-RPC method | gRPC service and method |
| - | - |
| `sui_getChainIdentifier` | `LedgerService/GetServiceInfo` (read `chainId`) |
| `sui_getLatestCheckpointSequenceNumber` | `LedgerService/GetServiceInfo` (read `checkpointHeight`) |
| `sui_getCheckpoint` | `LedgerService/GetCheckpoint` |
| `sui_getObject` | `LedgerService/GetObject` |
| `sui_multiGetObjects` | `LedgerService/BatchGetObjects` |
| `sui_getTransactionBlock` | `LedgerService/GetTransaction` |
| `sui_multiGetTransactionBlocks` | `LedgerService/BatchGetTransactions` |
| `suix_getLatestSuiSystemState` | `LedgerService/GetEpoch` (system state in read mask) |
| `suix_getCommitteeInfo` | `LedgerService/GetEpoch` (committee in read mask) |
| `sui_getProtocolConfig` | `LedgerService/GetEpoch` (protocol config in read mask) |
| `suix_getBalance` | `StateService/GetBalance` |
| `suix_getAllBalances` | `StateService/ListBalances` |
| `suix_getCoins` | `StateService/ListOwnedObjects` (filter `type: 0x2::coin::Coin`) |
| `suix_getCoinMetadata` | `StateService/GetCoinInfo` |
| `suix_getTotalSupply` | `StateService/GetCoinInfo` |
| `suix_getOwnedObjects` | `StateService/ListOwnedObjects` |
| `suix_getDynamicFields` | `StateService/ListDynamicFields` |
| `suix_getStakesByIds` | `LedgerService/BatchGetObjects` (the stake object IDs, with `json` in the read mask) |
| `sui_dryRunTransactionBlock` | `TransactionExecutionService/SimulateTransaction` |
| `sui_devInspectTransactionBlock` | `TransactionExecutionService/SimulateTransaction` (`checksEnabled: false`) |
| `sui_executeTransactionBlock` | `TransactionExecutionService/ExecuteTransaction` |
| `sui_getNormalizedMoveModule` | `MovePackageService/GetPackage` |
| `sui_getNormalizedMoveFunction` | `MovePackageService/GetFunction` |
| `sui_getNormalizedMoveStruct` | `MovePackageService/GetDatatype` |
| `suix_resolveNameServiceAddress` | `NameService/LookupName` |
| `suix_resolveNameServiceNames` | `NameService/ReverseLookupName` |

### No gRPC equivalent — use GraphQL

These methods have no gRPC equivalent. On Mainnet, use the GraphQL query in the table. Your Chainstack JSON-RPC endpoint still serves them, which is the path on Testnet.

| JSON-RPC method | GraphQL query |
| - | - |
| `suix_queryTransactionBlocks` | `transactions` with a `filter`, or `transactions` on an `address` |
| `suix_queryEvents` | `events` with a `filter` |
| `sui_getCheckpoints` | `checkpoints` |
| `suix_getStakes` | `objects` on an `address`, filtered by type `0x3::staking_pool::StakedSui` |
| `suix_getValidatorsApy` | No GraphQL field — keep on JSON-RPC |
| `suix_subscribeEvent`, `suix_subscribeTransaction` | No GraphQL subscriptions — keep on the JSON-RPC WebSocket endpoint, or stream checkpoints over gRPC |

Filtered `transactions` and all `events` queries cover about the most recent 90 days, a shorter window than point lookups. See [How far back GraphQL history goes](/docs/sui-graphql-endpoint#how-far-back-graphql-history-goes).

### Indexer and analytics methods

A few JSON-RPC methods return aggregated analytics that come from Sui's indexer layer, not from a full node. A full node — Sui's or Chainstack's — does not serve them over JSON-RPC or gRPC (calling them on Chainstack returns `-32601 Method not found`). Get the underlying data these way:

| JSON-RPC method | What to use instead |
| - | - |
| `suix_getEpochs` | On Mainnet, list epochs with the GraphQL `epochs` query; epochs that started before the GraphQL history window return `null` fields. For the current epoch's validators, committee, and gas price, call `suix_getLatestSuiSystemState` (JSON-RPC) or `LedgerService/GetEpoch` (gRPC). |
| `suix_getNetworkMetrics`, `suix_getAddressMetrics`, `suix_getMoveCallMetrics` | Network analytics (TPS, active addresses, popular calls). Derive them by indexing your Chainstack node's checkpoint stream (gRPC `SubscriptionService/SubscribeCheckpoints`) into your own store, or use a Sui analytics provider. Most applications do not need these. |

<Note>
  gRPC streaming exposes only `SubscribeCheckpoints`, not per-event subscriptions. For event streams, keep `suix_subscribeEvent` on the JSON-RPC WebSocket, or subscribe to checkpoints over gRPC and filter client-side.
</Note>

## gRPC quickstart

The fastest way to confirm your endpoint and explore the API is [grpcurl](https://github.com/fullstorydev/grpcurl). Sui gRPC has server reflection enabled, so you can list services and call methods without compiling proto files.

<CodeGroup>
  ```bash List services theme={"system"}
  grpcurl -H "x-token: YOUR_X_TOKEN" \
    sui-mainnet.core.chainstack.com:443 \
    list
  ```

  ```bash Node and chain info theme={"system"}
  grpcurl -H "x-token: YOUR_X_TOKEN" \
    sui-mainnet.core.chainstack.com:443 \
    sui.rpc.v2.LedgerService/GetServiceInfo
  ```

  ```bash Get a checkpoint theme={"system"}
  grpcurl -H "x-token: YOUR_X_TOKEN" \
    -d '{"sequence_number": 296000000}' \
    sui-mainnet.core.chainstack.com:443 \
    sui.rpc.v2.LedgerService/GetCheckpoint
  ```
</CodeGroup>

`GetServiceInfo` returns the chain, current epoch, and the node's checkpoint range:

```json theme={"system"}
{
  "chainId": "4btiuiMPvEENsttpZC7CZ53DruC3MAgfznDbASZ7DR6S",
  "chain": "mainnet",
  "epoch": "1184",
  "checkpointHeight": "296723264",
  "lowestAvailableCheckpoint": "253124671",
  "server": "sui-node/1.74.1-8fc60f1fa966"
}
```

To inspect any service's methods and message shapes, describe it:

```bash theme={"system"}
grpcurl -H "x-token: YOUR_X_TOKEN" \
  sui-mainnet.core.chainstack.com:443 \
  describe sui.rpc.v2.LedgerService
```

## gRPC from code

In TypeScript, use the official Sui SDK (`@mysten/sui`). Its **default gRPC-Web transport** works against Chainstack over HTTPS — in the browser and in Node.js — so you only need your node URL as `baseUrl`. For server-side apps that prefer native gRPC over HTTP/2, pass a native transport instead (see [Sui tooling](/docs/sui-tooling#grpc-from-code) for the native setup). From other languages, generate stubs from [Sui's proto definitions](https://github.com/MystenLabs/sui/tree/main/crates/sui-rpc-api/proto) and attach the `x-token` metadata.

<Note>
  Use recent client versions — `@mysten/sui` 2.16 or later (and `@grpc/grpc-js` 1.14 or later for the native transport). Older releases mishandle gRPC streams and produce intermittent `RST` and internal errors under load; current versions are reliable.
</Note>

<CodeGroup>
  ```typescript TypeScript theme={"system"}
  // npm install @mysten/sui
  // Default gRPC-Web transport over HTTPS — works in the browser and in Node.js.
  import { SuiGrpcClient } from '@mysten/sui/grpc';

  const client = new SuiGrpcClient({
    network: 'mainnet',
    baseUrl: 'YOUR_CHAINSTACK_SUI_HTTPS_ENDPOINT',
  });

  // High-level helpers on client.core; raw services on client.ledgerService, etc.
  const gasPrice = await client.core.getReferenceGasPrice();
  console.log(gasPrice.referenceGasPrice);
  ```

  ```python Python theme={"system"}
  import grpc

  # Native gRPC channel over TLS; x-token metadata on every call
  channel = grpc.secure_channel(
      "sui-mainnet.core.chainstack.com:443",
      grpc.ssl_channel_credentials(),
  )
  metadata = (("x-token", "YOUR_X_TOKEN"),)

  # Using stubs generated from Sui's protos, e.g. LedgerService:
  # from sui.rpc.v2 import ledger_service_pb2, ledger_service_pb2_grpc
  # stub = ledger_service_pb2_grpc.LedgerServiceStub(channel)
  # resp = stub.GetServiceInfo(
  #     ledger_service_pb2.GetServiceInfoRequest(), metadata=metadata
  # )
  # print(resp.checkpoint_height)
  ```
</CodeGroup>

<Info>
  The default gRPC-Web transport shown above works in the browser and in Node.js. Native gRPC over HTTP/2 is server-side only; use it when you specifically need native gRPC.
</Info>

## Next steps

* [Sui tooling](/docs/sui-tooling) — SDKs, JSON-RPC, gRPC, and GraphQL connection setup.
* [Sui gRPC endpoint](/docs/sui-grpc-endpoint) — checkpoint retention, authentication, and how Chainstack fronts every interface on one node.
* [Sui GraphQL endpoint](/docs/sui-graphql-endpoint) — GraphQL authentication, filters, history windows, and limits.
* [Sui gRPC overview](https://docs.sui.io/concepts/grpc-overview) — Sui's own gRPC reference.
* [Sui JSON-RPC migration guide](https://sdk.mystenlabs.com/sui/migrations/sui-2.0/json-rpc-migration) — the upstream mapping and SDK migration notes.
