Docs

zerionWallet

zerionWallet allows you to connect to the Zerion Wallet extension.

If you want to connect to Zerion wallet mobile app, use walletConnect instead.

Example

import {
zerionWallet,
injectedZerionProvider,
} from "thirdweb/wallets";
async function connectToZerion() {
const isInstalled = !!injectedZerionProvider();
// if Zerion Wallet extension is installed, connect to it
if (isInstalled) {
// create an instance
const wallet = zerionWallet();
try {
const account = await wallet.connect(); // connect to it
console.log("connected to", account);
} catch (e) {
console.error("error connecting to zerion wallet extension", e);
}
}
// else prompt user to connect to Zerion wallet app by scanning a QR code
else {
// refer to `walletConnect` documentation
}
}

If you want the wallet to be connected to a specific blockchain, you can pass a Chain object to the connect method. This will trigger a chain switch if the wallet provider is not already connected to the specified chain.

You can create a Chain object using the defineChain function. At minimum, you need to pass the id of the blockchain.

import { defineChain } from "thirdweb";
const mumbai = defineChain({
id: 80001,
});
const address = await wallet.connect({ chain: mumbai });

Returns

The InjectedWallet instance