src/http/rpcclient.js
function RPCClient(options) {
  if (!(this instanceof RPCClient))
    return new RPCClient(options);

  if (!options)
    options = {};

  if (typeof options === 'string')
    options = { uri: options };

  this.options = options;
  this.network = Network.get(options.network);

  this.uri = options.uri || `http://localhost:${this.network.rpcPort}`;
  this.apiKey = options.apiKey;
  this.id = 0;
}
function RPCClient(options) {
  if (!(this instanceof RPCClient))
    return new RPCClient(options);

  if (!options)
    options = {};

  if (typeof options === 'string')
    options = { uri: options };

  this.options = options;
  this.network = Network.get(options.network);

  this.uri = options.uri || `http://localhost:${this.network.rpcPort}`;
  this.apiKey = options.apiKey;
  this.id = 0;
}
function RPCClient ( options ) { if ( ! ( this instanceof RPCClient ) ) return new RPCClient ( options ) ; if ( ! options ) options = { } ; if ( typeof options === 'string' ) options = { uri : options } ; this . options = options ; this . network = Network . get ( options . network ) ; this . uri = options . uri || ` ${ this . network . rpcPort } ` ; this . apiKey = options . apiKey ; this . id = 0 ; }
WMCC RPC client.
@alias module:http.RPCClient
@constructor
@param {String} uri
@param {Object?} options
WMCC RPC client .