diff --git a/CHANGELOG.md b/CHANGELOG.md index ed42d3c..fc7a778 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## 0.25.0 + +* Add options locale, and useTeeOperator when using `setVerificationOptions` method. +* Add option to use Reclaim's TEE+MPC Protocol for HTTP request claim verification & attestation. +* Mention locale in headers for requests sent to reclaim sdk backend. +* Add support for app links & deep links launch using `Reclaim.setAllowedAppLinks` API. This API can be used by provider user scripts. +* Share the exact error message from backend on errors in `ReclaimSessionExpiredException`. +* Add `Reclaim.updateUserAgent(userAgent:string)` API for updating user agent from provider user script. + ## 0.24.0 * Fix use of capability access token diff --git a/generated/android/src/main/java/org/reclaimprotocol/inapp_sdk/Messages.kt b/generated/android/src/main/java/org/reclaimprotocol/inapp_sdk/Messages.kt index 43a11ee..0a56794 100644 --- a/generated/android/src/main/java/org/reclaimprotocol/inapp_sdk/Messages.kt +++ b/generated/android/src/main/java/org/reclaimprotocol/inapp_sdk/Messages.kt @@ -1,5 +1,5 @@ // Copyright 2025, Reclaim Protocol. Use of this source code is governed by a license that can be found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @@ -61,7 +61,7 @@ private object MessagesPigeonUtils { } if (a is Map<*, *> && b is Map<*, *>) { return a.size == b.size && a.all { - (b as Map).containsKey(it.key) && + (b as Map).contains(it.key) && deepEquals(it.value, b[it.key]) } } @@ -287,37 +287,64 @@ data class ClientProviderInformationOverride ( data class ClientFeatureOverrides ( val cookiePersist: Boolean? = null, val singleReclaimRequest: Boolean? = null, + val attestorBrowserRpcUrl: String? = null, val idleTimeThresholdForManualVerificationTrigger: Long? = null, val sessionTimeoutForManualVerificationTrigger: Long? = null, - val attestorBrowserRpcUrl: String? = null, val isAIFlowEnabled: Boolean? = null, val manualReviewMessage: String? = null, - val loginPromptMessage: String? = null + val loginPromptMessage: String? = null, + val useTEE: Boolean? = null, + val interceptorOptions: String? = null, + val claimCreationTimeoutDurationInMins: Long? = null, + val sessionNoActivityTimeoutDurationInMins: Long? = null, + val aiProviderNoActivityTimeoutDurationInSecs: Long? = null, + val pageLoadedCompletedDebounceTimeoutMs: Long? = null, + val potentialLoginTimeoutS: Long? = null, + val screenshotCaptureIntervalSeconds: Long? = null, + val teeUrls: String? = null ) { companion object { fun fromList(pigeonVar_list: List): ClientFeatureOverrides { val cookiePersist = pigeonVar_list[0] as Boolean? val singleReclaimRequest = pigeonVar_list[1] as Boolean? - val idleTimeThresholdForManualVerificationTrigger = pigeonVar_list[2] as Long? - val sessionTimeoutForManualVerificationTrigger = pigeonVar_list[3] as Long? - val attestorBrowserRpcUrl = pigeonVar_list[4] as String? + val attestorBrowserRpcUrl = pigeonVar_list[2] as String? + val idleTimeThresholdForManualVerificationTrigger = pigeonVar_list[3] as Long? + val sessionTimeoutForManualVerificationTrigger = pigeonVar_list[4] as Long? val isAIFlowEnabled = pigeonVar_list[5] as Boolean? val manualReviewMessage = pigeonVar_list[6] as String? val loginPromptMessage = pigeonVar_list[7] as String? - return ClientFeatureOverrides(cookiePersist, singleReclaimRequest, idleTimeThresholdForManualVerificationTrigger, sessionTimeoutForManualVerificationTrigger, attestorBrowserRpcUrl, isAIFlowEnabled, manualReviewMessage, loginPromptMessage) + val useTEE = pigeonVar_list[8] as Boolean? + val interceptorOptions = pigeonVar_list[9] as String? + val claimCreationTimeoutDurationInMins = pigeonVar_list[10] as Long? + val sessionNoActivityTimeoutDurationInMins = pigeonVar_list[11] as Long? + val aiProviderNoActivityTimeoutDurationInSecs = pigeonVar_list[12] as Long? + val pageLoadedCompletedDebounceTimeoutMs = pigeonVar_list[13] as Long? + val potentialLoginTimeoutS = pigeonVar_list[14] as Long? + val screenshotCaptureIntervalSeconds = pigeonVar_list[15] as Long? + val teeUrls = pigeonVar_list[16] as String? + return ClientFeatureOverrides(cookiePersist, singleReclaimRequest, attestorBrowserRpcUrl, idleTimeThresholdForManualVerificationTrigger, sessionTimeoutForManualVerificationTrigger, isAIFlowEnabled, manualReviewMessage, loginPromptMessage, useTEE, interceptorOptions, claimCreationTimeoutDurationInMins, sessionNoActivityTimeoutDurationInMins, aiProviderNoActivityTimeoutDurationInSecs, pageLoadedCompletedDebounceTimeoutMs, potentialLoginTimeoutS, screenshotCaptureIntervalSeconds, teeUrls) } } fun toList(): List { return listOf( cookiePersist, singleReclaimRequest, + attestorBrowserRpcUrl, idleTimeThresholdForManualVerificationTrigger, sessionTimeoutForManualVerificationTrigger, - attestorBrowserRpcUrl, isAIFlowEnabled, manualReviewMessage, loginPromptMessage, + useTEE, + interceptorOptions, + claimCreationTimeoutDurationInMins, + sessionNoActivityTimeoutDurationInMins, + aiProviderNoActivityTimeoutDurationInSecs, + pageLoadedCompletedDebounceTimeoutMs, + potentialLoginTimeoutS, + screenshotCaptureIntervalSeconds, + teeUrls, ) } override fun equals(other: Any?): Boolean { @@ -492,7 +519,22 @@ data class ReclaimApiVerificationOptions ( * Whether the close button is visible. * Defaults to true. */ - val isCloseButtonVisible: Boolean + val isCloseButtonVisible: Boolean, + /** A language code & Country code for localization that should be enforced in the verification flow. */ + val locale: String? = null, + /** + * Enables use of Reclaim's TEE+MPC protocol for HTTP Request claim verification and + * attestation. + * + * When set to `true`, the verification will use Trusted Execution Environment + * (TEE) with Multi-Party Computation (MPC) for enhanced security. + * + * When set to `false`, the standard Reclaim's proxy attestor verification flow is used. + * + * When `null` (default), the backend decides whether to use TEE based on + * a feature flag (currently in staged rollout). + */ + val useTeeOperator: Boolean? = null ) { companion object { @@ -502,7 +544,9 @@ data class ReclaimApiVerificationOptions ( val claimCreationType = pigeonVar_list[2] as ClaimCreationTypeApi val canAutoSubmit = pigeonVar_list[3] as Boolean val isCloseButtonVisible = pigeonVar_list[4] as Boolean - return ReclaimApiVerificationOptions(canDeleteCookiesBeforeVerificationStarts, canUseAttestorAuthenticationRequest, claimCreationType, canAutoSubmit, isCloseButtonVisible) + val locale = pigeonVar_list[5] as String? + val useTeeOperator = pigeonVar_list[6] as Boolean? + return ReclaimApiVerificationOptions(canDeleteCookiesBeforeVerificationStarts, canUseAttestorAuthenticationRequest, claimCreationType, canAutoSubmit, isCloseButtonVisible, locale, useTeeOperator) } } fun toList(): List { @@ -512,6 +556,8 @@ data class ReclaimApiVerificationOptions ( claimCreationType, canAutoSubmit, isCloseButtonVisible, + locale, + useTeeOperator, ) } override fun equals(other: Any?): Boolean { @@ -723,15 +769,15 @@ private open class MessagesPigeonCodec : StandardMessageCodec() { when (value) { is ReclaimApiVerificationExceptionType -> { stream.write(129) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is ReclaimSessionStatus -> { stream.write(130) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is ClaimCreationTypeApi -> { stream.write(131) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is ReclaimApiVerificationRequest -> { stream.write(132) diff --git a/generated/ios/Sources/ReclaimInAppSdk/Messages.h b/generated/ios/Sources/ReclaimInAppSdk/Messages.h index 7bb7d28..76804d8 100644 --- a/generated/ios/Sources/ReclaimInAppSdk/Messages.h +++ b/generated/ios/Sources/ReclaimInAppSdk/Messages.h @@ -1,5 +1,5 @@ // Copyright 2025, Reclaim Protocol. Use of this source code is governed by a license that can be found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon #import @@ -130,20 +130,38 @@ typedef NS_ENUM(NSUInteger, ClaimCreationTypeApi) { @interface ClientFeatureOverrides : NSObject + (instancetype)makeWithCookiePersist:(nullable NSNumber *)cookiePersist singleReclaimRequest:(nullable NSNumber *)singleReclaimRequest + attestorBrowserRpcUrl:(nullable NSString *)attestorBrowserRpcUrl idleTimeThresholdForManualVerificationTrigger:(nullable NSNumber *)idleTimeThresholdForManualVerificationTrigger sessionTimeoutForManualVerificationTrigger:(nullable NSNumber *)sessionTimeoutForManualVerificationTrigger - attestorBrowserRpcUrl:(nullable NSString *)attestorBrowserRpcUrl isAIFlowEnabled:(nullable NSNumber *)isAIFlowEnabled manualReviewMessage:(nullable NSString *)manualReviewMessage - loginPromptMessage:(nullable NSString *)loginPromptMessage; + loginPromptMessage:(nullable NSString *)loginPromptMessage + useTEE:(nullable NSNumber *)useTEE + interceptorOptions:(nullable NSString *)interceptorOptions + claimCreationTimeoutDurationInMins:(nullable NSNumber *)claimCreationTimeoutDurationInMins + sessionNoActivityTimeoutDurationInMins:(nullable NSNumber *)sessionNoActivityTimeoutDurationInMins + aiProviderNoActivityTimeoutDurationInSecs:(nullable NSNumber *)aiProviderNoActivityTimeoutDurationInSecs + pageLoadedCompletedDebounceTimeoutMs:(nullable NSNumber *)pageLoadedCompletedDebounceTimeoutMs + potentialLoginTimeoutS:(nullable NSNumber *)potentialLoginTimeoutS + screenshotCaptureIntervalSeconds:(nullable NSNumber *)screenshotCaptureIntervalSeconds + teeUrls:(nullable NSString *)teeUrls; @property(nonatomic, strong, nullable) NSNumber * cookiePersist; @property(nonatomic, strong, nullable) NSNumber * singleReclaimRequest; +@property(nonatomic, copy, nullable) NSString * attestorBrowserRpcUrl; @property(nonatomic, strong, nullable) NSNumber * idleTimeThresholdForManualVerificationTrigger; @property(nonatomic, strong, nullable) NSNumber * sessionTimeoutForManualVerificationTrigger; -@property(nonatomic, copy, nullable) NSString * attestorBrowserRpcUrl; @property(nonatomic, strong, nullable) NSNumber * isAIFlowEnabled; @property(nonatomic, copy, nullable) NSString * manualReviewMessage; @property(nonatomic, copy, nullable) NSString * loginPromptMessage; +@property(nonatomic, strong, nullable) NSNumber * useTEE; +@property(nonatomic, copy, nullable) NSString * interceptorOptions; +@property(nonatomic, strong, nullable) NSNumber * claimCreationTimeoutDurationInMins; +@property(nonatomic, strong, nullable) NSNumber * sessionNoActivityTimeoutDurationInMins; +@property(nonatomic, strong, nullable) NSNumber * aiProviderNoActivityTimeoutDurationInSecs; +@property(nonatomic, strong, nullable) NSNumber * pageLoadedCompletedDebounceTimeoutMs; +@property(nonatomic, strong, nullable) NSNumber * potentialLoginTimeoutS; +@property(nonatomic, strong, nullable) NSNumber * screenshotCaptureIntervalSeconds; +@property(nonatomic, copy, nullable) NSString * teeUrls; @end @interface ClientLogConsumerOverride : NSObject @@ -197,7 +215,9 @@ typedef NS_ENUM(NSUInteger, ClaimCreationTypeApi) { canUseAttestorAuthenticationRequest:(BOOL )canUseAttestorAuthenticationRequest claimCreationType:(ClaimCreationTypeApi)claimCreationType canAutoSubmit:(BOOL )canAutoSubmit - isCloseButtonVisible:(BOOL )isCloseButtonVisible; + isCloseButtonVisible:(BOOL )isCloseButtonVisible + locale:(nullable NSString *)locale + useTeeOperator:(nullable NSNumber *)useTeeOperator; /// Whether to delete cookies before user journey starts in the client web view. /// Defaults to true. @property(nonatomic, assign) BOOL canDeleteCookiesBeforeVerificationStarts; @@ -212,6 +232,19 @@ typedef NS_ENUM(NSUInteger, ClaimCreationTypeApi) { /// Whether the close button is visible. /// Defaults to true. @property(nonatomic, assign) BOOL isCloseButtonVisible; +/// A language code & Country code for localization that should be enforced in the verification flow. +@property(nonatomic, copy, nullable) NSString * locale; +/// Enables use of Reclaim's TEE+MPC protocol for HTTP Request claim verification and +/// attestation. +/// +/// When set to `true`, the verification will use Trusted Execution Environment +/// (TEE) with Multi-Party Computation (MPC) for enhanced security. +/// +/// When set to `false`, the standard Reclaim's proxy attestor verification flow is used. +/// +/// When `null` (default), the backend decides whether to use TEE based on +/// a feature flag (currently in staged rollout). +@property(nonatomic, strong, nullable) NSNumber * useTeeOperator; @end @interface ProviderVersionApi : NSObject diff --git a/generated/ios/Sources/ReclaimInAppSdk/Messages.m b/generated/ios/Sources/ReclaimInAppSdk/Messages.m index 0768d1b..5e248f3 100644 --- a/generated/ios/Sources/ReclaimInAppSdk/Messages.m +++ b/generated/ios/Sources/ReclaimInAppSdk/Messages.m @@ -1,5 +1,5 @@ // Copyright 2025, Reclaim Protocol. Use of this source code is governed by a license that can be found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "Messages.h" @@ -288,33 +288,60 @@ + (nullable ClientProviderInformationOverride *)nullableFromList:(NSArray *) @implementation ClientFeatureOverrides + (instancetype)makeWithCookiePersist:(nullable NSNumber *)cookiePersist singleReclaimRequest:(nullable NSNumber *)singleReclaimRequest + attestorBrowserRpcUrl:(nullable NSString *)attestorBrowserRpcUrl idleTimeThresholdForManualVerificationTrigger:(nullable NSNumber *)idleTimeThresholdForManualVerificationTrigger sessionTimeoutForManualVerificationTrigger:(nullable NSNumber *)sessionTimeoutForManualVerificationTrigger - attestorBrowserRpcUrl:(nullable NSString *)attestorBrowserRpcUrl isAIFlowEnabled:(nullable NSNumber *)isAIFlowEnabled manualReviewMessage:(nullable NSString *)manualReviewMessage - loginPromptMessage:(nullable NSString *)loginPromptMessage { + loginPromptMessage:(nullable NSString *)loginPromptMessage + useTEE:(nullable NSNumber *)useTEE + interceptorOptions:(nullable NSString *)interceptorOptions + claimCreationTimeoutDurationInMins:(nullable NSNumber *)claimCreationTimeoutDurationInMins + sessionNoActivityTimeoutDurationInMins:(nullable NSNumber *)sessionNoActivityTimeoutDurationInMins + aiProviderNoActivityTimeoutDurationInSecs:(nullable NSNumber *)aiProviderNoActivityTimeoutDurationInSecs + pageLoadedCompletedDebounceTimeoutMs:(nullable NSNumber *)pageLoadedCompletedDebounceTimeoutMs + potentialLoginTimeoutS:(nullable NSNumber *)potentialLoginTimeoutS + screenshotCaptureIntervalSeconds:(nullable NSNumber *)screenshotCaptureIntervalSeconds + teeUrls:(nullable NSString *)teeUrls { ClientFeatureOverrides* pigeonResult = [[ClientFeatureOverrides alloc] init]; pigeonResult.cookiePersist = cookiePersist; pigeonResult.singleReclaimRequest = singleReclaimRequest; + pigeonResult.attestorBrowserRpcUrl = attestorBrowserRpcUrl; pigeonResult.idleTimeThresholdForManualVerificationTrigger = idleTimeThresholdForManualVerificationTrigger; pigeonResult.sessionTimeoutForManualVerificationTrigger = sessionTimeoutForManualVerificationTrigger; - pigeonResult.attestorBrowserRpcUrl = attestorBrowserRpcUrl; pigeonResult.isAIFlowEnabled = isAIFlowEnabled; pigeonResult.manualReviewMessage = manualReviewMessage; pigeonResult.loginPromptMessage = loginPromptMessage; + pigeonResult.useTEE = useTEE; + pigeonResult.interceptorOptions = interceptorOptions; + pigeonResult.claimCreationTimeoutDurationInMins = claimCreationTimeoutDurationInMins; + pigeonResult.sessionNoActivityTimeoutDurationInMins = sessionNoActivityTimeoutDurationInMins; + pigeonResult.aiProviderNoActivityTimeoutDurationInSecs = aiProviderNoActivityTimeoutDurationInSecs; + pigeonResult.pageLoadedCompletedDebounceTimeoutMs = pageLoadedCompletedDebounceTimeoutMs; + pigeonResult.potentialLoginTimeoutS = potentialLoginTimeoutS; + pigeonResult.screenshotCaptureIntervalSeconds = screenshotCaptureIntervalSeconds; + pigeonResult.teeUrls = teeUrls; return pigeonResult; } + (ClientFeatureOverrides *)fromList:(NSArray *)list { ClientFeatureOverrides *pigeonResult = [[ClientFeatureOverrides alloc] init]; pigeonResult.cookiePersist = GetNullableObjectAtIndex(list, 0); pigeonResult.singleReclaimRequest = GetNullableObjectAtIndex(list, 1); - pigeonResult.idleTimeThresholdForManualVerificationTrigger = GetNullableObjectAtIndex(list, 2); - pigeonResult.sessionTimeoutForManualVerificationTrigger = GetNullableObjectAtIndex(list, 3); - pigeonResult.attestorBrowserRpcUrl = GetNullableObjectAtIndex(list, 4); + pigeonResult.attestorBrowserRpcUrl = GetNullableObjectAtIndex(list, 2); + pigeonResult.idleTimeThresholdForManualVerificationTrigger = GetNullableObjectAtIndex(list, 3); + pigeonResult.sessionTimeoutForManualVerificationTrigger = GetNullableObjectAtIndex(list, 4); pigeonResult.isAIFlowEnabled = GetNullableObjectAtIndex(list, 5); pigeonResult.manualReviewMessage = GetNullableObjectAtIndex(list, 6); pigeonResult.loginPromptMessage = GetNullableObjectAtIndex(list, 7); + pigeonResult.useTEE = GetNullableObjectAtIndex(list, 8); + pigeonResult.interceptorOptions = GetNullableObjectAtIndex(list, 9); + pigeonResult.claimCreationTimeoutDurationInMins = GetNullableObjectAtIndex(list, 10); + pigeonResult.sessionNoActivityTimeoutDurationInMins = GetNullableObjectAtIndex(list, 11); + pigeonResult.aiProviderNoActivityTimeoutDurationInSecs = GetNullableObjectAtIndex(list, 12); + pigeonResult.pageLoadedCompletedDebounceTimeoutMs = GetNullableObjectAtIndex(list, 13); + pigeonResult.potentialLoginTimeoutS = GetNullableObjectAtIndex(list, 14); + pigeonResult.screenshotCaptureIntervalSeconds = GetNullableObjectAtIndex(list, 15); + pigeonResult.teeUrls = GetNullableObjectAtIndex(list, 16); return pigeonResult; } + (nullable ClientFeatureOverrides *)nullableFromList:(NSArray *)list { @@ -324,12 +351,21 @@ + (nullable ClientFeatureOverrides *)nullableFromList:(NSArray *)list { return @[ self.cookiePersist ?: [NSNull null], self.singleReclaimRequest ?: [NSNull null], + self.attestorBrowserRpcUrl ?: [NSNull null], self.idleTimeThresholdForManualVerificationTrigger ?: [NSNull null], self.sessionTimeoutForManualVerificationTrigger ?: [NSNull null], - self.attestorBrowserRpcUrl ?: [NSNull null], self.isAIFlowEnabled ?: [NSNull null], self.manualReviewMessage ?: [NSNull null], self.loginPromptMessage ?: [NSNull null], + self.useTEE ?: [NSNull null], + self.interceptorOptions ?: [NSNull null], + self.claimCreationTimeoutDurationInMins ?: [NSNull null], + self.sessionNoActivityTimeoutDurationInMins ?: [NSNull null], + self.aiProviderNoActivityTimeoutDurationInSecs ?: [NSNull null], + self.pageLoadedCompletedDebounceTimeoutMs ?: [NSNull null], + self.potentialLoginTimeoutS ?: [NSNull null], + self.screenshotCaptureIntervalSeconds ?: [NSNull null], + self.teeUrls ?: [NSNull null], ]; } @end @@ -447,13 +483,17 @@ + (instancetype)makeWithCanDeleteCookiesBeforeVerificationStarts:(BOOL )canDelet canUseAttestorAuthenticationRequest:(BOOL )canUseAttestorAuthenticationRequest claimCreationType:(ClaimCreationTypeApi)claimCreationType canAutoSubmit:(BOOL )canAutoSubmit - isCloseButtonVisible:(BOOL )isCloseButtonVisible { + isCloseButtonVisible:(BOOL )isCloseButtonVisible + locale:(nullable NSString *)locale + useTeeOperator:(nullable NSNumber *)useTeeOperator { ReclaimApiVerificationOptions* pigeonResult = [[ReclaimApiVerificationOptions alloc] init]; pigeonResult.canDeleteCookiesBeforeVerificationStarts = canDeleteCookiesBeforeVerificationStarts; pigeonResult.canUseAttestorAuthenticationRequest = canUseAttestorAuthenticationRequest; pigeonResult.claimCreationType = claimCreationType; pigeonResult.canAutoSubmit = canAutoSubmit; pigeonResult.isCloseButtonVisible = isCloseButtonVisible; + pigeonResult.locale = locale; + pigeonResult.useTeeOperator = useTeeOperator; return pigeonResult; } + (ReclaimApiVerificationOptions *)fromList:(NSArray *)list { @@ -464,6 +504,8 @@ + (ReclaimApiVerificationOptions *)fromList:(NSArray *)list { pigeonResult.claimCreationType = boxedClaimCreationTypeApi.value; pigeonResult.canAutoSubmit = [GetNullableObjectAtIndex(list, 3) boolValue]; pigeonResult.isCloseButtonVisible = [GetNullableObjectAtIndex(list, 4) boolValue]; + pigeonResult.locale = GetNullableObjectAtIndex(list, 5); + pigeonResult.useTeeOperator = GetNullableObjectAtIndex(list, 6); return pigeonResult; } + (nullable ReclaimApiVerificationOptions *)nullableFromList:(NSArray *)list { @@ -476,6 +518,8 @@ + (nullable ReclaimApiVerificationOptions *)nullableFromList:(NSArray *)list [[ClaimCreationTypeApiBox alloc] initWithValue:self.claimCreationType], @(self.canAutoSubmit), @(self.isCloseButtonVisible), + self.locale ?: [NSNull null], + self.useTeeOperator ?: [NSNull null], ]; } @end diff --git a/generated/ios/Sources/ReclaimInAppSdk/Messages.swift b/generated/ios/Sources/ReclaimInAppSdk/Messages.swift index 3648098..96d64b0 100644 --- a/generated/ios/Sources/ReclaimInAppSdk/Messages.swift +++ b/generated/ios/Sources/ReclaimInAppSdk/Messages.swift @@ -1,5 +1,5 @@ // Copyright 2025, Reclaim Protocol. Use of this source code is governed by a license that can be found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation @@ -325,46 +325,82 @@ struct ClientProviderInformationOverride: Hashable { struct ClientFeatureOverrides: Hashable { var cookiePersist: Bool? = nil var singleReclaimRequest: Bool? = nil + var attestorBrowserRpcUrl: String? = nil var idleTimeThresholdForManualVerificationTrigger: Int64? = nil var sessionTimeoutForManualVerificationTrigger: Int64? = nil - var attestorBrowserRpcUrl: String? = nil var isAIFlowEnabled: Bool? = nil var manualReviewMessage: String? = nil var loginPromptMessage: String? = nil + var useTEE: Bool? = nil + var interceptorOptions: String? = nil + var claimCreationTimeoutDurationInMins: Int64? = nil + var sessionNoActivityTimeoutDurationInMins: Int64? = nil + var aiProviderNoActivityTimeoutDurationInSecs: Int64? = nil + var pageLoadedCompletedDebounceTimeoutMs: Int64? = nil + var potentialLoginTimeoutS: Int64? = nil + var screenshotCaptureIntervalSeconds: Int64? = nil + var teeUrls: String? = nil // swift-format-ignore: AlwaysUseLowerCamelCase static func fromList(_ pigeonVar_list: [Any?]) -> ClientFeatureOverrides? { let cookiePersist: Bool? = nilOrValue(pigeonVar_list[0]) let singleReclaimRequest: Bool? = nilOrValue(pigeonVar_list[1]) - let idleTimeThresholdForManualVerificationTrigger: Int64? = nilOrValue(pigeonVar_list[2]) - let sessionTimeoutForManualVerificationTrigger: Int64? = nilOrValue(pigeonVar_list[3]) - let attestorBrowserRpcUrl: String? = nilOrValue(pigeonVar_list[4]) + let attestorBrowserRpcUrl: String? = nilOrValue(pigeonVar_list[2]) + let idleTimeThresholdForManualVerificationTrigger: Int64? = nilOrValue(pigeonVar_list[3]) + let sessionTimeoutForManualVerificationTrigger: Int64? = nilOrValue(pigeonVar_list[4]) let isAIFlowEnabled: Bool? = nilOrValue(pigeonVar_list[5]) let manualReviewMessage: String? = nilOrValue(pigeonVar_list[6]) let loginPromptMessage: String? = nilOrValue(pigeonVar_list[7]) + let useTEE: Bool? = nilOrValue(pigeonVar_list[8]) + let interceptorOptions: String? = nilOrValue(pigeonVar_list[9]) + let claimCreationTimeoutDurationInMins: Int64? = nilOrValue(pigeonVar_list[10]) + let sessionNoActivityTimeoutDurationInMins: Int64? = nilOrValue(pigeonVar_list[11]) + let aiProviderNoActivityTimeoutDurationInSecs: Int64? = nilOrValue(pigeonVar_list[12]) + let pageLoadedCompletedDebounceTimeoutMs: Int64? = nilOrValue(pigeonVar_list[13]) + let potentialLoginTimeoutS: Int64? = nilOrValue(pigeonVar_list[14]) + let screenshotCaptureIntervalSeconds: Int64? = nilOrValue(pigeonVar_list[15]) + let teeUrls: String? = nilOrValue(pigeonVar_list[16]) return ClientFeatureOverrides( cookiePersist: cookiePersist, singleReclaimRequest: singleReclaimRequest, + attestorBrowserRpcUrl: attestorBrowserRpcUrl, idleTimeThresholdForManualVerificationTrigger: idleTimeThresholdForManualVerificationTrigger, sessionTimeoutForManualVerificationTrigger: sessionTimeoutForManualVerificationTrigger, - attestorBrowserRpcUrl: attestorBrowserRpcUrl, isAIFlowEnabled: isAIFlowEnabled, manualReviewMessage: manualReviewMessage, - loginPromptMessage: loginPromptMessage + loginPromptMessage: loginPromptMessage, + useTEE: useTEE, + interceptorOptions: interceptorOptions, + claimCreationTimeoutDurationInMins: claimCreationTimeoutDurationInMins, + sessionNoActivityTimeoutDurationInMins: sessionNoActivityTimeoutDurationInMins, + aiProviderNoActivityTimeoutDurationInSecs: aiProviderNoActivityTimeoutDurationInSecs, + pageLoadedCompletedDebounceTimeoutMs: pageLoadedCompletedDebounceTimeoutMs, + potentialLoginTimeoutS: potentialLoginTimeoutS, + screenshotCaptureIntervalSeconds: screenshotCaptureIntervalSeconds, + teeUrls: teeUrls ) } func toList() -> [Any?] { return [ cookiePersist, singleReclaimRequest, + attestorBrowserRpcUrl, idleTimeThresholdForManualVerificationTrigger, sessionTimeoutForManualVerificationTrigger, - attestorBrowserRpcUrl, isAIFlowEnabled, manualReviewMessage, loginPromptMessage, + useTEE, + interceptorOptions, + claimCreationTimeoutDurationInMins, + sessionNoActivityTimeoutDurationInMins, + aiProviderNoActivityTimeoutDurationInSecs, + pageLoadedCompletedDebounceTimeoutMs, + potentialLoginTimeoutS, + screenshotCaptureIntervalSeconds, + teeUrls, ] } static func == (lhs: ClientFeatureOverrides, rhs: ClientFeatureOverrides) -> Bool { @@ -519,6 +555,19 @@ struct ReclaimApiVerificationOptions: Hashable { /// Whether the close button is visible. /// Defaults to true. var isCloseButtonVisible: Bool + /// A language code & Country code for localization that should be enforced in the verification flow. + var locale: String? = nil + /// Enables use of Reclaim's TEE+MPC protocol for HTTP Request claim verification and + /// attestation. + /// + /// When set to `true`, the verification will use Trusted Execution Environment + /// (TEE) with Multi-Party Computation (MPC) for enhanced security. + /// + /// When set to `false`, the standard Reclaim's proxy attestor verification flow is used. + /// + /// When `null` (default), the backend decides whether to use TEE based on + /// a feature flag (currently in staged rollout). + var useTeeOperator: Bool? = nil // swift-format-ignore: AlwaysUseLowerCamelCase @@ -528,13 +577,17 @@ struct ReclaimApiVerificationOptions: Hashable { let claimCreationType = pigeonVar_list[2] as! ClaimCreationTypeApi let canAutoSubmit = pigeonVar_list[3] as! Bool let isCloseButtonVisible = pigeonVar_list[4] as! Bool + let locale: String? = nilOrValue(pigeonVar_list[5]) + let useTeeOperator: Bool? = nilOrValue(pigeonVar_list[6]) return ReclaimApiVerificationOptions( canDeleteCookiesBeforeVerificationStarts: canDeleteCookiesBeforeVerificationStarts, canUseAttestorAuthenticationRequest: canUseAttestorAuthenticationRequest, claimCreationType: claimCreationType, canAutoSubmit: canAutoSubmit, - isCloseButtonVisible: isCloseButtonVisible + isCloseButtonVisible: isCloseButtonVisible, + locale: locale, + useTeeOperator: useTeeOperator ) } func toList() -> [Any?] { @@ -544,6 +597,8 @@ struct ReclaimApiVerificationOptions: Hashable { claimCreationType, canAutoSubmit, isCloseButtonVisible, + locale, + useTeeOperator, ] } static func == (lhs: ReclaimApiVerificationOptions, rhs: ReclaimApiVerificationOptions) -> Bool { diff --git a/lib/reclaim_verifier_module.dart b/lib/reclaim_verifier_module.dart index c9ec969..9d58dc1 100644 --- a/lib/reclaim_verifier_module.dart +++ b/lib/reclaim_verifier_module.dart @@ -4,14 +4,14 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:logging/logging.dart'; -import 'package:reclaim_gnark_zkoperator/reclaim_gnark_zkoperator.dart'; -// ignore: implementation_imports -import 'package:reclaim_gnark_zkoperator/src/download/download.dart' show downloadWithHttp; import 'package:reclaim_inapp_sdk/capability_access.dart'; import 'package:reclaim_inapp_sdk/logging.dart'; import 'package:reclaim_inapp_sdk/overrides.dart'; import 'package:reclaim_inapp_sdk/reclaim_inapp_sdk.dart'; import 'package:reclaim_inapp_sdk/ui.dart'; +import 'package:reclaim_tee_operator_flutter/reclaim_tee_operator_flutter.dart'; +// ignore: implementation_imports +import 'package:reclaim_tee_operator_flutter/src/common/download/download.dart' show downloadWithHttp; import 'src/pigeon/messages.pigeon.dart'; @@ -20,6 +20,7 @@ export 'package:reclaim_inapp_sdk/logging.dart'; export 'package:reclaim_inapp_sdk/overrides.dart'; export 'package:reclaim_inapp_sdk/reclaim_inapp_sdk.dart'; export 'package:reclaim_inapp_sdk/ui.dart'; + export 'src/pigeon/messages.pigeon.dart'; final logger = Logger('reclaim_flutter_sdk.reclaim_verifier_module'); @@ -450,14 +451,15 @@ class ReclaimModuleAppState extends State implements ReclaimMo canUseAiFlow: feature.isAIFlowEnabled ?? false, manualReviewMessage: feature.manualReviewMessage, loginPromptMessage: feature.loginPromptMessage, - // TODO: UNIMPLEMENTED - interceptorOptions: null, - claimCreationTimeoutDurationInMins: null, - sessionNoActivityTimeoutDurationInMins: null, - aiProviderNoActivityTimeoutDurationInSecs: null, - pageLoadedCompletedDebounceTimeoutMs: null, - potentialLoginTimeoutS: null, - screenshotCaptureIntervalSeconds: null, + useTEE: feature.useTEE, + interceptorOptions: feature.interceptorOptions, + claimCreationTimeoutDurationInMins: feature.claimCreationTimeoutDurationInMins, + sessionNoActivityTimeoutDurationInMins: feature.sessionNoActivityTimeoutDurationInMins, + aiProviderNoActivityTimeoutDurationInSecs: feature.aiProviderNoActivityTimeoutDurationInSecs, + pageLoadedCompletedDebounceTimeoutMs: feature.pageLoadedCompletedDebounceTimeoutMs, + potentialLoginTimeoutS: feature.potentialLoginTimeoutS, + screenshotCaptureIntervalSeconds: feature.screenshotCaptureIntervalSeconds, + teeUrls: feature.teeUrls, ), if (provider != null) ReclaimProviderOverride( @@ -587,18 +589,24 @@ class ReclaimModuleAppState extends State implements ReclaimMo } else { log.info({ 'reason': 'Setting verification options', + 'canAutoSubmit': options.canAutoSubmit, 'canDeleteCookiesBeforeVerificationStarts': options.canDeleteCookiesBeforeVerificationStarts, 'canUseAttestorAuthenticationRequest': options.canUseAttestorAuthenticationRequest, 'claimCreationType': options.claimCreationType, + 'isCloseButtonVisible': options.isCloseButtonVisible, + 'locale': options.locale, + 'useTeeOperator': options.useTeeOperator, }); _reclaimVerificationOptions = _reclaimVerificationOptions.copyWith( canAutoSubmit: options.canAutoSubmit, - isCloseButtonVisible: options.isCloseButtonVisible, - claimCreationType: options.claimCreationType.toClaimCreationType, canClearWebStorage: options.canDeleteCookiesBeforeVerificationStarts, attestorAuthenticationRequest: options.canUseAttestorAuthenticationRequest ? _requestAttestorAuthenticationRequestFromHost : null, + claimCreationType: options.claimCreationType.toClaimCreationType, + isCloseButtonVisible: options.isCloseButtonVisible, + locale: options.locale, + useTeeOperator: options.useTeeOperator, ); } } diff --git a/lib/src/pigeon/messages.pigeon.dart b/lib/src/pigeon/messages.pigeon.dart index 791c9a6..dc73c33 100644 --- a/lib/src/pigeon/messages.pigeon.dart +++ b/lib/src/pigeon/messages.pigeon.dart @@ -1,7 +1,7 @@ // Copyright 2025, Reclaim Protocol. Use of this source code is governed by a license that can be found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; @@ -25,21 +25,21 @@ List wrapResponse({Object? result, PlatformException? error, bool empty } return [error.code, error.message, error.details]; } + bool _deepEquals(Object? a, Object? b) { if (a is List && b is List) { - return a.length == b.length && - a.indexed - .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); + return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); } if (a is Map && b is Map) { - return a.length == b.length && a.entries.every((MapEntry entry) => - (b as Map).containsKey(entry.key) && - _deepEquals(entry.value, b[entry.key])); + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && _deepEquals(entry.value, b[entry.key]), + ); } return a == b; } - enum ReclaimApiVerificationExceptionType { unknown, sessionExpired, @@ -61,10 +61,7 @@ enum ReclaimSessionStatus { AI_PROOF_SUBMITTED, } -enum ClaimCreationTypeApi { - standalone, - meChain, -} +enum ClaimCreationTypeApi { standalone, meChain } class ReclaimApiVerificationRequest { ReclaimApiVerificationRequest({ @@ -98,21 +95,12 @@ class ReclaimApiVerificationRequest { ProviderVersionApi? providerVersion; List _toList() { - return [ - appId, - providerId, - secret, - signature, - timestamp, - context, - sessionId, - parameters, - providerVersion, - ]; + return [appId, providerId, secret, signature, timestamp, context, sessionId, parameters, providerVersion]; } Object encode() { - return _toList(); } + return _toList(); + } static ReclaimApiVerificationRequest decode(Object result) { result as List; @@ -143,16 +131,11 @@ class ReclaimApiVerificationRequest { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } class ReclaimApiVerificationException { - ReclaimApiVerificationException({ - required this.message, - required this.stackTraceAsString, - required this.type, - }); + ReclaimApiVerificationException({required this.message, required this.stackTraceAsString, required this.type}); String message; @@ -161,15 +144,12 @@ class ReclaimApiVerificationException { ReclaimApiVerificationExceptionType type; List _toList() { - return [ - message, - stackTraceAsString, - type, - ]; + return [message, stackTraceAsString, type]; } Object encode() { - return _toList(); } + return _toList(); + } static ReclaimApiVerificationException decode(Object result) { result as List; @@ -194,8 +174,7 @@ class ReclaimApiVerificationException { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } class ReclaimApiVerificationResponse { @@ -215,16 +194,12 @@ class ReclaimApiVerificationResponse { ReclaimApiVerificationException? exception; List _toList() { - return [ - sessionId, - didSubmitManualVerification, - proofs, - exception, - ]; + return [sessionId, didSubmitManualVerification, proofs, exception]; } Object encode() { - return _toList(); } + return _toList(); + } static ReclaimApiVerificationResponse decode(Object result) { result as List; @@ -250,8 +225,7 @@ class ReclaimApiVerificationResponse { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } class ClientProviderInformationOverride { @@ -268,15 +242,12 @@ class ClientProviderInformationOverride { bool canFetchProviderInformationFromHost; List _toList() { - return [ - providerInformationUrl, - providerInformationJsonString, - canFetchProviderInformationFromHost, - ]; + return [providerInformationUrl, providerInformationJsonString, canFetchProviderInformationFromHost]; } Object encode() { - return _toList(); } + return _toList(); + } static ClientProviderInformationOverride decode(Object result) { result as List; @@ -301,65 +272,110 @@ class ClientProviderInformationOverride { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } class ClientFeatureOverrides { ClientFeatureOverrides({ this.cookiePersist, this.singleReclaimRequest, + this.attestorBrowserRpcUrl, this.idleTimeThresholdForManualVerificationTrigger, this.sessionTimeoutForManualVerificationTrigger, - this.attestorBrowserRpcUrl, this.isAIFlowEnabled, this.manualReviewMessage, this.loginPromptMessage, + this.useTEE, + this.interceptorOptions, + this.claimCreationTimeoutDurationInMins, + this.sessionNoActivityTimeoutDurationInMins, + this.aiProviderNoActivityTimeoutDurationInSecs, + this.pageLoadedCompletedDebounceTimeoutMs, + this.potentialLoginTimeoutS, + this.screenshotCaptureIntervalSeconds, + this.teeUrls, }); bool? cookiePersist; bool? singleReclaimRequest; + String? attestorBrowserRpcUrl; + int? idleTimeThresholdForManualVerificationTrigger; int? sessionTimeoutForManualVerificationTrigger; - String? attestorBrowserRpcUrl; - bool? isAIFlowEnabled; String? manualReviewMessage; String? loginPromptMessage; + bool? useTEE; + + String? interceptorOptions; + + int? claimCreationTimeoutDurationInMins; + + int? sessionNoActivityTimeoutDurationInMins; + + int? aiProviderNoActivityTimeoutDurationInSecs; + + int? pageLoadedCompletedDebounceTimeoutMs; + + int? potentialLoginTimeoutS; + + int? screenshotCaptureIntervalSeconds; + + String? teeUrls; + List _toList() { return [ cookiePersist, singleReclaimRequest, + attestorBrowserRpcUrl, idleTimeThresholdForManualVerificationTrigger, sessionTimeoutForManualVerificationTrigger, - attestorBrowserRpcUrl, isAIFlowEnabled, manualReviewMessage, loginPromptMessage, + useTEE, + interceptorOptions, + claimCreationTimeoutDurationInMins, + sessionNoActivityTimeoutDurationInMins, + aiProviderNoActivityTimeoutDurationInSecs, + pageLoadedCompletedDebounceTimeoutMs, + potentialLoginTimeoutS, + screenshotCaptureIntervalSeconds, + teeUrls, ]; } Object encode() { - return _toList(); } + return _toList(); + } static ClientFeatureOverrides decode(Object result) { result as List; return ClientFeatureOverrides( cookiePersist: result[0] as bool?, singleReclaimRequest: result[1] as bool?, - idleTimeThresholdForManualVerificationTrigger: result[2] as int?, - sessionTimeoutForManualVerificationTrigger: result[3] as int?, - attestorBrowserRpcUrl: result[4] as String?, + attestorBrowserRpcUrl: result[2] as String?, + idleTimeThresholdForManualVerificationTrigger: result[3] as int?, + sessionTimeoutForManualVerificationTrigger: result[4] as int?, isAIFlowEnabled: result[5] as bool?, manualReviewMessage: result[6] as String?, loginPromptMessage: result[7] as String?, + useTEE: result[8] as bool?, + interceptorOptions: result[9] as String?, + claimCreationTimeoutDurationInMins: result[10] as int?, + sessionNoActivityTimeoutDurationInMins: result[11] as int?, + aiProviderNoActivityTimeoutDurationInSecs: result[12] as int?, + pageLoadedCompletedDebounceTimeoutMs: result[13] as int?, + potentialLoginTimeoutS: result[14] as int?, + screenshotCaptureIntervalSeconds: result[15] as int?, + teeUrls: result[16] as String?, ); } @@ -377,8 +393,7 @@ class ClientFeatureOverrides { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } class ClientLogConsumerOverride { @@ -395,15 +410,12 @@ class ClientLogConsumerOverride { bool? canSdkPrintLogs; List _toList() { - return [ - enableLogHandler, - canSdkCollectTelemetry, - canSdkPrintLogs, - ]; + return [enableLogHandler, canSdkCollectTelemetry, canSdkPrintLogs]; } Object encode() { - return _toList(); } + return _toList(); + } static ClientLogConsumerOverride decode(Object result) { result as List; @@ -428,31 +440,25 @@ class ClientLogConsumerOverride { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } class ClientReclaimSessionManagementOverride { - ClientReclaimSessionManagementOverride({ - this.enableSdkSessionManagement = true, - }); + ClientReclaimSessionManagementOverride({this.enableSdkSessionManagement = true}); bool enableSdkSessionManagement; List _toList() { - return [ - enableSdkSessionManagement, - ]; + return [enableSdkSessionManagement]; } Object encode() { - return _toList(); } + return _toList(); + } static ClientReclaimSessionManagementOverride decode(Object result) { result as List; - return ClientReclaimSessionManagementOverride( - enableSdkSessionManagement: result[0]! as bool, - ); + return ClientReclaimSessionManagementOverride(enableSdkSessionManagement: result[0]! as bool); } @override @@ -469,16 +475,11 @@ class ClientReclaimSessionManagementOverride { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } class ClientReclaimAppInfoOverride { - ClientReclaimAppInfoOverride({ - required this.appName, - required this.appImageUrl, - required this.isRecurring, - }); + ClientReclaimAppInfoOverride({required this.appName, required this.appImageUrl, required this.isRecurring}); String appName; @@ -487,15 +488,12 @@ class ClientReclaimAppInfoOverride { bool isRecurring; List _toList() { - return [ - appName, - appImageUrl, - isRecurring, - ]; + return [appName, appImageUrl, isRecurring]; } Object encode() { - return _toList(); } + return _toList(); + } static ClientReclaimAppInfoOverride decode(Object result) { result as List; @@ -520,17 +518,12 @@ class ClientReclaimAppInfoOverride { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Identification information of a session. class ReclaimSessionIdentityUpdate { - ReclaimSessionIdentityUpdate({ - required this.appId, - required this.providerId, - required this.sessionId, - }); + ReclaimSessionIdentityUpdate({required this.appId, required this.providerId, required this.sessionId}); /// The application id. String appId; @@ -542,15 +535,12 @@ class ReclaimSessionIdentityUpdate { String sessionId; List _toList() { - return [ - appId, - providerId, - sessionId, - ]; + return [appId, providerId, sessionId]; } Object encode() { - return _toList(); } + return _toList(); + } static ReclaimSessionIdentityUpdate decode(Object result) { result as List; @@ -575,8 +565,7 @@ class ReclaimSessionIdentityUpdate { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } class ReclaimApiVerificationOptions { @@ -586,6 +575,8 @@ class ReclaimApiVerificationOptions { this.claimCreationType = ClaimCreationTypeApi.standalone, this.canAutoSubmit = true, this.isCloseButtonVisible = true, + this.locale, + this.useTeeOperator, }); /// Whether to delete cookies before user journey starts in the client web view. @@ -607,6 +598,21 @@ class ReclaimApiVerificationOptions { /// Defaults to true. bool isCloseButtonVisible; + /// A language code & Country code for localization that should be enforced in the verification flow. + String? locale; + + /// Enables use of Reclaim's TEE+MPC protocol for HTTP Request claim verification and + /// attestation. + /// + /// When set to `true`, the verification will use Trusted Execution Environment + /// (TEE) with Multi-Party Computation (MPC) for enhanced security. + /// + /// When set to `false`, the standard Reclaim's proxy attestor verification flow is used. + /// + /// When `null` (default), the backend decides whether to use TEE based on + /// a feature flag (currently in staged rollout). + bool? useTeeOperator; + List _toList() { return [ canDeleteCookiesBeforeVerificationStarts, @@ -614,11 +620,14 @@ class ReclaimApiVerificationOptions { claimCreationType, canAutoSubmit, isCloseButtonVisible, + locale, + useTeeOperator, ]; } Object encode() { - return _toList(); } + return _toList(); + } static ReclaimApiVerificationOptions decode(Object result) { result as List; @@ -628,6 +637,8 @@ class ReclaimApiVerificationOptions { claimCreationType: result[2]! as ClaimCreationTypeApi, canAutoSubmit: result[3]! as bool, isCloseButtonVisible: result[4]! as bool, + locale: result[5] as String?, + useTeeOperator: result[6] as bool?, ); } @@ -645,36 +656,27 @@ class ReclaimApiVerificationOptions { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } class ProviderVersionApi { - ProviderVersionApi({ - this.versionExpression, - this.resolvedVersion, - }); + ProviderVersionApi({this.versionExpression, this.resolvedVersion}); String? versionExpression; String? resolvedVersion; List _toList() { - return [ - versionExpression, - resolvedVersion, - ]; + return [versionExpression, resolvedVersion]; } Object encode() { - return _toList(); } + return _toList(); + } static ProviderVersionApi decode(Object result) { result as List; - return ProviderVersionApi( - versionExpression: result[0] as String?, - resolvedVersion: result[1] as String?, - ); + return ProviderVersionApi(versionExpression: result[0] as String?, resolvedVersion: result[1] as String?); } @override @@ -691,36 +693,27 @@ class ProviderVersionApi { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } class SessionInitResponseApi { - SessionInitResponseApi({ - required this.sessionId, - this.resolvedProviderVersion, - }); + SessionInitResponseApi({required this.sessionId, this.resolvedProviderVersion}); String sessionId; String? resolvedProviderVersion; List _toList() { - return [ - sessionId, - resolvedProviderVersion, - ]; + return [sessionId, resolvedProviderVersion]; } Object encode() { - return _toList(); } + return _toList(); + } static SessionInitResponseApi decode(Object result) { result as List; - return SessionInitResponseApi( - sessionId: result[0]! as String, - resolvedProviderVersion: result[1] as String?, - ); + return SessionInitResponseApi(sessionId: result[0]! as String, resolvedProviderVersion: result[1] as String?); } @override @@ -737,8 +730,7 @@ class SessionInitResponseApi { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } class LogEntryApi { @@ -767,19 +759,12 @@ class LogEntryApi { String? stackTraceAsString; List _toList() { - return [ - sessionId, - message, - level, - dateTimeIso, - source, - error, - stackTraceAsString, - ]; + return [sessionId, message, level, dateTimeIso, source, error, stackTraceAsString]; } Object encode() { - return _toList(); } + return _toList(); + } static LogEntryApi decode(Object result) { result as List; @@ -808,11 +793,9 @@ class LogEntryApi { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } - class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -820,52 +803,52 @@ class _PigeonCodec extends StandardMessageCodec { if (value is int) { buffer.putUint8(4); buffer.putInt64(value); - } else if (value is ReclaimApiVerificationExceptionType) { + } else if (value is ReclaimApiVerificationExceptionType) { buffer.putUint8(129); writeValue(buffer, value.index); - } else if (value is ReclaimSessionStatus) { + } else if (value is ReclaimSessionStatus) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is ClaimCreationTypeApi) { + } else if (value is ClaimCreationTypeApi) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is ReclaimApiVerificationRequest) { + } else if (value is ReclaimApiVerificationRequest) { buffer.putUint8(132); writeValue(buffer, value.encode()); - } else if (value is ReclaimApiVerificationException) { + } else if (value is ReclaimApiVerificationException) { buffer.putUint8(133); writeValue(buffer, value.encode()); - } else if (value is ReclaimApiVerificationResponse) { + } else if (value is ReclaimApiVerificationResponse) { buffer.putUint8(134); writeValue(buffer, value.encode()); - } else if (value is ClientProviderInformationOverride) { + } else if (value is ClientProviderInformationOverride) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is ClientFeatureOverrides) { + } else if (value is ClientFeatureOverrides) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is ClientLogConsumerOverride) { + } else if (value is ClientLogConsumerOverride) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is ClientReclaimSessionManagementOverride) { + } else if (value is ClientReclaimSessionManagementOverride) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is ClientReclaimAppInfoOverride) { + } else if (value is ClientReclaimAppInfoOverride) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is ReclaimSessionIdentityUpdate) { + } else if (value is ReclaimSessionIdentityUpdate) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is ReclaimApiVerificationOptions) { + } else if (value is ReclaimApiVerificationOptions) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is ProviderVersionApi) { + } else if (value is ProviderVersionApi) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is SessionInitResponseApi) { + } else if (value is SessionInitResponseApi) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is LogEntryApi) { + } else if (value is LogEntryApi) { buffer.putUint8(144); writeValue(buffer, value.encode()); } else { @@ -876,40 +859,40 @@ class _PigeonCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 129: - final int? value = readValue(buffer) as int?; + case 129: + final value = readValue(buffer) as int?; return value == null ? null : ReclaimApiVerificationExceptionType.values[value]; - case 130: - final int? value = readValue(buffer) as int?; + case 130: + final value = readValue(buffer) as int?; return value == null ? null : ReclaimSessionStatus.values[value]; - case 131: - final int? value = readValue(buffer) as int?; + case 131: + final value = readValue(buffer) as int?; return value == null ? null : ClaimCreationTypeApi.values[value]; - case 132: + case 132: return ReclaimApiVerificationRequest.decode(readValue(buffer)!); - case 133: + case 133: return ReclaimApiVerificationException.decode(readValue(buffer)!); - case 134: + case 134: return ReclaimApiVerificationResponse.decode(readValue(buffer)!); - case 135: + case 135: return ClientProviderInformationOverride.decode(readValue(buffer)!); - case 136: + case 136: return ClientFeatureOverrides.decode(readValue(buffer)!); - case 137: + case 137: return ClientLogConsumerOverride.decode(readValue(buffer)!); - case 138: + case 138: return ClientReclaimSessionManagementOverride.decode(readValue(buffer)!); - case 139: + case 139: return ClientReclaimAppInfoOverride.decode(readValue(buffer)!); - case 140: + case 140: return ReclaimSessionIdentityUpdate.decode(readValue(buffer)!); - case 141: + case 141: return ReclaimApiVerificationOptions.decode(readValue(buffer)!); - case 142: + case 142: return ProviderVersionApi.decode(readValue(buffer)!); - case 143: + case 143: return SessionInitResponseApi.decode(readValue(buffer)!); - case 144: + case 144: return LogEntryApi.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -927,7 +910,14 @@ abstract class ReclaimModuleApi { Future startVerificationFromJson(Map template); - Future setOverrides(ClientProviderInformationOverride? provider, ClientFeatureOverrides? feature, ClientLogConsumerOverride? logConsumer, ClientReclaimSessionManagementOverride? sessionManagement, ClientReclaimAppInfoOverride? appInfo, String? capabilityAccessToken); + Future setOverrides( + ClientProviderInformationOverride? provider, + ClientFeatureOverrides? feature, + ClientLogConsumerOverride? logConsumer, + ClientReclaimSessionManagementOverride? sessionManagement, + ClientReclaimAppInfoOverride? appInfo, + String? capabilityAccessToken, + ); Future clearAllOverrides(); @@ -939,115 +929,155 @@ abstract class ReclaimModuleApi { Future ping(); - static void setUp(ReclaimModuleApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { + static void setUp(ReclaimModuleApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) { messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerification$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerification$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerification was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerification was null.', + ); final List args = (message as List?)!; final ReclaimApiVerificationRequest? arg_request = (args[0] as ReclaimApiVerificationRequest?); - assert(arg_request != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerification was null, expected non-null ReclaimApiVerificationRequest.'); + assert( + arg_request != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerification was null, expected non-null ReclaimApiVerificationRequest.', + ); try { final ReclaimApiVerificationResponse output = await api.startVerification(arg_request!); return wrapResponse(result: output); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromUrl$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromUrl$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromUrl was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromUrl was null.', + ); final List args = (message as List?)!; final String? arg_url = (args[0] as String?); - assert(arg_url != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromUrl was null, expected non-null String.'); + assert( + arg_url != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromUrl was null, expected non-null String.', + ); try { final ReclaimApiVerificationResponse output = await api.startVerificationFromUrl(arg_url!); return wrapResponse(result: output); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromJson$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromJson$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromJson was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromJson was null.', + ); final List args = (message as List?)!; final Map? arg_template = (args[0] as Map?)?.cast(); - assert(arg_template != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromJson was null, expected non-null Map.'); + assert( + arg_template != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.startVerificationFromJson was null, expected non-null Map.', + ); try { final ReclaimApiVerificationResponse output = await api.startVerificationFromJson(arg_template!); return wrapResponse(result: output); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setOverrides$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setOverrides$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setOverrides was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setOverrides was null.', + ); final List args = (message as List?)!; final ClientProviderInformationOverride? arg_provider = (args[0] as ClientProviderInformationOverride?); final ClientFeatureOverrides? arg_feature = (args[1] as ClientFeatureOverrides?); final ClientLogConsumerOverride? arg_logConsumer = (args[2] as ClientLogConsumerOverride?); - final ClientReclaimSessionManagementOverride? arg_sessionManagement = (args[3] as ClientReclaimSessionManagementOverride?); + final ClientReclaimSessionManagementOverride? arg_sessionManagement = + (args[3] as ClientReclaimSessionManagementOverride?); final ClientReclaimAppInfoOverride? arg_appInfo = (args[4] as ClientReclaimAppInfoOverride?); final String? arg_capabilityAccessToken = (args[5] as String?); try { - await api.setOverrides(arg_provider, arg_feature, arg_logConsumer, arg_sessionManagement, arg_appInfo, arg_capabilityAccessToken); + await api.setOverrides( + arg_provider, + arg_feature, + arg_logConsumer, + arg_sessionManagement, + arg_appInfo, + arg_capabilityAccessToken, + ); return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.clearAllOverrides$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.clearAllOverrides$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { @@ -1057,22 +1087,28 @@ abstract class ReclaimModuleApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setVerificationOptions$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setVerificationOptions$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setVerificationOptions was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setVerificationOptions was null.', + ); final List args = (message as List?)!; final ReclaimApiVerificationOptions? arg_options = (args[0] as ReclaimApiVerificationOptions?); try { @@ -1080,66 +1116,86 @@ abstract class ReclaimModuleApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.sendLog$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.sendLog$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.sendLog was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.sendLog was null.', + ); final List args = (message as List?)!; final LogEntryApi? arg_entry = (args[0] as LogEntryApi?); - assert(arg_entry != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.sendLog was null, expected non-null LogEntryApi.'); + assert( + arg_entry != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.sendLog was null, expected non-null LogEntryApi.', + ); try { final bool output = await api.sendLog(arg_entry!); return wrapResponse(result: output); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setConsoleLogging$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setConsoleLogging$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setConsoleLogging was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setConsoleLogging was null.', + ); final List args = (message as List?)!; final bool? arg_enabled = (args[0] as bool?); - assert(arg_enabled != null, - 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setConsoleLogging was null, expected non-null bool.'); + assert( + arg_enabled != null, + 'Argument for dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.setConsoleLogging was null, expected non-null bool.', + ); try { await api.setConsoleLogging(arg_enabled!); return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.ping$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimModuleApi.ping$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { @@ -1149,8 +1205,10 @@ abstract class ReclaimModuleApi { return wrapResponse(result: output); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); } }); } @@ -1164,8 +1222,8 @@ class ReclaimHostOverridesApi { /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. ReclaimHostOverridesApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -1173,15 +1231,15 @@ class ReclaimHostOverridesApi { final String pigeonVar_messageChannelSuffix; Future onLogs(String logJsonString) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.onLogs$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.onLogs$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([logJsonString]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1195,16 +1253,28 @@ class ReclaimHostOverridesApi { } } - Future createSession({required String appId, required String providerId, required String timestamp, required String signature, required String providerVersion, }) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.createSession$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future createSession({ + required String appId, + required String providerId, + required String timestamp, + required String signature, + required String providerVersion, + }) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.createSession$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([appId, providerId, timestamp, signature, providerVersion]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final Future pigeonVar_sendFuture = pigeonVar_channel.send([ + appId, + providerId, + timestamp, + signature, + providerVersion, + ]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1223,16 +1293,20 @@ class ReclaimHostOverridesApi { } } - Future updateSession({required String sessionId, required ReclaimSessionStatus status, required Map? metadata, }) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.updateSession$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateSession({ + required String sessionId, + required ReclaimSessionStatus status, + required Map? metadata, + }) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.updateSession$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([sessionId, status, metadata]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1251,16 +1325,28 @@ class ReclaimHostOverridesApi { } } - Future logSession({required String appId, required String providerId, required String sessionId, required String logType, Map? metadata, }) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.logSession$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future logSession({ + required String appId, + required String providerId, + required String sessionId, + required String logType, + Map? metadata, + }) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.logSession$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([appId, providerId, sessionId, logType, metadata]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final Future pigeonVar_sendFuture = pigeonVar_channel.send([ + appId, + providerId, + sessionId, + logType, + metadata, + ]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1275,15 +1361,15 @@ class ReclaimHostOverridesApi { } Future onSessionIdentityUpdate(ReclaimSessionIdentityUpdate? update) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.onSessionIdentityUpdate$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.onSessionIdentityUpdate$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([update]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1297,16 +1383,30 @@ class ReclaimHostOverridesApi { } } - Future fetchProviderInformation({required String appId, required String providerId, required String sessionId, required String signature, required String timestamp, required String resolvedVersion, }) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.fetchProviderInformation$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future fetchProviderInformation({ + required String appId, + required String providerId, + required String sessionId, + required String signature, + required String timestamp, + required String resolvedVersion, + }) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostOverridesApi.fetchProviderInformation$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([appId, providerId, sessionId, signature, timestamp, resolvedVersion]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final Future pigeonVar_sendFuture = pigeonVar_channel.send([ + appId, + providerId, + sessionId, + signature, + timestamp, + resolvedVersion, + ]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1331,8 +1431,8 @@ class ReclaimHostVerificationApi { /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. ReclaimHostVerificationApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -1340,15 +1440,15 @@ class ReclaimHostVerificationApi { final String pigeonVar_messageChannelSuffix; Future fetchAttestorAuthenticationRequest(Map reclaimHttpProvider) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostVerificationApi.fetchAttestorAuthenticationRequest$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = + 'dev.flutter.pigeon.reclaim_verifier_module.ReclaimHostVerificationApi.fetchAttestorAuthenticationRequest$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([reclaimHttpProvider]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/pigeon/schema.dart b/pigeon/schema.dart index 7b894c4..0cd749b 100644 --- a/pigeon/schema.dart +++ b/pigeon/schema.dart @@ -86,7 +86,7 @@ class ClientFeatureOverrides { this.idleTimeThresholdForManualVerificationTrigger, // 180 this.sessionTimeoutForManualVerificationTrigger, - // https://attestor.reclaimprotocol.org/browser-rpc + // https://attestor.reclaimprotocol.org:444/browser-rpc this.attestorBrowserRpcUrl, // false this.isAIFlowEnabled, @@ -94,16 +94,43 @@ class ClientFeatureOverrides { this.manualReviewMessage, // null this.loginPromptMessage, + // null + this.useTEE, + // null + this.interceptorOptions, + // null + this.claimCreationTimeoutDurationInMins, + // null + this.sessionNoActivityTimeoutDurationInMins, + // null + this.aiProviderNoActivityTimeoutDurationInSecs, + // null + this.pageLoadedCompletedDebounceTimeoutMs, + // null + this.potentialLoginTimeoutS, + // null + this.screenshotCaptureIntervalSeconds, + // null + this.teeUrls, }); + final bool? cookiePersist; final bool? singleReclaimRequest; + final String? attestorBrowserRpcUrl; final int? idleTimeThresholdForManualVerificationTrigger; final int? sessionTimeoutForManualVerificationTrigger; - final String? attestorBrowserRpcUrl; - @Deprecated('Replace with canUseAiFlow') final bool? isAIFlowEnabled; final String? manualReviewMessage; final String? loginPromptMessage; + final bool? useTEE; + final String? interceptorOptions; + final int? claimCreationTimeoutDurationInMins; + final int? sessionNoActivityTimeoutDurationInMins; + final int? aiProviderNoActivityTimeoutDurationInSecs; + final int? pageLoadedCompletedDebounceTimeoutMs; + final int? potentialLoginTimeoutS; + final int? screenshotCaptureIntervalSeconds; + final String? teeUrls; } class ClientLogConsumerOverride { @@ -170,6 +197,8 @@ class ReclaimApiVerificationOptions { this.claimCreationType = ClaimCreationTypeApi.standalone, this.canAutoSubmit = true, this.isCloseButtonVisible = true, + this.locale, + this.useTeeOperator, }); /// Whether to delete cookies before user journey starts in the client web view. @@ -191,6 +220,21 @@ class ReclaimApiVerificationOptions { /// Whether the close button is visible. /// Defaults to true. final bool isCloseButtonVisible; + + /// A language code & Country code for localization that should be enforced in the verification flow. + final String? locale; + + /// Enables use of Reclaim's TEE+MPC protocol for HTTP Request claim verification and + /// attestation. + /// + /// When set to `true`, the verification will use Trusted Execution Environment + /// (TEE) with Multi-Party Computation (MPC) for enhanced security. + /// + /// When set to `false`, the standard Reclaim's proxy attestor verification flow is used. + /// + /// When `null` (default), the backend decides whether to use TEE based on + /// a feature flag (currently in staged rollout). + final bool? useTeeOperator; } class ProviderVersionApi { diff --git a/pubspec.lock b/pubspec.lock index 88dbafc..7e27aea 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: da0d9209ca76bde579f2da330aeb9df62b6319c834fa7baae052021b0462401f + sha256: "5b7468c326d2f8a4f630056404ca0d291ade42918f4a3c6233618e724f39da8e" url: "https://pub.dev" source: hosted - version: "85.0.0" + version: "92.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "974859dc0ff5f37bc4313244b3218c791810d03ab3470a579580279ba971a48d" + sha256: "70e4b1ef8003c64793a9e268a551a82869a8a96f39deb73dea28084b0e8bf75e" url: "https://pub.dev" source: hosted - version: "7.7.1" + version: "9.0.0" archive: dependency: transitive description: @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: build - sha256: ce76b1d48875e3233fde17717c23d1f60a91cc631597e49a400c89b475395b1d + sha256: c1668065e9ba04752570ad7e038288559d1e2ca5c6d0131c0f5f55e39e777413 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "4.0.3" build_config: dependency: transitive description: @@ -77,34 +77,18 @@ packages: dependency: transitive description: name: build_daemon - sha256: "409002f1adeea601018715d613115cfaf0e31f512cb80ae4534c79867ae2363d" + sha256: bf05f6e12cfea92d3c09308d7bcdab1906cd8a179b023269eed00c071004b957 url: "https://pub.dev" source: hosted - version: "4.1.0" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: d1d57f7807debd7349b4726a19fd32ec8bc177c71ad0febf91a20f84cd2d4b46 - url: "https://pub.dev" - source: hosted - version: "3.0.3" + version: "4.1.1" build_runner: dependency: "direct dev" description: name: build_runner - sha256: b24597fceb695969d47025c958f3837f9f0122e237c6a22cb082a5ac66c3ca30 + sha256: "110c56ef29b5eb367b4d17fc79375fa8c18a6cd7acd92c05bb3986c17a079057" url: "https://pub.dev" source: hosted - version: "2.7.1" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: "066dda7f73d8eb48ba630a55acb50c4a84a2e6b453b1cb4567f581729e794f7b" - url: "https://pub.dev" - source: hosted - version: "9.3.1" + version: "2.10.4" built_collection: dependency: transitive description: @@ -117,10 +101,10 @@ packages: dependency: transitive description: name: built_value - sha256: a30f0a0e38671e89a492c44d005b5545b830a961575bbd8336d42869ff71066d + sha256: "426cf75afdb23aa74bd4e471704de3f9393f3c7b04c1e2d9c6f1073ae0b8b139" url: "https://pub.dev" source: hosted - version: "8.12.0" + version: "8.12.1" cached_network_image: dependency: transitive description: @@ -177,6 +161,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.2" + code_assets: + dependency: transitive + description: + name: code_assets + sha256: ae0db647e668cbb295a3527f0938e4039e004c80099dce2f964102373f5ce0b5 + url: "https://pub.dev" + source: hosted + version: "0.19.10" code_builder: dependency: transitive description: @@ -205,26 +197,26 @@ packages: dependency: transitive description: name: cronet_http - sha256: "07bfb4c6158aef72f8004631826abaeecdeaa2b6042f5f8916b8db20e1d01b4a" + sha256: "1fff7f26ac0c4cda97fe2a9aa082494baee4775f167c27ba45f6c8e88571e3ab" url: "https://pub.dev" source: hosted - version: "1.6.0" + version: "1.7.0" crypto: dependency: transitive description: name: crypto - sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.0.7" cupertino_http: dependency: transitive description: name: cupertino_http - sha256: "72187f715837290a63479a5b0ae709f4fedad0ed6bd0441c275eceaa02d5abae" + sha256: "82cbec60c90bf785a047a9525688b6dacac444e177e1d5a5876963d3c50369e8" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.0" cupertino_icons: dependency: "direct main" description: @@ -237,18 +229,18 @@ packages: dependency: transitive description: name: dart_style - sha256: "8a0e5fba27e8ee025d2ffb4ee820b4e6e2cf5e4246a6b1a477eb66866947e0bb" + sha256: a9c30492da18ff84efe2422ba2d319a89942d93e58eb0b73d32abe822ef54b7b url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.3" device_info_plus: dependency: transitive description: name: device_info_plus - sha256: dd0e8e02186b2196c7848c9d394a5fd6e5b57a43a546082c5820b1ec72317e33 + sha256: "4df8babf73058181227e18b08e6ea3520cf5fc5d796888d33b7cb0f33f984b7c" url: "https://pub.dev" source: hosted - version: "12.2.0" + version: "12.3.0" device_info_plus_platform_interface: dependency: transitive description: @@ -471,10 +463,10 @@ packages: dependency: transitive description: name: flutter_svg - sha256: b9c2ad5872518a27507ab432d1fb97e8813b05f0fc693f9d40fad06d073e0678 + sha256: "87fbd7c534435b6c5d9d98b01e1fd527812b82e68ddd8bd35fc45ed0fa8f0a95" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.3" flutter_test: dependency: "direct dev" description: flutter @@ -493,14 +485,6 @@ packages: url: "https://pub.dev" source: hosted version: "9.0.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 - url: "https://pub.dev" - source: hosted - version: "4.0.0" glob: dependency: transitive description: @@ -517,14 +501,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" + hooks: + dependency: transitive + description: + name: hooks + sha256: "5410b9f4f6c9f01e8ff0eb81c9801ea13a3c3d39f8f0b1613cda08e27eab3c18" + url: "https://pub.dev" + source: hosted + version: "0.20.5" http: dependency: "direct main" description: name: http - sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007 + sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "1.6.0" http_multi_server: dependency: transitive description: @@ -569,10 +561,10 @@ packages: dependency: transitive description: name: jni - sha256: d2c361082d554d4593c3012e26f6b188f902acd291330f13d6427641a92b3da1 + sha256: "8706a77e94c76fe9ec9315e18949cc9479cc03af97085ca9c1077b61323ea12d" url: "https://pub.dev" source: hosted - version: "0.14.2" + version: "0.15.2" js: dependency: transitive description: @@ -593,10 +585,10 @@ packages: dependency: "direct dev" description: name: json_serializable - sha256: "33a040668b31b320aafa4822b7b1e177e163fc3c1e835c6750319d4ab23aa6fe" + sha256: "6b253f7851cf1626a05c8b49c792e04a14897349798c03798137f2b5f7e0b5b1" url: "https://pub.dev" source: hosted - version: "6.11.1" + version: "6.11.3" leak_tracker: dependency: transitive description: @@ -693,14 +685,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.0" + native_toolchain_c: + dependency: transitive + description: + name: native_toolchain_c + sha256: f8872ea6c7a50ce08db9ae280ca2b8efdd973157ce462826c82f3c3051d154ce + url: "https://pub.dev" + source: hosted + version: "0.17.2" objective_c: dependency: transitive description: name: objective_c - sha256: "9f034ba1eeca53ddb339bc8f4813cb07336a849cd735559b60cdc068ecce2dc7" + sha256: c12701c978eacda8d8a9be1469f005e26bf16a903945982b94f77d7a9dbeea45 url: "https://pub.dev" source: hosted - version: "7.1.0" + version: "9.2.1" octo_image: dependency: transitive description: @@ -761,18 +761,18 @@ packages: dependency: transitive description: name: path_provider_android - sha256: e122c5ea805bb6773bb12ce667611265980940145be920cd09a4b0ec0285cb16 + sha256: f2c65e21139ce2c3dad46922be8272bb5963516045659e71bb16e151c93b580e url: "https://pub.dev" source: hosted - version: "2.2.20" + version: "2.2.22" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: efaec349ddfc181528345c56f8eda9d6cccd71c177511b132c6a0ddaefaa2738 + sha256: "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4" url: "https://pub.dev" source: hosted - version: "2.4.3" + version: "2.5.1" path_provider_linux: dependency: transitive description: @@ -857,10 +857,10 @@ packages: dependency: "direct dev" description: name: pigeon - sha256: "0045b172d1da43c40cb3f58e80e04b50a65cba20b8b70dc880af04181f7758da" + sha256: ad2b4da1023fe734435395428c0530b495e0cce2e1c99f3d0df262d0469a4fa1 url: "https://pub.dev" source: hosted - version: "26.0.2" + version: "26.1.4" platform: dependency: transitive description: @@ -917,20 +917,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.0" - reclaim_gnark_zkoperator: - dependency: "direct main" - description: - path: "/Users/mushaheedsyed/Projects/reclaimprotocol.org/flutter_packages/flutter-gnark-prover" - relative: false - source: path - version: "1.6.1" reclaim_inapp_sdk: dependency: "direct main" description: path: "/Users/mushaheedsyed/Projects/reclaimprotocol.org/flutter_packages/inapp_sdk/main" relative: false source: path - version: "0.24.0" + version: "0.25.0" + reclaim_tee_operator_flutter: + dependency: "direct main" + description: + path: "." + ref: main + resolved-ref: ee4009644098ceb3846ad05b07313af19ca9ae69 + url: "git@github.com:reclaimprotocol/reclaim-tee-operator-flutter.git" + source: git + version: "1.97.0" retry: dependency: transitive description: @@ -975,18 +977,18 @@ packages: dependency: transitive description: name: shared_preferences_android - sha256: "34266009473bf71d748912da4bf62d439185226c03e01e2d9687bc65bbfcb713" + sha256: "83af5c682796c0f7719c2bbf74792d113e40ae97981b8f266fa84574573556bc" url: "https://pub.dev" source: hosted - version: "2.4.15" + version: "2.4.18" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "1c33a907142607c40a7542768ec9badfd16293bac51da3a4482623d15845f88b" + sha256: "4e7eaffc2b17ba398759f1151415869a34771ba11ebbccd1b0145472a619a64f" url: "https://pub.dev" source: hosted - version: "2.5.5" + version: "2.5.6" shared_preferences_linux: dependency: transitive description: @@ -1052,18 +1054,18 @@ packages: dependency: transitive description: name: source_gen - sha256: "800f12fb87434defa13432ab37e33051b43b290a174e15259563b043cda40c46" + sha256: "07b277b67e0096c45196cbddddf2d8c6ffc49342e88bf31d460ce04605ddac75" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.1.1" source_helper: dependency: transitive description: name: source_helper - sha256: "6a3c6cc82073a8797f8c4dc4572146114a39652851c157db37e964d9c7038723" + sha256: e82b1996c63da42aa3e6a34cc1ec17427728a1baf72ed017717a5669a7123f0d url: "https://pub.dev" source: hosted - version: "1.3.8" + version: "1.3.9" source_span: dependency: transitive description: @@ -1072,14 +1074,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.1" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" sqflite: dependency: transitive description: @@ -1176,14 +1170,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.7" - timing: - dependency: transitive - description: - name: timing - sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" - url: "https://pub.dev" - source: hosted - version: "1.0.2" typed_data: dependency: transitive description: @@ -1204,34 +1190,34 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: "5c8b6c2d89a78f5a1cca70a73d9d5f86c701b36b42f9c9dac7bad592113c28e9" + sha256: "767344bf3063897b5cf0db830e94f904528e6dd50a6dfaf839f0abf509009611" url: "https://pub.dev" source: hosted - version: "6.3.24" + version: "6.3.28" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "6b63f1441e4f653ae799166a72b50b1767321ecc263a57aadf825a7a2a5477d9" + sha256: cfde38aa257dae62ffe79c87fab20165dfdf6988c1d31b58ebf59b9106062aad url: "https://pub.dev" source: hosted - version: "6.3.5" + version: "6.3.6" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "8262208506252a3ed4ff5c0dc1e973d2c0e0ef337d0a074d35634da5d44397c9" + sha256: "368adf46f71ad3c21b8f06614adb38346f193f3a59ba8fe9a2fd74133070ba18" url: "https://pub.dev" source: hosted - version: "3.2.4" + version: "3.2.5" url_launcher_platform_interface: dependency: transitive description: @@ -1252,18 +1238,18 @@ packages: dependency: transitive description: name: url_launcher_windows - sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77" + sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" uuid: dependency: transitive description: name: uuid - sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + sha256: a11b666489b1954e01d992f3d601b1804a33937b5a8fe677bd26b8a9f96f96e8 url: "https://pub.dev" source: hosted - version: "4.5.1" + version: "4.5.2" vector_graphics: dependency: transitive description: @@ -1385,5 +1371,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.9.0 <4.0.0" - flutter: ">=3.35.0" + dart: ">=3.10.0 <4.0.0" + flutter: ">=3.35.6" diff --git a/pubspec.yaml b/pubspec.yaml index dd8c118..80b5175 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: none # This version is used _only_ for the Runner app, which is used if you just do # a `flutter run` or a `flutter make-host-app-editable`. It has no impact # on any other native host app that you embed your Flutter project into. -version: 0.24.0 +version: 0.25.0 environment: sdk: '>=3.9.0 <4.0.0' @@ -29,8 +29,15 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.8 - reclaim_gnark_zkoperator: ^0.0.1 - reclaim_inapp_sdk: ^0.0.1 + reclaim_inapp_sdk: + git: + url: git@github.com:reclaimprotocol/reclaim-inapp-sdk.git + ref: main + # Reclaim TEE operator for native protocol execution + reclaim_tee_operator_flutter: + git: + url: git@github.com:reclaimprotocol/reclaim-tee-operator-flutter.git + ref: main json_annotation: ^4.9.0 logging: ^1.3.0 http: ^1.5.0 diff --git a/scripts/build_ios.sh b/scripts/build_ios.sh index 0954343..12f72b9 100755 --- a/scripts/build_ios.sh +++ b/scripts/build_ios.sh @@ -48,8 +48,75 @@ sign_frameworks_in_directory() { return 0 } +# Example usage: +# create_xcframework objective_c +create_xcframework() { + local somepackage="$1" + + if [ -z "$somepackage" ]; then + echo "Usage: create_xcframework " + return 1 + fi + + mkdir -p iphoneos + mkdir -p iphonesimulator + + rm -rf "$somepackage.framework/_CodeSignature" + cp -R "$somepackage.framework/" "iphoneos/$somepackage.framework" + cp -R "$somepackage.framework/" "iphonesimulator/$somepackage.framework" + + echo "Original framework architectures:" + xcrun lipo -info "$somepackage.framework/$somepackage" + + # Create iphoneos version (remove x86_64, keep arm64) + xcrun lipo -remove x86_64 "./iphoneos/$somepackage.framework/$somepackage" -o "./iphoneos/$somepackage.framework/$somepackage" + vtool -set-build-version 2 14 26.1 -output "./iphoneos/$somepackage.framework/$somepackage" "./iphoneos/$somepackage.framework/$somepackage" + vtool -remove-build-version 7 -output "./iphoneos/$somepackage.framework/$somepackage" "./iphoneos/$somepackage.framework/$somepackage" + + echo "iphoneos framework architectures:" + xcrun lipo -info "iphoneos/$somepackage.framework/$somepackage" + + # Create XCFramework + xcodebuild -create-xcframework \ + -framework "iphoneos/$somepackage.framework/" \ + -framework "iphonesimulator/$somepackage.framework/" \ + -output "$somepackage.xcframework" + + rm -rf ./iphonesimulator; + rm -rf ./iphoneos; +} + dart run scripts/prepare_ios.dart +ONLY_RELEASE_TARGETS=true + +FRAMEWORK_PATTERN="" +if [ "$ONLY_RELEASE_TARGETS" != "true" ]; then + FRAMEWORK_PATTERN="build/ios/ReclaimXCFrameworks/**/*.framework" +else + FRAMEWORK_PATTERN="build/ios/ReclaimXCFrameworks/*.framework" +fi + +echo "Converting any binary frameworks to xcframework" + +project_dir="$(pwd)" + +for framework_path in $FRAMEWORK_PATTERN; do + echo "Trying to make XCframework for $framework_path" + if [ -d "$framework_path" ]; then + framework_name=$(basename $framework_path .framework) + + echo "📦 Creating xcframework for $framework_name" + + cd "$(dirname $framework_path)" + create_xcframework $framework_name + cd $project_dir; + + rm -rf $framework_path + fi +done + + sign_frameworks_in_directory "build/ios/ReclaimXCFrameworks" (cd build/ios && tar -zcvf ReclaimXCFrameworks.tar.gz ReclaimXCFrameworks) # FAST diff --git a/scripts/setup_vendor.sh b/scripts/setup_vendor.sh index 58bbb81..bc9056a 100755 --- a/scripts/setup_vendor.sh +++ b/scripts/setup_vendor.sh @@ -13,9 +13,9 @@ echo "OVERRIDE_RECLAIM_FLUTTER_SDK_GIT=$OVERRIDE_RECLAIM_FLUTTER_SDK_GIT" echo "OVERRIDE_GNARK_PROVER_GIT=$OVERRIDE_GNARK_PROVER_GIT" echo "dependency_overrides: - reclaim_gnark_zkoperator: + reclaim_tee_operator_flutter: git: - url: https://$PACKAGE_CLONE_USER:$PACKAGE_CLONE_PASSWD@github.com/reclaimprotocol/reclaim-gnark-zkoperator-flutter.git + url: https://$PACKAGE_CLONE_USER:$PACKAGE_CLONE_PASSWD@github.com/reclaimprotocol/reclaim-tee-operator-flutter.git ref: $OVERRIDE_GNARK_PROVER_GIT reclaim_inapp_sdk: git: