|
|
@ -5,6 +5,8 @@ var $ = require('preconditions').singleton(); |
|
|
|
var async = require('async'); |
|
|
|
var log = require('npmlog'); |
|
|
|
log.debug = log.verbose; |
|
|
|
var inherits = require('inherits'); |
|
|
|
var events = require('events'); |
|
|
|
|
|
|
|
var Bitcore = require('bitcore'); |
|
|
|
var PublicKey = Bitcore.PublicKey; |
|
|
@ -33,6 +35,13 @@ function CopayServer(opts) { |
|
|
|
this.storage = opts.storage || new Storage(); |
|
|
|
}; |
|
|
|
|
|
|
|
inherits(CopayServer, events.EventEmitter); |
|
|
|
|
|
|
|
CopayServer._emit = function (event) { |
|
|
|
var args = Array.prototype.slice.call(arguments); |
|
|
|
log.debug('Emitting: ', args); |
|
|
|
this.emit.apply(this, arguments); |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
* Creates a new wallet. |
|
|
|