diff --git a/peer-ids/peer-ids.md b/peer-ids/peer-ids.md index 13d4e9694..4df38e30d 100644 --- a/peer-ids/peer-ids.md +++ b/peer-ids/peer-ids.md @@ -133,14 +133,17 @@ behavior. Peer Ids are [multihashes][multihash] canonically represented with [CIDs](https://github.com/ipld/cid) when encoded into strings. -CID is a multihash with a prefix that specifies things like base encoding, cid version and the type of data behind it: +Encoding and decoding of string representation MUST follow [CID specification][cid-decoding]. + +Implementations parsing IDs from text MUST support both base58 CIDv0 and CIDv1 in base32, and they MUST generate base32-encoded CIDv1 by default. Generating CIDv0 is allowed as an opt-in (behind a flag). + +CIDv0 is a multihash encoded in Base58. +CIDv1 is a multihash with a prefix that specifies things like base encoding, cid version and the type of data behind it: ``` ::= ``` -Encoding and decoding of string representation must follow [CID spec][cid-decoding]. - #### libp2p-key CID The canonical string representation of a Peer Id is a CID v1