A production-ready Next.js decentralized application for sending XRP on XRPL EVM Mainnet with seamless .xrpl domain resolution powered by ZNS (Zelf Name Service).
- π MetaMask Integration: Seamless wallet connection with automatic network detection
- π XRPL EVM Mainnet Support: One-click network addition to MetaMask
- π·οΈ ZNS Domain Resolution: Resolve
.xrpldomains to addresses in real-time - πΈ Native XRP Transfers: Send XRP directly to addresses or .xrpl domains
- β‘ Real-time Domain Resolution: See resolved addresses as you type
- π¨ Modern UI: Built with Tailwind CSS and Radix UI components
- π Reverse Lookup: Display connected wallet's primary .xrpl domain
- π± Mobile Responsive: Full support for mobile wallets via MetaMask deep linking
| Parameter | Value |
|---|---|
| Network Name | XRPL EVM |
| RPC URL | https://rpc.xrplevm.org/ |
| Chain ID | 1440000 (0x15F900) |
| Currency Symbol | XRP |
| Block Explorer | https://explorer.xrplevm.org |
| ZNS Registry | 0xf180136DdC9e4F8c9b5A9FE59e2b1f07265C5D4D |
- Node.js: 18.x or higher
- npm: 9.x or higher
- MetaMask: Browser extension or mobile app
# Clone the repository
git clone https://github.com/vriveraPeersyst/zns-resolve-xrplevm.git
cd zns-resolve-xrplevm
# Install dependencies
npm installRun the development server:
npm run devOpen http://localhost:5089 to view the application.
# Create optimized production build
npm run build
# Start production server
npm startThe application integrates with the ZNS Registry contract on XRPL EVM to provide seamless .xrpl domain name resolution:
- User enters a
.xrpldomain name (e.g.,alice.xrpl) - App strips the
.xrplsuffix to get the base name (alice) - Queries
domainLookup(name)to get the token ID - Queries
registryLookupById(tokenId)to get owner address - Displays the resolved address in real-time
- User connects their wallet
- App queries
userLookupByAddress(address)to get user config - Retrieves the primary domain token ID
- Queries
registryLookupById(tokenId)to get domain name - Displays the domain name in the wallet button
Note: MetaMask does not currently support custom ENS registries via the wallet_addEthereumChain RPC method (per EIP-3085). All domain resolution is handled client-side within the dApp before sending transactions.
- Connect Wallet: Click "Connect Wallet" to connect MetaMask
- Add Network: Click "Add XRPL EVM Network" (only needed once)
- Switch Network: Ensure you're on XRPL EVM Mainnet
- Enter Recipient: Type a
.xrpldomain or Ethereum address - Enter Amount: Specify the amount of XRP to send
- Send: Click "Send XRP" and confirm the transaction in MetaMask
- Framework: Next.js 15 with App Router
- Blockchain: Viem for Ethereum interactions
- UI Components: Radix UI + Tailwind CSS
- Wallet: MetaMask integration via EIP-1193
- Type Safety: TypeScript with strict mode
- Deployment: Optimized for Vercel
zns-resolve-xrplevm/
βββ app/
β βββ page.tsx # Main application page
β βββ layout.tsx # Root layout with metadata
β βββ globals.css # Global styles
βββ components/
β βββ transfer.tsx # Main transfer component
β βββ connect-wallet-button.tsx # Wallet connection UI
β βββ footer.tsx # Footer component
β βββ ui/ # Reusable UI components
βββ lib/
β βββ xrplEvm.ts # XRPL EVM network configuration
β βββ zns.ts # ZNS Registry integration
β βββ transfer.ts # Transfer utilities
β βββ utils.ts # Helper functions
βββ public/ # Static assets
βββ vercel.json # Vercel deployment configuration
βββ package.json # Project dependencies
No environment variables are required for basic functionality. All configuration is hardcoded for XRPL EVM Mainnet.
Edit lib/xrplEvm.ts to modify network settings:
export const XRPL_EVM_CHAIN_ID_HEX = '0x15F900';
export const XRPL_EVM = {
id: parseInt(XRPL_EVM_CHAIN_ID_HEX, 16),
name: 'XRPL EVM',
// ... other settings
};Edit lib/zns.ts to update the registry address:
export const ZNS_REGISTRY = '0xf180136DdC9e4F8c9b5A9FE59e2b1f07265C5D4D' as const;Or manually:
# Install Vercel CLI
npm i -g vercel
# Deploy
vercelThe vercel.json configuration includes:
- Security headers (CSP, X-Frame-Options, etc.)
- Next.js framework detection
- Optimized build settings
The application is a standard Next.js app and can be deployed to:
- Netlify: Use the Next.js build plugin
- Railway: Automatically detected
- AWS Amplify: Configure build settings for Next.js
- Cloudflare Pages: Use Next.js adapter
- β No private keys stored or transmitted
- β All transactions signed client-side by MetaMask
- β
Security headers configured in
vercel.json - β Input validation for addresses and amounts
- β Domain resolution verification
- β No backend or API required
- Ensure MetaMask extension is installed and enabled
- On mobile, use the "Connect Wallet" button to open in MetaMask browser
- Check browser console for errors
- Verify the domain exists in the ZNS Registry
- Ensure the domain hasn't expired
- Check that the domain owner has set it correctly
- Ensure sufficient XRP balance for amount + gas fees
- Verify you're on XRPL EVM Mainnet
- Check that the recipient address is valid
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
- XRPL EVM Documentation
- ZNS Registry Contract
- Viem Documentation
- Next.js Documentation
- MetaMask Developer Docs
For issues and questions:
- Open an issue on GitHub
- Check existing issues for solutions
- Review the troubleshooting section above
Built with β€οΈ for the XRPL EVM community