user7200: 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..."?

user4627: You can follow the instructions here to derive different addresses from the rootKey you've already created:
https://github.com/Emurgo/cardano-serialization-lib/blob/master/doc/getting-started/generating-keys.md#use-in-addresses
You'll probably want to 1) create the accountKey + utxoPubKey + stakeKey, then 2) create the baseAddress, like so:
  const CardanoWasm = require("@emurgo/cardano-serialization-lib-nodejs");

  const harden = (num: number): number => {
    return 0x80000000 + num;
  }

  const rootKey = CardanoWasm.Bip32PrivateKey.generate_ed25519_bip32();

  // Start from here

  const accountKey = rootKey
    .derive(harden(1852)) // purpose
    .derive(harden(1815)) // coin type
    .derive(harden(0)); // account #0

  const utxoPubKey = accountKey
    .derive(0) // external
    .derive(0)
    .to_public();

  const stakeKey = accountKey
    .derive(2) // chimeric
    .derive(0)
    .to_public();

  // base address with staking key
  const baseAddress = CardanoWasm.BaseAddress.new(
    CardanoWasm.NetworkInfo.mainnet().network_id(),
    CardanoWasm.StakeCredential.from_keyhash(utxoPubKey.to_raw_key().hash()),
    CardanoWasm.StakeCredential.from_keyhash(stakeKey.to_raw_key().hash()),
  );

  const address = baseAddress.to_address();

  console.log(address.to_bech32()) // "addr..."

Edit:
Since you seem to be using your own cardano-wallet backend with this cardano-wallet-js client, the above is not needed. You create your wallet from the seed phrase via walletServer.createOrRestoreShelleyWallet() (see here) and list wallets (and their IDs) via walletServer.wallets(). The wallet id here is just something that this particular tool creates to let you distinguish between multiple wallets that you create with it; not something required by the network or derived from the private key. To get the addresses of a wallet you can use getAddresses() or getUnusedAddresses(), see https://github.com/tango-crypto/cardano-wallet-js#wallet-addresses

7200: <p>I want to retrieve the public key from a private key created via a mnemonic key.</p>
<pre><code>const { mnemonicToEntropy } = require('bip39');
const CardanoWasm = require('@emurgo/cardano-serialization-lib-nodejs')

const { WalletServer, Seed } = require(&quot;cardano-wallet-js&quot;);

const entropy = mnemonicToEntropy(
  [ &quot;test&quot;, &quot;walk&quot;, &quot;nut&quot;, &quot;penalty&quot;, &quot;hip&quot;, &quot;pave&quot;, &quot;soap&quot;, &quot;entry&quot;, &quot;language&quot;, &quot;right&quot;, &quot;filter&quot;, &quot;choice&quot; ].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());
</code></pre>
<p>How do I get a proper public key format like &quot;addr...&quot;?</p>
 4627: <p>You can follow the instructions here to derive different addresses from the rootKey you've already created:</p>
<p><a href="https://github.com/Emurgo/cardano-serialization-lib/blob/master/doc/getting-started/generating-keys.md#use-in-addresses" rel="nofollow noreferrer">https://github.com/Emurgo/cardano-serialization-lib/blob/master/doc/getting-started/generating-keys.md#use-in-addresses</a></p>
<p>You'll probably want to 1) create the accountKey + utxoPubKey + stakeKey, then 2) create the baseAddress, like so:</p>
<pre><code>  const CardanoWasm = require(&quot;@emurgo/cardano-serialization-lib-nodejs&quot;);

  const harden = (num: number): number =&gt; {
    return 0x80000000 + num;
  }

  const rootKey = CardanoWasm.Bip32PrivateKey.generate_ed25519_bip32();

  // Start from here

  const accountKey = rootKey
    .derive(harden(1852)) // purpose
    .derive(harden(1815)) // coin type
    .derive(harden(0)); // account #0

  const utxoPubKey = accountKey
    .derive(0) // external
    .derive(0)
    .to_public();

  const stakeKey = accountKey
    .derive(2) // chimeric
    .derive(0)
    .to_public();

  // base address with staking key
  const baseAddress = CardanoWasm.BaseAddress.new(
    CardanoWasm.NetworkInfo.mainnet().network_id(),
    CardanoWasm.StakeCredential.from_keyhash(utxoPubKey.to_raw_key().hash()),
    CardanoWasm.StakeCredential.from_keyhash(stakeKey.to_raw_key().hash()),
  );

  const address = baseAddress.to_address();

  console.log(address.to_bech32()) // &quot;addr...&quot;
</code></pre>
<p><em>Edit:</em></p>
<p>Since you seem to be using your own <a href="https://github.com/input-output-hk/cardano-wallet" rel="nofollow noreferrer">cardano-wallet</a> backend with this <a href="https://github.com/tango-crypto/cardano-wallet-js" rel="nofollow noreferrer">cardano-wallet-js</a> client, the above is not needed. You create your wallet from the seed phrase via <code>walletServer.createOrRestoreShelleyWallet()</code> (see <a href="https://github.com/tango-crypto/cardano-wallet-js#create-or-restore-a-wallet" rel="nofollow noreferrer">here</a>) and list wallets <em>(and their IDs)</em> via <code>walletServer.wallets()</code>. The <em>wallet id</em> here is just something that this particular tool creates to let you distinguish between multiple wallets that you create with it; not something required by the network or derived from the private key. To get the addresses of a wallet you can use <code>getAddresses()</code> or <code>getUnusedAddresses()</code>, see <a href="https://github.com/tango-crypto/cardano-wallet-js#wallet-addresses" rel="nofollow noreferrer">https://github.com/tango-crypto/cardano-wallet-js#wallet-addresses</a></p>
