libp2p / go-libp2p-relay-daemon

[DEPRECATED] A standalone libp2p circuit relay daemon that made 2022 migration from V1 to V2 easier.
MIT License
26 stars 26 forks source link

Create a way for people to migrate peerid from go-ipfs #5

Closed lidel closed 1 month ago

lidel commented 2 years ago

People use go-ipfs for v1, and that goes away (https://github.com/ipfs/go-ipfs/pull/8522), we should document how one can migrate relay (peerid) from go-ipfs to relayd.

vyzo commented 2 years ago

this should br straightforward, the identity file contains just the bytes of the private key.

Should we create a utility to take it from the ipfs datastore? Or is there an ipfs command we can use to get it? If there is an easy way to get it without code, then we can simply document the command line to use.

TheDiscordian commented 2 years ago

@vyzo you can export the key used in the peerID from the ipfs daemon via ipfs key export self:

ipfs key export --help
USAGE
  ipfs key export <name> - Export a keypair

SYNOPSIS
  ipfs key export [--output=<output> | -o] [--] <name>

ARGUMENTS

  <name> - name of key to export

OPTIONS

  -o, --output  string - The path where the output should be stored.

DESCRIPTION

  Exports a named libp2p key to disk.

  By default, the output will be stored at './<key-name>.key', but an alternate
  path can be specified with '--output=<path>' or '-o=<path>'.
vyzo commented 2 years ago

sure, care for a pr?