import type { MultibaseEncoder, MultibaseDecoder, Multibase } from '../bases/interface.js'; import type { Phantom, ByteView } from '../block/interface.js'; import type { MultihashDigest } from '../hashes/interface.js'; export type { MultihashDigest, MultibaseEncoder, MultibaseDecoder }; export type Version = 0 | 1; export type DAG_PB = 0x70; export type SHA_256 = 0x12; /** * Represents an IPLD link to a specific data of type `T`. * * @template T - Logical type of the data being linked to. * @template C - multicodec code corresponding to a codec linked data is encoded with * @template A - multicodec code corresponding to the hashing algorithm of the CID * @template V - CID version */ export interface Link extends Phantom { readonly version: V; readonly code: Format; readonly multihash: MultihashDigest; readonly byteOffset: number; readonly byteLength: number; readonly bytes: ByteView>; equals(other: unknown): other is Link; toString(base?: MultibaseEncoder): ToString, Prefix>; link(): Link; toV1(): Link; } export interface LinkJSON { '/': ToString; } export interface LegacyLink extends Link { } export type UnknownLink = LegacyLink | Link; export type ToString = Multibase & Phantom; export type { ByteView }; //# sourceMappingURL=interface.d.ts.map