UNPKG

@helia/verified-fetch

Version:

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

17 lines 670 B
import type { AcceptHeader, ContentType } from '../index.ts'; import type { CID } from 'multiformats/cid'; export interface ConvertedOutput { block: Uint8Array; contentType: string; } /** * Where supported, deserialize the passed block using the codec appropriate for * the CID, then loop over the acceptable content types and attempt to convert * the deserialized value to that format and serialize it back to a block - * return the first successful result. */ export declare function convertOutput(cid: CID, block: Uint8Array, accept: AcceptHeader[]): { contentType: ContentType; output: Uint8Array; }; //# sourceMappingURL=convert-output.d.ts.map