> ## Documentation Index
> Fetch the complete documentation index at: https://docs.afauth.org/llms.txt
> Use this file to discover all available pages before exploring further.

# @afauthhq/worker

> Cloudflare Workers bindings: createWorker, DurableObjectNonceStore, KvNonceStore, KvRevocationList, KvAttestedFreshnessStore, KvRateLimiter, D1AccountStore.

<Note>Overview only. Per-symbol typedoc reference is planned but not yet published.</Note>

Alongside the nonce/revocation/rate-limit/account stores, `@afauthhq/worker` ships **`KvAttestedFreshnessStore`** — the KV-backed `AttestedFreshnessStore` for §10.7 [attested sessions](/guides/keep-attested-access-live). Pass it via `attestedSession: { store }`; its KV entries' TTL is set to the remaining window, so lapsed sessions self-evict.

**`D1AccountStore`** is the durable, multi-agent [account store](/concepts/attestation): an account is keyed on an opaque `account_id` and groups a human's agent credentials by `(iss, sub_h)` (§10.4.4: one account, many devices). The grouping is atomic across isolates — its schema's `(iss, sub_h)` UNIQUE index lets concurrent first-signups of the same human converge on one account (`INSERT … ON CONFLICT`). Apply migration `0001_init.sql` and pass it as `accounts`.
