injectedProvider

Get Injected Provider for given wallet by passing a wallet ID (rdns) using EIP-6963 Provider Discovery.

Example

import { injectedProvider } from "thirdweb/wallets";
const metamaskProvider = injectedProvider("io.metamask");
if (metamaskProvider) {
console.log("Metamask is installed");
}
function injectedProvider(walletId: WalletId): Ethereum | undefined;

Parameters

The Wallet Id (rdns) to check.

Type

let walletId:
| "walletConnect"
| "inApp"
| "embedded"
| "smart"
| "adapter"
| EcosystemWalletId

Returns

let returnType: Ethereum | undefined;

The details of the Injected Provider if it exists. undefined otherwise.