This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Use js-ipld for DAG API #738
Closed
Description
Basic support for the DAG API landed with #534.
Though not all formats are supported and you can't traverse through different types of formats. I.e. you couldn't follow a link from a dag-cbor node to a dag-pb node.
The solution is to use js-ipld instead of hard-coding the formats (currently dag-cbor and dag-pb).
Using js-ipld is not straight forward. The problem is that js-ipld needs a Block Service which in turn needs a Repository to work. But js-htt-api doesn't have the blocks available in the JS environment, but receives them manually over the HTTP API.
So I guess you would need a Block Service (or Repository) that uses the HTTP API to retrieve the blocks. But I leave the details to whoever will implement this.