Files
explore/types/web3.ts
T
tom goriunovandGitHub f3fc9f9277 update web3modal to v4 (#1731)
* update hooks and methods

* fix typescript

* options fix

* fix pw test build

* try to fix tests

* more pw test fixes

* update screenshots and fix address verification test
2024-03-25 08:41:20 +01:00

66 lines
1.3 KiB
TypeScript

// copied from node_modules/@wagmi/core/src/connectors/injected.ts
import type { EIP1193Provider } from 'viem';
import type { Evaluate } from './utils';
type WalletProviderFlags =
| 'isApexWallet'
| 'isAvalanche'
| 'isBackpack'
| 'isBifrost'
| 'isBitKeep'
| 'isBitski'
| 'isBlockWallet'
| 'isBraveWallet'
| 'isCoinbaseWallet'
| 'isDawn'
| 'isEnkrypt'
| 'isExodus'
| 'isFrame'
| 'isFrontier'
| 'isGamestop'
| 'isHyperPay'
| 'isImToken'
| 'isKuCoinWallet'
| 'isMathWallet'
| 'isMetaMask'
| 'isOkxWallet'
| 'isOKExWallet'
| 'isOneInchAndroidWallet'
| 'isOneInchIOSWallet'
| 'isOpera'
| 'isPhantom'
| 'isPortal'
| 'isRabby'
| 'isRainbow'
| 'isStatus'
| 'isTally'
| 'isTokenPocket'
| 'isTokenary'
| 'isTrust'
| 'isTrustWallet'
| 'isXDEFI'
| 'isZerion'
export type WalletProvider = Evaluate<
EIP1193Provider & {
[key in WalletProviderFlags]?: true | undefined
} & {
providers?: Array<WalletProvider> | undefined;
/** Only exists in MetaMask as of 2022/04/03 */
_events?: { connect?: (() => void) | undefined } | undefined;
/** Only exists in MetaMask as of 2022/04/03 */
_state?:
| {
accounts?: Array<string>;
initialized?: boolean;
isConnected?: boolean;
isPermanentlyDisconnected?: boolean;
isUnlocked?: boolean;
}
| undefined;
}
>