import { ExternalProvider, JsonRpcProvider, Web3Provider } from '@ethersproject/providers';
import { Web3ReactHooks } from '@web3-react/core';
import { Connector, Provider as Eip1193Provider } from '@web3-react/types';
import { SupportedChainId } from 'constants/chains';
import { PropsWithChildren } from 'react';
interface Web3ProviderProps {
    provider?: Eip1193Provider | JsonRpcProvider;
    jsonRpcEndpoints: Partial<Record<SupportedChainId, string | JsonRpcProvider>>;
    chainId?: SupportedChainId;
}
declare type Web3SourceContextType = {
    connector: Connector;
    library?: (JsonRpcProvider & {
        provider?: ExternalProvider;
    }) | Web3Provider;
    chainId?: ReturnType<Web3ReactHooks['useChainId']>;
    accounts?: ReturnType<Web3ReactHooks['useAccounts']>;
    account?: ReturnType<Web3ReactHooks['useAccount']>;
    active?: ReturnType<Web3ReactHooks['useIsActive']>;
    activating?: ReturnType<Web3ReactHooks['useIsActivating']>;
    error?: ReturnType<Web3ReactHooks['useError']>;
    ensNames?: ReturnType<Web3ReactHooks['useENSNames']>;
    ensName?: ReturnType<Web3ReactHooks['useENSName']>;
};
declare type Web3DestContextType = {
    connector: Connector;
    library?: (JsonRpcProvider & {
        provider?: ExternalProvider;
    }) | Web3Provider;
    chainId?: ReturnType<Web3ReactHooks['useChainId']>;
    active?: ReturnType<Web3ReactHooks['useIsActive']>;
    activating?: ReturnType<Web3ReactHooks['useIsActivating']>;
    error?: ReturnType<Web3ReactHooks['useError']>;
};
/**
 * The widget has two Providers, Web3ReactProviderSource and Web3ReactProviderDest.
 * Web3ReactProviderSource is the provider for the source chain, the one the user is on/the chain
 *  of the token the user wants to spend. It follows this with or without an external provider such
 *  as MetaMask. It will always have the provider info for the first trade made on the source chain.
 * Web3ReactProviderDest is the provider for the destination chain, the one the purhcased assets/tokens
 *  are on. This is always on the destination chain and will always have the provider info for the
 *  seocnd trade made on the destination chain.
 * Certain functions need to use provider data for a particular chain depending on the context it's
 *  called in (ex: useSwapCallArguments, useClientSideSmartOrderRouterTrade). To do this, this can be
 *  called with a boolean for whether the source chain or destination chain is needed to
 * Generally passed as:
 *      chainId of the trade !== destChainId
 *  which return true if the trade isn't the destination chain and false if it is.
 *
 * @param isForSourceChain If true, the source chain provider will be returned.
 */
export default function useWeb3React(isForSourceChain: boolean): Web3DestContextType;
export declare function useSourceWeb3React(): Web3SourceContextType;
export declare function useDestWeb3React(): Web3DestContextType;
export declare function Web3ReactProviderSource({ jsonRpcEndpoints, children, chainId, provider, }: PropsWithChildren<Web3ProviderProps>): JSX.Element;
export declare function Web3ReactProviderDest({ jsonRpcEndpoints, children, chainId }: PropsWithChildren<Web3ProviderProps>): JSX.Element;
export {};
