What function in nodejs, or using the relevant crypto packages (web3, ethers, cryptojs, etc) can do this?
For example, need a function within node that can turn something that looks like this: "twenty four words... that are pass phrase"
into something that looks like this:
"8da4ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f"
Based on another post: Recover all the account under Mnemonic using ethers.js
tried using
w = utils.HDNode.fromMnemonic(keys.mnemonic, m/44'/60'/0'/0/1);
throws 'invalid mnemonic'
when using the valid passphrase from an existing wallet.
strangely, the central point of a hardware wallet is to store a private key... yet it may have no mechanism to give the private key back to you directly, no export function. Therefore, the private key must be generated denovo from the passphrase. Yes, I'm aware that the point of a hardware wallet is to keep the private key hidden in hardware and that it'd be risky to put it anywhere else. That said, need a private key to test live crypto transactions with.
Thanks