Logo
New RPC users get 35% off their first monthView the offer
RPC Assistant

Sui RPC on GitHub: Where to Find Endpoints, SDKs, and Node Configs

Summary

Developers searching for "sui rpc github" usually want one of three things: a working Sui RPC endpoint, the official Sui GitHub repositories that document JSON-RPC and the newer gRPC-based APIs, or example code that connects a client to a Sui full node. This article maps those needs to concrete resources and shows how to move from a public endpoint to infrastructure you can rely on in production.

You will find the Sui JSON-RPC method surface, a curl and TypeScript example, a comparison of public versus managed versus dedicated Sui RPC, and a debugging path for common connection and method errors. OnFinality provides Sui RPC API access and dedicated Sui nodes when you outgrow shared public endpoints.

When you search for "sui rpc github," you are usually trying to answer one practical question: where do I get a Sui RPC endpoint and the code that talks to it? The Sui ecosystem keeps its node software, JSON-RPC schema, and client SDKs in public GitHub repositories, but the information is spread across several projects. This page pulls the pieces together so you can connect a client, test a method, and decide whether a public endpoint is enough or whether you need managed infrastructure.

Which Sui RPC source do you actually need?

Before copying an endpoint, identify what you are trying to do. The table below maps common goals to the right resource and the next action.

Your goalWhere to lookNext action
Send a quick JSON-RPC callA Sui RPC endpoint plus the JSON-RPC method listUse curl or a client SDK against a testnet or mainnet endpoint
Build a dApp or backend serviceSui TypeScript SDK or Rust SDK on GitHubInstall the SDK, point it at an endpoint, handle retries
Run your own full nodeSui node source repository and node docsProvision hardware, sync the node, expose RPC locally
Support production trafficA managed RPC API or dedicated nodeCompare shared, managed, and dedicated options before launch
Debug a failing methodJSON-RPC reference and node logsCheck method name, params, and endpoint health

If you only need to read chain data occasionally, a public endpoint and the SDK are enough. If you are shipping a product with uptime expectations, the endpoint becomes an infrastructure decision, not just a URL.

Sui RPC endpoints and transport basics

Sui exposes a JSON-RPC interface over HTTP, and newer tooling also supports gRPC-style and GraphQL access patterns depending on the node version and client. For most developers starting out, JSON-RPC over HTTPS is the simplest path.

A typical Sui RPC request looks like this:

curl -X POST https://<your-sui-rpc-endpoint> \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sui_getLatestCheckpointSequenceNumber",
    "params": []
  }'

Replace the placeholder with the endpoint you have been issued. OnFinality publishes Sui mainnet and testnet endpoints through its network pages rather than hard-coding them in articles, so always confirm the current URL on the Sui network page before you wire it into a config file.

In a TypeScript project, the same call is usually wrapped by the Sui SDK:

import { SuiClient, getFullnodeUrl } from '@mysten/sui/client';

const client = new SuiClient({
  url: process.env.SUI_RPC_URL ?? getFullnodeUrl('mainnet'),
});

const checkpoint = await client.getLatestCheckpointSequenceNumber();
console.log('latest checkpoint:', checkpoint);

Keep the endpoint in an environment variable. Hard-coded URLs are the most common reason a Sui integration breaks when a team moves from testnet to mainnet.

What the Sui GitHub repositories give you

The Sui network is developed in the open, and the repositories you will touch most often fall into a few categories:

  • Node and protocol source. The core Sui repository contains the full node implementation, validator logic, and the JSON-RPC server. This is where method definitions and configuration flags live.
  • Client SDKs. The TypeScript and Rust SDKs wrap JSON-RPC calls into typed functions. They are the fastest way to avoid hand-writing request payloads.
  • Schema and API references. JSON-RPC method names, parameter shapes, and return types are documented alongside the source. When a method behaves unexpectedly, the schema is the source of truth.
  • Example projects and tooling. Sample apps, indexers, and CLI tools show how other teams connect to Sui RPC in practice.

A useful habit is to pin the SDK version in your package manifest and read the changelog before upgrading. Sui moves quickly, and method signatures occasionally change between releases.

Public, managed, and dedicated Sui RPC compared

Once your prototype works, the next decision is where the endpoint should live. The three common models differ in how much operational work you own.

