go-libp2p-relay-daemon icon indicating copy to clipboard operation
go-libp2p-relay-daemon copied to clipboard

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

Open lidel opened this issue 4 years ago • 4 comments

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.

lidel avatar Nov 26 '21 17:11 lidel

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.

vyzo avatar Nov 26 '21 17:11 vyzo

@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>'.

TheDiscordian avatar May 18 '22 18:05 TheDiscordian

sure, care for a pr?

vyzo avatar May 18 '22 18:05 vyzo