recoverLastDevice
suspend fun recoverLastDevice(address: DeviceAddress, authorization: LastDeviceRecoveryAuthorization): LastDeviceRecoveryOutcome
Replaces address's registered device authentication key with the statement's replacement key, authorized by the user's offline recovery key over the server-issued challenge and proven by the replacement key (docs/last-device-recovery.md). Consumes the challenge. Throws LastDeviceRecoveryException and changes nothing if any check fails.
From the moment this returns LastDeviceRecoveryOutcome.REPLACED, only the replacement key authenticates the device and the epoch is one higher. The messaging identity, prekeys and mailbox are not touched. A retry of the same recovery returns LastDeviceRecoveryOutcome.ALREADY_APPLIED.