ℹ️ Introduction To SUI Network RPCs and RPC Node Providers
Sui provides multiple ways for developers and users to access on-chain data and interact with its network. This is primarily done through Remote Procedure Call (RPC) interfaces and services hosted by various RPC node providers. These access mechanisms are available across Sui’s networks: Mainnet, Testnet, Devnet, and Localnet.
1. Accessing Sui Network Data
You can interact with the Sui network via:
- Sui Full Node JSON-RPC: The primary RPC interface, allowing real-time and historical access to network data such as transaction details, object state, and on-chain events. Most developers connect to JSON-RPC endpoints hosted by RPC providers or operate their own full node.
- Sui Foundation Load-Balanced Endpoints: Simplified access via URLs managed by the Sui Foundation. These endpoints are ideal for development or exploration, but not recommended for production use due to limited guarantees on stability and scaling.
- Custom Indexers: Developers who need specialized access patterns (e.g., tracking specific object types or relationships) can run their own indexers. These indexers extract and store chain data into PostgreSQL databases for advanced querying.
2. JSON-RPC API
Sui’s JSON-RPC supports both real-time queries and historical lookups. However, historical data retention is subject to each node's pruning strategy. If a full node no longer retains the historical data, it will fall back to a Sui Foundation-managed key-value store for retrieval.
Example Use Cases:
- Query account balances and object ownership
- Submit and simulate transactions
- Fetch on-chain events and logs
3. GraphQL for Sui RPC (Alpha)
Sui also provides a GraphQL interface as a public RPC service. Still in alpha, this interface offers structured, efficient querying over chain state and is supported on Devnet, Testnet, and Mainnet.
Key Features:
- Queries: Read chain state, simulate transactions (
dryRunTransactionBlock), fetch objects and addresses.
- Mutations: Perform state-changing actions like executing transaction blocks.
- Structured Types: Exposes Move objects, addresses, and ownership data through GraphQL schemas.
Note: While promising, GraphQL RPC is still in early development and not recommended for production.
4. SuiJSON Format
To interact with the Sui network through RPC, input data must follow SuiJSON—a JSON format constrained to align with Move’s strict type system.
Examples of SuiJSON Constraints:
u64,u128,u256must be passed as strings, not raw numbers.
nullandobjectsare not allowed.
- Vectors must be homogeneous and valid for Move types.
- Addresses and ObjectIDs must be 32-byte hex strings prefixed with
0x.
This design ensures accurate and type-safe handling of on-chain data and function calls, especially when invoking smart contracts.
5. RPC Node Providers
Several community and commercial providers host publicly accessible or subscription-based RPC nodes. These services may include:
- Load-balanced and geo-distributed full node access
- Enhanced indexing and analytics
- Higher throughput and availability guarantees
Using a third-party provider can simplify development while ensuring performance, especially if you’re not running your own infrastructure.
Summary
Access Method | Use Case | Network Support | Production Use |
JSON-RPC | Real-time + historical data, tx submission | Mainnet, Testnet, Devnet | Yes |
GraphQL RPC (Alpha) | Structured queries, object relations | Mainnet, Testnet, Devnet | No |
Custom Indexer | Advanced data filtering and querying | All networks | Yes |
Foundation Endpoints | Quick prototyping | All networks | No |
For production applications, it's recommended to use self-hosted full nodes or trusted RPC providers, along with properly formatted SuiJSON inputs or GraphQL queries once the service matures.







