import { CID, format, toJSON, fromJSON } from './cid.js'; import type * as API from './link/interface.js'; export * from './link/interface.js'; declare const SHA_256_CODE = 18; /** * Simplified version of `create` for CIDv0. */ export declare function createLegacy(digest: API.MultihashDigest): API.LegacyLink; /** * Simplified version of `create` for CIDv1. * * @param code - Content encoding format code. * @param digest - Miltihash of the content. */ export declare function create(code: Code, digest: API.MultihashDigest): API.Link; /** * Type predicate returns true if value is the link. */ export declare function isLink>(value: unknown | L): value is L & CID; /** * Takes cid in a string representation and creates an instance. If `base` * decoder is not provided will use a default from the configuration. It will * throw an error if encoding of the CID is not compatible with supplied (or * a default decoder). */ export declare function parse(source: API.ToString, Prefix>, base?: API.MultibaseDecoder): API.Link; export { format, toJSON, fromJSON }; /** * Decoded a CID from its binary representation. The byte array must contain * only the CID with no additional bytes. * * An error will be thrown if the bytes provided do not contain a valid * binary representation of a CID. */ export declare function decode(bytes: API.ByteView>): API.Link; //# sourceMappingURL=link.d.ts.map