user_devices API Postgres table
Every device a user's chain has held, projected from its states.
Declared in packages/api-shared/src/schema/userDeviceStates.ts
Description
A signing key belongs to one device of one user, so the key alone names its device.
Columns
user_iduuid- not null
- references users (
id)
The user whose chain holds the device, and the device id its states sign. Together the primary key.
device_iduuid- not null
The user whose chain holds the device, and the device id its states sign. Together the primary key.
signing_public_keytext- not null
Base64 public keys, proven against the fingerprints the adding state signs.
signing_key_fingerprinttext- not null
Hex SHA-256 fingerprints of those keys, as the adding state signs them. The signing key fingerprint is unique across all users.
encapsulation_public_keytext- not null
Base64 public keys, proven against the fingerprints the adding state signs.
encapsulation_key_fingerprinttext- not null
Hex SHA-256 fingerprints of those keys, as the adding state signs them. The signing key fingerprint is unique across all users.
added_attext- not null
The signing time of the adding state, as signed.
added_versionbigint- not null
The device was active from the first up to, not including, the second; null while it is active.
removed_versionbigint- nullable
The device was active from the first up to, not including, the second; null while it is active.
Keys and constraints
- Primary key
(user_id, device_id) on delete cascade
Indexes
user_devices_signing_key_fingerprint_idx(signing_key_fingerprint)- unique