import { JSONRPCClient } from 'json-rpc-2.0'; import Client from './client'; export declare const getRpcServerUrl: () => string; /** * Wraps a promise like object and returns a promise that supports catch. * * @param promise the HTTP promise like to wrap * * @returns promise for the HTTP connection with catch supporting error */ export declare const handlePromiseLikeErrors: (promise: PromiseLike) => Promise; /** * JSON RPC client using HTTP (fetch) as transport. */ declare class JSONRPCHttpClient { /** JSON-RPC client used to make requests */ client: JSONRPCClient; constructor(); /** * Request handler for the JSON-RPC client. This function is called by the JSON-RPC library * after forming the RPC request. * * @param request JSON-RPC request to send to the server */ private handleRequest; request: (method: string, data: any) => PromiseLike; } /** * Client used for making requests to Aspera. */ declare class HttpClient implements Client { /** HTTP client used to make requests */ httpClient: JSONRPCHttpClient; constructor(); request: (method: string, payload?: any) => Promise; } export declare const httpClient: HttpClient; declare const _default: { httpClient: HttpClient; handlePromiseLikeErrors: (promise: PromiseLike) => Promise; }; export default _default;