Rainbowkit

Docs

Install

yarn add @rainbow-me/rainbowkit wagmi viem

Config OneKey

Add the OneKey Wallet Id when Rainbowkit.

// import OneKey Wallet
import { oneKeyWallet } from "@rainbow-me/rainbowkit/wallets";

const appName = "OneKey Demo";
const projectId = "12345";

const { wallets } = getDefaultWallets({ appName, projectId, chains });
const connectors = connectorsForWallets([
  ...wallets,
  {
    groupName: "Recommend",
    // Config OneKey Wallet
    wallets: [oneKeyWallet({ chains })]
  }
]);

const wagmiConfig = createConfig({
  connectors,
  publicClient
});

Quickstart

Last updated