Skip to main content

providers/functions/getTrustWallet.md

getTrustWallet(options?): Promise<DetectedWallet | null>

Trust Wallet in this browser (see findTrustWallet; also window.trustwallet / window.trustWallet). Trust Wallet can inject after the page loaded, so when it is not found at once this waits up to options.timeout ms (default 3000) for its trustwallet#initialized window event and looks again; it never waits when the wallet is already there. Resolves null when it is not found, and at once without a browser window.

Parameters​

ParameterTypeDescription
options?{ announceTimeout?: number; timeout?: number; }timeout: the most to wait for the initialized event; announceTimeout: the EIP-6963 announcement window of the first look (see detectWallets).
options.announceTimeout?number-
options.timeout?number-

Returns​

Promise<DetectedWallet | null>