Is there a way to generate a private key, public key and peerId for createFromJson?

Hi all,
I was following the chat example inside libp2p-js repo and I would like to know how to generate each field inside peerId like in peerid-dialer
What I need is basically to generate immutable peerIds, different from one another, for each node so that with the bootstrap discovery mechanism I can connect each node together.
Thank you in advance for your time.