FAQ

General Questions

1. How is this different than BitcoinJS or Bitcore?

CryptoCoinJS and Bitcore both derive their roots from an older version of BitcoinJS. For a long period of time BitcoinJS went unmaintained and many forks emerged. There was an opportunity to create a library that broke down each piece of functionality into its own module for the sake of making the library easier to use and easier to maintain. Let's face it, understanding Bitcoin is difficult, let alone programming with it - we as developers need to make things as easy as possible to attract faster innovation.

Since BitcoinJS is now maintained again and Bitpay has developers working full-time on Bitcore, both of these libraries are attractive options to use for your next Bitcoin/JavaScript project.

Bitcore:

Pros:

Cons:

BitcoinJS:

Pros:

Cons:

CryptoCoinJS:

Pros:

Cons:

When it comes down to it, you should pick a library that helps you achieve your objective quickly while instilling confidence about its long-term viability. i.e. will the library be maintained in one year? While we can't make any concrete promises about the future, businesses rely upon CryptoCoinJS, so it should be actively developed for the foreseeable future.

Technical Questions

1. How do I use these modules in the browser?

Assuming that you've gone through the Getting Started, you'll need to install Browserify.

npm install -g browserify

As an example, let's say that you want to use coinkey in the browser. Clone the repository:

git clone https://github.com/cryptocoinjs/coinkey

Navigate into it:

cd coinkey

Install dependencies:

npm install

Run browserify:

browserify --standalone CoinKey < lib/coinkey.js > coinkey.bundle.js

Include in a script in your HTML:

<script src="coinkey.bundle.js"></script>
<script>
//since we passesd the --standalone flag to Browserify, "CoinKey" will be global i.e. attached to `window`

var ck = new CoinKey();
</script>

Note: If you use more than one CryptoCoinJS module, you don't need to do this for each one. Assuming that you're using Browserify for your browser app, you'll only need to build with Browserify once with your top level index.js or app.js file.