diff options
author | Florian Dold <florian@dold.me> | 2021-10-21 18:51:19 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-10-21 18:51:19 +0200 |
commit | 3740010117df56c0ab8cfa97c983d9cf0143daf1 (patch) | |
tree | e290a211f9e76af226e69a30012f3d2079b93829 /packages/anastasis-core/src/reducer-types.ts | |
parent | 0ee669f52341a8331394a1e9892264c0ef0bb7d7 (diff) | |
download | wallet-core-3740010117df56c0ab8cfa97c983d9cf0143daf1.tar.gz wallet-core-3740010117df56c0ab8cfa97c983d9cf0143daf1.tar.bz2 wallet-core-3740010117df56c0ab8cfa97c983d9cf0143daf1.zip |
anastasis: make recovery work, at least for security questions
Diffstat (limited to 'packages/anastasis-core/src/reducer-types.ts')
-rw-r--r-- | packages/anastasis-core/src/reducer-types.ts | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/packages/anastasis-core/src/reducer-types.ts b/packages/anastasis-core/src/reducer-types.ts index 4c73dfa66..f7ba9e0f1 100644 --- a/packages/anastasis-core/src/reducer-types.ts +++ b/packages/anastasis-core/src/reducer-types.ts @@ -1,4 +1,6 @@ import { Duration, Timestamp } from "@gnu-taler/taler-util"; +import { KeyShare } from "./crypto.js"; +import { RecoveryDocument } from "./recovery-document-types.js"; export type ReducerState = | ReducerStateBackup @@ -110,8 +112,16 @@ export interface RecoveryInformation { } export interface ReducerStateRecovery { - backup_state?: undefined; recovery_state: RecoveryStates; + + /** + * Unused in the recovery states. + */ + backup_state?: undefined; + + /** + * Unused in the recovery states. + */ code?: undefined; identity_attributes?: { [n: string]: string }; @@ -133,10 +143,18 @@ export interface ReducerStateRecovery { // FIXME: This should really be renamed to recovery_internal_data recovery_document?: RecoveryInternalData; + // FIXME: The C reducer should also use this! + verbatim_recovery_document?: RecoveryDocument; + selected_challenge_uuid?: string; challenge_feedback?: { [uuid: string]: ChallengeFeedback }; + /** + * Key shares that we managed to recover so far. + */ + recovered_key_shares?: { [truth_uuid: string]: KeyShare }; + core_secret?: { mime: string; value: string; @@ -254,6 +272,12 @@ export interface ActionArgEnterSecret { expiration: Duration; } -export interface ActionArgSelectChallenge { +export interface ActionArgsSelectChallenge { uuid: string; } + +export type ActionArgsSolveChallengeRequest = SolveChallengeAnswerRequest; + +export interface SolveChallengeAnswerRequest { + answer: string; +} |