How to use the web3-providers-ws.apply function in web3-providers-ws

To help you get started, we’ve selected a few web3-providers-ws examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ostdotcom / base / lib / ost_web3 / ost-web3-providers-ws.js View on Github external
const OstWSProvider = (module.exports = function(url, i_d_k, options) {
  const oThis = this;

  //Note Down url
  oThis.endPointUrl = url;

  //Take Care of Options
  oThis.options = Object.assign({}, OstWSProvider.DefaultOptions, options || {});

  //Create Event Emiter.
  oThis.eventEmitter = new Events.EventEmitter();
  oThis.eventEmitter.setMaxListeners(oThis.options.emitterMaxListeners);

  //Call the baseclass constructor with arguments.
  return WebsocketProvider.apply(oThis, arguments) || oThis;
});

web3-providers-ws

Websocket provider for Web3 4.x.x

LGPL-3.0
Latest version published 16 days ago

Package Health Score

98 / 100
Full package analysis

Similar packages