import { Web3Provider } from '@ethersproject/providers'; import { ChainId } from '@pangolindex/sdk'; import { AbstractConnector } from '@web3-react/abstract-connector'; interface Web3ReactContextInterface { activate: (connector: AbstractConnector, onError?: (error: Error) => void, throwErrors?: boolean) => Promise; setError: (error: Error) => void; deactivate: () => void; connector?: AbstractConnector; library?: T; chainId?: number; account?: null | string; active: boolean; error?: Error; } /** * This hook return the active web3-react context * * Is active network context or any context * * @returns return the active web3-react context */ export declare function useActiveWeb3React(): Web3ReactContextInterface & { chainId?: ChainId; }; /** * This function tries to activate an already connected wallet * * For desktop weh check if this is authourized, then active the wallet * * For mobile we can try activate without check, because mobile injects the wallet and it is already authorized * * @param tryToActive Identifies if are going to try to activate a wallet, true to try, false to not try */ export declare function useEagerConnect(tryToActive: boolean): boolean; /** * This hook configures a function for connection events from any wallet * * We do this so that we can have a single global function where we update the state * of the last connected wallet, deactivate a wallet if it is active and trigger the * mixpanel event of wallet connected */ export declare function useWalletUpdater(): void; export {};