I have been studying IPFS for a bit and I tried to follow some tutorials about the IPLD data model and programming in IPFS on proto school.
However, I can’t say it’s everything clear to me. In particular, during my journey of exploring IPLD, unfortunately, I got stuck very quickly. The problem is that the DAG objects I create do not work as expected for cid links are not recognized as such.
I am running an ipfs node with the following docker-compose file
command: [“daemon”, “–enable-pubsub-experiment”]
Then I tried to create a DAG object with the dag/put API, both from CLI and HTTP API. To do that I passed to the DAG API a JSON object and the execution of the command returned me the CID of the DAG object I created:
docker-compose exec ipfs-daemon ipfs dag put my_file.json bafyreignblg2i5iz3ibo5s76kw5l45ujnuqzpbhuqqcpt6ctpvrdu24soe docker-compose exec ipfs-daemon ipfs dag get bafyreignblg2i5iz3ibo5s76kw5l45ujnuqzpbhuqqcpt6ctpvrdu24soe [returns my JSON object]
Finally, I tried to create a new dag object which points to the previously created one.
The CID of this object is
and the object is something like this:
Unfortunately, the IPDL explorer does not recognize the keyword author to contain a CID, it’s just a string. Why is that? I think I am doing something wrong though I do not understand how to fix thix.
To me, it seems that the only difference between my code and the examples I am following (see https://proto.school/blog) is that I am NOT using the JS implementation of IPFS. Is that just it?
Do I have to use the JS implementation?
Thank you in advance for your time and patience, I will appreciate any comment and I wish you all a good day