multiformats / cid

Self-describing content-addressed identifiers for distributed systems
Other
426 stars 79 forks source link

Specify CID without a specific binary encoding #61

Open vmx opened 1 year ago

vmx commented 1 year ago

In the current spec, CIDs are tied to a specific binary encoding. I propose splitting the CID spec into a definition of the values it describes and some default binary encoding.

The description of the values would talk about the version, the IPLD codec and the Multihash. It would be independent on how it is represented. For example rust-CID supports encoding a CID using the SCALE codec, which is not the default binary encoding of the CID.

There would then be a default binary encoding (as it is today) with the varints.