A pure JavaScript Bitcoin library for node.js and browsers.
A continued implementation of the original `0.1.3` version used by over a million wallet users; and the backbone for almost all Bitcoin web wallets in production today.
The pure JavaScript Bitcoin library for node.js and browsers.
A continued implementation of the original `0.1.3` version used by over a million wallet users; the backbone for almost all Bitcoin web wallets in production today.
## 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.
Master is currently being heavily refactored to clean things up, add new functionality and merge improvements from the community.
If you are looking for the original, it is tagged as `0.1.3`.
We are releasing quasi-stable releases tagged under `0.2.x`, with the expectation that this is still beta software and is `PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED`.
## Features
This is not the original bitcoinjs-lib that was not updated for a long time.
- Clean: Pure JavaScript, concise code, easy to read.
- Random private key generation that uses [window.crypto.getRandomValues](https://developer.mozilla.org/en-US/docs/Web/API/Window.crypto) in the underlying implementation.
- ECDSA signing and verification.
- Standard transaction creation, with support for PubKeyHash, ScriptHash, MultiSig and PubKey scripts, and
- A (somewhat incomplete) wallet implementation, with improvements ongoing.
If you are looking for the original, it is tagged as `0.1.3`. Unless you need it for dependency reasons, it is strongly recommended that you use (or upgrade to) the newest version, which adds major functionality, cleans up the interface, fixes many bugs, and adds over 1,300 more tests.
## 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.
## Setup
@ -49,10 +48,15 @@ From the repo:
### Browser
Compile `bitcoinjs-min.js` with the following command:
From the repository: Compile `bitcoinjs-min.js` with the following command: