I want to retrieve the public key from a private key created via a mnemonic key.
const { mnemonicToEntropy } = require('bip39');
const CardanoWasm = require('@emurgo/cardano-serialization-lib-nodejs')
const { WalletServer, Seed } = require("cardano-wallet-js");
const entropy = mnemonicToEntropy(
[ "test", "walk", "nut", "penalty", "hip", "pave", "soap", "entry", "language", "right", "filter", "choice" ].join(' ')
);
const rootKey = CardanoWasm.Bip32PrivateKey.from_bip39_entropy(
Buffer.from(entropy, 'hex'),
Buffer.from(''),
);
let privateKey = Seed.deriveKey(rootKey, ['1852H','1815H','0H','0','0']).to_raw_key();
console.log(privateKey.to_bech32());
How do I get a proper public key format like "addr..."?