Skip to main content

JSON-RPC migration

:::warning Required migration Sui JSON-RPC is deprecated and must be migrated by July 2026 according to the Sui API reference. New applications should not add JSON-RPC dependencies. :::

Migration targets

Legacy patternPreferred targetNotes
Object reads such as sui_getObjectgRPC StateService or GraphQL object queryUse gRPC for backend latency; GraphQL for frontend field selection.
Transaction lookup such as sui_getTransactionBlockgRPC LedgerService or GraphQL transaction queryPreserve digest-based lookup and normalize response shape in your app.
Dry-run or execute transaction callsgRPC TransactionExecutionServiceKeep signing outside the node and submit serialized transaction bytes.
Event pollinggRPC SubscriptionService or GraphQL event paginationUse streaming for indexers; use GraphQL for backfill and UI search.

Cutover plan

  1. Inventory JSON-RPC methods at the gateway and client libraries.
  2. Classify each call as read, transaction execution, or event/indexer workload.
  3. Add gRPC and GraphQL clients side-by-side behind the application interface.
  4. Compare object IDs, transaction digests, checkpoint numbers, and pagination behavior.
  5. Disable new JSON-RPC callers, then remove legacy routes after production parity.

See migration samples for concrete mapping patterns.