

Bitcore – A pure JavaScript Bitcoin API - eordano
http://bitcore.io

======
jonpaul
It's an exciting time to be a JavaScript developer for Bitcoin. There are a
number of JavaScript libraries for Bitcoin. Here is a comprehensive list of
alternatives to Bitcore:

\- [https://github.com/bitcoinjs/bitcoinjs-
lib](https://github.com/bitcoinjs/bitcoinjs-lib) (one of the best)

\- [https://github.com/indutny/bcoin](https://github.com/indutny/bcoin)
(Indutny's work is found throughout Node.js and is the basis of elliptic curve
cryptography in Bitcore)

\-
[https://github.com/ryanxcharles/fullnode](https://github.com/ryanxcharles/fullnode)
(ex-developer of Bitcore and now engineer at Reddit behind Reddit's crypto
currency initiative)

\- [http://cryptocoinjs.com/](http://cryptocoinjs.com/) (disclosure: I started
this one)

Here is an older article that I wrote about understanding how an Address is
created (still valid, but using an older version of bitcoinjs-lib):
[http://procbits.com/2013/08/27/generating-a-bitcoin-
address-...](http://procbits.com/2013/08/27/generating-a-bitcoin-address-with-
javascript)

The cool thing is that you can use test Bitcoins without any risk to learn how
to program for Bitcoin. Use these faucets:
[http://tpfaucet.appspot.com/](http://tpfaucet.appspot.com/) and
[http://faucet.xeno-genesis.com/](http://faucet.xeno-genesis.com/)

Here is a very simple wallet that I built to demonstrate how easy it is to
build one: [https://github.com/coinbolt/simple-
wallet](https://github.com/coinbolt/simple-wallet)

Finally, an open source app to test the purchasing experience of Bitcoin:
[https://github.com/coinbolt/catshop](https://github.com/coinbolt/catshop)

~~~
lectrick
Since you'd be the most likely person to know here, what javascript VM's will
give you known-secure PRNG's, and which won't?

I think that's a pretty important thing to clarify if you're creating/signing
transactions via JS.

~~~
bgfuller
A deterministic K is used in many of these libraries, so randomness isn't
needed at the time of signing transactions. window.crypto and the Node.js
crypto library are often used for private key generation.

------
PhrosTT
Looks awesome. Cryptocurrency development has seemed pretty intimidating to me
but this is probably the going to be the push that gets me started supporting
tip sharing features on my site.

~~~
IkmoIkmo
Look into Coinbase's tip service:
[https://www.coinbase.com/tip](https://www.coinbase.com/tip)

As well as ChangeTip: [https://www.changetip.com/](https://www.changetip.com/)

It might be what you're looking for, unless you want to custom build
something. In that case also give Chain.com a look as well as Blockcypher.com.

Coinbase also has some nice developer products, their api:
coinbase.com/docs/api/overview

and if you want to do anything relating to raw bitcoin data (the blockchain
and all transactions) i.e., run a node, I'd recommend Toshi.io, an open-source
node that is very easy to query. Quite a few people run this thing on an AWS
tier.

Hope that helps if you want to dabble with a bitcoin project for your site :)

------
jordanbaucke
I am wondering if anyone has some thoughts on the security of this in a web-
application? Storing the private keys in a database connected to one's web-app
is just a bad idea right? So than it just becomes a proxy to the Bitcoind
installation via JSON-RPC? Would it be considered safe to encrypt user's
private keys via their password+hash+salt the same way I'm storing their
passwords?

~~~
eordano
Yep, storing your bitcoins in a plain web app is definitely a bad idea. The
current trend in the bitcoin space is a mixture of:

* Discouraging the use of the webapp (if any available) in favor of a browser application (chrome app, firefox app, etc)

* 2 factor auth to login

* Bitcoin "multisig" transactions: require at least N out of M valid private keys (allowing the storage of these keys to be on different devices/services/media) before releasing funds

And of course encryption before storage.

------
ytimoschenko
Core Bitcoin:
[https://github.com/oleganza/CoreBitcoin](https://github.com/oleganza/CoreBitcoin)

Bitcoin Core:
[https://github.com/bitcoin/bitcoin](https://github.com/bitcoin/bitcoin)

Now it is Bitcore. Project names are hardly distinguishable, feels kind of
messy.

------
omarforgotpwd
Awesome project. Hopefully nobody makes anything serious using it in the
browser.

------
jxm262
This looks very well done! Starred on github :)

------
afandian
This looks more like a library than an API. I wonder why the decision was made
to market it this way.

~~~
haakon
All libraries expose an API, which is its set of public functions.

~~~
afandian
Sure but it seems strange way to discuss it. Unless it's an API that wraps
some existing library.

~~~
jxm262
I believe haakon is correct on this one, unless I'm missing something. We just
got into an argument at my work over the correct usage of the term "api", but
found this post to back up my arguments -
[http://stackoverflow.com/questions/8772746/difference-
betwee...](http://stackoverflow.com/questions/8772746/difference-between-
framework-vs-library-vs-ide-vs-api-vs-sdk-vs-toolkits)

Anyway, I'm not trying to nitpick or keep this side-discussion alive. But I'm
genuinely curious how most people classify the difference between api and
library.

Also on a sidenote, who's downvoting all the comments and the thread itself?
This seems like a really cool project and it doesn't look like anyone's posted
anything completely irrelevant here.

~~~
RemoteWorker
> Also on a sidenote, who's downvoting all the comments and the thread itself?
> This seems like a really cool project and it doesn't look like anyone's
> posted anything completely irrelevant here.

Who else? Bitcoin haters and deniers like patio11. Such kinds of irrational
and emotional people are everywhere, including HN. Keep in mind they can be
good and logical at other things, but get emotional on one particular subject.
Bitcoin shakes some of the foundations everyone on Earth has or has had at
some point (like the concept of money, the justifications for inflation,
etc.), and a lot of people don't like change.

~~~
juliangregorian
> Bitcoin shakes some of the foundations everyone on Earth has or has had at
> some point

really now...

> like the concept of money

Bitcoin is still money (which I would describe as a proxy for value with
latency built in).

> the justifications for inflation

Other than eventually running out and deflating (probably a problem in it's
own way), bitcoin doesn't address this problem.

What is bitcoin going to do to address fractional reserve banking, debt
slavery, information asymmetry (insider trading), financial chicanery (selling
debt-based products/toxic assets), which I would argue are bigger problems
built into money as we know it. Nada that I'm aware of.

Why is bitcoin even less anonymous than traditional currency?

Why is it even more inequal (who has bitcoin? wealthy, technologically
literate citizens of the first world) than traditional currency?

I agree that money sucks but bitcoin is hardly the solution we need.

------
panhandlr
Looks like they built their NSA spy module out of coffeescript, neato

~~~
knowaveragejoe
Huh?

~~~
panhandlr
In today's climate I would be extremely weary of npm installing any core
bitcoin tech without a serious line by line audit of the source.

~~~
taylorwc
Why would this be more true of npm than any other package manager for any
scripting language?

~~~
elif
I would guess his paranoia is more general than directed at npm directly.
However, it's a fair point that NPM allows anyone to push projects with no
oversight, whereas many other package manager inventories are maintained and
curated.

------
Humjob
I have a question about bitcoin in general - how do transactions on the
network get verified? Does it mostly happen through miners? If so, what
happens when mining reaches the point where it becomes economically worthless
to everyone except a few electricity thieves? Will there just be a massive
backlog of unprocessed transactions?

Unless I'm wrong somehow, I could see this becoming especially problematic as
bitcoin becomes more popular and the daily transaction volume grows. How does
the bitcoin foundation/community plan to tackle this issue?

~~~
rockyleal
This is clearly not the place to ask this question about mining. This is a
thread about a software development on a whole different side of Bitcoin. If
you are genuinely curious about the theme of your question, and not just
interested in derailing threads, you are very welcome to educate yourself at
bitcointalk, the main Bitcoin forum. There have been thousands -if not
millions- of man hours in thinking, development, research and debate about the
topics you enquire about. Head there and find the answers, and if still in
doubt don't be afraid to ask (on an appropriate thread).

