Notify is the service that stores an account's notification inbox, read state and email notification settings. Seed Exact uses it only from the Activity package, through one signed endpoint. This page describes the protocol from the app's side, as implemented in src/activity/client.ts and enforced by the mock in tools/mock-notify/routes.ts. The real service's code is not in the mobile app; behaviour stated here "as the mock enforces" was not checked against it.
Discovery
GET {server}/hm/api/config on the configured Seed site (Seed site read API).
Take notifyServiceUrl, else notifyServiceHost. If neither is set, use the hosted default https://hyper.media/hm/api/notify.
Normalise: add https:// when missing, strip trailing slashes, and map the retired hosts notify.seed.hyper.media and notify-dev.seed.hyper.media to the hosted paths on hyper.media and dev.hyper.media.
Choose the endpoint: a base ending in /hm/api/notify posts to {base}/notifications; a standalone base posts to {origin}/hm/api/notifications.
A failed config request is an error shown to the person, not a silent fallback. Details: Activity: notify client and signed requests.
The request
POST {endpoint}
Content-Type: application/cbor
(redirects are refused)
strict DAG-CBOR map:
action: "get-notification-state" | "apply-notification-actions"
actions: [...] only for apply
limit: 400
signer: 34 bytes 0xED 0x01 followed by the Ed25519 public key
time: whole milliseconds the sender's clock, floored by wireTimestamp
sig: 64 bytes Ed25519 signatureSigning
The signature covers the strict DAG-CBOR encoding of the map without the sig key; sig is then added to the transmitted map. This differs from the agents envelope, which signs with a zeroed sig in place. Both are built in src/crypto/envelopes.ts, see Crypto: signed envelopes and Agents: signed action envelope and endpoints. The key comes from Identity. There is no other credential.
Time window
The mock rejects a request whose time differs from its clock by more than 20000 ms (401 Request time outside 20 second window); exactly 20000 ms is accepted. The app therefore signs with a fresh stamp written by one Contract action, and re-asks once a minute while the tab is open, instead of reading a clock per frame. See the ask stamp in Activity: sources, the ask stamp and the committed snapshot and State, refresh and stale-reply patterns.
Actions
Sent one at a time by the app, inside actions:
Action | Fields | Effect in the mock |
|---|---|---|
|
| Adds the event to |
|
| Raises the watermark and drops read events at or before it |
|
| Lowercases; a new address (or an expired unverified one) resets verification and sets the send time |
|
| Only for an expired, unverified address: clears the expiry and sets a new send time |
| none | Clears the email and verification fields |
The app's envelope type also allows beforeMs, siteUid and a get-email-subscribers action; the app sends none of them, and the mock rejects unknown signed fields.
The response
Reads and writes both return the full snapshot as JSON:
{
accountId,
inbox: { notifications: [...], hasMore, oldestEventAtMs },
config: { accountId, email, verifiedTime, verificationSendTime, verificationExpired },
readState: { accountId, markAllReadAtMs, readEvents: [{eventId, eventAtMs}], updatedAt }
}Each notification has feedEventId, eventAtMs, reason, eventType, author {uid, name, icon}, target {uid, path, name}, commentId, optional threadRoot, sourceId, citationType. The app validates every field and requires all three account ids to equal the signer's (Activity: snapshot model and grouping). Because a write returns the new state, the app shows it without a second request.
Email verification happens outside the app: the service emails a link, and the app polls every 3 s while the state is pending or expired until verifiedTime appears.
Errors
Status in the mock | Body | When |
|---|---|---|
400 |
| malformed request |
401 |
| stale time or bad signature |
503 |
| the |
The app shows the body's error string when present, else Request failed ({status}). Network failures and redirects read Notification server not responding ({host}). Deadline: 15 s.
The mock
tools/mock-notify/routes.ts is mounted by the local test server on http://127.0.0.1:4790 and directly by the Bun tests. It serves /activity/hm/api/config and /activity/hm/api/notify/notifications, plus control routes /activity/reset (clock and scenario: inbox, empty, pending, expired, verified, failure, wrong-account, thread), /activity/time, /activity/verify and /activity/posts (a counter of signed requests). The test server answers 403 on hosted notify paths so tests can never reach the real service. Full description: Mock notify service.
Grants: net.fetch https: for real deployments and net.fetch http://127.0.0.1:4790 for the fixture (Grants and capabilities).
Known limits
The app asks for the latest 400 notifications and cannot page further.
There are no push notifications; the inbox updates when the tab opens, once a minute while it is open, and on manual refresh.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime