Skip to main content

Function: detectWallets()

GalaChain core SDK 1.0.0-rc.8


GalaChain core SDK 1.0.0-rc.8 / providers / detectWallets

Function: detectWallets()

detectWallets(timeout?): Promise<WalletDetectionResult>

Defined in: packages/gala-core-sdk/dist/providers.d.ts:511

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​

timeout?​

number

Returns​

Promise<WalletDetectionResult>

Example​

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