Client Interface
A connected client: one signed-in user on one device. Every call is async. The calls take turns on the client, but a pending receive waits for mail outside that turn, so a send on the same client from another task goes through meanwhile. The Config/AccountConfig constructors below are the address layer under the `Tenant` handle, for callers that know their addresses.
Inheritors
Functions
Turn on per-send rollback protection: hold store so every send and every ratchet-advancing receive commits a monotonic counter to it, and exportStateSealed binds that counter. Call once, before sending, on a client made by connect / signIn; the sealed restore constructors attach the store themselves. This is what closes EX-03's per-send window — use the same platform store across restarts so the counter is monotone.
The device identity secret, to persist and reuse via signInWithIdentity (and connectWithIdentity) on later runs. Carries a private key — store it as a secret.
The resumable session state: the device identity, every live ratchet session with a peer this device already talks to, and the published prekey secrets. Restore it with signInWithState or connectWithState.
The sealed resumable state (decision 0078, anchor B): the same bytes as exportState, authenticated under the attached SecureStore key so that an attacker who can rewrite the state file cannot forge the anti-rollback generation, with the store's rollback counter bound alongside. Restore with connectWithStateSealed or signInWithStateSealed. Requires attachSecureStore first (or a sealed restore, which attaches it); errors otherwise. Against a file-rewriter this refuses a forged generation and, via the per-send counter, a state older than the latest send.
What the sign-in found: whether restored sessions are in use or were discarded as a rollback; see `RestoreOutcome`.