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.
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.
libp2p-key
(0x72) was addedgo-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.