-
Notifications
You must be signed in to change notification settings - Fork 20
Multiple Wallets #172
Description
Is your feature request related to a problem? Please describe.
There is a clear need to allow user's to create multiple wallets.
Describe the solution you'd like
Allow users to create multiple wallets
Need to track the amount of wallets in the reducer and when the user wants to switch wallets we can just change the derived path.
Every wallet name must map to an index in the masterNode.derivePath
var HDNode = require('ethers').HDNode;
var mnemonic = "12 words";
var masterNode = HDNode.fromMnemonic(mnemonic);
console.log(masterNode);
var wallet1 = masterNode.derivePath("m/44'/60'/0'/0/0");
console.log("wallet 1 - " , wallet1);
var wallet2 = masterNode.derivePath("m/44'/60'/1'/0/0");
console.log("wallet 2 - " , wallet2);
Helpful Resources
https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
https://docs.ethers.io/ethers.js/html/api-advanced.html#hdnode