Reown AppKit is a powerful framework for building Web3 modal experiences. Since AppKit is powered by Wagmi, integrating Para follows a similar pattern to the Wagmi integration with additional AppKit-specific configuration.
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 Para Wagmi integration along with Reown AppKit and its dependencies:
npm install @getpara/wagmi-v2-integration@alpha @reown/appkit @reown/appkit-adapter-wagmi @tanstack/react-query wagmi viem
Setup
Setting up Para with Reown AppKit involves creating a Para connector and configuring it as a custom connector in AppKit’s Wagmi adapter.
1. Initialize Para Client
First, create and configure your Para client:
import Para , { Environment } from "@getpara/web-sdk" ;
const para = new Para ( Environment . BETA , YOUR_API_KEY );
2. Create Para Connector
Create the Para connector using the Wagmi v2 integration:
import { paraConnector } from "@getpara/wagmi-v2-integration" ;
import { OAuthMethod } from "@getpara/web-sdk" ;
import { mainnet , sepolia } from "viem/chains" ;
const connector = paraConnector ({
para ,
chains: [ mainnet , sepolia ],
appName: "Your dApp Name" ,
options: {},
oAuthMethods: [
OAuthMethod . GOOGLE ,
OAuthMethod . TWITTER ,
OAuthMethod . DISCORD ,
// Add other OAuth methods as needed
],
});
Create the AppKit configuration with the Para connector:
import { createAppKit } from "@reown/appkit" ;
import { WagmiAdapter } from "@reown/appkit-adapter-wagmi" ;
import { QueryClient } from "@tanstack/react-query" ;
// Create a query client
const queryClient = new QueryClient ();
// Get your project ID from https://cloud.reown.com
const projectId = "YOUR_REOWN_PROJECT_ID" ;
// Set up metadata for your app
const metadata = {
name: "Your dApp Name" ,
description: "Your dApp Description" ,
url: "https://yourdapp.com" ,
icons: [ "https://yourdapp.com/icon.png" ],
};
// Create custom connectors array with Para connector
const connectors = [ connector ];
// Create Wagmi adapter with custom connectors
const wagmiAdapter = new WagmiAdapter ({
networks: [ mainnet , sepolia ],
projectId ,
connectors ,
});
// Create AppKit instance
const appKit = createAppKit ({
adapters: [ wagmiAdapter ],
networks: [ mainnet , sepolia ],
projectId ,
metadata ,
features: {
analytics: true ,
email: true ,
socials: [ "google" , "x" , "github" , "discord" ],
},
});
4. Set Up Providers
Wrap your application with the necessary providers:
import { WagmiProvider } from "wagmi" ;
import { QueryClientProvider } from "@tanstack/react-query" ;
function App () {
return (
< WagmiProvider config = { wagmiAdapter . wagmiConfig } >
< QueryClientProvider client = { queryClient } >
{ /* Your app components */ }
</ QueryClientProvider >
</ WagmiProvider >
);
}
Advanced Configuration
Customize the Para connector with additional options to enhance the user experience:
const connector = paraConnector ({
para ,
chains: [ mainnet , sepolia ],
appName: "Your dApp Name" ,
logo: "/path/to/logo.svg" ,
oAuthMethods: [
OAuthMethod . GOOGLE ,
OAuthMethod . APPLE ,
OAuthMethod . DISCORD ,
OAuthMethod . TWITTER ,
OAuthMethod . FACEBOOK ,
OAuthMethod . FARCASTER ,
],
theme: {
foregroundColor: "#2D3648" ,
backgroundColor: "#FFFFFF" ,
accentColor: "#0066CC" ,
darkForegroundColor: "#E8EBF2" ,
darkBackgroundColor: "#1A1F2B" ,
darkAccentColor: "#4D9FFF" ,
mode: "light" ,
borderRadius: "md" ,
font: "Inter" ,
},
onRampTestMode: true ,
disableEmailLogin: false ,
disablePhoneLogin: false ,
recoverySecretStepEnabled: true ,
});
Usage
Once configured, use Reown AppKit’s components to enable wallet connection in your app:
import { useAppKit } from "@reown/appkit/react" ;
function ConnectButton () {
const { open } = useAppKit ();
return (
< button onClick = { () => open () } >
Connect Wallet
</ button >
);
}
Using Pre-built Components
AppKit provides pre-built components for common Web3 UI patterns:
import {
AppKitButton ,
AppKitNetwork ,
AppKitNetworkButton
} from "@reown/appkit/react" ;
function Header () {
return (
< div >
< AppKitButton />
< AppKitNetwork />
< AppKitNetworkButton />
</ div >
);
}
Use Wagmi hooks to access connected account information:
import { useAccount , useBalance } from "wagmi" ;
function AccountInfo () {
const { address , isConnected } = useAccount ();
const { data : balance } = useBalance ({ address });
if ( ! isConnected ) {
return < p > Not connected </ p > ;
}
return (
< div >
< p > Address: { address } </ p >
< p > Balance: { balance ?. formatted } { balance ?. symbol } </ p >
</ div >
);
}
Examples
Explore a complete implementation of Para with Reown AppKit:
Troubleshooting
If the AppKit modal doesn’t open:
Verify that you’ve obtained a valid project ID from Reown Cloud
Check that the AppKit instance is properly created with your configuration
Ensure all required providers are wrapping your app components
Look for initialization errors in the browser console
Para Connector Not Showing
If Para doesn’t appear as a wallet option:
Confirm the Para connector is included in the connectors array
Verify that your Para API key is valid and the client is initialized
Check that the chains configured in the connector match those in AppKit
Ensure the connector is properly typed when passed to the WagmiAdapter
OAuth Methods Not Working
If OAuth authentication methods fail:
Verify that the OAuth methods are enabled in your Para dashboard
Check that redirect URLs are properly configured for your domain
Ensure popup blockers aren’t preventing the OAuth flow
Review console errors for specific OAuth provider issues
Type Errors with Custom Connectors
If you encounter TypeScript errors when adding the Para connector:
Cast the connector as any
when adding to the connectors array: [connector as any]
Ensure all dependencies are using compatible versions
Check that you’re importing from the correct package versions
Next Steps
Now that you have Para integrated with Reown AppKit, explore these additional resources: