Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

how much overlap is there with BitPay's Bitcore? I do believe both projects originated from Stefan Thomas' original work on BitcoinJS


You are correct. Both projects come from Stefan Thomas's original BitcoinJS.

Both projects (bitcore vs bitcoinjs) are very similar. I would say the main difference you will find is mostly at a DSL level. I find that bitcoinjs has nicer syntax than bitcore.

Bitcore has a fairly loose syntax. And a function can takes many different types of argument. As an example:

https://github.com/bitpay/bitcore/blob/master/lib/Hierarchic...

If you pass no argument, it defaults to a new BIP32 key on mainnet. Or you can pass in a network argument, or you can pass in a string private key.

Bitcoinjs-lib on the other hand, enforces fairly strict typing on functions. Functions often only take one particular type, as an example: https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/src/h...

This function only takes a string key in base58 format.

In my experience of using both, it is easy to have programmer error in bitcore, because its syntax is so loose. Whereas it is a lot harder to make programmer errors in bitcoinjs-lib. Given that this is financial software, I prefer the bitcoinjs-lib approach.

For example, One problem I encountered with bitcore was I made a mistake in the derivation path of a bip32 key. Instead path of 'M/1/0/1', I mistakenly used 'M/1/0/1/undefined'. Bitcore happily derived a key for me. This is the type of errors you don't tend to get with bitcoinjs.


Bitcore and BitcoinJS achieve a lot of the same basic functions like generating addresses (and now multi-signature addresses), building, and signing transctions. You will still need to be able to connect to a Bitcoind peer (via an API or run your own) to promulgate the transaction on the Bitcoin network. http://cryptocoinjs.com/ is another library that performs some of these functions. Rubyists may be interested in https://github.com/lian/bitcoin-ruby




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: