A pure and powerful JavaScript Multiple Coins library.
npm install mix-lib
var lib = require('mix-lib');
var priv = new lib.PrivateKey("GEEK");
console.log(priv);
console.log(priv.toWIF());
console.log(priv.toAddress());
// <PrivateKey: 8f446ab8fa9db83b367bc4d160b7a6f0fc2fa6f390d076c2616ae7dae2ed49ca, network: GeekCash>
// XG68DmUydnkdaj9VoXzD6mzGzc2ABz2jEFcUPAYWnBew3eJtYvWk
// <Address: GPJs2uSCFDjDD9GqS5PcGcixBUs6jB8qL8, type: pubkeyhash, network: GeekCash>
var lib = require('mix-lib');
var priv = new lib.PrivateKey("DASH");
console.log(priv);
console.log(priv.toWIF());
console.log(priv.toAddress());
// <PrivateKey: 58af0f84ecc68038f9d4f8ec5658c5bf4bea57fedaaa1ebe6e992ca32b101417, network: Dash>
// XEG2F8raABRoeze7xV4exbg6ji1YYR34qqWQGJ3CZuhdGcZvqGDx
// <Address: XkV5By8ADmr2jzm6bYjkQnUFHqeu9wk1bP, type: pubkeyhash, network: Dash>
var lib = require('mix-lib');
var priv = new lib.PrivateKey("BTC");
console.log(priv);
console.log(priv.toWIF());
console.log(priv.toAddress());
// <PrivateKey: 74b35dce79cb9154858615e8cb8b2889f826ec557bb0bcf95d40881d367779af, network: Bitcoin>
// L18ZXoA7z6xJBmE9mvctDzwyg2skLLHhYWmupXdnkHQ7JgtL9kXf
// <Address: 1B7zH2tuXAwqFj9AypBqjMqJiiNKY67os4, type: pubkeyhash, network: Bitcoin>
var lib = require('mix-lib');
var transaction = new lib.Transaction()
.from(utxos) // Feed information about what unspent outputs one can use
.to(address, amount) // Add an output with the given amount of satoshis
.change(address) // Sets up a change address where the rest of the funds will go
.sign(privkeySet) // Signs all the inputs it can
var lib = require('mix-lib');
var wif = 'XG68DmUydnkdaj9VoXzD6mzGzc2ABz2jEFcUPAYWnBew3eJtYvWk';
var address = new lib.PrivateKey(wif).toAddress();
//<Address: GPJs2uSCFDjDD9GqS5PcGcixBUs6jB8qL8, type: pubkeyhash, network: GeekCash>
GeekCash [GEEK]
Dash [DASH]
Bitcoin [BTC]
PIVX [PIVX]
ColossusXT [COLX]
Aegeus [AEG]
MetaCash [META]
LightPayCoin [LPC]
Northern [NORT]
DeepOnion [ONION]
DigiByte [DGB]
Zcash [ZEC]
Stakenet [XSN]
MMOCoin [MMO]
Stakecube [SCC]
BitcoinCash [BCH]
Alqo [ALQ]
BlockNet [BLOCK]
Trittium [TRTT]
- Addresses
- Block
- Crypto
- Encoding
- Hierarchically-derived Private and Public Keys
- Networks
- PrivateKey
- PublicKey
- Script
- Transaction
- Using Different Units
- Unspent Output
- URI
- Governance Object / Proposal
Some examples can be found here, below is a list of direct links for some of them.
- Generate a random address
- Generate an address from a SHA256 hash
- Import an address via WIF
- Create a Transaction
- Sign a Dash message
- Verify a Dash message
- Create an OP RETURN transaction
- Create a 2-of-3 multisig P2SH address
- Spend from a 2-of-2 multisig P2SH address
Code released under the MIT license.