Install RabbyKit and its peer dependencies (@wagmi/core (opens in a new tab) and viem (opens in a new tab)).

npm i @rabby-wallet/rabbykit @wagmi/core@1 viem@1

API Keys

  1. RabbyKit utilises's SDK to help with connecting wallets. WalletConnect 2.0 requires a projectId which you can create quickly and easily for free over at WalletConnect Cloud (opens in a new tab).
  2. wagmi (opens in a new tab) recommends using other provider packages such as Infura (opens in a new tab) or Alchemy (opens in a new tab) depending on the specific network requirements of your dApp. These providers offer reliable infrastructure and can be chosen based on your specific needs.


create a config using wagmi's createConfig and create a RabbyKit config;

import { configureChains, createConfig } from "@wagmi/core";
import { mainnet, arbitrum, bsc, optimism, polygon } from "@wagmi/core/chains";
import { publicProvider } from "@wagmi/core/providers/public";
import { alchemyProvider } from "@wagmi/core/providers/alchemy";
import { infuraProvider } from "@wagmi/core/providers/infura";
import { createModal } from "@rabby-wallet/rabbykit";
const { chains, publicClient, webSocketPublicClient } = configureChains(
  [mainnet, arbitrum, bsc, optimism, polygon],
    alchemyProvider({ apiKey: "yourAlchemyApiKey" }),
    infuraProvider({ apiKey: "yourInfuraApiKey" }),
const config = createConfig({
  autoConnect: true,
export const rabbyKit = createModal({
  wagmi: config,
  projectId: "yourProjectId",
  appName: "RabbyKit",
console.log("current rabbykit modal open status:", rabbyKit.getOpenState());