Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Adding dag.get and dag.put methods #4

Open
Schwartz10 opened this issue Aug 20, 2019 · 1 comment
Open

Adding dag.get and dag.put methods #4

Schwartz10 opened this issue Aug 20, 2019 · 1 comment

Comments

@Schwartz10
Copy link

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?

@alanshaw
Copy link
Member

alanshaw commented Sep 5, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants