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

Sui Testnet RPC & gRPC: Endpoint, Faucet & Developer Setup

Summary

Sui Testnet RPC gives developers a gRPC-first path to query checkpoints, objects, and balances; simulate and execute transactions; and stream real-time activity using OnFinality managed endpoints. The modern workflow uses LedgerService for checkpoint data, StateService for object and balance reads, TransactionExecutionService for SimulateTransaction and ExecuteTransaction, and SubscriptionService for SubscribeCheckpoints, SubscribeTransactions, and SubscribeEvents. Legacy Full Node JSON-RPC remains useful for migration comparisons, but new testnet integrations should target gRPC and treat JSON-RPC as a legacy surface. Use the official faucet at https://faucet.sui.io for test SUI, and keep testnet credentials separate from mainnet. Configure endpoint placeholders such as GRPC_ENDPOINT and authorization headers in SDKs, wallets, and CI. Because testnet endpoints can reset and faucet limits change, always build your testnet environment to be disposable and avoid hard-coding object IDs or transaction digests. Testnet is not permanent: verify current faucet policy, expect resets, and validate the same workflows before moving to Sui mainnet. For operational guidance, see /rpc-assistant/sui-rpc-guide and /networks/sui-testnet.

Key Takeaways

  • Use gRPC-first Sui Testnet access with LedgerService, StateService, TransactionExecutionService, and SubscriptionService.
  • Treat the full node JSON-RPC surface as legacy; only use it for migration comparisons.
  • Get test SUI from https://faucet.sui.io and verify current faucet limits before CI runs.
  • Keep testnet and mainnet credentials, endpoints, and token expectations separate.

Sui Testnet gRPC-First Access and Legacy JSON-RPC

OnFinality's Sui testnet access is gRPC-first. The current integration path uses the Sui protobuf services LedgerService, StateService, TransactionExecutionService, and SubscriptionService. They cover checkpoint queries, object and balance reads, transaction simulation and execution, and streaming subscriptions for checkpoints, transactions, and events.

Legacy Full Node JSON-RPC is still present in some existing tooling, but it should be treated as a migration surface. Do not build new testnet workflows around JSON-RPC; instead, map legacy methods to the equivalent gRPC workflow before committing testnet code.

  • Use LedgerService, StateService, TransactionExecutionService, and SubscriptionService for new Sui Testnet integration.
  • Treat Full Node JSON-RPC as legacy and migration-only, not as the main implementation path.
  • Map existing JSON-RPC calls to gRPC methods before expanding testnet code.
CriterionWhat to checkWhy it matters
gRPC services (LedgerService, StateService, TransactionExecutionService, SubscriptionService)Modern workflow for queries, execution, simulation, and streamingPrimary path for new development and real-time data needs
Legacy Full Node JSON-RPCExisting clients and migration comparisonsIsolate from new code to avoid dual-path maintenance

Testnet Endpoint and Credential Configuration

OnFinality provides a managed gRPC endpoint for Sui Testnet. You will receive an endpoint URL and an API token or equivalent credential. Store these in environment variables or a secrets manager. Do not hard-code credentials in repositories.

The following grpcurl example uses placeholders. Replace GRPC_ENDPOINT and ONFINALITY_API_TOKEN with your assigned values. The list command is a grpcurl reflection helper; after importing the Sui protobuf definitions, call the relevant method from LedgerService, StateService, TransactionExecutionService, or SubscriptionService.

Using the Official Sui Faucet Safely

The official Sui Testnet faucet is at https://faucet.sui.io. Always verify the current faucet policy, per-address limits, and cooldown periods before integrating it into automated tests. Request test SUI to a wallet address you control, and never request tokens for addresses you do not own.

Test SUI has no value and cannot be exchanged for mainnet assets. If you have unused test tokens, return them to the faucet's return address to keep the testnet healthy. Keep testnet and mainnet faucet usage separate.

  • Use only https://faucet.sui.io for official test SUI.
  • Verify current faucet limits and cooldowns before CI runs.
  • Keep test SUI separate from mainnet SUI; do not use test addresses for production.
  • Return unused test tokens when possible.

Move Deployment, Object Reads, and Transaction Workflows

Sui is object-centric, so your testnet workflow should center on object reads, transaction simulation, and execution. Use StateService to query objects and balances before building a transaction. Use TransactionExecutionService for SimulateTransaction to dry-run a transaction, then use ExecuteTransaction for the final submission. This two-step pattern helps catch Move type errors, object version conflicts, and gas estimation issues without advancing chain state.

