-
Notifications
You must be signed in to change notification settings - Fork 106
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: add sessions to trustless gateways #459
Merged
Merged
Commits on Feb 6, 2024
-
feat: add block session support to @helia/interface
There are no implementations yet but the usage pattern will be something like: ```javascript // unixfs cat command export async function * cat (cid: CID, blockstore: Blocks, options: Partial<CatOptions> = {}): AsyncIterable<Uint8Array> { // create a session for the CID if support is available const blocks = await (blockstore.createSession != null ? blockstore.createSession(cid) : blockstore) const opts: CatOptions = mergeOptions(defaultOptions, options) // resolve and export using the session, if created, otherwise fall back to regular blockstore access const resolved = await resolve(cid, opts.path, blocks, opts) const result = await exporter(resolved.cid, blocks, opts) if (result.type !== 'file' && result.type !== 'raw') { throw new NotAFileError() } if (result.content == null) { throw new NoContentError() } yield * result.content(opts) } ```
Configuration menu - View commit details
-
Copy full SHA for 546bf66 - Browse repository at this point
Copy the full SHA 546bf66View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5836dcd - Browse repository at this point
Copy the full SHA 5836dcdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d9cb49 - Browse repository at this point
Copy the full SHA 3d9cb49View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39b6f7a - Browse repository at this point
Copy the full SHA 39b6f7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d1228b9 - Browse repository at this point
Copy the full SHA d1228b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 32713ab - Browse repository at this point
Copy the full SHA 32713abView commit details
Commits on Feb 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0c28d66 - Browse repository at this point
Copy the full SHA 0c28d66View commit details
Commits on Feb 9, 2024
-
chore: do not dedupe at the routing level as different impls return d…
…ifferent metadata
Configuration menu - View commit details
-
Copy full SHA for d0610c9 - Browse repository at this point
Copy the full SHA d0610c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9aeded1 - Browse repository at this point
Copy the full SHA 9aeded1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e6051a - Browse repository at this point
Copy the full SHA 8e6051aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ca1c458 - Browse repository at this point
Copy the full SHA ca1c458View commit details
Commits on Mar 1, 2024
-
chore: apply suggestions from code review
Co-authored-by: Russell Dempsey <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d7d6334 - Browse repository at this point
Copy the full SHA d7d6334View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c42ec5 - Browse repository at this point
Copy the full SHA 8c42ec5View commit details -
feat: add sessions to trustless gateways
Implements blockstore sessions for trustless gateways. - Queries the Helia routing for block providers - Creates a set of trustless gateways from routing results - Uses only these gateways to fetch session blocks
Configuration menu - View commit details
-
Copy full SHA for 8997d41 - Browse repository at this point
Copy the full SHA 8997d41View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60365d2 - Browse repository at this point
Copy the full SHA 60365d2View commit details
Commits on Mar 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ac06ff6 - Browse repository at this point
Copy the full SHA ac06ff6View commit details
Commits on Apr 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 263bc1c - Browse repository at this point
Copy the full SHA 263bc1cView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.