import { Config, RpcSession, Interceptors } from '../types/types.js'; import { RestClientInstance } from './restClient.js'; type EnigmaRpc = (appId: string, rpcConfig?: { delta?: boolean; }) => Promise; export interface RpcClientInstance extends EnigmaRpc { interceptors?: Interceptors; } /** * @remarks * RPCClient is used to handle JsonRPC calls * * @param config - required configuration * * @returns an instance of the RestClient class. */ export default class RpcClient { private config; /** object storing the interceptors */ interceptors: Interceptors; private rest; sessions: { [key: string]: RpcSession; }; constructor(config: Config, rest?: RestClientInstance); rpc(appId: string, rpcConfig?: { delta?: boolean; }): Promise; /** * @param appId - the application Id * @param config - required configuration */ buildUrlAndCreateSocket(appId: string): Promise<{ url: string; createSocket: any; }>; } export {};