CryptoCoinJS
CryptoCoinJS is a JavaScript project that helps you to interface with many of the crypto currencies such as Bitcoin, Litecoin, Dogecoin, and more. Most of the modules are fully compatible with the browser and Node.js. Naturally, the modules that interface directly with peer nodes won't run in the browser.
Principles
We believe in the Node.js and UNIX philosophy - the idea of building small components that do one thing and do it well. Writing software in this manner allows individuals to use and contribute much more effectively than writing one monolithic library.
We believe that people are more important than code and therefore it's critical to write code that is easy to read, document each module with the API and examples, and that code is the enemy 1 2.
We believe that writing tests is one of the best ways to communicate expectations between developers. If documentation is a way to commuincate for a consumer of your module, then tests are a way to communicate between developers.
We have our work cut out for us.
Platforms
CryptoCoinJS is focused on Node.js and the browser using Browserify. We have made an active decision to NOT support legacy browsers. i.e. if your browser does not support ECMAScript 5 (2009-2010) and it doesn't support window.crypto.getRandomValues() some of the modules may not work.
Guide
Modules
Note: If a component won't work on the client (browser), then it'll be marked as server only.
Active
Crypto Currency
- bip38 - Password encrypted private keys
- btc-p2p - Manage a network of Bitcoin peers. (server only)
- coininfo - Fetch currency specific information such as ports and version numbers
- coinkey - Create private keys, public keys, and addresses. (Inherits from eckey)
- coinstring - Create, parse, or validate addresses a wallet import format strings
- eckey - Super class for coinkey used for private and public elliptic curve keys
- hdkey - BIP32(hierarchical deterministic keys)
- p2p-manager - Manage a network of peers in a p2p network. (server only)
- p2p-node - Low-level library to handle p2p traffic on crypto currency networks. (server only)
(the following are poorly documented and need some TLC)
- btc-address - Address handling library for Bitcoin. Possibly irrelevant by coinkey or coinstring
- btc-opcode - Bitcoin opcodes
- btc-script - Bitcoin Script
- btc-scriptinterpreter - btc-scriptinterpreter - Bitcoin Script Interpreter
- btc-transaction - Bitcon Transaction Creation / Parsing
Cryptography
- aes - Implementation of the Advanced Encryption Standard
- crypto-hashing - Normalize interfaces to crypto hashing routines such as SHA256 / RIPEMD160
- ecdsa - Signing & verfication for Elliptic Curve Cryptography
- ecurve - Main module for Elliptic Curve Cryptography
- pbkdf2-sha256 - PBKDF2 using SHA256 HMAC
- ripemd160 - RIPEMD160 hash
- scryptsy - Scrypt key derivation
Misc
- bigi - BigInteger library (port of Tom Wu's library)
- binstring - Convert data types. i.e. convert between
Array
,Buffer
,UTF8
,Hex
, etc - bs58 - BASE58 encoding / decoding
- qr-encode - Encode data into QR codes
Deprecated
- ecurve-names - Moving curves to ecurve
- sha256 - Outsourced to crypto-browserify through crypto-hashing
Unknown
The library that bundles everything is located here: https://github.com/cryptocoinjs/cryptocoin. The NPM module is cryptocoin.
Development moves quickly with each individual module and packaging up a release in the larger module is tedious and error prone. So, the state of the large bundle is unknown.
Use In Production
- Coinbolt - Simple & Secure Wallet
- Helloblock - Block Explorer with Mainnet and Testnet API
- Bitrated - Arbitration Marketplace
Do you use any of CryptoCoinJS? If so, let us know by emailing us or opening a issue/pull request.
Have Questions?
Please see our FAQ. If it's not answered on the FAQ, then email us.
Want to Contribute?
Please read: https://github.com/cryptocoinjs/cryptocoin/wiki/Contributor-Guidelines
Thanks
This library wouldn't be possible without some of the great work of Stefan Thomas, Tom Wu, authors of CryptoJS, and authors of SJCL. Also, recent contributions to BitcoinJS by Kyle Drake, Daniel Cousens, and Wei Lu have helped tremendously. We owe all of the aforementioned a heartfelt thank you for building the foundation for all of this.
Last, but surely not least, we owe Satoshi Nakamoto a heartfelt thank you for inventing what will surely be one of the greatest inventions of mankind.