ipfs / go-cid

Content ID v1 implemented in go
MIT License
157 stars 47 forks source link

proposal: Allow encoding CIDv0 in custom multibase #54

Closed magik6k closed 6 years ago

magik6k commented 6 years ago

This is basically the first step needed to be able to output base32 cidv0 hashes from go-ipfs, there is a lot more to do on the js, go and docs fronts.

This code will output 'cid0.5' for cidv0s with encoding different than Base58 (multibase encoded cidv1 with version field set to 0), it's a rather horrible hack, but it does the trick, allowing us to use base32 cidv0 in go-ipfs without major changes.

We still need to check that this works with js-ipfs the same way it does here.

Example base32 cidv0 hash:

ipfs cat babybeifdmflkybo26fnmpxrcoakgaeax4yrt2kftctbcz3zz6uz3c5p3xy
daviddias commented 6 years ago

Ref: https://github.com/ipfs/developer-meetings/pull/39

magik6k commented 6 years ago

So, after a long discussion we decided we won't be using this variant