Files
anubis-mirror/web/js/algorithms/index.ts
Xe Iaso f5a51b8bbd fix(js): add typed ChallengeResult interface for PoW worker results
The process() function in fast.ts declared Promise<string> but actually
resolved with the full worker message object { hash, data, difficulty,
nonce }. main.tsx papered over this with `any`. Introduce a shared
ChallengeResult type so the contract between workers, algorithms, and
the main component is enforced by the type checker.

Assisted-by: Claude Opus 4.6 via Claude Code
Signed-off-by: Xe Iaso <me@xeiaso.net>
2026-03-24 19:22:51 +00:00

9 lines
204 B
TypeScript

import fast from "./fast";
export type { ChallengeResult } from "./types";
export default {
fast: fast,
slow: fast, // XXX(Xe): slow is deprecated, but keep this around in case anything goes bad
};