fcoin/lib/bcoin/node.js
Christopher Jeffrey 0a7f118528
add environment.
2016-04-06 18:55:55 -07:00

45 lines
761 B
JavaScript

/**
* node.js - node object for bcoin
* Copyright (c) 2014-2015, Fedor Indutny (MIT License)
* Copyright (c) 2014-2016, Christopher Jeffrey (MIT License).
* https://github.com/indutny/bcoin
*/
module.exports = function(bcoin) {
var EventEmitter = require('events').EventEmitter;
var network = bcoin.protocol.network;
var utils = require('./utils');
/**
* Node
*/
function Node(options) {
if (!(this instanceof Node))
return new Node(options);
EventEmitter.call(this);
if (!options)
options = {};
this.options = options;
this.network = network;
this.mempool = null;
this.pool = null;
this.chain = null;
this.miner = null;
this.walletdb = null;
}
utils.inherits(Node, EventEmitter);
/**
* Expose
*/
return Node;
};