import type { Hash } from "./types.js"; /** * Initialize the xxhash WASM instance. After this resolves, the synchronous * hashing functions {@link computeHashSync} and {@link computeSelfHashSync} * may be called. */ export declare function initHasher(): Promise; /** * Synchronous variant of {@link computeHash}. Must only be called after * {@link initHasher} has resolved at least once; throws otherwise. */ export declare function computeHashSync(typeHash: Hash, payload: unknown): Hash; /** * Synchronous variant of {@link computeSelfHash}. Must only be called after * {@link initHasher} has resolved at least once; throws otherwise. */ export declare function computeSelfHashSync(payload: unknown): Hash; /** * hash = XXH64(utf8(typeHash) ++ CBOR_deterministic(payload)) * Used for all normal nodes. */ export declare function computeHash(typeHash: Hash, payload: unknown): Promise; /** * hash = XXH64(CBOR_deterministic(payload)) * Used for self-referencing (bootstrap) nodes where type = hash. */ export declare function computeSelfHash(payload: unknown): Promise; //# sourceMappingURL=hash.d.ts.map