ConnectKit Integration
ConnectKit is a modern wallet connection component that provides a clean, customizable interface for connecting wallets. This guide shows you how to integrate Sei Global Wallet with ConnectKit.Prerequisites
- React application
- Node.js and npm/yarn
- Basic understanding of React hooks
Step 1: Create React Application
Create a new React application with TypeScript:Step 2: Install Dependencies
Install the required packages:Step 3: Configure Your Application
Update yourApp.tsx
file with the complete ConnectKit configuration:
App.tsx
Step 4: Get WalletConnect Project ID
1
Visit WalletConnect
Go to cloud.walletconnect.com and sign up for a free account
2
Create a new project
Click “Create” and fill in your project details
3
Copy your Project ID
Copy the Project ID from your dashboard
4
Replace in your code
Replace
'YOUR_WALLETCONNECT_PROJECT_ID'
with your actual Project IDStep 5: Run Your Application
Start your development server:http://localhost:3000
.
Expected Behavior
Once configured correctly, your application will:- Display Connect Button: ConnectKit’s styled connect button appears
- Show Sei Global Wallet: Sei Global Wallet appears in the wallet selection modal
- Handle Authentication: Users can authenticate via social login methods
- Display Account Info: Connected wallet address, network, and balance are shown
- Persist Connection: Wallet connection persists across page refreshes
ConnectKit Features
ConnectKit provides several built-in features:Responsive Design
Works seamlessly on desktop and mobile devices
Theme Support
Built-in light and dark theme support
Custom Styling
Extensive customization options available
Accessibility
WCAG compliant with keyboard navigation
Customization Options
Custom Theme
ConnectKit supports custom themes:Custom Button
Create a custom connect button:Custom RPC Endpoints
Configure custom RPC endpoints for better performance:Troubleshooting
Sei Global Wallet not appearing
Sei Global Wallet not appearing
Solution: Ensure the import is at the top of your file:
WalletConnect connection fails
WalletConnect connection fails
Solution: Verify your Project ID and network configuration:
- Check cloud.walletconnect.com dashboard
- Ensure your Project ID is active and properly configured
- Verify allowed domains in your WalletConnect project settings
Transport configuration errors
Transport configuration errors
Solution: Ensure proper transport setup:
Advanced Usage
Multiple Chain Support
Add support for additional chains:Error Handling
Implement proper error handling:Next Steps
Web3-React Integration
Try Web3-React for more flexibility
Wagmi + Dynamic
Explore advanced features with Dynamic