js-ipfs-http-client-lite icon indicating copy to clipboard operation
js-ipfs-http-client-lite copied to clipboard

Adding dag.get and dag.put methods

Open Schwartz10 opened this issue 6 years ago • 1 comments

Hi @alanshaw - I'm trying to get a better sense of what it would take to add dag.get and dag.put methods to this lite client.

I'm looking at the js-ipfs-http-client dag directory as a reference, and upon an initial skim, it seems like building support for these two methods should be relatively straightforward.

Do you see any possible complications or things to look out for? Are there any dependencies being used in the js-ipfs-http-client (related to the dag.put and dag.get methods) that we should avoid using here?

Schwartz10 avatar Aug 20 '19 15:08 Schwartz10

In the case of dag.get we could just request the dag endpoint rather than using the block API - we don't need to return actual IPLD nodes.

For dag.put we could just accept bytes (buffer/arraybuffer) of the serialized IPLD node to put. i.e. no built in serialization.

Including any IPLD modules is going to increase the bundle size significantly so I'd like to avoid if possible.

alanshaw avatar Sep 05 '19 23:09 alanshaw