import { AxiosRequestConfig } from 'axios';
import { RestClientOptions, RestClientType } from './requestUtils.js';
export interface SignedRequest<T extends object | undefined = {}> {
    originalParams: T;
    paramsWithSign?: T & {
        sign: string;
    };
    serializedParams: string;
    sign: string;
    queryParamsWithSign: string;
    timestamp: number;
    recvWindow: number;
}
export declare abstract class BaseRestClient {
    private options;
    private baseUrl;
    private globalRequestOptions;
    private apiKey;
    private apiSecret;
    private apiPassphrase;
    private apiAccessToken;
    /** Defines the client type (affecting how requests & signatures behave) */
    abstract getClientType(): RestClientType;
    /**
     * Create an instance of the REST client. Pass API credentials in the object in the first parameter.
     * @param {RestClientOptions} [restClientOptions={}] options to configure REST API connectivity
     * @param {AxiosRequestConfig} [networkOptions={}] HTTP networking options for axios
     */
    constructor(restClientOptions?: RestClientOptions, networkOptions?: AxiosRequestConfig);
    /**
     * Generates a timestamp for signing API requests.
     *
     * This method can be overridden or customized using `customTimestampFn`
     * to implement a custom timestamp synchronization mechanism.
     * If no custom function is provided, it defaults to the current system time.
     */
    private getSignTimestampMs;
    private hasValidCredentials;
    setAccessToken(newAccessToken: string): void;
    hasAccessToken(): boolean;
    get(endpoint: string, params?: any): Promise<any>;
    post(endpoint: string, params?: any): Promise<any>;
    getPrivate(endpoint: string, params?: any): Promise<any>;
    postPrivate(endpoint: string, params?: any): Promise<any>;
    deletePrivate(endpoint: string, params?: any): Promise<any>;
    /**
     * @private Make a HTTP request to a specific endpoint. Private endpoint API calls are automatically signed.
     */
    private _call;
    /**
     * @private generic handler to parse request exceptions
     */
    parseException(e: any, requestParams: any): unknown;
    private signMessage;
    /**
     * @private sign request and set recv window
     */
    private signRequest;
    private prepareSignParams;
    /** Returns an axios request object. Handles signing process automatically if this is a private API call */
    private buildRequest;
}
