/**
 * Wrapper class around a Http-based JsonRpcClient
 */ import { JsonRpcClient } from './json-rpc-client' ; import { HttpRequest , HttpResponse } from '../../../types' ; import { JsonRpcHttpAdapter } from './json-rpc-http-adapter' ; import { AxiosHttpClient } from './axios-http-client' ; export class SimpleClient { private jsonRpcClient : JsonRpcClient < HttpRequest , HttpResponse > ; param baseUrl constructor ( private baseUrl ) { this . jsonRpcClient = new JsonRpcClient < HttpRequest , HttpResponse > ( new JsonRpcHttpAdapter ( ) , new AxiosHttpClient ( baseUrl ) ) ; } param method param params returns public async handle < T > ( method , params ? ) { return this . jsonRpcClient . handle < T > ( method , params ) ; } }