import * as loopring_defs from '../defs';
import { Request } from './request';
import { AxiosResponse } from 'axios';
export declare const KEY_MESSAGE: string;
export declare class BaseAPI {
    static KEY_MESSAGE: string;
    protected baseUrl: string;
    protected chainId: loopring_defs.ChainId;
    genErr(err: Error | (AxiosResponse & Error)): loopring_defs.RESULT_INFO;
    protected returnTxHash<T extends loopring_defs.TX_HASH_API>(raw_data: T): (Omit<T, 'resultInfo'> & {
        raw_data: Omit<T, 'resultInfo'>;
    }) | loopring_defs.RESULT_INFO;
    private timeout;
    private baseUrlMap;
    constructor(param: InitParam, timeout?: number, baseUrlMap?: {
        1: string;
        5: string;
    });
    getAvailableBroker(request: loopring_defs.GetAvailableBrokerRequest): Promise<{
        broker: string;
    }>;
    getCounterFactualInfo<T extends any>(request: loopring_defs.GetCounterFactualInfoRequest): Promise<{
        raw_data: T;
        counterFactualInfo: loopring_defs.CounterFactualInfo | undefined;
        error?: loopring_defs.RESULT_INFO;
    }>;
    setChainId(chainId: loopring_defs.ChainId): void;
    setBaseUrl(baseUrl: string): void;
    protected makeReq(): Request;
}
export declare function ecRecover(account: string, msg: string, sig: any): {
    result: boolean;
    error?: undefined;
} | {
    error: unknown;
    result?: undefined;
};
export declare function contractWalletValidate32(web3: any, account: string, msg: string, sig: any): Promise<unknown>;
export declare function mykeyWalletValid(web3: any, account: string, msg: string, sig: any): Promise<unknown>;
export declare function ecRecover2(account: string, message: string, signature: any): Promise<unknown>;
/**
 * @default chainId 1
 * @default keySeed `Sign this message to access Loopring exchange: ${exchangeAddress} with key nonce: ${nonce}`
 */
export interface InitParam {
    chainId?: loopring_defs.ChainId;
    baseUrl?: string;
}
export declare function formatSig(rpcSig: string): string;
export declare function recoverSignType(web3: any, account: string, msg: string, sig: string): "" | "03";
export declare function personalSign(web3: any, account: string | undefined, pwd: string, msg: string, walletType: loopring_defs.ConnectorNames, chainId: loopring_defs.ChainId, accountId?: number, counterFactualInfo?: loopring_defs.CounterFactualInfo, isMobile?: boolean): Promise<unknown>;
export declare function fcWalletValid(web3: any, account: string, msg: string, result: any, accountId: number, chainId: loopring_defs.ChainId, counterFactualInfo?: loopring_defs.CounterFactualInfo): Promise<{
    counterFactualInfo?: loopring_defs.CounterFactualInfo;
    error?: any;
    result?: boolean;
}>;
//# sourceMappingURL=base_api.d.ts.map