I’ve searched through the forum and Internet and it seems I can’t find any tutorial or documentation on the topic.
For a file or a directory, I could easily get the CID using IPFS Add CLI or API provided by the IPFS daemon. What I’d like to know is how do we get the same CID locally without running an IPFS daemon?
For encoded string content, I have no problem getting the CID using the official CID and multihash implementations (https://github.com/multiformats/cid#implementations). However, from what I understand so far, to get a CID of a file/directory, files should be chunked and built into a DAG, then the CID will be computed from the DAG. The implementation of DAG building, the chunking algorithm and chunker size, all these factors would make the result CID different.
Maybe there’s some official documentation or community project about how to create exactly same CID as the CID created through IPFS daemon. Any help or direction would be appreciated.