bitpay / bitcore-explorers

Blockchain APIs for bitcore
http://bitcore.io
MIT License
68 stars 95 forks source link

explorer api url not compatible with latest installation of insight-api #28

Open southbite opened 8 years ago

southbite commented 8 years ago

Hi there,

I installed the insight api on our own node as per your instructions here: https://github.com/bitpay/insight-api/tree/v0.3.0 The api and insight are both up and running on our nodes, so all good there, but when I try and get address info or unspents like so: var testExplorer = new Insight(testConfig.testServer1.url, Networks.testnet); testExplorer.getUnspentUtxos(testConfig.address2.address, function(e, utxos) { ...

I got 404 errors, this is because the url part on the requests is simply /api/[rest of query] - as can be seen here: https://github.com/bitpay/bitcore-explorers/blob/master/lib/insight.js#L64

the path is actually /insight-api/[rest of query] - this is the insight-api default, on fixing this my unit tests all passed.

Is this an issue - or have I set insight-api up incorrectly?

hudgins commented 8 years ago

@southbite I ran into the same thing. https://github.com/bitpay/bitcore-explorers/pull/31