Skip to content

Commit

Permalink
describe the 4 parts of cids, #13
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonLab committed Jan 21, 2019
1 parent 9d72e99 commit e393380
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,33 @@ Crucially, we can create a system where the IDs start out at 2 characters
and increase gradually as required
(_similar to how Instagram grew their IDs as they scaled, see below_).

The [multiformats](https://multiformats.io/) project [provides a description](https://github.com/multiformats/cid) of
CIDs.

A Content IDentifier is a unique Id which is created based on the content
this Id references.

A CID is composed of 4 main parts:
- The mulibase
- The CID format version - There are currenty 2 versions CIDv0 CIDv1
- The multicodec
- The multihash

With these 4 parts, the CID not only references a specific content (with the multihash part) but it also
provides the information on **how** it has created the references by telling us
which tools way used (multibase, cid version and multicodec)

exmpale of a CID: `zb2rhe5P4gXftAwvA4eXQ5HJwsER2owDyS9sKaQRRVQPn93bA`

## Multibase
https://github.com/multiformats/multibase

## Multicodec
https://github.com/multiformats/multicodec


## Multihash
https://github.com/multiformats/multihash

# How?

Expand Down

0 comments on commit e393380

Please sign in to comment.