OneKey Docs
Ask or search…
K

Rainbowkit

Docs

Install

Yarn
Npm
yarn add @rainbow-me/rainbowkit wagmi viem
npm install @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 modified 22d ago