Closed richardschneider closed 6 years ago
According to the official documentation, dag/get should return a Dag Node, but checking the current code I have seen that class already exist in the Object API. Any recommendation about how to name the new class? what about something like "IPLDNode" (I'm really new with IPFS and I'm afraid I'm still don't understand some of the concepts).
I agree that dag.get
should return a IPLDNode
; which is not defined. According to the spec, IPLD is a JSON-based data model for representing merkle-dags. The JObject
can be used for this.
Perhaps the signatures should be
Task<JObject> GetAsync(string path, CancellationToken cancel = default(CancellationToken));
Task<Cid> PutAsync(
JObject data,
string contentType,
string multiHash = MultiHash.DefaultAlgorithmName,
CancellationToken cancel = default(CancellationToken));
While doing some test, I have seen that you can get two completely different results from the dag/get command, depending if you are in the root of the cid (info regarding the branches) or inside one of the branches (author, committer, message...). Any idea of how to solve this?
Can you show the test and results or just point me to test repo/fork?
Some good tests, in JS, can be found at https://github.com/ipfs/js-ipfs/tree/master/examples/traverse-ipld-graphs
@mjeronimoa I've released v0.20.0 that implements DAG API. Hope you like it.
Please feel free to raise any issues.
From email disucussions with @mjeronimoa