Utilities to make working with libp2p configuration simpler.
Example: Load or create the "self" private key in a datastore
Most nodes will want to persist the same private key between restarts so this
function helps you extract one from a datastore if it exists, otherwise it
will create a new one and save it in the keystore.
The options you pass to this function should be the same as those passed to
the @libp2p/keychain service you configure your node with.
Utilities to make working with libp2p configuration simpler.
Example: Load or create the "self" private key in a datastore
Most nodes will want to persist the same private key between restarts so this function helps you extract one from a datastore if it exists, otherwise it will create a new one and save it in the keystore.
The options you pass to this function should be the same as those passed to the
@libp2p/keychain
service you configure your node with.