import { CID } from "multiformats/cid" import { CodecIdentifier } from "../../dag/codecs.js" export type Implementation = { // Get the data behind a CID getBlock: (cid: CID) => Promise getUnixFile: (cid: CID) => Promise getUnixDirectory: (cid: CID) => Promise // Keep data around putBlock: (data: Uint8Array, codec: CodecIdentifier) => Promise putChunked: (data: Uint8Array) => Promise // Stats size: (cid: CID) => Promise } export type DirectoryItem = { isFile: boolean cid: CID name: string size: number } export type PutResult = { cid: CID size: number isFile: boolean }