# BitcoinJS (bitcoinjs-lib) [![Build Status](https://travis-ci.org/bitcoinjs/bitcoinjs-lib.png?branch=master)](https://travis-ci.org/bitcoinjs/bitcoinjs-lib) [![NPM](https://img.shields.io/npm/v/bitcoinjs-lib.svg)](https://www.npmjs.org/package/bitcoinjs-lib) [![tip for next commit](https://tip4commit.com/projects/735.svg)](http://tip4commit.com/projects/735) [![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) The pure JavaScript Bitcoin library for node.js and browsers. Used by over a million wallet users and the backbone for almost all Bitcoin web wallets in production today. ## Features - Clean: Pure JavaScript, concise code, easy to read. - Tested: Coverage > 90%, third-party integration tests. - Careful: Two person approval process for small, focused pull requests. - Compatible: Works on Node.js and all modern browsers. - Powerful: Support for advanced features, such as multi-sig, HD Wallets. - Secure: Strong random number generation, PGP signed releases, trusted developers. - Principled: No support for browsers with crap RNG (IE < 11) - Standardized: Node community coding style, Browserify, Node's stdlib and Buffers. - Fast: Optimized code, uses typed arrays instead of byte arrays for performance. - Experiment-friendly: Bitcoin Mainnet and Testnet support. - Altcoin-ready: Capable of working with bitcoin-derived cryptocurrencies (such as Dogecoin). ## Should I use this in production? If you are thinking of using the master branch of this library in production, **stop**. Master is not stable; it is our development branch, and [only tagged releases may be classified as stable](https://github.com/bitcoinjs/bitcoinjs-lib/tags). ## Installation `npm install bitcoinjs-lib` ## Setup ### Node.js var bitcoin = require('bitcoinjs-lib') ### Browser If you're familiar with how to use browserify, ignore this and proceed normally. These steps are advisory only, and may not be necessary for your application. [Browserify](https://github.com/substack/node-browserify) is assumed to be installed for these steps. From your repository, create an `index.js` file ``` javascript module.exports = { base58: require('bs58'), bitcoin: require('bitcoinjs-lib'), ecurve: require('ecurve'), BigInteger: require('bigi') } ``` Install each of the above packages locally ``` bash npm install bs58 bitcoinjs-lib ecurve bigi ``` After installation, use browserify to compile `index.js` for use in the browser: ``` bash $ browserify index.js --standalone foo > app.js ``` You will now be able to use `