UNPKG

@helia/verified-fetch

Version:

A fetch-like API for obtaining verified & trustless IPFS content on the web

17 lines 914 B
import { BasePlugin } from './plugin-base.js'; import type { PluginContext } from './types.js'; /** * This plugin should almost always run first because it's going to handle path walking if needed, and will only say it can handle * the request if path walking is possible (path is not empty, terminalCid is unknown, and the path has not been walked yet). * * Once this plugin has run, the PluginContext will be updated and then this plugin will return false for canHandle, so it won't run again. */ export declare class DagWalkPlugin extends BasePlugin { readonly id = "dag-walk-plugin"; /** * Return false if the path has already been walked, otherwise return true if the CID is encoded with a codec that supports pathing. */ canHandle(context: PluginContext): boolean; handle(context: PluginContext): Promise<Response | null>; } //# sourceMappingURL=plugin-handle-dag-walk.d.ts.map