Docs

injectedWallet

Connect to Injected Wallet Provider

Example

Connecting the wallet by using EIP-6963 by passing the wallet's rdns as walletId .

import { injectedWallet } from "thirdweb/wallets";
// Using the Wallet Id
const wallet = await injectedWallet({
walletId: "io.metamask",
});

Using custom logic to get the provider

const wallet = await injectedWallet({
getProvider() {
return window.xfi?.ethereum; // Example of XDEFI Wallet
},
});

Connecting to window.ethereum provider - whichever wallet it may be

// Using the default `window.ethereum` provider
const wallet = await injectedWallet();

Parameters

Returns

The Wallet instance.