Wagmi Integration
Integrate Para with Wagmi’s React Hooks to build powerful Ethereum dApps with seamless wallet connection and transaction signing.
Wagmi is a collection of React Hooks for Ethereum. This guide shows how to integrate Para’s secure signing with both v2 (recommended) and v1 versions.
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
Choose your package manager to install the Para Wagmi integration along with Wagmi:
Setup
Using Para with Wagmi is similar to using any other wallet provider, create a connector and pass it to Wagmi’s configuration.
Wagmi is best used when creating a custom wallet connector UI. If not using a custom UI, consider using the ParaModal
instead.
Then set up your providers in your main app component by wrapping your app with WagmiProvider
and QueryClientProvider
:
Then set up your providers in your main app component by wrapping your app with WagmiProvider
and QueryClientProvider
:
If you’re currently using Wagmi v1, we recommend migrating to v2 for improved features and ongoing support.
Then set up your provider in your main app component:
Advanced Configuration
Para’s Wagmi connector supports additional configuration options to customize the user experience:
Usage Examples
Once you’ve set up the Para Wagmi integration, you can use Wagmi’s hooks to interact with EVM chains. Example for connecting to a wallet:
Connecting a Wallet
Examples
If you’d like to learn more about how to use Wagmi with Para, check out this example that creates a custom wallet connector UI with Para as a wallet option:
Troubleshooting
Next Steps
With your Para and Wagmi integration complete, check out these other guides to further enhance your dApp: