bitcore-node
bitcore-node copied to clipboard
bitpay's server not returning histories
Hello,
I have this small and simple script. The reply never arrives.
<script src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
<script>
console.log("Starting!");
var socket = io("https://insight.bitpay.com");
socket.send({
method: "getAddressHistory",
params: [
["1JAd7XCBzGudGpJQSDSfpmJhiygtLQWaGL"],
{
from: 0,
to: 50,
queryMempool: true,
start: 429632,
end: 0
}
]
}, function (reply) {
console.log("Reply was ", reply);
})
</script>
The script works (meaning, the reply arrives) with other public bitcore addresses - localbitcoinschain.com, bitcore2.mytrezor.com. Where is the problem?
The script is here
- https://github.com/runn1ng/socketio-bitpay
- http://www.karelbilek.com/socketio-bitpay/ (see console logs)
Yes, those methods are only available when running a local node.
By "available when running a local node", you mean some additional configuration on Bitpay's servers which prevent other services to abusing your servers? If I understand that right, you're primarily focused on providing Insight web UI for public and you do not aim in providing general block explorer which would be used by another applications. Is that position strict or are you willing to whitelist some other services under some conditions?
When we choose Bitcore as our backend solution for TREZOR, one of reason was that there're other public servers providing faillover for our company-provided servers (which are publicly available without any restriction).
Primarily, it was not already a part of the insight api, so it wasn't enabled. It was a new feature that we added as an idea to extend the capabilities of the existing websocket connection, and to be able to use the bitcore-node API with different processes. If it's useful, perhaps it should be enabled in some capacity.
It would be amazing to reconsider it and make that call publicly available even in some limited capacity. Thanks!
@slush0 what would be your decision criteria for selecting an alternative server?
Unavailability / temporary downtime of main server.