Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

phore-wallet

phoreproject19MIT1.0.0

Simplified utility for working with wallet-related commands for Phore Wallets, written in Javascript

phore, wallet, bip39, bip32, mnemonic, seed, wif, xpub, backup, restore

readme

Phore-Wallet

Simplified wallet commands for Phore.

Installation

Using npm:

npm install phore-wallet --save

In Node.js:

const phorew = require('phore-wallet');

var password = ""; // optional password for wallet seed
var iteration = 0; //first child keypair of HDMaster, +1 for new keypairs

var mcode = phorew.generateMnemonic(); // 24 words instead of 12
console.log(mcode);

var seed = phorew.generateSeed(mcode, password);
console.log('Seed is: ' + seed)

var HDMaster = phorew.generateHDMaster(seed);
console.log('HDMaster is: ' + JSON.stringify(HDMaster))

var firstKeyPair = phorew.generateKeyPairFromMaster(HDMaster, iteration);

var firstWIF = phorew.getWIFfromKeyPair(firstKeyPair);
console.log('WIF is: ' + firstWIF)

var address = phorew.getAddressFromKeyPair(firstKeyPair);
console.log('Receiving Address is: ' + address);

var xpub = phorew.getXPubFromSeed(seed);
console.log('Xpub is: ' + xpub);