Complete integration guide
The sections below show the full integration steps. If the app already has RainbowKit configured, skip to step 2. Otherwise, follow all steps to set up RainbowKit from scratch.Don't have RainbowKit yet? Start here
Don't have RainbowKit yet? Start here
If the app doesn’t use RainbowKit yet, follow steps 1-4 below to set up both RainbowKit and the global wallet connector together.If the app already has RainbowKit, skip to step 2 to just add the global wallet.
1. Install dependencies
Install the@privy-io/cross-app-connect SDK and its peer dependencies:
2. Create the global wallet connector
Import thetoPrivyWallet connector function from @privy-io/cross-app-connect/rainbow-kit:
toPrivyWallet method to create a wallet connector. The function takes id, name, and iconUrl (described below) and returns a connector that RainbowKit will use to connect to the provider wallet.
Parameters
Privy app ID for the provider application.
The name of the Privy provider application.
The URL for the icon that will appear in the modal.
connectorsForWallets function like so:
config will be passed to the WagmiProvider in the next step.
3. Wrap app with providers
At the highest level of your applications, wrap the component with thewagmi, QueryClient, and RainbowKit providers. Pass the configuration you created in step 2 to the wagmi provider.
Complete example
All together, this should look like:4. Use the ConnectButton
Import the ConnectButton and use to prompt users to connect to their provider Privy wallet.

