Anybody using bitcore.io? I can't seem to make it work properly

-1

I've installed bitcore.io on a folder for my nodejs, using the npm command.

npm install bitcore
npm install classtool

Of course, I tried to run an example code, the one is shown at their website. I saved it as "test.js"

var Address = require('bitcore/Address').class();

var addr = new Address("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");

try {
    addr.validate();
    console.log("Address is valid.");
} catch(e) {
    console.log(addr.data + " is not a valid address. " + e);
}

Then I did:

myuser@ownbox:~/bitproj$ node test.js
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa is not a valid address. RangeError: start > end
myuser@ownbox:~/bitproj$

Is there something I'm missing? I've been googling for hours, for a solution. The address indeed does exist, I've checked it with blockchain.info.

ParanoidE

Posted 2014-02-24T22:06:28.723

Reputation: 101

Answers

0

I had nodejs outdated. My version was "v0.9.9" when the latest is (right now) "v0.10.26", and that was all the issue.

ParanoidE

Posted 2014-02-24T22:06:28.723

Reputation: 101