import { providers } from 'ethers'; import { Chain } from '../types'; import { Connector } from './base'; export declare type InjectedConnectorOptions = { /** Name of connector */ name?: string | ((detectedName: string | string[]) => string); /** * MetaMask and other injected providers do not support programmatic disconnect. * This flag simulates the disconnect behavior by keeping track of connection status in storage. * @see https://github.com/MetaMask/metamask-extension/issues/10353 * @default true */ shimDisconnect?: boolean; }; export declare class InjectedConnector extends Connector { #private; readonly id: string; readonly name: string; readonly ready: boolean; constructor(config?: { chains?: Chain[]; options?: InjectedConnectorOptions; }); connect(): Promise<{ account: string; chain: { id: number; unsupported: boolean; }; provider: Ethereum; }>; disconnect(): Promise; getAccount(): Promise; getChainId(): Promise; getProvider(): Promise; getSigner(): Promise; isAuthorized(): Promise; switchChain(chainId: number): Promise; watchAsset({ address, decimals, image, symbol, }: { address: string; decimals?: number; image?: string; symbol: string; }): Promise; protected onAccountsChanged: (accounts: string[]) => void; protected onChainChanged: (chainId: number | string) => void; protected onDisconnect: () => void; }