completeRecoveryKeyReset

Completes the pending reset in one atomic step. In this order:

  1. the user never registered a key: RecoveryKeyResetCompletionResult.NOT_CONFIGURED;

  2. the active key was installed by the completion with RecoveryKeyResetCompletionTransition.completionId and is its new key: RecoveryKeyResetCompletionResult.ALREADY_APPLIED, nothing written;

  3. no reset is pending, or another one than RecoveryKeyResetCompletionTransition.resetId: RecoveryKeyResetCompletionResult.NOT_PENDING;

  4. the pending reset's key, epoch or times differ from the transition's, the state is not that ACTIVE key and epoch, the new key is the active key, or the completing device's registration differs from RecoveryKeyResetCompletionTransition.expectedCompleter: RecoveryKeyResetCompletionResult.CONFLICT;

  5. RecoveryKeyResetCompletionTransition.now is before the reset's eligibility time: RecoveryKeyResetCompletionResult.NOT_YET_ELIGIBLE;

  6. the epoch is Long.MAX_VALUE: RecoveryKeyResetCompletionResult.EPOCH_EXHAUSTED;

  7. stores the new key, epoch + 1, the completion ID (clearing the other transition IDs) and now as installation and transition time, removes the reset and deletes every last-device recovery challenge of the user: RecoveryKeyResetCompletionResult.COMPLETED.

No nonce is claimed: removing the reset makes the completion single-use.