dashhive / dashhd-cli

Commandline utility to traverse HD Keys from HD Wallet Seed and Extended Key (xprv, xpub) Paths
MIT License
1 stars 0 forks source link

ability to walk hd paths #3

Closed coolaj86 closed 1 year ago

coolaj86 commented 1 year ago

How to derive m/44'/5'/0'/0/0 (to get the right xpubs and xprivs and carry on from the seed):

(BIP44/DashCoin/Account/Direction/Index)

let walletTypeRoot = seed.deriveChild(44, true);
let coinTypeRoot = walletTypeRoot.deriveChild(5, true);
let accountRoot = coinTypeRoot.deriveChild(0, true);
let directionRoot = accountRoot.deriveChild(0);
let key = directionRoot.deriveChild(0);

Or, chained:

seed
    .deriveChild(44, true)
    .deriveChild(5, true)
    .deriveChild(0, true)
    .deriveChild(0)
    .deriveChild(0)