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:

<multicodec><multihash-algorithm><multihash-length><multihash-hash>

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:

<cid-version><multicodec><multihash>

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.

not yet startedTake the quiz!

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

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