Ear Tag
Random bearer keys and SHA-256 digests, a typed capability-grant vocabulary, and a tenant-scoped key store with issuance, verification and lifecycle, for services issuing invite codes or API keys.
Fastest path
Install
Add it to your project with npm, pnpm, Yarn or Bun.
TERMINAL npm install @fungi.computer/ear-tagIssue a key and its digest
Creates a prefixed bearer key and its SHA-256 digest in one call, then prints that the key carries the prefix and the digest is 64 hex characters.
home.ts import { generateKeyAndHash } from "@fungi.computer/ear-tag";const { key, digest } = await generateKeyAndHash({ prefix: "invite" });console.log(key.startsWith("invite_")); // trueconsole.log(digest.length); // 64: a SHA-256 digest as lowercase hex