Overview only. Per-symbol typedoc reference is planned but not yet published.
Entry points
defineService(opts)— opinionated convenience factory. Returns aServerwithattestation: "required"defaults (unclaimed_mode: "attested_only"in the discovery doc + bundledtrustAttestor()). With this default, an un-attested signup is rejected with401 attestation_required; an agent reaches it by linking to a human and minting a per-service JWT viaTrustClient(orafauth trust linkafauth signup). Use this for new integrations; opt out withattestation: "off"(paid/read-only) or"optional"(migration path). Synthesizes the discovery doc frombaseUrl+serviceDidand accepts adiscoveryoverride for partial customization. A human’s agents are grouped onto one account by their(iss, sub_h)(§10.4.4: one account, many devices) — automatic for anyAccountStore, no option needed.
new Server({...})— the lower-level constructor. Pass an explicitDiscoveryDocument, attestor, nonce store, etc. Use when you needMultiAttestor, a customHmacAttestor, or full discovery control.Verifier— standalone §5.5/§5.6 request verifier. Use directly at an edge proxy or sidecar that fronts a service backend.server.verifyAttested(req)+attestedSession— the §10.7 attested-session gate. ConfigureattestedSession: { store, mode }(with anattestor) and callverifyAttestedon your own authenticated endpoints: it verifies the signature, refreshes the session when the agent re-presents an attestation, and challenges with401 attestation_requiredwhen the freshness window lapses. Stores:MemoryAttestedFreshnessStorehere,KvAttestedFreshnessStorein@afauthhq/worker. See Keep attested access live.- Multi-agent accounts (§10.4.4) — an
Accountis keyed on an opaqueaccount_idand holds one or more agent credentials (agents[]). At signup, an agent presenting a verified(iss, sub_h)that a human already has attaches to that account (AccountStore.signupAgent→attached: true) — one account, many devices. Agents with nosub_h(attestation off/optional, runtime-only) get singleton accounts. Key rotation keepsaccount_idstable; resolve an account from a request viaaccounts.getByAgentDid(did).