Record the transaction digest after execution and query the resulting object changes to verify state transitions.

  • Query owned objects and balances with StateService before building a transaction.
  • Call SimulateTransaction from TransactionExecutionService to validate gas, object versioning, and Move logic.
  • Use ExecuteTransaction from TransactionExecutionService for final submission.
  • Record the transaction digest and query the resulting object changes.
CriterionWhat to checkWhy it matters
Read objects/balancesStateServiceVerify ownership and object versions before transaction construction
Simulate transactionTransactionExecutionService -> SimulateTransactionDry-run without chain state change
Execute transactionTransactionExecutionService -> ExecuteTransactionSubmit real testnet transaction
Query checkpointLedgerServiceConfirm inclusion and ordering

Checkpoints and Real-Time Subscriptions

Checkpoints provide a stable chain boundary for indexing and syncing. Query checkpoint sequence numbers and checkpoint data through LedgerService. For streaming updates, use SubscriptionService with SubscribeCheckpoints, SubscribeTransactions, or SubscribeEvents.

Design your client to handle reconnects and backpressure. Testnet resets can interrupt streams, and subscription clients should be able to re-establish sessions automatically.

  • SubscribeCheckpoints for checkpoint boundaries.
  • SubscribeTransactions for transaction-level streaming.
  • SubscribeEvents for event filtering and structured updates.
  • Handle reconnects and resets in subscription clients.

Wallet, SDK, and CI Configuration

Wallets and SDKs should be pointed at the managed gRPC endpoint you were assigned. In CI, inject the endpoint and credential via environment variables, and never commit secrets. Use a stage or test job that targets Sui Testnet with a test-only account. Keep mainnet configuration in a separate profile.

The following environment example uses placeholders for CI. Replace the values with your secure store references.

Testnet Limits, Resets, and Operational Checks

Sui Testnet is not permanent and may reset. Endpoints and data can be wiped or changed. Do not treat testnet objects, transaction digests, or faucet balances as durable. Verify current faucet policy before relying on it. Monitor your request usage, handle rate limit responses gracefully, and keep testnet credentials isolated from production.

CriterionWhat to checkWhy it matters
Faucet limitsCurrent per-address and cooldown policy at https://faucet.sui.ioPrevents CI stalls from exhausted faucet allowances
Endpoint statusProvider dashboard or network status pageDetects testnet-wide outages or resets
Rate limitsYour plan's request limits and error codesAvoids blocking automated test runs
Reset scheduleAny announced testnet reset or upgrade windowPrevents invalid assumptions about persistent object IDs

Migration Path to Sui Mainnet

After your Sui Testnet workflow passes, plan a separate mainnet rollout. Use the mainnet gRPC endpoint and credentials from OnFinality; never reuse testnet tokens, addresses, or object digests. Re-run the same simulation and execution checks with mainnet gas costs.

Review the Sui network pages at /networks/sui-testnet and /networks/sui for current endpoint details and provider guidance. For provider evaluation criteria, see /rpc-assistant/sui-rpc-providers.

Next steps: Sui gRPC Guide.

  • Provision separate mainnet credentials and endpoints.
  • Re-validate Move packages and transaction flows against mainnet state.
  • Use the same gRPC workflow but with mainnet-specific limits and monitoring.
  • Do not carry testnet assumptions into production.

Frequently Asked Questions

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

gRPC is the current recommended path, using protobuf services such as LedgerService, StateService, TransactionExecutionService, and SubscriptionService. JSON-RPC is a legacy full node surface that may still be present in older tooling; treat it as migration-only for new development.

How do I get test SUI tokens?

Use the official faucet at https://faucet.sui.io. Verify current per-address limits and cooldown periods, request to an address you control, and return unused tokens to help other developers.

Which gRPC services should I use for transactions and subscriptions?

Use TransactionExecutionService for SimulateTransaction and ExecuteTransaction. Use SubscriptionService for SubscribeCheckpoints, SubscribeTransactions, and SubscribeEvents. LedgerService provides checkpoint queries and StateService handles object and balance reads.

Does the Sui Testnet reset? How does that affect my development?

Yes, testnet is not permanent and may reset. Object IDs, transaction digests, and faucet balances can change or disappear. Build disposable test environments, avoid hard-coded assumptions, and verify current faucet policy before relying on it.

Can I use the same RPC provider for testnet and mainnet?

Yes, OnFinality supports both Sui Testnet and Sui Mainnet. Use separate endpoints and credentials for each network, and never mix testnet tokens or addresses with mainnet.

What should I check before migrating from testnet to mainnet?

Re-validate Move packages and transaction flows against mainnet state, use mainnet gas costs, provision separate credentials, and review endpoint details at /networks/sui and /rpc-assistant/sui-rpc-providers.

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