@@ -3711,8 +3711,14 @@ public func FfiConverterTypeManifestManager_lower(_ value: ManifestManager) -> U
37113711 */
37123712public protocol RootKeyProtocol : AnyObject , Sendable {
37133713
3714+ /**
3715+ * Returns `true` if the provided `RootKey`s are equal by comparing internally the underlying secrets.
3716+ */
37143717 func isEqualTo( other: RootKey ) -> Bool
37153718
3719+ /**
3720+ * Returns `true` if the `RootKey` is a version 0 key.
3721+ */
37163722 func isV0( ) -> Bool
37173723
37183724}
@@ -3797,6 +3803,9 @@ public static func newRandom() -> RootKey {
37973803
37983804
37993805
3806+ /**
3807+ * Returns `true` if the provided `RootKey`s are equal by comparing internally the underlying secrets.
3808+ */
38003809open func isEqualTo( other: RootKey ) -> Bool {
38013810 return try ! FfiConverterBool . lift ( try ! rustCall ( ) {
38023811 uniffi_bedrock_fn_method_rootkey_is_equal_to ( self . uniffiClonePointer ( ) ,
@@ -3805,6 +3814,9 @@ open func isEqualTo(other: RootKey) -> Bool {
38053814} )
38063815}
38073816
3817+ /**
3818+ * Returns `true` if the `RootKey` is a version 0 key.
3819+ */
38083820open func isV0( ) -> Bool {
38093821 return try ! FfiConverterBool . lift ( try ! rustCall ( ) {
38103822 uniffi_bedrock_fn_method_rootkey_is_v0 ( self . uniffiClonePointer ( ) , $0
@@ -5106,6 +5118,11 @@ public struct CreatedBackup {
51065118 * The manifest hash representing the current backup state. Hex-encoded, 32-byte Blake3 hash.
51075119 */
51085120 public var manifestHash : String
5121+ /**
5122+ * The unique identifier for the backup account. Used to ensure that a user can only have a single backup.
5123+ * The remote backup service will only accept one backup per account.
5124+ */
5125+ public var backupAccountId : String
51095126
51105127 // Default memberwise initializers are never public by default, so we
51115128 // declare one manually.
@@ -5122,11 +5139,16 @@ public struct CreatedBackup {
51225139 */backupKeypairPublicKey: String ,
51235140 /**
51245141 * The manifest hash representing the current backup state. Hex-encoded, 32-byte Blake3 hash.
5125- */manifestHash: String ) {
5142+ */manifestHash: String ,
5143+ /**
5144+ * The unique identifier for the backup account. Used to ensure that a user can only have a single backup.
5145+ * The remote backup service will only accept one backup per account.
5146+ */backupAccountId: String ) {
51265147 self . sealedBackupData = sealedBackupData
51275148 self . encryptedBackupKeypair = encryptedBackupKeypair
51285149 self . backupKeypairPublicKey = backupKeypairPublicKey
51295150 self . manifestHash = manifestHash
5151+ self . backupAccountId = backupAccountId
51305152 }
51315153}
51325154
@@ -5149,6 +5171,9 @@ extension CreatedBackup: Equatable, Hashable {
51495171 if lhs. manifestHash != rhs. manifestHash {
51505172 return false
51515173 }
5174+ if lhs. backupAccountId != rhs. backupAccountId {
5175+ return false
5176+ }
51525177 return true
51535178 }
51545179
@@ -5157,6 +5182,7 @@ extension CreatedBackup: Equatable, Hashable {
51575182 hasher. combine ( encryptedBackupKeypair)
51585183 hasher. combine ( backupKeypairPublicKey)
51595184 hasher. combine ( manifestHash)
5185+ hasher. combine ( backupAccountId)
51605186 }
51615187}
51625188
@@ -5172,7 +5198,8 @@ public struct FfiConverterTypeCreatedBackup: FfiConverterRustBuffer {
51725198 sealedBackupData: FfiConverterData . read ( from: & buf) ,
51735199 encryptedBackupKeypair: FfiConverterString . read ( from: & buf) ,
51745200 backupKeypairPublicKey: FfiConverterString . read ( from: & buf) ,
5175- manifestHash: FfiConverterString . read ( from: & buf)
5201+ manifestHash: FfiConverterString . read ( from: & buf) ,
5202+ backupAccountId: FfiConverterString . read ( from: & buf)
51765203 )
51775204 }
51785205
@@ -5181,6 +5208,7 @@ public struct FfiConverterTypeCreatedBackup: FfiConverterRustBuffer {
51815208 FfiConverterString . write ( value. encryptedBackupKeypair, into: & buf)
51825209 FfiConverterString . write ( value. backupKeypairPublicKey, into: & buf)
51835210 FfiConverterString . write ( value. manifestHash, into: & buf)
5211+ FfiConverterString . write ( value. backupAccountId, into: & buf)
51845212 }
51855213}
51865214
@@ -8228,6 +8256,11 @@ public enum RootKeyError: Swift.Error {
82288256 * The provided input is likely not an actual `RootKey`. It is malformed or not the right format.
82298257 */
82308258 case KeyParseError
8259+ /**
8260+ * Key derivation unexpectedly fail
8261+ */
8262+ case KeyDerivation( String
8263+ )
82318264 /**
82328265 * A generic error that can wrap any anyhow error.
82338266 */
@@ -8258,10 +8291,13 @@ public struct FfiConverterTypeRootKeyError: FfiConverterRustBuffer {
82588291
82598292
82608293 case 1 : return . KeyParseError
8261- case 2 : return . Generic(
8294+ case 2 : return . KeyDerivation(
8295+ try FfiConverterString . read ( from: & buf)
8296+ )
8297+ case 3 : return . Generic(
82628298 errorMessage: try FfiConverterString . read ( from: & buf)
82638299 )
8264- case 3 : return . FileSystem(
8300+ case 4 : return . FileSystem(
82658301 try FfiConverterTypeFileSystemError . read ( from: & buf)
82668302 )
82678303
@@ -8280,13 +8316,18 @@ public struct FfiConverterTypeRootKeyError: FfiConverterRustBuffer {
82808316 writeInt ( & buf, Int32 ( 1 ) )
82818317
82828318
8283- case let . Generic ( errorMessage ) :
8319+ case let . KeyDerivation ( v1 ) :
82848320 writeInt ( & buf, Int32 ( 2 ) )
8321+ FfiConverterString . write ( v1, into: & buf)
8322+
8323+
8324+ case let . Generic( errorMessage) :
8325+ writeInt ( & buf, Int32 ( 3 ) )
82858326 FfiConverterString . write ( errorMessage, into: & buf)
82868327
82878328
82888329 case let . FileSystem( v1) :
8289- writeInt ( & buf, Int32 ( 3 ) )
8330+ writeInt ( & buf, Int32 ( 4 ) )
82908331 FfiConverterTypeFileSystemError . write ( v1, into: & buf)
82918332
82928333 }
@@ -9879,10 +9920,10 @@ private let initializationResult: InitializationResult = {
98799920 if ( uniffi_bedrock_checksum_method_manifestmanager_store_file ( ) != 35335 ) {
98809921 return InitializationResult . apiChecksumMismatch
98819922 }
9882- if ( uniffi_bedrock_checksum_method_rootkey_is_equal_to ( ) != 2010 ) {
9923+ if ( uniffi_bedrock_checksum_method_rootkey_is_equal_to ( ) != 29866 ) {
98839924 return InitializationResult . apiChecksumMismatch
98849925 }
9885- if ( uniffi_bedrock_checksum_method_rootkey_is_v0 ( ) != 36834 ) {
9926+ if ( uniffi_bedrock_checksum_method_rootkey_is_v0 ( ) != 4314 ) {
98869927 return InitializationResult . apiChecksumMismatch
98879928 }
98889929 if ( uniffi_bedrock_checksum_method_safesmartaccount_personal_sign ( ) != 21352 ) {
0 commit comments