Skip to main content

providers/functions/detectWallets.md

detectWallets(timeout?): Promise<WalletDetectionResult>

The wallets in this browser: every EIP-6963 announcement within timeout ms (one per uuid), then the injected fallbacks (window.ethereum when nothing announced, Trust Wallet, Gala Wallet). Outside a browser it resolves to "nothing found" at once.

Parameters​

ParameterType
timeout?number

Returns​

Promise<WalletDetectionResult>

Example​

const { wallets, primary } = await detectWallets();
if (primary) await new ExternalWalletProvider(primary.provider).connect();