ℹ️ 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.