This page covers EVM global wallets. Solana global wallets use a Wallet Standard adapter instead
of a wagmi connector. Read the Solana connector
guide.
@privy-io/cross-app-connect SDK.
Integrating apps do not need to use Privy themselves to integrate cross-app wallets; instead, they can create a custom wagmi connector using the SDK to configure with ConnectKit. Simply follow the instructions below to get set up!
1. Install dependencies
Install the@privy-io/cross-app-connect SDK and its peer dependencies:
2. Create the custom connector
Next, you’ll create a custom wagmi connector that integrates with Privy’s cross-app-connect functionality. This connector will be fully compatible with ConnectKit and handles all the connection logic for you:privy-global-connector.ts
3. Configure wagmi with ConnectKit
Now you’ll set up your wagmi configuration using ConnectKit’sgetDefaultConfig and pass in your custom Privy connector. This step brings everything together:
4. Wrap your app with providers
At the highest level of your application, wrap your components with theProviders component you just created:
Complete example
Here’s how all the pieces fit together in your project structure:5. Use the ConnectKitButton
Finally, import the ConnectKitButton and use it anywhere in your app to let users connect to their Privy global wallets:
Chain scoping
The connector above forwardsconfig.chains to toPrivyWalletProvider, so there is no second chain list to keep in sync. Its switchChain rejects a chain the config omits with SwitchChainError, before the request reaches Privy. Add the chain to the wagmi config to use it.
