3 ms·
Persistent Peer IDs in libp2p JavaScript
- chunkz_fan 1y agothis is nowhere to be found in the docs. great stuff
- lukaivanic 1y agoDamn that's nice, saved me at least a couple of hours of work
- 2color 1y agoThere's a `loadOrCreateSelfKey` function which you can use to load the key from a persistent datastore (fs). It's documented here: https://github.com/libp2p/js-libp2p/tree/4420fad686921f887854e1b37ecd01f65b276e0d/packages/config#example---load-or-create-the-self-private-key-in-a-datastore https://github.com/libp2p/js-libp2p/tree/4420fad686921f88785... I'll be sure to update the docs to include an example in the config docs.