How to detect multibase of a CID
- Dominant language
- Elixir
- Stars
- 38
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Given a CID the first step when decoding the CID is to determine which multibase is used
see https://github.com/multiformats/multibase
The CID(v1) encode this information on the first byte (ie the first 8 bits), see https://github.com/multiformats/cid#decoding-algorithm where:

- So the first step is to extract the first byte and to get a representation in hexadecimal. Then we can match with the multibase table to determine which encoding is used (the 0x is an indication to tell us that the text is in base16 which is hexadecimal)

- [ ] Check the implementations of multibase to know how the first byte is extracted
see https://github.com/multiformats/js-multibase
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.