Skip to content

Conversation

@Arlodotexe
Copy link
Collaborator

@Arlodotexe Arlodotexe commented Jan 24, 2024

Background

Since this code was written in 2019, the ipfs ecosystem has moved to using base36 Cidv1 as the default for the libp2p-key multihashes used for public peer ids and ipns public keys (see RFC0001).

Changes

This PR closes #26 and brings us up to speed with the latest defaults in Kubo's Key API.

  • Support for Multicodec libp2p-key (0x72) was added
  • Support for Base36 was added, as it's the default used in Kubo's Key API. This was ported from the go-base36 used by Boxo and Kubo.
  • IKey.Id is now a Cid instead of a MultiHash, allowing support for both Cidv0 and Cidv1. Using MultiHash here would force dropping essential Cidv1 information, and only supports implicitly base58btc encoded Cidv0.

@Arlodotexe Arlodotexe changed the title Update/libp2p-key-as-cid Add base36 support, libp2p-key codec Jan 24, 2024
@Arlodotexe Arlodotexe self-assigned this Jan 24, 2024
@Arlodotexe Arlodotexe merged commit 8034e68 into main Jan 24, 2024
@Arlodotexe Arlodotexe deleted the update/libp2p-key-as-cid branch January 24, 2024 21:22
Arlodotexe added a commit to ipfs-shipyard/net-ipfs-http-client that referenced this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MultiHash support for libp2p-key, PeerId as base32 Cidv1

2 participants