How to use js-libp2p keychain?

I created this GitHub issue in the js-libp2p repository. As js-libp2p transitioned from v0.46.21 to v1.x, it lost the ability to persist the nodes identity to disk.

Apparently the new way to do this is through the keychain library, but I can’t figure out how to integrate with it by looking at the libp2p and keychain code bases.

Can anyone give me a pointer on how to retrieve the private key from the libp2p node and write it to disk, and then on startup, feed that data back into the libp2p node?

Hello @christroutner ,

Thanks for your post. I think you’ll get a better answer if you ask this technical question in the js-libp2p technical forum on Github: libp2p/js-libp2p · Discussions · GitHub

Cheers!

1 Like

Thank you for the link! I didn’t realize that area existed.

1 Like

You’re welcome! Happy to help. :beers: