Hmac
Path:
loom-sprint-scaffold/loom/src/lib/hmac.tsRelative: loom/src/lib/hmac.tsSubproject: loom-sprint-scaffoldCategory: otherLines: 77Bytes: 2,257Imports: 1Exports: 6
Content Preview
- /**
- * HMAC utilities shared by Loop 1 (token-mint) and Loop 3 (reversibility-gate).
- * WebCrypto only — workerd-compatible.
- *
- * The message format used by Loop 3's verifier is:
- * `tool\u0000${canonicalJSON(args)}`
- *
- * New token-mint messages additionally embed structured metadata
- * (goal_id, stage_id, expires_at, nonce) alongside tool args so that
- * single-use enforcement and TTL checking can be done without modifying
- * the existing Loop 3 verifier.
- */
- import { canonicalJSON } from