diff --git a/lib/types/backup-types.js b/lib/types/backup-types.js new file mode 100644 --- /dev/null +++ b/lib/types/backup-types.js @@ -0,0 +1,30 @@ +// @flow + +import type { UserStore } from './user-types.js'; + +export type UserKeys = { + +backupDataKey: string, + +ed25519: string, +}; + +export type UserData = { + +userStore: UserStore, +}; + +export type BackupAuth = { + +userID: string, + +accessToken: string, + +deviceID: string, +}; + +export type Backup = { + +backupID: string, + +userKeys: UserKeys, + +userData: UserData, +}; + +export type BackupEncrypted = { + +backupID: string, + +userKeys: Uint8Array, + +userData: Uint8Array, +};