ServerApiPaths

Canonical paths of the device-scoped HTTP API v1. The client builds its request URLs from them; the server rebuilds them from the decoded route parameters. Signatures cover these paths, never a raw request URI.

Each address component is one path segment, percent-encoded as in RFC 3986: the unreserved characters A-Z a-z 0-9 - . _ ~ stay as they are, every other UTF-8 byte becomes %XX with upper-case hex digits.

Properties

Link copied to clipboard

Last-device recovery (docs/last-device-recovery.md). Not a ServerAuth-signed endpoint.

Link copied to clipboard

Issues a last-device recovery challenge. Public, not ServerAuth-signed.

Link copied to clipboard

Registers the user's last-device recovery key. ServerAuth-signed.

Link copied to clipboard

Requests (PUT) or reads (GET) the user's delayed recovery key reset (docs/recovery-key-reset.md). ServerAuth-signed.

Cancels a pending recovery key reset. Device-scoped: ServerAuth-signed. User-scoped (user): public, the body carries the current recovery key's signature.

Completes a pending recovery key reset. ServerAuth-signed; the body carries the new key's proof of possession.

Link copied to clipboard

User-scoped recovery key reset status query (user). Public, not ServerAuth-signed: the body carries the current recovery key's signature.

Link copied to clipboard

Revokes the user's last-device recovery key (docs/recovery-key-lifecycle.md). ServerAuth-signed; the body carries the current recovery key's signature.

Link copied to clipboard

Rotates the user's last-device recovery key (docs/recovery-key-lifecycle.md). ServerAuth-signed; the body carries the current recovery key's signature.

Link copied to clipboard
const val MESSAGES: String
Link copied to clipboard
Link copied to clipboard
const val PRE_KEYS: String
Link copied to clipboard
const val REGISTRATION: String
Link copied to clipboard

Device recovery (docs/device-recovery.md). Not a ServerAuth-signed endpoint.

Link copied to clipboard

Routine device authentication key rotation (docs/device-authentication-rotation.md). Not a ServerAuth-signed endpoint.

Link copied to clipboard

POST /v1/messages: envelope submission, ServerAuth-signed by the sending device since S1 (docs/server-authentication.md). An absolute path, not device-scoped: the device is the signed request's address.

Functions

Link copied to clipboard

The inverse of encodeDevice, or null unless value is exactly the canonical encoding of an address: two segments, only unreserved characters and upper-case %XX escapes of other bytes, valid UTF-8.

Link copied to clipboard
fun device(address: DeviceAddress, endpoint: String): String

/v1/devices/{user}/{device}/{endpoint}.

Link copied to clipboard

{user}/{device}, each component encoded with encodeSegment: the submitting device of POST /v1/messages, carried in a request header (S1, docs/server-authentication.md).

Link copied to clipboard
Link copied to clipboard
fun user(userId: UserId, endpoint: String): String

/v1/users/{user}/{endpoint}: the routes an offline recovery key holder uses without any device (docs/recovery-key-reset.md). Never ServerAuth-signed.