Skip to main content

OneKey Wallet

Prompt users to connect to their OneKey wallet.

Usage

import { OneKeyWallet } from "@thirdweb-dev/wallets";

const wallet = new OneKeyWallet();

wallet.connect();

Configuration

Optionally, provide a configuration object when instantiating the OneKeyWallet class.

projectId (recommended)

This is only relevant if you want to use WalletConnect for connecting to OneKey wallet mobile app when MetaMask is not injected.

This projectId can be obtained at cloud.walletconnect.com. It is highly recommended to use your own project id and only use the default one for testing purposes.

import { OneKeyWallet } from "@thirdweb-dev/wallets";

const wallet = new OneKeyWallet(
{
projectId: "YOUR_WALLET_CONNECT_PROJECT_ID",
},
);
recommended (optional)

Show this wallet as "recommended" in the ConnectWallet Modal.

OneKeyWallet({
recommended: true,
});

Methods

Inherits all the public methods from the AbstractClientWallet class.