Skip to main content

JSON-RPC migration samples

The Sui API reference sets the direction: JSON-RPC is deprecated and must be replaced by July 2026.

JSON-RPC to gRPC

JSON-RPC habitgRPC replacement
Poll latest checkpointLedgerService latest checkpoint call.
Read object by IDStateService object lookup.
Submit transaction bytesTransactionExecutionService submission call.
Subscribe or poll eventsSubscriptionService checkpoint stream plus event filtering.

JSON-RPC to GraphQL

JSON-RPC habitGraphQL replacement
Fetch object fields for a UIobject(address:) selection with only required fields.
Fetch transaction detailstransactionBlock(digest:) query with effects and events.
Search eventsEvent connection with filters and cursor pagination.

Breaking-change checklist

  • Response shapes change from method-specific JSON objects to protobuf messages or GraphQL selections.
  • Pagination changes to checkpoint cursors or GraphQL connection cursors.
  • gRPC transport requires HTTP/2-aware load balancers.
  • Transaction submission should preserve binary bytes and signatures without JSON mutation.