π Network Selection Guide
Understanding which networks to choose for your XRP Genie project.
π― Overview
XRP Genie involves two separate network configurations:
- Web3Auth Infrastructure: Where your authentication happens
- XRPL Network: Which blockchain your transactions use
ποΈ Web3Auth Infrastructure
Sapphire Devnet
- Purpose: Development and testing
- Client IDs: Work only with devnet
- Features: Full feature set, development-friendly
- Use When: Building, testing, prototyping
Sapphire Mainnet
- Purpose: Production applications
- Client IDs: Work only with mainnet
- Features: Production-grade reliability
- Use When: Live applications with real users
βοΈ XRPL Networks
Testnet
- Purpose: Development and testing
- XRP: Free from faucets (not real value)
- Features: Same as mainnet, but test environment
- Faucet: Available for funding accounts
- Use When: Development, testing, staging
Mainnet
- Purpose: Production applications
- XRP: Real XRP with actual value
- Features: Live XRPL with real transactions
- Faucet: Not available (requires real XRP)
- Use When: Production applications only
π― Recommended Combinations
π¨βπ» Development Setup
Web3Auth: Sapphire Devnet
XRPL: Testnet
Benefits:
- Free to test
- Quick setup
- No real money at risk
- Full feature testing
π Production Setup
Web3Auth: Sapphire Mainnet
XRPL: Mainnet
Benefits:
- Production-grade reliability
- Real XRP transactions
- Live user authentication
- Maximum security
π§ͺ Staging Setup
Web3Auth: Sapphire Mainnet
XRPL: Testnet
Benefits:
- Production auth system
- Test XRP for safety
- Real user flows without financial risk
π CLI Selection Process
When you run npx xrp-genie init
, youβll be asked:
1. Web3Auth Infrastructure
? Choose Web3Auth infrastructure environment:
π§ͺ Sapphire Devnet - Development (most new projects)
π Sapphire Mainnet - Production (established projects)
2. XRPL Network
? Choose XRPL network for Web3Auth integration:
π§ͺ Testnet - For development and testing (with faucet)
π Mainnet - Production use (real XRP required)
π¨ UI Display
Your app will show the configuration in the header:
π§ββοΈ XRP Genie
Web3Auth (Sapphire Devnet) β’ XRPL Testnet
This helps you always know which environment youβre using.
β οΈ Common Mistakes
Wrong Web3Auth Environment
# β Using devnet client ID with mainnet config
Error: "Failed to fetch project configurations"
Fix: Match your client ID environment with the code configuration
Missing Testnet Funding
# β Trying to send XRP with 0 balance
Error: "Insufficient balance. Available: 0 XRP"
Fix: Use the βFund Account (Testnet)β button
Production Without Real XRP
# β Using mainnet without funding account
Error: Account not activated (needs 10+ XRP)
Fix: Send real XRP to activate the account
π Switching Networks
To change networks in an existing project:
- Update Environment Variables:
# .env.local NEXT_PUBLIC_XRPL_NETWORK=mainnet NEXT_PUBLIC_WEB3AUTH_ENV=mainnet
- Update Client ID (if switching Web3Auth environments):
// hooks/useWeb3AuthWallet.ts clientId: "YOUR_NEW_CLIENT_ID"
- Restart Development Server:
npm run dev
π― Decision Tree
Are you developing/testing?
ββ Yes β Sapphire Devnet + XRPL Testnet
ββ No β Are you ready for production?
ββ Yes β Sapphire Mainnet + XRPL Mainnet
ββ No β Sapphire Mainnet + XRPL Testnet (staging)
π Next Steps
- Web3Auth Dashboard Setup - Configure your project
- Environment Configuration - Set up .env files
- Troubleshooting - Fix network issues