export const contentType: "application/vnd.ipld.car"; export const name: "CAR"; /** @type {API.MulticodecCode<0x0202, 'CAR'>} */ export const code: API.MulticodecCode<0x0202, 'CAR'>; export function createWriter(): Writer; export function encode>({ roots, blocks }: T): API.ByteView; export function decode(bytes: API.ByteView>): Model; export function link>(bytes: API.ByteView, { hasher }?: { hasher?: API.MultihashHasher; }): Promise, number, 1>>; export function write>(data: T, options?: { hasher?: API.MultihashHasher | undefined; } | undefined): Promise, number, 1>>; export type Model = { roots: API.IPLDBlock[]; blocks: Map; }; import * as API from '@ucanto/interface'; /** * @typedef {{ * roots: API.IPLDBlock[] * blocks: Map * }} Model */ declare class Writer { /** * @param {API.IPLDBlock[]} blocks * @param {number} byteLength */ constructor(blocks?: API.IPLDBlock[], byteLength?: number); written: Set; blocks: API.IPLDBlock[]; byteLength: number; /** * @param {API.IPLDBlock[]} blocks */ write(...blocks: API.IPLDBlock[]): Writer; /** * @param {API.IPLDBlock[]} rootBlocks */ flush(...rootBlocks: API.IPLDBlock[]): Uint8Array; } export {}; //# sourceMappingURL=car.d.ts.map