/ protocol ← all documentation

Protocol v1, auth and the limits

The wire contract between every Yap client and both server backends, plus what a session is made of and the ceilings the protocol enforces. This is the normative summary; docs/protocol.md carries the full endpoint list.

1. Protocol v1

Two channels to the server, both over TLS in production (plain HTTP is accepted by the client only for loopback):

IDs are 63-bit and time-ordered: 41 bits of milliseconds since 2026-01-01, 22 bits of sequence. In JSON they are strings, because they exceed 253; in protobuf they are fixed64.

Full endpoint list: docs/protocol.md in the repository.

2. Auth and sessions

3. Sign-up cap and address tags

Two accounts per IP address; the third registration from one address is 409 with "Two accounts per address is the limit." The cap is --max-accounts-per-ip N on a self-hosted server (0 lifts it) and the MAX_ACCOUNTS_PER_IP var on the Worker. Logins are never capped.

The address is never stored. Each sign-up bumps a counter in signup_tags, keyed by hex(HMAC-SHA256(K, "yap/v1/signup\0" + address)[..16]). The table has no user id, no timestamp and no row order, so a tag cannot be tied to an account. On the Worker K is PEPPER; self-hosted it is a random key in <database file>.signup-key (or YAP_SIGNUP_KEY_FILE), created on first start and kept outside the database. Losing K only resets the cap. Rate-limit buckets stay in memory only.

Updated . Yap technical documentation is part of the documentation index; the product itself is at getyap.dev.