import { ChainRpcProvider } from './providers/ChainRpcProvider' /** * Rpc provides a wrapper around internal ChainRpcProvider object */ export class Rpc { private static chainRpcProvider: ChainRpcProvider = new ChainRpcProvider({ baseURL: "http://127.0.0.1:8545" }) private constructor() { } /** * setter of ChainRPC provider * @param url RPC server url */ public static setRpcServer(url: string) { this.chainRpcProvider = new ChainRpcProvider({ baseURL: url }) } /** * getter of ChainPRC provider */ public static getRpcServer(): ChainRpcProvider { return this.chainRpcProvider } }