ipfs / helia

An implementation of IPFS in TypeScript
https://helia.io
Other
954 stars 105 forks source link

Allow for custom data transfer mechanisms #109

Closed MarcoPolo closed 1 year ago

MarcoPolo commented 1 year ago

Please correct me if I'm wrong, but it seems like bitswap is always activated if you provide a libp2p object to the helia constructor. I would like a way to either:

  1. Disable bitswap, and allow me to provide my own custom blockstore that may or may not use bitswap. If we do this it would be nice to expose the helia's BlockStorage so I can reuse that code with my own custom bitswap.
  2. Allow for a custom bitswap to be passed in as an option (and maybe even allow for it to be set to false so it's disabled like 1).

I would like this so I can plug in alternative data transfer mechanisms like using the HTTP gateway api.

BigLep commented 1 year ago

@MarcoPolo : is this a duplicate of https://github.com/ipfs/helia/issues/98 ?

MarcoPolo commented 1 year ago

Yes, thanks. I didn't find that one. Closing in favor of the other one.

SgtPooki commented 1 year ago

@MarcoPolo This is now possible on the helia@next branch. pls let us know if you try it out.