Skip to main content

restore_from_saved_code

Function restore_from_saved_code 

Source
pub async fn restore_from_saved_code(
    builder: CovenBuilder,
    saved: &SavedRestoreCode,
    s3_credentials: Option<S3Credentials>,
    device_name: &str,
    on_status: impl Fn(BootstrapStatus),
    cancel: &Receiver<bool>,
) -> Result<Option<CovenHandle>, BootstrapError>
Expand description

Restore a readable entry selected from saved_restore_codes. Reads the current code by store id, including a replacement saved since listing. Returns None if that store’s code is no longer saved. S3 uses the explicit key when supplied, otherwise its key saved beside the code. Missing keys, wrong-provider keys and keychain failures precede bootstrap.