Comparing version 1.0.2 to 1.0.3
@@ -35,8 +35,13 @@ var websocket = require('websocket') | ||
onMessage: function(msg) { | ||
if (msg.type != 'utf8') return debug('binary message received'); | ||
debug('msg:' + msg.utf8Data); | ||
onMessage: function(packet) { | ||
if (packet.type != 'utf8') return debug('binary message received'); | ||
debug('raw packet:' + packet.utf8Data); | ||
var msg = JSON.parse(packet.utf8Data).x; | ||
var addrs = _.pluck(msg.inputs, 'addr').concat(_.pluck(msg.outputs, 'addr')); | ||
debug('msg:' + JSON.stringify(msg, null, 4)); | ||
var addrs = _.pluck(msg.inputs, 'addr').concat(_.pluck(msg.out, 'addr')); | ||
debug(addrs.length + ' addresses involved'); | ||
_.each(addrs, function(addr) { | ||
@@ -49,2 +54,6 @@ _.each(this.subs[addr], function(fn) { | ||
close: function() { | ||
this.conn && this.conn.close(); | ||
}, | ||
onClose: function() { | ||
@@ -51,0 +60,0 @@ debug('closed'); |
{ | ||
"name": "blockchain", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"author": "Andreas Brekken <a@abrkn.com>", | ||
@@ -5,0 +5,0 @@ "description": "node.js module to access the blockchain websocket api", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6350
122