diff --git a/README.md b/README.md index 6bff2ff..636ddc3 100644 --- a/README.md +++ b/README.md @@ -68,27 +68,12 @@ npm update #### Module usage -Initialize a new Stratum object -```javascript -var Stratum = require('stratum-pool'); - -var stratum = new Stratum({ - blockNotifyListener: { - enabled: false, - port: 8117, - password: "test" - } -}); - -stratum.on('log', function(text){ - console.log(text); -}); -``` - - Create and start new pool with configuration options and authentication function ```javascript -var pool = stratum.createPool({ + +var Stratum = require('stratum-pool'); + +var pool = Stratum.createPool({ coin: { name: "Dogecoin", diff --git a/lib/index.js b/lib/index.js index 5d82e73..dc54b7f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -3,18 +3,7 @@ var events = require('events'); var pool = require('./pool.js'); - -var index = module.exports = function index(options){ - - var _this = this; - this.pools = []; - - - this.createPool = function(poolOptions, authorizeFn){ - var newPool = new pool(poolOptions, authorizeFn); - this.pools.push(newPool); - return newPool; - }; - -}; -index.prototype.__proto__ = events.EventEmitter.prototype; \ No newline at end of file +exports.createPool = function(poolOptions, authorizeFn){ + var newPool = new pool(poolOptions, authorizeFn); + return newPool; +}; \ No newline at end of file