The pure JavaScript Gcoin library for node.js and browsers. Forked from BitcoinJS.
npm install gcoinjs-lib
var gcoin = require('gcoinjs-lib')
For most part of the library, it is the same as bitcoinjs-lib. The main different part from Gcoin to Bitcoin is that Gcoin support multi-color native currency. As a result, when creating new transaction, the addOutput([:address], [:amount], [:color])
method of the TransactionBuilder
is different. The color
should be added into the last parameter.
- Generate a random address
- Generate a address from a SHA256 hash
- Import an address via WIF
- Create a Transaction
- (Supporting Soon) Create an OP RETURN transaction
- Create a 2-of-3 multisig P2SH address
- Spend from a 2-of-4 multisig P2SH address
- Generate a single-key stealth address
- Generate a dual-key stealth address
- Recover a BIP32 parent private key from the parent public key and a derived non-hardened child private key
- Recover a Private key from duplicate R values in a signature
- Create a CLTV locked transaction where the expiry is past
- Create a CLTV locked transaction where the parties bypass the expiry
- Create a CLTV locked transaction which fails due to expiry in the future
If you have a use case that you feel could be listed here, please ask for it!
$ npm test
$ npm run-script coverage
- BIP21 - A BIP21 compatible URL encoding utility library
- BIP38 - Passphrase-protected private keys
- BIP39 - Mnemonic generation for deterministic keys
- BIP32-Utils - A set of utilities for working with BIP32
- BIP32-Wallet - A BIP32 Wallet backed by bitcoinjs-lib, lite on features but heavily tested
- BIP66 - Strict DER signature decoding
- BIP69 - Lexicographical Indexing of Transaction Inputs and Outputs
- Base58 - Base58 encoding/decoding
- Base58 Check - Base58 check encoding/decoding
- BCoin - BIP37 / Bloom Filters / SPV client
- insight - A bitcoin blockchain API for web wallets.
LICENSE MIT
BitcoinJS (c) 2011-2016 bitcoinjs-lib contributors
Released under MIT license