ModelWhat you controlTypical fitTradeoffs to weigh
Public endpointNothing beyond your client codePrototypes, scripts, learningShared capacity, no SLA, limited visibility into failures
Managed RPC API (OnFinality)API keys, usage, and endpoint choiceProduction dApps and backendsYou depend on a provider for capacity and support
Dedicated node (OnFinality)A node reserved for your workloadHigh-volume or latency-sensitive servicesHigher cost, more planning around capacity

OnFinality offers both a managed RPC API service and dedicated nodes for teams that need isolated capacity. The right choice depends on request volume, whether you need archive-style historical queries, and how much downtime your product can tolerate.

Production readiness checklist for Sui RPC

Before you point real users at a Sui endpoint, walk through these checks:

  1. Separate environments. Use distinct endpoints and API keys for development, staging, and production.
  2. Add retries with backoff. Network blips and rate limits are normal; your client should retry idempotent reads.
  3. Monitor latency and error rates. Track response times and JSON-RPC error codes per method, not just overall uptime.
  4. Plan a failover endpoint. If your provider has a regional or maintenance event, a secondary endpoint keeps reads flowing.
  5. Confirm method support. Not every endpoint supports every method, especially historical or subscription-style calls. Verify the ones you depend on.
  6. Review limits before launch. Understand request-per-second and payload limits so a traffic spike does not surprise you. See RPC pricing for how plans are structured.
  7. Log request IDs. When you open a support ticket, request IDs and timestamps shorten diagnosis considerably.

Debugging common Sui RPC failures

Most Sui RPC problems fall into a small set of categories. Match the symptom to the likely cause before changing code.

SymptomLikely causeFirst fix to try
Connection refused or timeoutWrong URL, network mismatch, or endpoint downRe-check the endpoint on the Sui network page and confirm testnet vs mainnet
Method not foundMethod name typo or unsupported methodCompare against the JSON-RPC reference and SDK version
Invalid paramsWrong parameter shape or typesValidate against the schema; check object ID formatting
401 or 403Missing or invalid API keyConfirm the key is sent in the correct header
429Rate limit reachedAdd backoff, reduce polling, or move to a higher-capacity plan
Stale dataCaching or an out-of-sync nodeCheck checkpoint height and compare against a second endpoint

When a method fails only in production, compare the request payload from your staging logs against the one that works locally. Differences in object IDs, pagination cursors, or optional fields are frequent culprits.

Moving from a public endpoint to managed Sui RPC

A common path looks like this: a developer finds a public Sui endpoint, builds a prototype, and then hits shared-capacity limits as usage grows. The migration itself is usually small if you planned ahead.

  • Store the endpoint in configuration, not in source code.
  • Keep SDK calls behind a thin wrapper so you can swap providers without touching business logic.
  • Add a health check that pings a cheap method like the latest checkpoint number.
  • Test the new endpoint against your full method list before cutting over.
  • Roll out gradually: route a percentage of traffic to the new endpoint and compare error rates.

OnFinality's Sui network page lists the endpoints and transport options available, and the supported RPC networks page shows how Sui fits alongside other chains if you run multi-chain infrastructure.

Key Takeaways

  • "Sui RPC GitHub" usually means finding an endpoint plus the SDK or node source that talks to it.
  • Sui exposes JSON-RPC over HTTP, with SDKs that wrap calls into typed functions.
  • Public endpoints are fine for prototypes; production apps need retries, monitoring, and a failover plan.
  • Managed RPC and dedicated nodes differ mainly in how much capacity and isolation you control.
  • Always confirm the current endpoint URL on the OnFinality Sui network page instead of hard-coding one from an article.

FAQ

Is there an official Sui RPC endpoint on GitHub?

GitHub hosts the Sui node software and SDKs, which document the RPC interface. Endpoint URLs themselves are usually published by node operators and providers rather than in the source repository.

Can I run my own Sui full node instead of using a provider?

Yes. Running a node gives you full control but requires hardware, storage, and ongoing maintenance. Many teams start with a managed endpoint and move to a dedicated node as traffic grows.

Does OnFinality support Sui RPC?

OnFinality provides Sui RPC API access and dedicated Sui nodes. Check the Sui network page for current endpoints and transport details.

What is the difference between Sui JSON-RPC and gRPC?

Both are ways to talk to a Sui node. JSON-RPC is widely used and easy to test with curl; gRPC is often used for higher-throughput or streaming-style integrations. Support depends on the node version and provider.

How do I avoid rate limits on Sui RPC?

Reduce unnecessary polling, batch reads where possible, add exponential backoff, and choose a plan sized to your request volume. See RPC pricing for options.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started