Overview
WalletConnect enables your app to connect with 300+ cryptocurrency wallets. PolygonKit uses WalletConnect (via Reown AppKit) to provide a seamless wallet connection experience.Why WalletConnect?
300+ Wallets
Support for MetaMask, Trust Wallet, Coinbase Wallet, Rainbow, and many more
QR Code Connection
Users can scan QR codes to connect with mobile wallets
Mobile Deep Linking
Automatic deep linking to wallet apps on mobile devices
Secure
End-to-end encrypted connection between app and wallet
Getting a Project ID
Create WalletConnect Account
Visit WalletConnect Cloud and sign up for a free account.
Create New Project
Click “New Project” and fill in your project details:
- Project Name: Your app’s name
- Homepage URL: Your app’s URL (can be localhost for development)
Copy Project ID
Once created, you’ll see your Project ID on the dashboard. Copy this ID.It looks like:
f6bd6e2911b56f5ac3bc8b2d0e2d7ad5Add to Environment Variables
Store your Project ID in environment variables (never commit this to version control):
- Next.js
- Vite
- Remix
.env.local
Default Project ID
PolygonKit includes a default Project ID for quick development:WalletConnect Features
Wallet Selection Modal
PolygonKit automatically shows a wallet selection modal when users click the connect button:- Search functionality
- Popular wallets highlighted
- QR code for mobile wallet connection
- “View All” to see 300+ supported wallets
QR Code Connection
Desktop users can scan QR codes to connect with mobile wallets:- Click “WalletConnect” in the modal
- Scan the QR code with your mobile wallet app
- Approve the connection in your wallet
- Connection established!
Mobile Deep Linking
On mobile devices, PolygonKit automatically opens wallet apps:- Tap a wallet in the connection modal
- The wallet app opens automatically
- Approve the connection
- Return to your app - you’re connected!
Customizing Wallet Modal
You can customize the appearance and behavior of the wallet modal through the PolygonKitProvider configuration:- The wallet connection modal
- The wallet app when requesting approval
- WalletConnect session details
Project Analytics
WalletConnect Cloud provides analytics for your project:- Active Users: Number of connected wallets
- Connection Events: How many times users connect
- Wallet Distribution: Which wallets users prefer
- Geographic Data: Where your users are located
Rate Limits
WalletConnect Cloud has rate limits based on your plan:| Plan | Requests/Month |
|---|---|
| Free | 1,000,000 |
| Pro | 10,000,000+ |
Best Practices
Create Separate Project IDs
Create Separate Project IDs
Use different Project IDs for development, staging, and production environments.
Monitor Usage
Monitor Usage
Check your WalletConnect Cloud dashboard regularly to monitor usage and stay within rate limits.
Set Proper Metadata
Set Proper Metadata
Provide accurate appName, appDescription, appUrl, and appIcons. This builds trust with users.
Test Multiple Wallets
Test Multiple Wallets
Test your app with different wallets (MetaMask, Coinbase Wallet, etc.) to ensure compatibility.
Handle Connection Errors
Handle Connection Errors
Implement proper error handling for connection failures and provide helpful error messages.
Troubleshooting
Invalid Project ID Error
Problem: “Invalid Project ID” error when connecting wallet. Solution:- Verify your Project ID is correct
- Check that environment variables are loaded properly
- Ensure the Project ID hasn’t been revoked
- Create a new Project ID if needed
Wallet Not Appearing in Modal
Problem: A specific wallet doesn’t show up in the connection modal. Solution:- Ensure the wallet supports WalletConnect v2
- Check if the wallet is installed (for browser extension wallets)
- Try searching for the wallet by name in the modal
- Clear browser cache and try again
QR Code Not Working
Problem: QR code doesn’t connect with mobile wallet. Solution:- Ensure your Project ID is valid
- Check that the wallet app supports WalletConnect v2
- Try a different wallet app
- Verify your internet connection is stable
Connection Drops Frequently
Problem: Wallet connection drops after a short time. Solution:- Check if you’re hitting rate limits
- Upgrade your WalletConnect plan if needed
- Ensure proper session management in your app
- Verify network stability
Rate Limit Errors
Problem: Hitting WalletConnect rate limits. Solution:- Monitor your usage in WalletConnect Cloud
- Optimize connection logic to reduce unnecessary requests
- Upgrade to a paid plan for higher limits
- Implement caching to reduce API calls
Example: Connection Handler
Handle connection events and errors:Security Considerations
Additional Resources
WalletConnect Cloud
Create and manage Project IDs
WalletConnect Docs
Official WalletConnect documentation
Supported Wallets
Browse all supported wallets
WalletConnect Explorer
Explore dApps and wallets