Skip to content

JSON-RPC Gateway

Drop-in replacement for Sui RPC nodes, powered by Inodra-managed infrastructure.

📌 Continued JSON-RPC Support

While Sui has deprecated JSON-RPC in favor of GraphQL and gRPC, Inodra intends to continue supporting the JSON-RPC interface for the foreseeable future. We aim to maintain compatibility by translating requests to gRPC, GraphQL or our indexed data sources behind the scenes. However, we recommend new integrations use gRPC, REST or GraphQL for long-term stability.

Overview

The JSON-RPC gateway provides 100% compatibility with the official Sui JSON-RPC specification. Simply replace your Sui node URL with Inodra's endpoint and add your API key.

Endpoint: https://api.inodra.com/v1/jsonrpc

Quick Start

1. Update Your Client

javascript
import { SuiClient, SuiHTTPTransport } from '@mysten/sui/client'

// Before: Direct Sui node
const client = new SuiClient({
  url: 'https://fullnode.mainnet.sui.io:443'
})

// After: Inodra-managed infrastructure
const transport = new SuiHTTPTransport({
  url: 'https://api.inodra.com/v1/jsonrpc',
  rpc: {
    headers: { 'x-api-key': 'YOUR_API_KEY' }
  }
})

const client = new SuiClient({ transport })

2. Test Connection

javascript
// All existing methods work unchanged
const checkpoint = await client.getLatestCheckpointSequenceNumber()
const balance = await client.getBalance({ owner: '0x123...' })

Migration Examples

From Sui TypeScript SDK

javascript
import { SuiClient, SuiHTTPTransport } from '@mysten/sui/client'

const transport = new SuiHTTPTransport({
  url: 'https://api.inodra.com/v1/jsonrpc',
  rpc: {
    headers: { 'x-api-key': process.env.INODRA_API_KEY }
  }
})

const client = new SuiClient({ transport })

// Everything else stays the same!

Direct JSON-RPC Calls

javascript
// Just update the endpoint and add authentication
const response = await fetch('https://api.inodra.com/v1/jsonrpc', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'sui_getLatestCheckpointSequenceNumber',
    params: []
  })
})

Understanding the Deprecation

Sui has deprecated JSON-RPC in favor of gRPC and GraphQL, with full deprecation planned for April 2026. Here's what this means for you:

What's happening:

  • Sui will stop maintaining the JSON-RPC interface
  • New features may only be available via gRPC
  • Official Sui SDK support for JSON-RPC will end

What Inodra does:

  • Currently, we route JSON-RPC requests directly to Sui nodes
  • After Sui removes JSON-RPC, we'll translate requests to gRPC or our indexed data on a best-effort basis
  • You'll still need to migrate eventually, but Inodra gives you time to plan it properly

Preparing for the Future

Even if you stay on JSON-RPC now, here's how to prepare:

  1. Use Inodra - We handle the translation, so you're already future-proofed
  2. Isolate your RPC calls - Keep them in a service layer for easier migration
  3. Read the migration guide - Understand what changes when you're ready

🚀 Ready to try it?

Get your free API key and start making requests in under 2 minutes. The same key works for JSON-RPC, gRPC, GraphQL, and REST.

Released under the MIT License.