export type CIDGenerationResult = { /** * - The string representation of the CID. */ cidString: string; /** * - The CID version that was generated. */ version: 'v0' | 'v1'; /** * - The algorithm used for hashing. */ hashAlgorithm: 'sha256'; /** * - The multicodec code of the content. */ codec: number; }; /** * @typedef {Object} CIDGenerationResult * @property {string} cidString - The string representation of the CID. * @property {'v0' | 'v1'} version - The CID version that was generated. * @property {'sha256'} hashAlgorithm - The algorithm used for hashing. * @property {number} codec - The multicodec code of the content. */ /** * A utility class to generate IPFS Content Identifiers (CIDs) locally. */ declare class IPFSHasher { #private; /** * @param {'v0' | 'v1'} [version='v1'] - The CID version to generate. * @throws {TypeError} If the version is not 'v0' or 'v1'. */ constructor(version?: 'v0' | 'v1'); /** * Generates a CID from the provided data. * * @param {Uint8Array} data - The raw data to be hashed. * @returns {Promise} A promise resolving to the CID result. * @throws {TypeError} If the input data is not a Uint8Array. */ generate(data: Uint8Array): Promise; } export default IPFSHasher; //# sourceMappingURL=index.d.mts.map