ruimarinho / bitcoin-core

A modern Bitcoin Core REST and RPC client.
480 stars 188 forks source link

Why is this library preferable? #11

Closed mayeaux closed 8 years ago

mayeaux commented 8 years ago

Just saw node-bitcoin points towards this repo:

If starting a new project, I highly encourage you to take a look at the more modern bitcoin-core.

Wondering why using this library is preferable? Thanks!

mayeaux commented 8 years ago

Right off the bat, it seems like the library supports lots of ES6 out of the box, is that kind of the main pitch?

freewil commented 8 years ago

Yes, ES6, also with optional promise support.

freewil commented 8 years ago

Also, it adds support for the new REST API, in addition to the RPC methods.

mayeaux commented 8 years ago

Okay cool, just reading up on the REST API now.

Correct me if I'm wrong, but: https://bitcoin.org/en/developer-reference#http-rest it looks like the REST API is unauthenticated and can only be run from localhost?

Also, we should probably get a url to the API documentation for the RPC calls somewhere in the readme, since it's not there at all and I'm wondering which Bitcoin docs are most up to date.

ruimarinho commented 8 years ago

Like @freewil mentioned, the main differences are:

Regarding the REST api, it defaults to localhost and is unauthenticated. I'm unsure if binding can be changed.

The methods are linked right under the methods header. Probably a bit obscure but I'm open to a PR if you'd like to propose something else.

mayeaux commented 8 years ago

Yes, I found those methods but they don't have any information on how the API is used (ie which parameters to pass etc). We probably want to link to the actual API information as well.

ruimarinho commented 8 years ago

@mrmayfield does #12 address your suggestion?

mayeaux commented 8 years ago

Definitely looks a lot better. I know there's a lot of RPC calls that are mentioned here though. Maybe we want to link to the 'definitive up to date API' documentation if such a thing exists ?

ruimarinho commented 8 years ago

Unfortunately, I don't think such documentation exists and linking to the source code might not be helpful for many users.