Docs

injectedWallet

Connect to Injected Wallet Provider

Example

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
},
});
// Using the default `window.ethereum` provider
const wallet = await injectedWallet();

Parameters

Returns

The Wallet instance.