bitcoinsource v0.1.20
BitcoinSource: A Bitcoin Cash implementation written in modern Javascript
About BitcoinSource
BitcoinSource 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 clemens@bitcoincomputer.io.
Installation
Using NPM
$ npm install --save bitcoin-source
Manually
You can also download a pre-compiled and minified version here: dist
Examples
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
Security
BitcoinSource 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 clemens@bitcointoken.com.
Contributing
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.
Development
To get started with development, you should first clone the repository and install any dependencies:
$ git clone https://github.com/bitcoin-computer/bitcoin-source
$ cd BitcoinSource
$ 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
Progress
File | Airbnb Style Guide | ES6 | Flow |
---|---|---|---|
address.js | |||
block/block.js | |||
block/blockheader.js | |||
block/index.js | |||
block/merkleblock.js | |||
crypto/bn.js | |||
crypto/ecdsa.js | |||
crypto/hash.js | |||
crypto/point.js | |||
crypto/random.js | |||
crypto/signature.js | |||
encoding/base58.js | |||
encoding/base58check.js | |||
encoding/bufferreader.js | |||
encoding/bufferwriter.js | |||
encoding/varint.js | |||
errors/index.js | |||
errors/spec.js | |||
hdprivatekey.js | |||
hdpublickey.js | |||
message.js | |||
mnemonic/index.js | |||
mnemonic/mnemonic.js | |||
mnemonic/pbkdf2.js | |||
mnemonic/words/chinese.js | |||
mnemonic/words/english.js | |||
mnemonic/words/french.js | |||
mnemonic/words/index.js | |||
mnemonic/words/italian.js | |||
mnemonic/words/japanese.js | |||
mnemonic/words/spanish.js | |||
networks.js | |||
opcode.js | |||
privatekey.js | |||
publickey.js | |||
script/index.js | |||
script/interpreter.js | |||
script/script.js | |||
transaction/index.js | |||
transaction/input/index.js | |||
transaction/input/input.js | |||
transaction/input/multisig.js | |||
transaction/input/multisigscripthash.js | |||
transaction/input/publickey.js | |||
transaction/input/publickeyhash.js | |||
transaction/input/scripthash.js | |||
transaction/output.js | |||
transaction/sighash.js | |||
transaction/signature.js | |||
transaction/transaction.js | |||
transaction/unspentoutput.js | |||
unit.js | |||
uri.js | |||
util/buffer.js | |||
util/js.js | |||
util/preconditions.js |
License
Code released under the MIT license.