Skip to content

Improve docs around creating peerId from private key and improve support #82

@jacobheun

Description

@jacobheun

Doc Updates

The docs for createFromPrivKey currently reads:

createFromPrivKey(privKey)

  • privKey: Buffer
    Creates a Peer ID from a buffer containing a private key.

This is missleading as it requires a ProtoBuf.

We should clarify the documentation for this as users may try to use simple Buffer.

Improved Support

It would be nice if we improved the support for creating a peerid from a private key to accept a simple buffer. This could allow users to generate a keypair and use that privatekey to create their peerid. A use case of this might be an EC2 instance where the private key is stored in AWS KMS. It's possible to do this leveraging libp2p-crypto, but it would be nice if a factory method existed in peer-id to handle this for users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    exp/noviceSomeone with a little familiarity can pick uphelp wantedSeeking public contribution on this issuekind/bugA bug in existing code (including security flaws)status/readyReady to be worked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions