A javascript Bitcoin library for node.js and browsers.
Find a file
2014-03-11 09:32:06 +08:00
demo Added version to getBitcoinAddress 2014-01-02 20:33:23 -05:00
src remove old crypto-js 2014-03-11 09:32:06 +08:00
test Merge pull request #57 from bitcoinjs/upgrade-crypto-js 2014-03-11 09:14:49 +08:00
.gitignore remove and ignore bitcoinjs-min.js 2014-02-23 19:10:24 -08:00
.travis.yml Add travis 2014-01-11 13:58:14 +07:00
LICENSE Updated licensing information. 2011-12-20 12:47:50 +01:00
package.json migrate crypto-js to 3.1.2 2014-03-09 09:49:24 +08:00
README.md note for more projects 2014-03-08 15:12:18 -06:00

bitcoinjs-lib

browser support

A pure JavaScript Bitcoin library for node.js and browsers. Backed by (slowly improving) testing, proven by over a million wallet users. The backbone for almost all Bitcoin web wallets in production today.

This is not the original bitcoinjs-lib that was not updated for a while. The current bitcoinjs-lib has been refactored to clean things up, add new functionality and merge improvements from the community. If you are looking for the original, it will be tagged as 0.1.3. We will use 0.2.x for releases based on these changes, so be sure to use the 0.1.3 tag if you need the original version.

Features

  • Bitcoin Testnet and Mainnet (production) support
  • HD Wallets
  • Highly secure random private key / address generation using window.crypto.getRandomValues
  • ECDSA signing and verification
  • Transaction creation (pay-to-pubkey-hash), support for multisignature transactions
  • A (somewhat incomplete) wallet implementation, improvements ongoing

Installation

npm install bitcoinjs-lib

Note: The npm version is currently out of date, are working to resolve this. The best way to use the latest code is to clone the repository.

Usage

Run the test suite

$ npm test

Node.js

var bitcoin = require('bitcoinjs-lib')

From the repo:

var bitcoin = require('./src/index.js')

Browser

Compile bitcoinjs-min.js with the following command:

$ npm run-script compile

After loading this file in your browser, you will be able to use the global Bitcoin object.

Projects utilizing bitcoinjs-lib

Feel free to send pull requests to have your project/startup listed here.

Alternatives

License

This library is free and open-source software released under the MIT license.

BitcoinJS (c) 2011-2012 Stefan Thomas Released under MIT license http://bitcoinjs.org/

JSBN (c) 2003-2005 Tom Wu Released under BSD license http://www-cs-students.stanford.edu/~tjw/jsbn/

CryptoJS (c) 20092012 by Jeff Mott Released under New BSD license http://code.google.com/p/crypto-js/