4 ms·
how much overlap is there with BitPay's Bitcore? I do believe both projects originated from Stefan Thomas' original work on BitcoinJS
by mifreewil 12y ago
how much overlap is there with BitPay's Bitcore? I do believe both projects originated from Stefan Thomas' original work on BitcoinJS
- sida 12y agoYou 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/HierarchicalKey.js#L17-L54 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/hdnode.js#L73-L75 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.
- chicagomint 12y agoBitcore 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/ http://cryptocoinjs.com/ is another library that performs some of these functions. Rubyists may be interested in https://github.com/lian/bitcoin-ruby https://github.com/lian/bitcoin-ruby