BitcoinCashFlow: A Bitcoin Cash implementation written in modern Javascript
BitcoinCashFlow is a community driven effort to produce a readable, reliable and modern Javascript implementation of Bitcoin. Most current Javascript Bitcoin implementations do not adhere to modern coding standards and are very hard to read as a consequence. We want to create a Bitcoin implementation that every JavaScript programmer can read and understand.
In step one, we want to get the entire codebase to comply with the Airbnb JavaScript Style Guide. Step two will be to port the code base to ES6. Step three will be to statically typecheck the entire codebase with Facebook’s Flow. We suspect we will uncover bugs in the process.
We are looking for contributors. You do not have to be a Bitcoin protocol expert to contribute. All you need to be is a good Javascript programmer. If you want to help, check out CONTRIBUTING.md or email [email protected].
BitcoinCashFlow is currently undergoing a major refactoring which might break parts of the API. We do not recommend it to be used until the version 1.0.0 is released.
Bitcoin Cash is peer-to-peer electronic cash for the Internet. It is fully decentralized, has no central bank, and requires no trusted third-parties to operate. Bitcoin Cash is the continuation of the Bitcoin project, upgraded with consensus rules that allow it to grow and scale.
$ npm install --save bitcoincashflow
$ bower install --save bitcoincashflow
You can also download a pre-compiled and minified version here: dist
You can find many useful, up-to-date examples to get you started right away by following the provided examples:
- Generate a random address
- Generate a address from a SHA256 hash
- Translate an address to any Bitcoin Cash address format
- Read an address from any Bitcoin Cash address format
- Import an address via WIF
- Create a Transaction
- Verify a Bitcoin message
- Sign a Bitcoin message
- Create an OP RETURN transaction
- Create a 2-of-3 multisig P2SH address
- Spend from a 2-of-2 multisig P2SH address
BitcoinCashFlow is a fork of bitcore-lib, which is used in production at Bitpay Inc. and many other projects. If you find a security issue, please email [email protected].
This is an open-source project, and any form of contribution is welcome. Feel free to create an issue in case you would like to share ideas for improvement, or would like to report a bug. Also, please send pull requests for bug fixes or code optimization. For more information on how to contribute, please refer to our CONTRIBUTING file.
To get started with development, you should first clone the repository and install any dependencies:
$ git clone https://github.com/BitcoinDB/BitcoinCashFlow
$ cd BitcoinCashFlow
$ npm install
Next, you can check everything is installed correctly by running the full test-suite and verifying that all tests are completed successfully.
$ npm test
Code released under the MIT license.