RainbowKit Integration
Integrate Para with RainbowKit to provide seamless wallet connection and authentication for your dApp users.
This guide shows how to add Para to RainbowKit, allowing users to connect via social logins, email, and phone verification. Integration is simple—just add Para as a wallet connector to your wagmi configuration. Learn more about RainbowKit and wagmi in their documentation.
Prerequisites
To use Para, you need an API key. This key authenticates your requests to Para services and is essential for integration. Before integrating Para with your application, ensure you have:
- Completed Para authentication setup in your application (see one of our Setup Guides)
- A valid Para API key
- An RPC endpoint for your desired network
Need an API key? Visit the Developer Portal to create API keys, manage billing, teams, and more.
Installation
Install the required packages for the integration:
Setup
Configure Wagmi and Para client
Create a configuration file to initialize your Para wallet configuration:
Set Up Providers
Wrap your application with the necessary providers:
Add Connect Button
Add the ConnectButton
component to your application to allow users to connect their wallets:
If using Next.js, its recommended to setup providers in a dedicated Providers
component and using either the ‘use client’ directive or the next/dynamic
import to ensure the providers are rendered on the client side.
Advanced Configuration
Para’s RainbowKit integration supports all of the ParaModal
props for advanced configuration. Here’s an example of how to set up the GetParaOpts
object with various options:
You can learn more about customizing the ParaModal
in the customization guide:
Interacting with the Connected Wallet
Rainbowkit is powered by wagmi, so you can use hooks like useAccount
to interact with the connected wallet. To learn more about using wagmi hooks or the Rainbowkit hooks check out their docs Using Wagmi Hooks and Using RainbowKit Hooks guides.
Examples
If you’d like to learn more about how to use Rainbowkit with Para, check out our examples on GitHub:
Troubleshooting
If you run into any issues, check out the following common problems and solutions:
Connection issues
Connection issues
If you encounter connection issues, check the following:
- Verify your Para API key is correct
- Ensure you’ve configured the correct environment (DEVELOPMENT vs PRODUCTION)
- Check browser console for error messages
- Verify you’ve selected supported networks in your configuration
Modal not appearing
Modal not appearing
If the Para modal doesn’t appear when clicking the connect button:
- Ensure you’re using the correct imports from
@getpara/rainbowkit
- Check for any CSS conflicts that might hide the modal
- Verify your RainbowKit providers are properly configured
Next Steps
You can also use Para directly without RainbowKit while still taking advantage of wagmi’s hooks. Check out our wagmi guide for more information on how to do that.