diff options
Diffstat (limited to 'packages/anastasis-core/src/reducer-types.ts')
-rw-r--r-- | packages/anastasis-core/src/reducer-types.ts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/packages/anastasis-core/src/reducer-types.ts b/packages/anastasis-core/src/reducer-types.ts index 08e61cefe..318e00f89 100644 --- a/packages/anastasis-core/src/reducer-types.ts +++ b/packages/anastasis-core/src/reducer-types.ts @@ -68,6 +68,13 @@ export interface ReducerStateBackup { policies?: Policy[]; /** + * Map from truth key (`${methodIndex}/${providerUrl}`) to + * the truth metadata. + */ + truth_metadata?: Record<string, TruthMetaData>; + recovery_document?: RecoveryDocument; + + /** * Policy providers are providers that we checked to be functional * and that are actually used in policies. */ @@ -198,6 +205,35 @@ export interface ReducerStateRecovery { authentication_providers?: { [url: string]: AuthenticationProviderStatus }; } +/** + * Truth data as stored in the reducer. + */ +export interface TruthMetaData { + uuid: string; + + key_share: string; + + policy_index: number; + + pol_method_index: number; + + /** + * Nonce used for encrypting the truth. + */ + nonce: string; + + /** + * Key that the truth (i.e. secret question answer, email address, mobile number, ...) + * is encrypted with when stored at the provider. + */ + truth_key: string; + + /** + * Truth-specific salt. + */ + truth_salt: string; +} + export interface ReducerStateError { backup_state?: undefined; recovery_state?: undefined; |