import { JsonRpcProvider } from '@ethersproject/providers';
import type { TransactionRequest } from '@ethersproject/abstract-provider';
import { BigNumber as EthersBigNumber } from '@ethersproject/bignumber';
import BigNumber from 'bignumber.js';
import { TokenInfo } from '../Token';
export type Deferrable<T> = {
    [K in keyof T]: T[K] | Promise<T[K]>;
};
export declare enum WatchResult {
    Failed = 0,// 0:Failure
    Success = 1,// 1:Success
    Warning = 2
}
export declare const getEstimateGas: (params: any, provider: JsonRpcProvider) => Promise<EthersBigNumber | null>;
export declare const getGasPrice: (provider: JsonRpcProvider) => Promise<EthersBigNumber | null>;
export declare const sendTransaction: (params: Deferrable<TransactionRequest>, provider: JsonRpcProvider) => Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
export declare const approve: (tokenAddress: string, accountAddress: string, contractAddress: string, allowance: BigNumber, provider: JsonRpcProvider) => Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
/**
 * Add custom token to metamask
 * https://docs.metamask.io/guide/registering-your-token.html#registering-tokens-with-users
 */
export declare function registerTokenWithMetamask(provider: JsonRpcProvider | undefined, token: TokenInfo): Promise<{
    result: boolean;
    failMsg?: string;
}>;
