import { ApiClient, Precision } from '@muirglacier/jellyfish-api-core';
import AbortController from 'abort-controller';
import { PrecisionPath } from '@muirglacier/jellyfish-json';
/**
 * ClientOptions for JsonRpc
 */
export interface ClientOptions {
    /**
     * Millis before RPC request is aborted
     * @default 60000 ms
     */
    timeout?: number;
    /**
     * Headers to include in the RPC request
     * @default []
     */
    headers?: string[][] | Record<string, string>;
}
/**
 * JsonRpcClient default client options
 */
export declare const defaultOptions: ClientOptions;
/**
 * A JSON-RPC client implementation for connecting to a DeFiChain node.
 */
export declare class JsonRpcClient extends ApiClient {
    protected readonly url: string;
    protected readonly options: ClientOptions;
    /**
     * Construct a Jellyfish client to connect to a DeFiChain node via JSON-RPC.
     *
     * @param {string} url endpoint
     * @param {ClientOptions} [options] Optional ClientOptions
     * timeout: default to 60000ms
     * headers: none
     */
    constructor(url: string, options?: ClientOptions);
    /**
     * Implements JSON-RPC 1.0 specification for ApiClient
     */
    call<T>(method: string, params: any[], precision: Precision | PrecisionPath): Promise<T>;
    private static stringify;
    private static parse;
    /**
     * Fetch with timeout defined in 'this.options.timeout'
     */
    private fetchTimeout;
    protected fetch(body: string, controller: AbortController): Promise<Response>;
}
//# sourceMappingURL=index.d.ts.map