Skip to content

Fungi host seam

Sign host requests and reject reused request signatures.

  • @fungi.computer/seam
  • v0.2.0
  • MIT

Fastest path

  1. Install

    Add it to your project with npm, pnpm, Yarn or Bun.

    TERMINAL
    npm install @fungi.computer/seam
  2. Create 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)); // admitted
    console.log(replay.admit(record)); // replayed