js-ipfs icon indicating copy to clipboard operation
js-ipfs copied to clipboard

`ipfs dag stat` support

Open AuHau opened this issue 5 years ago • 5 comments

We will need support for the upcoming ipfs dag stat command that is coming to go-ipfs in 0.7.0.

Since we use only the client library, it would be sufficient to have it only part of the client library but I assume you require to have it implemented in the full implementation as well?

I might be able to put PR for this.

AuHau avatar Sep 14 '20 08:09 AuHau

Yes please, a PR implementing this would be very helpful.

achingbrain avatar Sep 14 '20 12:09 achingbrain

Ok, a question on how to approach this.

Upon initial investigation, there is nothing like traverse in js-ipld right? I guess this will have to be solved first basically with together with this issue: https://github.com/ipld/js-ipld/issues/198

Then we can use the same approach as in the go-ipfs traversing the DAG and for each node count the size...

AuHau avatar Sep 14 '20 12:09 AuHau

Would it be possible to support the go-ipfs command even if js-ipfs hasn't implemented the command yet? We plan on utilizing this command for upcoming filecoin support so at least having support for the go-ipfs command while the js-ipfs side of things gets implemented would be super helpful.

obo20 avatar Sep 29 '20 16:09 obo20

Hey @AuHau did you ever get a chance to work on this? Infura has now deprecated object.stat and indicates to instead use dag stat however it appears that this command does not exist within the javascript ipfs client (and our app relies on this functionality)

Faolain avatar May 26 '22 16:05 Faolain

Nope 😞 We have just "polyfilled" it ourselves with directly calling the http api

AuHau avatar May 26 '22 19:05 AuHau

js-ipfs is being deprecated in favor of Helia. You can https://github.com/ipfs/js-ipfs/issues/4336 and read the migration guide.

Please feel to reopen with any comments before 2023-06-05. We will do a final pass on reopened issues afterward (see https://github.com/ipfs/js-ipfs/issues/4336).

This might already be resolved in Helia, if not please feel free to create an issue there.

whizzzkid avatar May 31 '23 06:05 whizzzkid