import type * as Engine from '../core/Engine.js'; import type * as Errors from '../core/Errors.js'; import * as internal from './internal/instantiate.js'; export * from '../core/Hash.js'; export { MemoryError } from './internal/instantiate.js'; /** * Compiles the WASM implementation of the [`Hash`](/api/Hash) primitives, * without installing it. * * Most callers want * [`Engine.install`](/wasm/crypto/Engine/install) instead, which compiles every * implementation this entrypoint provides and installs them in one call. Reach * for this to take the `Hash` slot on its own, or to hold the implementation * without touching the installed engine. * * :::note * Performance varies by primitive, input size, runtime, and processor. Run * `pnpm bench:engines` to compare Ox's default, Node, WASM, and Alloy * implementations on your target machine. * ::: * * @example * ```ts twoslash * // @noErrors * import { Engine } from 'ox' * import { Hash } from 'ox/wasm' * * await Engine.install({ Hash: Hash.engine() }) * * Hash.keccak256('0xdeadbeef') * ``` * * @returns The WASM implementation of the `Hash` slot. */ export declare function engine(): Promise; export declare namespace engine { /** Every `Hash` primitive this module implements. */ type ReturnType = { [key in 'blake3' | 'createBlake3' | 'createHmacSha256' | 'createKeccak256' | 'createRipemd160' | 'createSha256' | 'hmacSha256' | 'keccak256' | 'ripemd160' | 'sha256']-?: NonNullable; }; type ErrorType = internal.MemoryError | Errors.GlobalErrorType; } //# sourceMappingURL=Hash.d.ts.map