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.
wallet detection result
Parameters
| Parameter | Type |
|---|---|
timeout? | number |
Returns
Promise<WalletDetectionResult>
wallet detection result
Example
const { wallets, primary } = await detectWallets();
if (primary) await new ExternalWalletProvider(primary.provider).connect();