jb55/node-bitcoin — Issue #6: undefined:1
Author: mcandre
Created: 2012-02-02 01:36:53+00:00
State: open

When I try your sample code, I get an error.

Example:

client.getBalance('*', 6, function(err, balance) {
if (err) return console.log(err);
console.log('Balance:', balance);
});

Trace:

undefined:1

^^
SyntaxError: Unexpected token ILLEGAL
at Object.parse (native)
at IncomingMessage. (/Users/andrew/Desktop/src/mijnwerker/node_modules/bitcoin/lib/jsonrpc.js:62:28)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at Client.onData [as ondata] (http.js:1488:27)
at Client._onReadable (net.js:683:27)
at IOWatcher.onReadable [as callback] (net.js:177:10)