Available Networks
Localnet
Purpose: Local development and testing RPC:http://127.0.0.1:9000
Use case: Fast iteration without network delays
Devnet
Purpose: Development and experimentation RPC:https://fullnode.devnet.sui.io:443
Use case: Testing with a live network, frequent resets
Faucet: Available for free test tokens
Testnet
Purpose: Pre-production testing RPC:https://fullnode.testnet.sui.io:443
Use case: Final testing before mainnet, more stable than devnet
Faucet: Available for free test tokens
Mainnet
Purpose: Production deployment RPC:https://fullnode.mainnet.sui.io:443
Use case: Real value transactions
Faucet: None (use real SUI)
Connecting with CLI
View active environment
List all environments
Add new environment
Switch environment
Connecting with Rust SDK
Fromcrates/sui-sdk/examples/sui_client.rs:
Connecting with TypeScript SDK
Getting Test Tokens
Using CLI
Using TypeScript
Using Rust
Fromcrates/sui-sdk/examples/utils.rs:
Network Configuration
Environment variables
Configuration file
Edit~/.sui/sui_config/client.yaml:
Custom RPC Endpoints
Running your own node
Using third-party providers
Health Checks
Check node status
TypeScript health check
Rust health check
Network Selection Strategy
Development workflow
- Localnet: Initial development and unit testing
- Devnet: Integration testing
- Testnet: Pre-production testing
- Mainnet: Production deployment
Best practices
Troubleshooting
Connection timeout
Rate limiting
Public RPC endpoints may have rate limits. Consider:- Using your own node
- Implementing request caching
- Adding retry logic with backoff