Anatomy of a CID | Lesson 4 of 6

CIDv1: Version prefix

Now that we've added a multicodec, our Version 1 CID contains the following fields:


But, if you remember from the previous lessons, Version 0 CIDs only contain the <multihash-*> parts, so how can we distinguish between different versions of CIDs? You guessed it, more prefixes!

Version Prefix

So now our CID looks like this:


The <cid-version> represents the version of the CID (0 or 1).

In the next lesson we'll learn about the final prefix added to the CIDv1 specification.

Take the quiz!

Which version of CIDs include the actual version number of the CID?

Oops, you haven't selected the right answer yet!