Signal-iOS/SignalServiceKit/SecureValueRecovery/SVRLocalStorage.swift
2026-05-26 18:24:40 -05:00

16 lines
432 B
Swift

//
// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
//
import Foundation
/// Stores state related to SVR; e.g. do we have backups at all, etc.
public struct SVRLocalStorage {
let completedBackupStore = KeyValueStore(collection: "SVR.Completed")
public func isMasterKeyBackedUp(tx: DBReadTransaction) -> Bool {
return !completedBackupStore.allKeys(transaction: tx).isEmpty
}
}