-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Helia fetch for dApps #348
Comments
|
I've added my understanding of "Ecosystem Needs" to the description of this issue. Tried to split needs into groups that then could be fullfilled by delivering sensible milestones and so far I got two (food and shelter and PWA/DApps). Hope it is useful for planing work once we are back in January. |
have you looked at https://github.com/filecoin-saturn/js-client and https://github.com/filecoin-saturn/browser-client? There is probably lots of code to crib there. We do essentially this -- intercepting requests with service worker, making trustless HTTP requests, using unixfs-exporter to verify the car and produce the flat file, and serving it to the user if it works. BTW, beware that ServiceWorker doesn't run on first load (at least until it's installed and registered, usually after sub resource URLs are fetched). |
2024-01-09 conversation: Concerning API modelled after Fetch API: HTTP Request → HTTP Response Location:
We did conversation in https://hackmd.io/gXm6nzJlTDmhFJ8ZL2CI_w Next steps: |
lidel mentioned in conversation: delegated routing request for https://delegated-ipfs.dev/routing/v1/providers/bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi points to "/dns4/dag.w3s.link/tcp/443/https" and we should see what it would take to prioritize fetching over https |
Created https://github.com/ipfs/web3-fetch to host some of the design decisions as proposed by @lidel |
@SgtPooki Did we decide if this is going to be a package inside this repo? |
@2color it was either or, but I figure starting out the with the design in a separate repo will make changes easier for now, instead of mucking with Helia versioning |
Moved to #392 |
Adds a `@helia/verified-fetch` module that makes fetching verified, trustless content from the distributed web as easy as using window.fetch. ```typescript import { createVerifiedFetch } from '@helia/verified-fetch' const fetch = await createVerifiedFetch({ gateways: ['https://mygateway.example.net', 'https://trustless-gateway.link'], routers: ['https://myrouter.example.net', 'https://delegated-ipfs.dev'] }) const resp = await fetch('ipfs://bafy...') const json = await resp.json() ``` Fixes #348 --------- Co-authored-by: Daniel Norman <[email protected]> Co-authored-by: Alex Potsides <[email protected]> Co-authored-by: Marcin Rataj <[email protected]>
we may want to re-open this or open new issues with some of the items above. |
this task is intended to cover all of the actions necessary to get a library, lets call it "helia fetch" working for dApps.
ping ed from liquity to see what he's working on
Ecosystem Needs
(lidel) One way to look at the body of work ahead is to identify needs of different stakeholder, and focus on delivering useful software for the wider audience first. Below if my first stab in surfacing needs and related scope of work, feel free to adjust as we go.
Food and Shelter for Web developers and public gateways
Use cases:
Needs:
ipfs://
and/ipfs/
paths_redirects
, dir listing, or CAR responses./ipfs/
paths on one's website.PWA and Dapps
Use cases:
Needs:
Host
header for subdomain functionality. CheckingHost
header, and alsowindow.location.origin
should be good enough._redirects
support for PWA and parity with Web Gateways / Brave/ipns/name
forapplication/vnd.ipfs.ipns-record
(or delegated routing endpoint at/routing/v1/ipns
).eth
(eg.curl -s -H "accept: application/dns-json" "https://resolver.cloudflare-eth.com/dns-query?name=_dnslink.vitalik.eth&type=TXT" | jq
)The text was updated successfully, but these errors were encountered: