Fastest path
Install
Add it to your project with npm, pnpm, Yarn or Bun.
TERMINAL npm install @fungi.computer/seamCreate a replay guard
Admit a nonce once; key provisioning remains with the host.
home.ts import { SeamReplayGuard } from "@fungi.computer/seam";const replay = new SeamReplayGuard();const now = Date.now();const record = {nonce: "00112233445566778899aabbccddeeff",now,expiresAt: now + 120_000,};console.log(replay.admit(record)); // admittedconsole.log(replay.admit(record)); // replayed