A javascript GameCredits library for node.js and browsers. This library is a fork of bitcoinjs-lib
Released under the terms of the MIT LICENSE.
If you are thinking of using the master branch of this library in production, stop. Master is not stable; it is our development branch. Tagged releases coming soon!
Don't trust. Verify.
We recommend every user of this library and the GameCredits ecosystem audit and verify any underlying code for its validity and suitability.
Mistakes and bugs happen, but with your help in resolving and reporting issues, together we can produce open source software that is:
- Easy to audit and verify,
- Tested, with test coverage >95%,
- Advanced and feature rich,
- Standardized, using standard and Node
Buffer
's throughout, and - Friendly, with a strong and helpful community, ready to answer questions.
Presently, we do not have any formal documentation other than our examples, please ask for help if our examples aren't enough to guide you.
npm install gamejs-lib
Typically we support the Node Maintenance LTS version. If in doubt, see the .travis.yml for what versions are used by our continuous integration tests.
WARNING: We presently don't provide any tooling to verify that the release on npm
matches GitHub. As such, you should verify anything downloaded by npm
against your own verified copy.
The recommended method of using gamejs-lib
in your browser is through Browserify.
If you're familiar with how to use browserify, ignore this and carry on, otherwise, it is recommended to read the tutorial at http://browserify.org/.
NOTE: We use Node Maintenance LTS features, if you need strict ES5, use --transform babelify
in conjunction with your browserify
step (using an es2015
preset).
NOTE: If you expect this library to run on an iOS 10 device, ensure that you are using [email protected] or greater.
The below examples are implemented so you can inspect them and write your own code that is fulfilling your needs. These methods should be easy to understand. Otherwise, pull requests are appreciated.
- Generate random address
- Generate an address from a SHA256 hash
- Import an address via WIF
- Generate a 2-of-2 P2SH address
- Generate a 2-of-3 P2SH address
- Create a 1-to-1 Transaction
- Create a 2-to-2 Tranasction
- Create a Transaction using MultiSignature address
- Verify Transaction
- Generate 12 word BIP39 Mnemonic
- Generate stronger BIP39 Mnemonic
- Generate BIP39 Mnemonic with a different wordlist
- Validate BIP39 Mnemonic
- Import a BIP32 xpriv and export to WIF
- Export a BIP32 xpriv, then import it
- Export a BIP32 xpub
- Create BIP32, gamecredits, account 0, external
- Use BIP39 to generate BIP32 addresses
BIP32 and BIP44 standards coming in the next release!
See CONTRIBUTING.md.
npm test
npm run-script coverage
Coming soon!