import type * as Engine from '../core/Engine.js'; import * as Errors from '../core/Errors.js'; import * as internal from './internal/instantiate.js'; export * from '../core/MlDsa44.js'; export { MemoryError } from './internal/instantiate.js'; /** * Compiles WASM implementations of selected [`MlDsa44`](/api/MlDsa44) * primitives, without installing them. * * Random key generation remains on Ox's host-backed default implementation. * * @example * ```ts twoslash * // @noErrors * import { Engine } from 'ox' * import { MlDsa44 } from 'ox/wasm' * * await Engine.install({ MlDsa44: MlDsa44.engine() }) * * MlDsa44.getPublicKey({ privateKey: '0x...' }) * ``` * * @returns The WASM implementation of part of the `MlDsa44` slot. */ export declare function engine(): Promise; export declare namespace engine { /** Every `MlDsa44` primitive this module implements. */ type ReturnType = { [key in 'getPublicKey' | 'sign' | 'verify']-?: NonNullable; }; type ErrorType = InvalidInputError | internal.MemoryError | Errors.GlobalErrorType; } /** * Thrown when mldsa-native rejects an input or fails to produce a signature. * * @example * ```ts twoslash * import { MlDsa44 } from 'ox/wasm' * * try { * const engine = await MlDsa44.engine() * engine.getPublicKey(new Uint8Array(32)) * } catch (error) { * if (error instanceof MlDsa44.InvalidInputError) * console.error(error.message) * } * ``` */ export declare class InvalidInputError extends Errors.BaseError { readonly name = "MlDsa44.InvalidInputError"; constructor({ operation }: { operation: string; }); } //# sourceMappingURL=MlDsa44.d.ts.map