Open liferealized opened 9 years ago
Agreed. We're working on a new spec for the API (which we'll implement in https://github.com/bitpay/bitcore-node). Feel free to check it out and comment/give feedback https://docs.google.com/document/d/1rXQdfr8VDBSzheEn0KynnCKCMB0oAsMunkjdG4aY-18
Will bitcore-node end up replacing the insight api?
Not completely. insight-api
is currently way too many things (blockchain API, credential storage service, mailbox plugin, historic bitcoin rate service, etc). We're approaching bitcore-node
as a more atomic and well-tested version of the blockchain API.
Understood. Thanks for the clarifications. I've looked over the documentation and you've included the best standard suggested which is awesome.
Can't wait to see it integrated into insight!
@maraoz would you be open to providing compatibility end points for a https://github.com/dcousens/common-blockchain compliant API?
edit: moved my question to here
Not completely.
insight-api
is currently way too many things (blockchain API, credential storage service, mailbox plugin, historic bitcoin rate service, etc). We're approachingbitcore-node
as a more atomic and well-tested version of the blockchain API.
@maraoz, what's the strategy for insight
(the UI) then? What will the stack look like?
+--------------+
| insight (UI) | +-----------------------------+
+------v-------+ | insight (UI) | ___
| insight-api | +------v-------+------v-------+ |__ \
+------v-------+ -or- | insight-api > bitcore-node | -or- / /
| bitcore-node | +------v-------+------v-------+ |_|
+------v-------+ | bitcoind | (_)
| bitcoind | +-----------------------------+
+--------------+
Or are insight
/insight-api
going to be EOL'ed?
@posita Current plan is for bitcore-node to run a variety of services, including something similar to insight-api, as well as others.
@maraoz wrote:
insight-api
is currently way too many things (blockchain API, credential storage service, mailbox plugin, historic bitcoin rate service, etc). We're approachingbitcore-node
as a more atomic and well-tested version of the blockchain API.
@braydonf wrote:
@posita Current plan is for bitcore-node to run a variety of services, including something similar to insight-api, as well as others.
Forgive me, but I'm having trouble reconciling these two things. Are you saying the plan is to do something like this?
+--------------+
| insight (UI) | <- or possibly something else with a reduced feature set?
+------v-------+
| bitcore-node |
+------v-------+
| bitcoind |
+--------------+
What about the "way too many things" that the insight API does (that @maraoz was talking about)? Will those be EOL'ed?
Also, please forgive my ignorance, but it appears (at least for now) that bitcore-node
is a Javascript library, not a REST endpoint. Have I misunderstood?
That's correct, any type of API exposed would be a service run on top of bitcore-node. However keep in mind that many of the details are still actively being developed. Also feel free to jump on the gitter bitcore channel to ask other questions, since this may be off-topic to this issue.
@braydonf, thanks! Yeah, I tried asking some questions on Gitter a while back, but there wasn't very much activity, and some of my questions went unanswered. I'll try again though. I apologize for this being off-topic. One more question:
... any type of API exposed would be a service run on top of bitcore-node ...
I understand things are in flux, but does that mean there are plans to build a bitcore-node
-based replacement for insight
(the UI/block explorer) or insight-api
(the REST endpoint), or is that going to be left up to third parties?
For reference the updated blockchain api mentioned previously by @maraoz can be viewed at: https://github.com/bitpay/bitcore-node/tree/v0.1.0/api and could make an additional service for bitcore-node, as well as common-blockchain @dcousens.
Currently, the API allows for finding transactions scoped to a block or address.
/api/txs/?block=HASH
/api/txs/?address=ADDR
I believe the proper way of including this type of functionality within a REST API would be something similar to:
/api/block/HASH/tx <- gets all txs for block
/api/addr/ADDR/tx <- gets all txs for an address