import EventEmitter from 'eventemitter3'; import { InternalWalletConnector, WalletConnectorConstructor } from '../WalletConnectorBase'; type AutoConnectEventProps = { connector: InternalWalletConnector; }; export type ProviderReadyEventProps = { connector: InternalWalletConnector; shouldAutoConnect?: boolean; }; type ProviderInjectedEventProps = { injectedConnectorConstructor: WalletConnectorConstructor; }; export type WalletConnectorEvents = { /** * This is useful for when we want to auto-connect/login with a wallet * without the user having to select it from the list, as long as * the wallet is already connected to the dapp * * For example, we can auto-connect to a Safe wallet from a a Safe App */ autoConnect: (props: AutoConnectEventProps) => void; /** * This is useful for when we want to know when the wallet provider * is ready to be used */ providerReady: (props: ProviderReadyEventProps) => void; /** * This is emitted when a wallet gets announced (eip6963, bitcoin wallet standard, solana wallet standard, etc) * It contains the constructor of the wallet connector that was injected */ providerInjected: (props: ProviderInjectedEventProps) => void; /** * This is emitted when the wallet connector starts to initialize */ connectorInitStarted: (key: string) => void; /** * This is emitted when the wallet connector has completed initializing */ connectorInitCompleted: (key: string) => void; }; export declare const walletConnectorEvents: EventEmitter; export type WalletConnectorEventEmitter = typeof walletConnectorEvents; export {};