@procivis/react-native-one-core 1.26999.0 → 1.41710.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/README.md +71 -40
  2. package/android/build.gradle +46 -10
  3. package/android/build.gradle_opensource +121 -0
  4. package/android/libs/core-reactnative-compatible-2025.0305.1.aar +0 -0
  5. package/android/src/main/AndroidManifest.xml +5 -2
  6. package/android/src/main/java/ch/procivis/one/core/Deserialize.kt +10 -6
  7. package/android/src/main/java/ch/procivis/one/core/DeserializeSpecific.kt +13 -5
  8. package/android/src/main/java/ch/procivis/one/core/ProcivisOneCoreModule.kt +251 -79
  9. package/android/src/main/java/ch/procivis/one/core/ProcivisOneCorePackage.kt +3 -4
  10. package/android/src/main/java/ch/procivis/one/core/SerializeSpecific.kt +13 -1
  11. package/android/src/main/java/ch/procivis/one/core/Util.kt +42 -10
  12. package/android/src/main/java/ch/procivis/one/core/ubiqu/PinPadRunner.kt +123 -0
  13. package/android/src/main/java/ch/procivis/one/core/ubiqu/PinPadViewManager.kt +23 -0
  14. package/android/src/main/java/ch/procivis/one/core/ubiqu/PinPadViewManager.kt_opensource +20 -0
  15. package/android/src/main/java/ch/procivis/one/core/ubiqu/PinPadWrapper.kt +396 -0
  16. package/android/src/main/java/ch/procivis/one/core/ubiqu/RegistrationManager.kt +59 -0
  17. package/android/src/main/java/ch/procivis/one/core/ubiqu/TokenManager.kt +48 -0
  18. package/android/src/main/java/ch/procivis/one/core/ubiqu/UbiquKeyStorage.kt +256 -0
  19. package/android/src/main/java/ch/procivis/one/core/ubiqu/UbiquKeyStorage.kt_opensource +51 -0
  20. package/android/src/main/java/ch/procivis/one/core/ubiqu/Util.kt +74 -0
  21. package/android/src/main/java/ch/procivis/one/core/ubiqu/dataformats/CreateIdentityRequest.kt +9 -0
  22. package/android/src/main/java/ch/procivis/one/core/ubiqu/dataformats/CreateIdentityResponse.kt +9 -0
  23. package/android/src/main/java/ch/procivis/one/core/ubiqu/dataformats/RegisterRSEResponse.kt +10 -0
  24. package/core-sdk.json +6 -6
  25. package/dist/index.d.ts +10 -8
  26. package/dist/index.js +31 -25
  27. package/dist/src/cache.d.ts +8 -0
  28. package/dist/src/cache.js +9 -0
  29. package/dist/src/config.d.ts +39 -6
  30. package/dist/src/config.js +19 -0
  31. package/dist/src/core.d.ts +24 -8
  32. package/dist/src/core.js +68 -0
  33. package/dist/src/credential.d.ts +15 -1
  34. package/dist/src/credential.js +5 -0
  35. package/dist/src/credentialSchema.d.ts +5 -2
  36. package/dist/src/credentialSchema.js +2 -0
  37. package/dist/src/did.d.ts +9 -5
  38. package/dist/src/error.d.ts +10 -17
  39. package/dist/src/error.js +5 -14
  40. package/dist/src/history.d.ts +19 -5
  41. package/dist/src/history.js +10 -2
  42. package/dist/src/key.d.ts +3 -0
  43. package/dist/src/organisation.d.ts +8 -0
  44. package/dist/src/organisation.js +1 -0
  45. package/dist/src/proof.d.ts +29 -2
  46. package/dist/src/proof.js +13 -0
  47. package/dist/src/proofSchema.d.ts +2 -0
  48. package/dist/src/trust.d.ts +85 -19
  49. package/dist/src/trust.js +28 -7
  50. package/dist/src/ubiqu.d.ts +49 -0
  51. package/dist/src/ubiqu.js +69 -0
  52. package/ios/Deserialize.swift +203 -24
  53. package/ios/EventEmitter.swift +79 -0
  54. package/ios/ProcivisOneCoreModule.m +74 -6
  55. package/ios/ProcivisOneCoreModule.swift +312 -88
  56. package/ios/ProcivisRNOneCore.xcodeproj/project.pbxproj +28 -26
  57. package/ios/RSEKeyStorage.swift +587 -0
  58. package/ios/RSEKeyStorage.swift_opensource +49 -0
  59. package/ios/RSEPinPad.swift +74 -0
  60. package/ios/RSEPinPad.swift_opensource +21 -0
  61. package/ios/RSEPinPadManager.m +19 -0
  62. package/ios/Serialize.swift +105 -28
  63. package/ios/UBQKit.xcframework/Info.plist +44 -0
  64. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Assets.car +0 -0
  65. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFCompatibilityMacros.h +37 -0
  66. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFHTTPSessionManager.h +304 -0
  67. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFNetworkReachabilityManager.h +216 -0
  68. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFNetworking.h +41 -0
  69. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFPlainTextRequestSerializer.h +16 -0
  70. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFSecurityPolicy.h +156 -0
  71. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFURLRequestSerialization.h +479 -0
  72. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFURLResponseSerialization.h +310 -0
  73. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFURLSessionManager.h +501 -0
  74. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/CardRequestProtocol.h +72 -0
  75. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/Constants.h +222 -0
  76. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/DeviceBindProtocol.h +38 -0
  77. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/DomainSecurityModule.h +43 -0
  78. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/ErrorDomains.h +68 -0
  79. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/FreeAssetProtocol.h +40 -0
  80. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/GDataXMLNode.h +214 -0
  81. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/NSDictionary+Utilities.h +23 -0
  82. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/NSFileManager+Utilities.h +20 -0
  83. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/NSString+Utilities.h +23 -0
  84. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/NSURL+Utilities.h +12 -0
  85. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/ProtocolBase.h +38 -0
  86. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/ResetPinProtocol.h +45 -0
  87. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/Settings.h +120 -0
  88. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequest.h +58 -0
  89. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestBaseProcessor.h +37 -0
  90. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestBindProcessor.h +34 -0
  91. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestNullProcessor.h +28 -0
  92. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestResetPinProcessor.h +35 -0
  93. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestUnlockProcessor.h +31 -0
  94. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestUseProcessor.h +34 -0
  95. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQKit-Swift.h +761 -0
  96. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQKit.h +56 -0
  97. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQPacket.h +38 -0
  98. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Info.plist +0 -0
  99. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios.abi.json +89006 -0
  100. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios.private.swiftinterface +1099 -0
  101. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  102. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios.swiftinterface +1099 -0
  103. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Modules/module.modulemap +11 -0
  104. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/UBQKit +0 -0
  105. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/_CodeSignature/CodeResources +597 -0
  106. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/certs +0 -0
  107. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/checksums +0 -0
  108. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/pinning_pub +0 -0
  109. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/static +0 -0
  110. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/stream +0 -0
  111. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Assets.car +0 -0
  112. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFCompatibilityMacros.h +37 -0
  113. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFHTTPSessionManager.h +304 -0
  114. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFNetworkReachabilityManager.h +216 -0
  115. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFNetworking.h +41 -0
  116. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFPlainTextRequestSerializer.h +16 -0
  117. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFSecurityPolicy.h +156 -0
  118. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFURLRequestSerialization.h +479 -0
  119. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFURLResponseSerialization.h +310 -0
  120. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFURLSessionManager.h +501 -0
  121. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/CardRequestProtocol.h +72 -0
  122. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/Constants.h +222 -0
  123. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/DeviceBindProtocol.h +38 -0
  124. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/DomainSecurityModule.h +43 -0
  125. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/ErrorDomains.h +68 -0
  126. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/FreeAssetProtocol.h +40 -0
  127. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/GDataXMLNode.h +214 -0
  128. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/NSDictionary+Utilities.h +23 -0
  129. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/NSFileManager+Utilities.h +20 -0
  130. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/NSString+Utilities.h +23 -0
  131. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/NSURL+Utilities.h +12 -0
  132. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/ProtocolBase.h +38 -0
  133. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/ResetPinProtocol.h +45 -0
  134. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/Settings.h +120 -0
  135. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequest.h +58 -0
  136. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestBaseProcessor.h +37 -0
  137. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestBindProcessor.h +34 -0
  138. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestNullProcessor.h +28 -0
  139. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestResetPinProcessor.h +35 -0
  140. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestUnlockProcessor.h +31 -0
  141. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestUseProcessor.h +34 -0
  142. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQKit-Swift.h +1522 -0
  143. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQKit.h +56 -0
  144. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQPacket.h +38 -0
  145. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Info.plist +0 -0
  146. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios-simulator.abi.json +89006 -0
  147. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1099 -0
  148. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  149. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1099 -0
  150. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +89006 -0
  151. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1099 -0
  152. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  153. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1099 -0
  154. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/module.modulemap +11 -0
  155. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/UBQKit +0 -0
  156. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/_CodeSignature/CodeResources +652 -0
  157. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/certs +0 -0
  158. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/checksums +0 -0
  159. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/pinning_pub +0 -0
  160. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/static +0 -0
  161. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/stream +0 -0
  162. package/ios/Util.swift +21 -24
  163. package/package.json +4 -3
  164. package/react-native-one-core.podspec +4 -5
@@ -0,0 +1,1522 @@
1
+ #if 0
2
+ #elif defined(__arm64__) && __arm64__
3
+ // Generated by Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
4
+ #ifndef UBQKIT_SWIFT_H
5
+ #define UBQKIT_SWIFT_H
6
+ #pragma clang diagnostic push
7
+ #pragma clang diagnostic ignored "-Wgcc-compat"
8
+
9
+ #if !defined(__has_include)
10
+ # define __has_include(x) 0
11
+ #endif
12
+ #if !defined(__has_attribute)
13
+ # define __has_attribute(x) 0
14
+ #endif
15
+ #if !defined(__has_feature)
16
+ # define __has_feature(x) 0
17
+ #endif
18
+ #if !defined(__has_warning)
19
+ # define __has_warning(x) 0
20
+ #endif
21
+
22
+ #if __has_include(<swift/objc-prologue.h>)
23
+ # include <swift/objc-prologue.h>
24
+ #endif
25
+
26
+ #pragma clang diagnostic ignored "-Wauto-import"
27
+ #if defined(__OBJC__)
28
+ #include <Foundation/Foundation.h>
29
+ #endif
30
+ #if defined(__cplusplus)
31
+ #include <cstdint>
32
+ #include <cstddef>
33
+ #include <cstdbool>
34
+ #include <cstring>
35
+ #include <stdlib.h>
36
+ #include <new>
37
+ #include <type_traits>
38
+ #else
39
+ #include <stdint.h>
40
+ #include <stddef.h>
41
+ #include <stdbool.h>
42
+ #include <string.h>
43
+ #endif
44
+ #if defined(__cplusplus)
45
+ #pragma clang diagnostic push
46
+ #pragma clang diagnostic ignored "-Wnon-modular-include-in-framework-module"
47
+ #if defined(__arm64e__) && __has_include(<ptrauth.h>)
48
+ # include <ptrauth.h>
49
+ #else
50
+ #pragma clang diagnostic push
51
+ #pragma clang diagnostic ignored "-Wreserved-macro-identifier"
52
+ # ifndef __ptrauth_swift_value_witness_function_pointer
53
+ # define __ptrauth_swift_value_witness_function_pointer(x)
54
+ # endif
55
+ # ifndef __ptrauth_swift_class_method_pointer
56
+ # define __ptrauth_swift_class_method_pointer(x)
57
+ # endif
58
+ #pragma clang diagnostic pop
59
+ #endif
60
+ #pragma clang diagnostic pop
61
+ #endif
62
+
63
+ #if !defined(SWIFT_TYPEDEFS)
64
+ # define SWIFT_TYPEDEFS 1
65
+ # if __has_include(<uchar.h>)
66
+ # include <uchar.h>
67
+ # elif !defined(__cplusplus)
68
+ typedef uint_least16_t char16_t;
69
+ typedef uint_least32_t char32_t;
70
+ # endif
71
+ typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
72
+ typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
73
+ typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
74
+ typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
75
+ typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
76
+ typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
77
+ typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
78
+ typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
79
+ typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
80
+ typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
81
+ typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
82
+ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
83
+ #endif
84
+
85
+ #if !defined(SWIFT_PASTE)
86
+ # define SWIFT_PASTE_HELPER(x, y) x##y
87
+ # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
88
+ #endif
89
+ #if !defined(SWIFT_METATYPE)
90
+ # define SWIFT_METATYPE(X) Class
91
+ #endif
92
+ #if !defined(SWIFT_CLASS_PROPERTY)
93
+ # if __has_feature(objc_class_property)
94
+ # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
95
+ # else
96
+ # define SWIFT_CLASS_PROPERTY(...)
97
+ # endif
98
+ #endif
99
+ #if !defined(SWIFT_RUNTIME_NAME)
100
+ # if __has_attribute(objc_runtime_name)
101
+ # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
102
+ # else
103
+ # define SWIFT_RUNTIME_NAME(X)
104
+ # endif
105
+ #endif
106
+ #if !defined(SWIFT_COMPILE_NAME)
107
+ # if __has_attribute(swift_name)
108
+ # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
109
+ # else
110
+ # define SWIFT_COMPILE_NAME(X)
111
+ # endif
112
+ #endif
113
+ #if !defined(SWIFT_METHOD_FAMILY)
114
+ # if __has_attribute(objc_method_family)
115
+ # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
116
+ # else
117
+ # define SWIFT_METHOD_FAMILY(X)
118
+ # endif
119
+ #endif
120
+ #if !defined(SWIFT_NOESCAPE)
121
+ # if __has_attribute(noescape)
122
+ # define SWIFT_NOESCAPE __attribute__((noescape))
123
+ # else
124
+ # define SWIFT_NOESCAPE
125
+ # endif
126
+ #endif
127
+ #if !defined(SWIFT_RELEASES_ARGUMENT)
128
+ # if __has_attribute(ns_consumed)
129
+ # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
130
+ # else
131
+ # define SWIFT_RELEASES_ARGUMENT
132
+ # endif
133
+ #endif
134
+ #if !defined(SWIFT_WARN_UNUSED_RESULT)
135
+ # if __has_attribute(warn_unused_result)
136
+ # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
137
+ # else
138
+ # define SWIFT_WARN_UNUSED_RESULT
139
+ # endif
140
+ #endif
141
+ #if !defined(SWIFT_NORETURN)
142
+ # if __has_attribute(noreturn)
143
+ # define SWIFT_NORETURN __attribute__((noreturn))
144
+ # else
145
+ # define SWIFT_NORETURN
146
+ # endif
147
+ #endif
148
+ #if !defined(SWIFT_CLASS_EXTRA)
149
+ # define SWIFT_CLASS_EXTRA
150
+ #endif
151
+ #if !defined(SWIFT_PROTOCOL_EXTRA)
152
+ # define SWIFT_PROTOCOL_EXTRA
153
+ #endif
154
+ #if !defined(SWIFT_ENUM_EXTRA)
155
+ # define SWIFT_ENUM_EXTRA
156
+ #endif
157
+ #if !defined(SWIFT_CLASS)
158
+ # if __has_attribute(objc_subclassing_restricted)
159
+ # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
160
+ # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
161
+ # else
162
+ # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
163
+ # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
164
+ # endif
165
+ #endif
166
+ #if !defined(SWIFT_RESILIENT_CLASS)
167
+ # if __has_attribute(objc_class_stub)
168
+ # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
169
+ # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
170
+ # else
171
+ # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
172
+ # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
173
+ # endif
174
+ #endif
175
+ #if !defined(SWIFT_PROTOCOL)
176
+ # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
177
+ # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
178
+ #endif
179
+ #if !defined(SWIFT_EXTENSION)
180
+ # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
181
+ #endif
182
+ #if !defined(OBJC_DESIGNATED_INITIALIZER)
183
+ # if __has_attribute(objc_designated_initializer)
184
+ # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
185
+ # else
186
+ # define OBJC_DESIGNATED_INITIALIZER
187
+ # endif
188
+ #endif
189
+ #if !defined(SWIFT_ENUM_ATTR)
190
+ # if __has_attribute(enum_extensibility)
191
+ # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
192
+ # else
193
+ # define SWIFT_ENUM_ATTR(_extensibility)
194
+ # endif
195
+ #endif
196
+ #if !defined(SWIFT_ENUM)
197
+ # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
198
+ # if __has_feature(generalized_swift_name)
199
+ # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
200
+ # else
201
+ # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
202
+ # endif
203
+ #endif
204
+ #if !defined(SWIFT_UNAVAILABLE)
205
+ # define SWIFT_UNAVAILABLE __attribute__((unavailable))
206
+ #endif
207
+ #if !defined(SWIFT_UNAVAILABLE_MSG)
208
+ # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
209
+ #endif
210
+ #if !defined(SWIFT_AVAILABILITY)
211
+ # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
212
+ #endif
213
+ #if !defined(SWIFT_WEAK_IMPORT)
214
+ # define SWIFT_WEAK_IMPORT __attribute__((weak_import))
215
+ #endif
216
+ #if !defined(SWIFT_DEPRECATED)
217
+ # define SWIFT_DEPRECATED __attribute__((deprecated))
218
+ #endif
219
+ #if !defined(SWIFT_DEPRECATED_MSG)
220
+ # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
221
+ #endif
222
+ #if !defined(SWIFT_DEPRECATED_OBJC)
223
+ # if __has_feature(attribute_diagnose_if_objc)
224
+ # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
225
+ # else
226
+ # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
227
+ # endif
228
+ #endif
229
+ #if defined(__OBJC__)
230
+ #if !defined(IBSegueAction)
231
+ # define IBSegueAction
232
+ #endif
233
+ #endif
234
+ #if !defined(SWIFT_EXTERN)
235
+ # if defined(__cplusplus)
236
+ # define SWIFT_EXTERN extern "C"
237
+ # else
238
+ # define SWIFT_EXTERN extern
239
+ # endif
240
+ #endif
241
+ #if !defined(SWIFT_CALL)
242
+ # define SWIFT_CALL __attribute__((swiftcall))
243
+ #endif
244
+ #if !defined(SWIFT_INDIRECT_RESULT)
245
+ # define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
246
+ #endif
247
+ #if !defined(SWIFT_CONTEXT)
248
+ # define SWIFT_CONTEXT __attribute__((swift_context))
249
+ #endif
250
+ #if !defined(SWIFT_ERROR_RESULT)
251
+ # define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
252
+ #endif
253
+ #if defined(__cplusplus)
254
+ # define SWIFT_NOEXCEPT noexcept
255
+ #else
256
+ # define SWIFT_NOEXCEPT
257
+ #endif
258
+ #if !defined(SWIFT_C_INLINE_THUNK)
259
+ # if __has_attribute(always_inline)
260
+ # if __has_attribute(nodebug)
261
+ # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
262
+ # else
263
+ # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
264
+ # endif
265
+ # else
266
+ # define SWIFT_C_INLINE_THUNK inline
267
+ # endif
268
+ #endif
269
+ #if defined(_WIN32)
270
+ #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
271
+ # define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
272
+ #endif
273
+ #else
274
+ #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
275
+ # define SWIFT_IMPORT_STDLIB_SYMBOL
276
+ #endif
277
+ #endif
278
+ #if defined(__OBJC__)
279
+ #if __has_feature(objc_modules)
280
+ #if __has_warning("-Watimport-in-framework-header")
281
+ #pragma clang diagnostic ignored "-Watimport-in-framework-header"
282
+ #endif
283
+ @import CoreFoundation;
284
+ @import Dispatch;
285
+ @import Foundation;
286
+ @import ObjectiveC;
287
+ @import Security;
288
+ @import UIKit;
289
+ #endif
290
+
291
+ #endif
292
+ #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
293
+ #pragma clang diagnostic ignored "-Wduplicate-method-arg"
294
+ #if __has_warning("-Wpragma-clang-attribute")
295
+ # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
296
+ #endif
297
+ #pragma clang diagnostic ignored "-Wunknown-pragmas"
298
+ #pragma clang diagnostic ignored "-Wnullability"
299
+ #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
300
+ #pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
301
+
302
+ #if __has_attribute(external_source_symbol)
303
+ # pragma push_macro("any")
304
+ # undef any
305
+ # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="UBQKit",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
306
+ # pragma pop_macro("any")
307
+ #endif
308
+
309
+ #if defined(__OBJC__)
310
+ @class NSData;
311
+
312
+ SWIFT_CLASS("_TtC6UBQKit6AESCBC")
313
+ @interface AESCBC : NSObject
314
+ + (NSData * _Nullable)encrypt:(NSData * _Nonnull)data using:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
315
+ + (NSData * _Nullable)decrypt:(NSData * _Nonnull)data using:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
316
+ + (NSData * _Nullable)encryptNoPadding:(NSData * _Nonnull)data key:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
317
+ + (NSData * _Nullable)decryptNoPadding:(NSData * _Nonnull)data key:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
318
+ + (NSData * _Nullable)decryptNoPaddingNoIV:(NSData * _Nonnull)data key:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
319
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
320
+ @end
321
+
322
+
323
+ SWIFT_CLASS("_TtC6UBQKit10AESKeyWrap")
324
+ @interface AESKeyWrap : NSObject
325
+ + (NSData * _Nullable)wrapWithKey:(NSData * _Nonnull)key using:(NSData * _Nonnull)wrapperKey SWIFT_WARN_UNUSED_RESULT;
326
+ + (NSData * _Nullable)unwrapWithWrappedKey:(NSData * _Nonnull)wrappedKey using:(NSData * _Nonnull)wrapperKey SWIFT_WARN_UNUSED_RESULT;
327
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
328
+ @end
329
+
330
+ @class NSString;
331
+
332
+ SWIFT_CLASS("_TtC6UBQKit18ApplicationMessage")
333
+ @interface ApplicationMessage : NSObject
334
+ @property (nonatomic, readonly) NSUInteger command;
335
+ @property (nonatomic, readonly, copy) NSString * _Nullable payload;
336
+ @property (nonatomic, readonly, copy) NSData * _Nullable wrappedVerificationKey;
337
+ @property (nonatomic, readonly, copy) NSString * _Nonnull description;
338
+ /// Initialize a UBQ command with payload.
339
+ /// \param command The UBQ command.
340
+ ///
341
+ /// \param payload The payload to send, represented as hex string.
342
+ ///
343
+ /// \param wrappedVerificationKey The wrapped verification key.
344
+ ///
345
+ - (nonnull instancetype)initWithCommand:(NSUInteger)command payload:(NSString * _Nullable)payload wrappedVerificationKey:(NSData * _Nullable)wrappedVerificationKey OBJC_DESIGNATED_INITIALIZER;
346
+ - (nonnull instancetype)initWithCommand:(NSUInteger)command payload:(NSString * _Nullable)payload;
347
+ - (nonnull instancetype)initWithCommand:(NSUInteger)command;
348
+ - (nonnull instancetype)initWithString:(NSString * _Nonnull)string;
349
+ - (BOOL)validateWithCommand:(NSUInteger)command SWIFT_WARN_UNUSED_RESULT;
350
+ - (BOOL)validateWithCommands:(NSArray<NSNumber *> * _Nonnull)commands SWIFT_WARN_UNUSED_RESULT;
351
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
352
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
353
+ @end
354
+
355
+ @class Token;
356
+ @class IdentityProvider;
357
+ enum AssetState : NSInteger;
358
+ @class NSCoder;
359
+ @class UBQCardRequest;
360
+
361
+ SWIFT_CLASS("_TtC6UBQKit5Asset")
362
+ @interface Asset : NSObject
363
+ /// The token of the channel associated with the asset.
364
+ @property (nonatomic, readonly, strong) Token * _Nonnull channelToken;
365
+ @property (nonatomic, unsafe_unretained) IdentityProvider * _Null_unspecified identityProvider;
366
+ /// The token of the idp that owns the asset.
367
+ @property (nonatomic, readonly, strong) Token * _Nonnull idpToken;
368
+ /// The badge number shown in the profiles screen.
369
+ @property (nonatomic) NSInteger badgeNumber;
370
+ /// Is biometric authentication enabled for this asset.
371
+ @property (nonatomic) BOOL biometricAuthentication;
372
+ @property (nonatomic) BOOL deviceKeyUsed;
373
+ @property (nonatomic) BOOL usesSVM;
374
+ /// The label used to display the asset.
375
+ @property (nonatomic, copy) NSString * _Nonnull label;
376
+ /// The known asset state. This should be modified if the asset is locked or revoked.
377
+ @property (nonatomic) enum AssetState state;
378
+ - (nonnull instancetype)initWithChannelToken:(Token * _Nonnull)channelToken identityProvider:(IdentityProvider * _Nonnull)identityProvider OBJC_DESIGNATED_INITIALIZER;
379
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
380
+ /// Create an asset.
381
+ /// \param token The token of the asset.
382
+ ///
383
+ /// \param provider The identity provider of the asset.
384
+ ///
385
+ /// \param name The name of the asset.
386
+ ///
387
+ - (nonnull instancetype)initWithToken:(Token * _Nonnull)token provider:(IdentityProvider * _Nonnull)provider OBJC_DESIGNATED_INITIALIZER;
388
+ - (void)revokeWithCompletionBlock:(void (^ _Nullable)(BOOL, NSError * _Nullable))completionBlock;
389
+ @property (nonatomic, readonly, copy) NSString * _Nonnull description;
390
+ - (NSData * _Nullable)getSVMWithKey:(NSInteger)key direction:(NSInteger)direction SWIFT_WARN_UNUSED_RESULT;
391
+ - (NSData * _Nullable)getSVMWithCardRequest:(UBQCardRequest * _Nonnull)cardRequest direction:(NSInteger)direction SWIFT_WARN_UNUSED_RESULT;
392
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
393
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
394
+ @end
395
+
396
+ typedef SWIFT_ENUM(NSInteger, AssetState, open) {
397
+ AssetStateNormal = 0,
398
+ AssetStateLocked = 1,
399
+ AssetStateRevoked = 2,
400
+ };
401
+
402
+
403
+ @interface Asset (SWIFT_EXTENSION(UBQKit)) <NSCoding>
404
+ - (void)encodeWithCoder:(NSCoder * _Nonnull)coder;
405
+ @end
406
+
407
+
408
+ SWIFT_CLASS("_TtC6UBQKit12AssetManager")
409
+ @interface AssetManager : NSObject
410
+ /// The default asset manager.
411
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) AssetManager * _Nonnull standard;)
412
+ + (AssetManager * _Nonnull)standard SWIFT_WARN_UNUSED_RESULT;
413
+ + (void)setStandard:(AssetManager * _Nonnull)value;
414
+ - (BOOL)removeAssetForToken:(Token * _Nonnull)assetToken;
415
+ - (void)save;
416
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
417
+ @end
418
+
419
+
420
+ @class Domain;
421
+
422
+ SWIFT_CLASS("_TtC6UBQKit12ChannelState")
423
+ @interface ChannelState : NSObject <NSCoding>
424
+ /// Address of this end point to the associated channel.
425
+ @property (nonatomic, strong) Token * _Nonnull token;
426
+ /// Domain that specifies the server at the end of the associated channel. This should be the domain whose serverToken corresponds to the ChannelState’s serverToken.
427
+ @property (nonatomic, strong) Domain * _Nonnull domain;
428
+ /// The encrypted master key.
429
+ @property (nonatomic, copy) NSData * _Nullable wrappedMasterKey;
430
+ /// The encrypted active channel key.
431
+ @property (nonatomic, copy) NSData * _Nullable wrappedChannelKey;
432
+ @property (nonatomic, copy) NSString * _Nullable apnsRegistrationID;
433
+ @property (nonatomic, copy) NSData * _Nullable svm;
434
+ @property (nonatomic, readonly) BOOL isInitial;
435
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
436
+ - (void)registerForToken:(Token * _Nonnull)token wrappedChannelKey:(NSData * _Nonnull)wrappedChannelKey;
437
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
438
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
439
+ @end
440
+
441
+
442
+ @interface ChannelState (SWIFT_EXTENSION(UBQKit))
443
+ - (void)encodeWithCoder:(NSCoder * _Nonnull)coder;
444
+ @end
445
+
446
+
447
+ SWIFT_CLASS("_TtC6UBQKit6Domain")
448
+ @interface Domain : NSObject
449
+ /// The current domain.
450
+ /// note:
451
+ /// There is only one domain per application.
452
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) Domain * _Null_unspecified current;)
453
+ + (Domain * _Null_unspecified)current SWIFT_WARN_UNUSED_RESULT;
454
+ + (void)setCurrent:(Domain * _Null_unspecified)value;
455
+ /// The public key data.
456
+ @property (nonatomic, readonly, copy) NSData * _Nonnull publicKeyData;
457
+ /// All loaded assets.
458
+ @property (nonatomic, readonly, copy) NSArray<Asset *> * _Nonnull assets;
459
+ /// Retrieve an asset by its token.
460
+ /// \param token The token to search with.
461
+ ///
462
+ ///
463
+ /// returns:
464
+ /// The found asset or <code>nil</code> when it was not found.
465
+ - (Asset * _Nullable)assetFor:(Token * _Nonnull)token SWIFT_WARN_UNUSED_RESULT;
466
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
467
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
468
+ @end
469
+
470
+ @class DomainSecurityModule;
471
+ @class UBQPacket;
472
+
473
+ SWIFT_CLASS("_TtC6UBQKit13DomainChannel")
474
+ @interface DomainChannel : NSObject
475
+ /// Stores the security module used to sign and verify UBQ packets.
476
+ @property (nonatomic, readonly, strong) DomainSecurityModule * _Nonnull securityModule;
477
+ /// Stores the state of the connection.
478
+ @property (nonatomic, readonly, strong) ChannelState * _Nonnull channelState;
479
+ - (nonnull instancetype)initWithDomainSecurityModule:(DomainSecurityModule * _Nonnull)dsm channelState:(ChannelState * _Nonnull)channelState OBJC_DESIGNATED_INITIALIZER;
480
+ - (void)send:(ApplicationMessage * _Nonnull)msg priority:(BOOL)priority success:(void (^ _Nonnull)(ApplicationMessage * _Nonnull))success failure:(void (^ _Nonnull)(NSError * _Nonnull))failure;
481
+ - (void)send:(ApplicationMessage * _Nonnull)msg success:(void (^ _Nonnull)(ApplicationMessage * _Nonnull))success failure:(void (^ _Nonnull)(NSError * _Nonnull))failure;
482
+ - (dispatch_semaphore_t _Nonnull)setBlock SWIFT_WARN_UNUSED_RESULT;
483
+ - (UBQPacket * _Nonnull)createSignedPacketFromPayload:(NSString * _Nonnull)payload SWIFT_WARN_UNUSED_RESULT;
484
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
485
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
486
+ @end
487
+
488
+
489
+ SWIFT_CLASS("_TtC6UBQKit13DomainManager")
490
+ @interface DomainManager : NSObject
491
+ /// The default domain manager.
492
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) DomainManager * _Nonnull standard;)
493
+ + (DomainManager * _Nonnull)standard SWIFT_WARN_UNUSED_RESULT;
494
+ + (void)setStandard:(DomainManager * _Nonnull)value;
495
+ /// Stores a reference to the security module used to authenticate messages.
496
+ @property (nonatomic, readonly, strong) DomainSecurityModule * _Nonnull securityModule;
497
+ /// Creates an unitialized channel for the default domain.
498
+ /// TODO: When in full Swift, add the throws
499
+ - (DomainChannel * _Nullable)createChannel SWIFT_WARN_UNUSED_RESULT;
500
+ /// Add a channel state to the list of the registered channel states.
501
+ - (void)addWithChannelState:(ChannelState * _Nonnull)state;
502
+ - (DomainChannel * _Nullable)channelForChannelToken:(Token * _Nonnull)token SWIFT_WARN_UNUSED_RESULT;
503
+ /// Save the channel states and write to disk.
504
+ - (void)save;
505
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
506
+ @end
507
+
508
+
509
+ SWIFT_CLASS("_TtC6UBQKit9FMVersion")
510
+ @interface FMVersion : NSObject
511
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
512
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
513
+ @end
514
+
515
+
516
+
517
+
518
+ SWIFT_CLASS("_TtC6UBQKit10HMACSHA256")
519
+ @interface HMACSHA256 : NSObject
520
+ /// Calculate the HMAC using SHA-256 for the data.
521
+ /// \param data The data to mac.
522
+ ///
523
+ /// \param key The key used to mac.
524
+ ///
525
+ ///
526
+ /// returns:
527
+ /// The computed HMAC.
528
+ + (NSData * _Nonnull)mac:(NSData * _Nonnull)data key:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
529
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
530
+ @end
531
+
532
+
533
+ SWIFT_CLASS("_TtC6UBQKit16IdentityProvider")
534
+ @interface IdentityProvider : NSObject
535
+ /// The identifier.
536
+ @property (nonatomic, readonly, strong) Token * _Nonnull token;
537
+ /// The name.
538
+ @property (nonatomic, readonly, copy) NSString * _Nonnull name;
539
+ /// The public key.
540
+ @property (nonatomic, readonly, copy) NSData * _Nonnull publicKey;
541
+ /// The URL scheme used for URL scheme querying.
542
+ @property (nonatomic, copy) NSString * _Nullable urlScheme;
543
+ /// The theme of the identity provider.
544
+ @property (nonatomic, readonly) NSInteger theme;
545
+ /// The assets of the identity provider.
546
+ @property (nonatomic, copy) NSArray<Asset *> * _Nonnull assets;
547
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
548
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
549
+ @end
550
+
551
+
552
+
553
+
554
+ @interface NSData (SWIFT_EXTENSION(UBQKit))
555
+ /// Generate random data of a specific size.
556
+ /// note:
557
+ /// Uses both a system random and a mersenne twister implementation.
558
+ /// \param size The number of random bytes to generate.
559
+ ///
560
+ ///
561
+ /// returns:
562
+ /// The randomly generated bytes.
563
+ + (NSData * _Nonnull)randomOfSize:(NSInteger)size SWIFT_WARN_UNUSED_RESULT;
564
+ @end
565
+
566
+
567
+ @interface NSData (SWIFT_EXTENSION(UBQKit))
568
+ /// Initialize a <code>Data</code> object from a hexadecimal <code>String</code>.
569
+ /// note:
570
+ /// The initializer will fail when invalid hexadecimal data is provided.
571
+ /// \param hexString The hexadecimal string.
572
+ ///
573
+ - (nullable instancetype)initWithHexString:(NSString * _Nonnull)hexString;
574
+ /// Retrieve the hexadecimal string for the data.
575
+ @property (nonatomic, readonly, copy) NSString * _Nonnull hexadecimal;
576
+ /// XOR operation for two <code>NSData</code> objects.
577
+ /// note:
578
+ /// The function will fail if the two parameters differ from size.
579
+ /// \param lhs The first <code>NSData</code> object.
580
+ ///
581
+ /// \param rhs The second <code>NSData</code> object.
582
+ ///
583
+ + (NSData * _Nonnull)xorWithBytes:(NSData * _Nonnull)lhs with:(NSData * _Nonnull)rhs SWIFT_WARN_UNUSED_RESULT;
584
+ @end
585
+
586
+
587
+ @interface NSDate (SWIFT_EXTENSION(UBQKit))
588
+ /// Creates a 4-byte UNIX timestamp of the specified date and time.
589
+ @property (nonatomic, readonly, strong) NSString * _Nonnull hexTimeStamp;
590
+ @end
591
+
592
+
593
+ @interface NSString (SWIFT_EXTENSION(UBQKit))
594
+ /// Indication if a <code>String</code> contains only hexadecimal characters.
595
+ @property (nonatomic, readonly) BOOL isHexString;
596
+ - (NSString * _Nonnull)insertWithSeparator:(NSString * _Nonnull)separator every:(NSInteger)n SWIFT_WARN_UNUSED_RESULT;
597
+ @end
598
+
599
+
600
+ SWIFT_CLASS("_TtC6UBQKit3RSA")
601
+ @interface RSA : NSObject
602
+ + (NSData * _Nullable)encrypt:(NSData * _Nonnull)data publicKeyData:(NSData * _Nonnull)keyData SWIFT_WARN_UNUSED_RESULT;
603
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
604
+ @end
605
+
606
+
607
+ SWIFT_CLASS("_TtC6UBQKit14SecKeyDelegate")
608
+ @interface SecKeyDelegate : NSObject
609
+ /// This is a replacement for the old <code>RootStore</code>.
610
+ /// \param alias The alias/identifier of the secret key.
611
+ ///
612
+ /// \param overwrite Boolean value indicating whether or not the key should be overwritten or not.
613
+ ///
614
+ + (NSData * _Nonnull)secretKeyWithAlias:(NSString * _Nonnull)alias overwrite:(BOOL)overwrite SWIFT_WARN_UNUSED_RESULT;
615
+ /// The Objective-C helper function, as the <code>Tags</code> class is unavailable.
616
+ /// \param identifier The identifier of the key.
617
+ ///
618
+ + (NSData * _Nullable)getSymmetricKeyWithIdentifier:(NSString * _Nonnull)identifier SWIFT_WARN_UNUSED_RESULT;
619
+ + (void)storeSymmetricKeyWithIdentifier:(NSString * _Nonnull)identifier key:(NSData * _Nonnull)key;
620
+ + (void)deleteSymmetricKeyWithIdentifier:(NSString * _Nonnull)identifier;
621
+ + (NSData * _Nullable)wrapWithKey:(NSData * _Nonnull)key with:(NSData * _Nonnull)wrapperKey SWIFT_WARN_UNUSED_RESULT;
622
+ + (NSData * _Nullable)unwrapWithKey:(NSData * _Nonnull)key with:(NSData * _Nonnull)wrapperKey SWIFT_WARN_UNUSED_RESULT;
623
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
624
+ @end
625
+
626
+
627
+ /// Objective-C helper class.
628
+ /// The nested <code>Tags</code> class in the <code>SecKeyDelegate</code> object cannot be accessed with Objective-C.
629
+ /// This class will assist in that matter.
630
+ SWIFT_CLASS("_TtC6UBQKit18SecKeyDelegateTags")
631
+ @interface SecKeyDelegateTags : NSObject
632
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull assets;)
633
+ + (NSString * _Nonnull)assets SWIFT_WARN_UNUSED_RESULT;
634
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull secureState;)
635
+ + (NSString * _Nonnull)secureState SWIFT_WARN_UNUSED_RESULT;
636
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull secureStateOld;)
637
+ + (NSString * _Nonnull)secureStateOld SWIFT_WARN_UNUSED_RESULT;
638
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull channelState;)
639
+ + (NSString * _Nonnull)channelState SWIFT_WARN_UNUSED_RESULT;
640
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull channelStateOld;)
641
+ + (NSString * _Nonnull)channelStateOld SWIFT_WARN_UNUSED_RESULT;
642
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull wrapper;)
643
+ + (NSString * _Nonnull)wrapper SWIFT_WARN_UNUSED_RESULT;
644
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
645
+ @end
646
+
647
+
648
+ SWIFT_CLASS("_TtC6UBQKit20SecureEnclaveManager")
649
+ @interface SecureEnclaveManager : NSObject
650
+ /// Create an ECDSA X962 SHA-256 signature of data. Data will be hashed by the functon.
651
+ + (NSData * _Nullable)signWithKey:(SecKeyRef _Nonnull)key data:(NSData * _Nonnull)data error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
652
+ /// Returns a DER formatted publick key based upon the reference to the private key
653
+ + (NSData * _Nullable)getPublicKeyDerFormatted:(SecKeyRef _Nonnull)privateKeyReference error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
654
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
655
+ @end
656
+
657
+
658
+ SWIFT_CLASS("_TtC6UBQKit15TemporaryHelper")
659
+ @interface TemporaryHelper : NSObject
660
+ + (void)decodeCardRequest:(NSData * _Nonnull)data;
661
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
662
+ @end
663
+
664
+
665
+ SWIFT_CLASS("_TtC6UBQKit5Token")
666
+ @interface Token : NSObject <NSCoding>
667
+ /// Contains the byte data for the token.
668
+ @property (nonatomic, readonly, copy) NSData * _Nonnull data;
669
+ @property (nonatomic, readonly, copy) NSString * _Nonnull hexValue;
670
+ @property (nonatomic, readonly, copy) NSString * _Nonnull description;
671
+ + (Token * _Nullable)tokenWithHexString:(NSString * _Nonnull)hex SWIFT_WARN_UNUSED_RESULT;
672
+ + (Token * _Nullable)tokenWithData:(NSData * _Nonnull)data SWIFT_WARN_UNUSED_RESULT;
673
+ - (nullable instancetype)initWithHexString:(NSString * _Nonnull)hexString;
674
+ - (BOOL)isEqualTo:(Token * _Nonnull)token SWIFT_WARN_UNUSED_RESULT;
675
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
676
+ - (void)encodeWithCoder:(NSCoder * _Nonnull)coder;
677
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
678
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
679
+ @end
680
+
681
+
682
+ @interface Token (SWIFT_EXTENSION(UBQKit)) <NSCopying>
683
+ - (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
684
+ @end
685
+
686
+
687
+ SWIFT_CLASS("_TtC6UBQKit14UBQInternalPad")
688
+ @interface UBQInternalPad : UIView
689
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
690
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
691
+ - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
692
+ @end
693
+
694
+
695
+
696
+ SWIFT_CLASS("_TtC6UBQKit9UBQKeyPad")
697
+ @interface UBQKeyPad : UBQInternalPad
698
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
699
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
700
+ @end
701
+
702
+
703
+ SWIFT_CLASS("_TtC6UBQKit9UBQPinPad")
704
+ @interface UBQPinPad : UBQInternalPad
705
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
706
+ @end
707
+
708
+
709
+ SWIFT_CLASS("_TtC6UBQKit19UBQSecurityStrategy")
710
+ @interface UBQSecurityStrategy : NSObject
711
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) UBQSecurityStrategy * _Nonnull standard;)
712
+ + (UBQSecurityStrategy * _Nonnull)standard SWIFT_WARN_UNUSED_RESULT;
713
+ + (void)setStandard:(UBQSecurityStrategy * _Nonnull)value;
714
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
715
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
716
+ - (BOOL)verify:(NSData * _Nonnull)message signature:(NSData * _Nonnull)signature publicSlotGroupKey:(NSData * _Nonnull)publicSlotGroupKey SWIFT_WARN_UNUSED_RESULT;
717
+ - (NSData * _Nullable)createTransportKeysWithProviderID:(NSData * _Nonnull)providerID cardUUID:(NSData * _Nonnull)cardUUID hashes:(NSData * _Nonnull)hashes SWIFT_WARN_UNUSED_RESULT;
718
+ - (NSData * _Nullable)encryptedPhoneRandom:(NSData * _Nonnull)publicSlotGroupKey SWIFT_WARN_UNUSED_RESULT;
719
+ /// Encrypt bind response for V1/V3
720
+ - (NSData * _Nullable)aesEncryptedBindResponseWithProviderID:(NSData * _Nonnull)providerID cardUUID:(NSData * _Nonnull)cardUUID hashes:(NSData * _Nonnull)hashes hsmRandom:(NSData * _Nonnull)hsmRandom SWIFT_WARN_UNUSED_RESULT;
721
+ /// Encrypt bind response for V4 (contains device public key)
722
+ - (NSData * _Nullable)aesEncryptedBindResponseWithProviderID:(NSData * _Nonnull)providerID cardUUID:(NSData * _Nonnull)cardUUID hashes:(NSData * _Nonnull)hashes hsmRandom:(NSData * _Nonnull)hsmRandom devicePublicKey:(NSData * _Nonnull)devicePublicKey SWIFT_WARN_UNUSED_RESULT;
723
+ - (NSData * _Nullable)decryptWithDisplayKey:(NSData * _Nonnull)providerId cardUUID:(NSData * _Nonnull)cardUUID hash:(NSData * _Nonnull)hash cipherText:(NSData * _Nonnull)cipherText svm:(NSData * _Nullable)svmKey SWIFT_WARN_UNUSED_RESULT;
724
+ - (NSData * _Nullable)encryptWithEntryKey:(NSData * _Nonnull)providerId cardUUID:(NSData * _Nonnull)cardUUID hash:(NSData * _Nonnull)hash plainText:(NSData * _Nonnull)plainText svm:(NSData * _Nullable)svmKey SWIFT_WARN_UNUSED_RESULT;
725
+ @end
726
+
727
+
728
+
729
+
730
+
731
+
732
+
733
+
734
+ SWIFT_CLASS("_TtC6UBQKit18UITransactionTitle")
735
+ @interface UITransactionTitle : UILabel
736
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
737
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
738
+ - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
739
+ @end
740
+
741
+
742
+ SWIFT_CLASS("_TtC6UBQKit6UbqSdk")
743
+ @interface UbqSdk : NSObject
744
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nullable sdkHeader;)
745
+ + (NSString * _Nullable)sdkHeader SWIFT_WARN_UNUSED_RESULT;
746
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
747
+ @end
748
+
749
+
750
+
751
+
752
+ #endif
753
+ #if __has_attribute(external_source_symbol)
754
+ # pragma clang attribute pop
755
+ #endif
756
+ #if defined(__cplusplus)
757
+ #endif
758
+ #pragma clang diagnostic pop
759
+ #endif
760
+
761
+ #elif defined(__x86_64__) && __x86_64__
762
+ // Generated by Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
763
+ #ifndef UBQKIT_SWIFT_H
764
+ #define UBQKIT_SWIFT_H
765
+ #pragma clang diagnostic push
766
+ #pragma clang diagnostic ignored "-Wgcc-compat"
767
+
768
+ #if !defined(__has_include)
769
+ # define __has_include(x) 0
770
+ #endif
771
+ #if !defined(__has_attribute)
772
+ # define __has_attribute(x) 0
773
+ #endif
774
+ #if !defined(__has_feature)
775
+ # define __has_feature(x) 0
776
+ #endif
777
+ #if !defined(__has_warning)
778
+ # define __has_warning(x) 0
779
+ #endif
780
+
781
+ #if __has_include(<swift/objc-prologue.h>)
782
+ # include <swift/objc-prologue.h>
783
+ #endif
784
+
785
+ #pragma clang diagnostic ignored "-Wauto-import"
786
+ #if defined(__OBJC__)
787
+ #include <Foundation/Foundation.h>
788
+ #endif
789
+ #if defined(__cplusplus)
790
+ #include <cstdint>
791
+ #include <cstddef>
792
+ #include <cstdbool>
793
+ #include <cstring>
794
+ #include <stdlib.h>
795
+ #include <new>
796
+ #include <type_traits>
797
+ #else
798
+ #include <stdint.h>
799
+ #include <stddef.h>
800
+ #include <stdbool.h>
801
+ #include <string.h>
802
+ #endif
803
+ #if defined(__cplusplus)
804
+ #pragma clang diagnostic push
805
+ #pragma clang diagnostic ignored "-Wnon-modular-include-in-framework-module"
806
+ #if defined(__arm64e__) && __has_include(<ptrauth.h>)
807
+ # include <ptrauth.h>
808
+ #else
809
+ #pragma clang diagnostic push
810
+ #pragma clang diagnostic ignored "-Wreserved-macro-identifier"
811
+ # ifndef __ptrauth_swift_value_witness_function_pointer
812
+ # define __ptrauth_swift_value_witness_function_pointer(x)
813
+ # endif
814
+ # ifndef __ptrauth_swift_class_method_pointer
815
+ # define __ptrauth_swift_class_method_pointer(x)
816
+ # endif
817
+ #pragma clang diagnostic pop
818
+ #endif
819
+ #pragma clang diagnostic pop
820
+ #endif
821
+
822
+ #if !defined(SWIFT_TYPEDEFS)
823
+ # define SWIFT_TYPEDEFS 1
824
+ # if __has_include(<uchar.h>)
825
+ # include <uchar.h>
826
+ # elif !defined(__cplusplus)
827
+ typedef uint_least16_t char16_t;
828
+ typedef uint_least32_t char32_t;
829
+ # endif
830
+ typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
831
+ typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
832
+ typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
833
+ typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
834
+ typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
835
+ typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
836
+ typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
837
+ typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
838
+ typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
839
+ typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
840
+ typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
841
+ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
842
+ #endif
843
+
844
+ #if !defined(SWIFT_PASTE)
845
+ # define SWIFT_PASTE_HELPER(x, y) x##y
846
+ # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
847
+ #endif
848
+ #if !defined(SWIFT_METATYPE)
849
+ # define SWIFT_METATYPE(X) Class
850
+ #endif
851
+ #if !defined(SWIFT_CLASS_PROPERTY)
852
+ # if __has_feature(objc_class_property)
853
+ # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
854
+ # else
855
+ # define SWIFT_CLASS_PROPERTY(...)
856
+ # endif
857
+ #endif
858
+ #if !defined(SWIFT_RUNTIME_NAME)
859
+ # if __has_attribute(objc_runtime_name)
860
+ # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
861
+ # else
862
+ # define SWIFT_RUNTIME_NAME(X)
863
+ # endif
864
+ #endif
865
+ #if !defined(SWIFT_COMPILE_NAME)
866
+ # if __has_attribute(swift_name)
867
+ # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
868
+ # else
869
+ # define SWIFT_COMPILE_NAME(X)
870
+ # endif
871
+ #endif
872
+ #if !defined(SWIFT_METHOD_FAMILY)
873
+ # if __has_attribute(objc_method_family)
874
+ # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
875
+ # else
876
+ # define SWIFT_METHOD_FAMILY(X)
877
+ # endif
878
+ #endif
879
+ #if !defined(SWIFT_NOESCAPE)
880
+ # if __has_attribute(noescape)
881
+ # define SWIFT_NOESCAPE __attribute__((noescape))
882
+ # else
883
+ # define SWIFT_NOESCAPE
884
+ # endif
885
+ #endif
886
+ #if !defined(SWIFT_RELEASES_ARGUMENT)
887
+ # if __has_attribute(ns_consumed)
888
+ # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
889
+ # else
890
+ # define SWIFT_RELEASES_ARGUMENT
891
+ # endif
892
+ #endif
893
+ #if !defined(SWIFT_WARN_UNUSED_RESULT)
894
+ # if __has_attribute(warn_unused_result)
895
+ # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
896
+ # else
897
+ # define SWIFT_WARN_UNUSED_RESULT
898
+ # endif
899
+ #endif
900
+ #if !defined(SWIFT_NORETURN)
901
+ # if __has_attribute(noreturn)
902
+ # define SWIFT_NORETURN __attribute__((noreturn))
903
+ # else
904
+ # define SWIFT_NORETURN
905
+ # endif
906
+ #endif
907
+ #if !defined(SWIFT_CLASS_EXTRA)
908
+ # define SWIFT_CLASS_EXTRA
909
+ #endif
910
+ #if !defined(SWIFT_PROTOCOL_EXTRA)
911
+ # define SWIFT_PROTOCOL_EXTRA
912
+ #endif
913
+ #if !defined(SWIFT_ENUM_EXTRA)
914
+ # define SWIFT_ENUM_EXTRA
915
+ #endif
916
+ #if !defined(SWIFT_CLASS)
917
+ # if __has_attribute(objc_subclassing_restricted)
918
+ # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
919
+ # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
920
+ # else
921
+ # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
922
+ # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
923
+ # endif
924
+ #endif
925
+ #if !defined(SWIFT_RESILIENT_CLASS)
926
+ # if __has_attribute(objc_class_stub)
927
+ # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
928
+ # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
929
+ # else
930
+ # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
931
+ # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
932
+ # endif
933
+ #endif
934
+ #if !defined(SWIFT_PROTOCOL)
935
+ # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
936
+ # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
937
+ #endif
938
+ #if !defined(SWIFT_EXTENSION)
939
+ # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
940
+ #endif
941
+ #if !defined(OBJC_DESIGNATED_INITIALIZER)
942
+ # if __has_attribute(objc_designated_initializer)
943
+ # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
944
+ # else
945
+ # define OBJC_DESIGNATED_INITIALIZER
946
+ # endif
947
+ #endif
948
+ #if !defined(SWIFT_ENUM_ATTR)
949
+ # if __has_attribute(enum_extensibility)
950
+ # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
951
+ # else
952
+ # define SWIFT_ENUM_ATTR(_extensibility)
953
+ # endif
954
+ #endif
955
+ #if !defined(SWIFT_ENUM)
956
+ # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
957
+ # if __has_feature(generalized_swift_name)
958
+ # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
959
+ # else
960
+ # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
961
+ # endif
962
+ #endif
963
+ #if !defined(SWIFT_UNAVAILABLE)
964
+ # define SWIFT_UNAVAILABLE __attribute__((unavailable))
965
+ #endif
966
+ #if !defined(SWIFT_UNAVAILABLE_MSG)
967
+ # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
968
+ #endif
969
+ #if !defined(SWIFT_AVAILABILITY)
970
+ # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
971
+ #endif
972
+ #if !defined(SWIFT_WEAK_IMPORT)
973
+ # define SWIFT_WEAK_IMPORT __attribute__((weak_import))
974
+ #endif
975
+ #if !defined(SWIFT_DEPRECATED)
976
+ # define SWIFT_DEPRECATED __attribute__((deprecated))
977
+ #endif
978
+ #if !defined(SWIFT_DEPRECATED_MSG)
979
+ # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
980
+ #endif
981
+ #if !defined(SWIFT_DEPRECATED_OBJC)
982
+ # if __has_feature(attribute_diagnose_if_objc)
983
+ # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
984
+ # else
985
+ # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
986
+ # endif
987
+ #endif
988
+ #if defined(__OBJC__)
989
+ #if !defined(IBSegueAction)
990
+ # define IBSegueAction
991
+ #endif
992
+ #endif
993
+ #if !defined(SWIFT_EXTERN)
994
+ # if defined(__cplusplus)
995
+ # define SWIFT_EXTERN extern "C"
996
+ # else
997
+ # define SWIFT_EXTERN extern
998
+ # endif
999
+ #endif
1000
+ #if !defined(SWIFT_CALL)
1001
+ # define SWIFT_CALL __attribute__((swiftcall))
1002
+ #endif
1003
+ #if !defined(SWIFT_INDIRECT_RESULT)
1004
+ # define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
1005
+ #endif
1006
+ #if !defined(SWIFT_CONTEXT)
1007
+ # define SWIFT_CONTEXT __attribute__((swift_context))
1008
+ #endif
1009
+ #if !defined(SWIFT_ERROR_RESULT)
1010
+ # define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
1011
+ #endif
1012
+ #if defined(__cplusplus)
1013
+ # define SWIFT_NOEXCEPT noexcept
1014
+ #else
1015
+ # define SWIFT_NOEXCEPT
1016
+ #endif
1017
+ #if !defined(SWIFT_C_INLINE_THUNK)
1018
+ # if __has_attribute(always_inline)
1019
+ # if __has_attribute(nodebug)
1020
+ # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
1021
+ # else
1022
+ # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
1023
+ # endif
1024
+ # else
1025
+ # define SWIFT_C_INLINE_THUNK inline
1026
+ # endif
1027
+ #endif
1028
+ #if defined(_WIN32)
1029
+ #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
1030
+ # define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
1031
+ #endif
1032
+ #else
1033
+ #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
1034
+ # define SWIFT_IMPORT_STDLIB_SYMBOL
1035
+ #endif
1036
+ #endif
1037
+ #if defined(__OBJC__)
1038
+ #if __has_feature(objc_modules)
1039
+ #if __has_warning("-Watimport-in-framework-header")
1040
+ #pragma clang diagnostic ignored "-Watimport-in-framework-header"
1041
+ #endif
1042
+ @import CoreFoundation;
1043
+ @import Dispatch;
1044
+ @import Foundation;
1045
+ @import ObjectiveC;
1046
+ @import Security;
1047
+ @import UIKit;
1048
+ #endif
1049
+
1050
+ #endif
1051
+ #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
1052
+ #pragma clang diagnostic ignored "-Wduplicate-method-arg"
1053
+ #if __has_warning("-Wpragma-clang-attribute")
1054
+ # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
1055
+ #endif
1056
+ #pragma clang diagnostic ignored "-Wunknown-pragmas"
1057
+ #pragma clang diagnostic ignored "-Wnullability"
1058
+ #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
1059
+ #pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
1060
+
1061
+ #if __has_attribute(external_source_symbol)
1062
+ # pragma push_macro("any")
1063
+ # undef any
1064
+ # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="UBQKit",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
1065
+ # pragma pop_macro("any")
1066
+ #endif
1067
+
1068
+ #if defined(__OBJC__)
1069
+ @class NSData;
1070
+
1071
+ SWIFT_CLASS("_TtC6UBQKit6AESCBC")
1072
+ @interface AESCBC : NSObject
1073
+ + (NSData * _Nullable)encrypt:(NSData * _Nonnull)data using:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
1074
+ + (NSData * _Nullable)decrypt:(NSData * _Nonnull)data using:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
1075
+ + (NSData * _Nullable)encryptNoPadding:(NSData * _Nonnull)data key:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
1076
+ + (NSData * _Nullable)decryptNoPadding:(NSData * _Nonnull)data key:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
1077
+ + (NSData * _Nullable)decryptNoPaddingNoIV:(NSData * _Nonnull)data key:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
1078
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1079
+ @end
1080
+
1081
+
1082
+ SWIFT_CLASS("_TtC6UBQKit10AESKeyWrap")
1083
+ @interface AESKeyWrap : NSObject
1084
+ + (NSData * _Nullable)wrapWithKey:(NSData * _Nonnull)key using:(NSData * _Nonnull)wrapperKey SWIFT_WARN_UNUSED_RESULT;
1085
+ + (NSData * _Nullable)unwrapWithWrappedKey:(NSData * _Nonnull)wrappedKey using:(NSData * _Nonnull)wrapperKey SWIFT_WARN_UNUSED_RESULT;
1086
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1087
+ @end
1088
+
1089
+ @class NSString;
1090
+
1091
+ SWIFT_CLASS("_TtC6UBQKit18ApplicationMessage")
1092
+ @interface ApplicationMessage : NSObject
1093
+ @property (nonatomic, readonly) NSUInteger command;
1094
+ @property (nonatomic, readonly, copy) NSString * _Nullable payload;
1095
+ @property (nonatomic, readonly, copy) NSData * _Nullable wrappedVerificationKey;
1096
+ @property (nonatomic, readonly, copy) NSString * _Nonnull description;
1097
+ /// Initialize a UBQ command with payload.
1098
+ /// \param command The UBQ command.
1099
+ ///
1100
+ /// \param payload The payload to send, represented as hex string.
1101
+ ///
1102
+ /// \param wrappedVerificationKey The wrapped verification key.
1103
+ ///
1104
+ - (nonnull instancetype)initWithCommand:(NSUInteger)command payload:(NSString * _Nullable)payload wrappedVerificationKey:(NSData * _Nullable)wrappedVerificationKey OBJC_DESIGNATED_INITIALIZER;
1105
+ - (nonnull instancetype)initWithCommand:(NSUInteger)command payload:(NSString * _Nullable)payload;
1106
+ - (nonnull instancetype)initWithCommand:(NSUInteger)command;
1107
+ - (nonnull instancetype)initWithString:(NSString * _Nonnull)string;
1108
+ - (BOOL)validateWithCommand:(NSUInteger)command SWIFT_WARN_UNUSED_RESULT;
1109
+ - (BOOL)validateWithCommands:(NSArray<NSNumber *> * _Nonnull)commands SWIFT_WARN_UNUSED_RESULT;
1110
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1111
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1112
+ @end
1113
+
1114
+ @class Token;
1115
+ @class IdentityProvider;
1116
+ enum AssetState : NSInteger;
1117
+ @class NSCoder;
1118
+ @class UBQCardRequest;
1119
+
1120
+ SWIFT_CLASS("_TtC6UBQKit5Asset")
1121
+ @interface Asset : NSObject
1122
+ /// The token of the channel associated with the asset.
1123
+ @property (nonatomic, readonly, strong) Token * _Nonnull channelToken;
1124
+ @property (nonatomic, unsafe_unretained) IdentityProvider * _Null_unspecified identityProvider;
1125
+ /// The token of the idp that owns the asset.
1126
+ @property (nonatomic, readonly, strong) Token * _Nonnull idpToken;
1127
+ /// The badge number shown in the profiles screen.
1128
+ @property (nonatomic) NSInteger badgeNumber;
1129
+ /// Is biometric authentication enabled for this asset.
1130
+ @property (nonatomic) BOOL biometricAuthentication;
1131
+ @property (nonatomic) BOOL deviceKeyUsed;
1132
+ @property (nonatomic) BOOL usesSVM;
1133
+ /// The label used to display the asset.
1134
+ @property (nonatomic, copy) NSString * _Nonnull label;
1135
+ /// The known asset state. This should be modified if the asset is locked or revoked.
1136
+ @property (nonatomic) enum AssetState state;
1137
+ - (nonnull instancetype)initWithChannelToken:(Token * _Nonnull)channelToken identityProvider:(IdentityProvider * _Nonnull)identityProvider OBJC_DESIGNATED_INITIALIZER;
1138
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
1139
+ /// Create an asset.
1140
+ /// \param token The token of the asset.
1141
+ ///
1142
+ /// \param provider The identity provider of the asset.
1143
+ ///
1144
+ /// \param name The name of the asset.
1145
+ ///
1146
+ - (nonnull instancetype)initWithToken:(Token * _Nonnull)token provider:(IdentityProvider * _Nonnull)provider OBJC_DESIGNATED_INITIALIZER;
1147
+ - (void)revokeWithCompletionBlock:(void (^ _Nullable)(BOOL, NSError * _Nullable))completionBlock;
1148
+ @property (nonatomic, readonly, copy) NSString * _Nonnull description;
1149
+ - (NSData * _Nullable)getSVMWithKey:(NSInteger)key direction:(NSInteger)direction SWIFT_WARN_UNUSED_RESULT;
1150
+ - (NSData * _Nullable)getSVMWithCardRequest:(UBQCardRequest * _Nonnull)cardRequest direction:(NSInteger)direction SWIFT_WARN_UNUSED_RESULT;
1151
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1152
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1153
+ @end
1154
+
1155
+ typedef SWIFT_ENUM(NSInteger, AssetState, open) {
1156
+ AssetStateNormal = 0,
1157
+ AssetStateLocked = 1,
1158
+ AssetStateRevoked = 2,
1159
+ };
1160
+
1161
+
1162
+ @interface Asset (SWIFT_EXTENSION(UBQKit)) <NSCoding>
1163
+ - (void)encodeWithCoder:(NSCoder * _Nonnull)coder;
1164
+ @end
1165
+
1166
+
1167
+ SWIFT_CLASS("_TtC6UBQKit12AssetManager")
1168
+ @interface AssetManager : NSObject
1169
+ /// The default asset manager.
1170
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) AssetManager * _Nonnull standard;)
1171
+ + (AssetManager * _Nonnull)standard SWIFT_WARN_UNUSED_RESULT;
1172
+ + (void)setStandard:(AssetManager * _Nonnull)value;
1173
+ - (BOOL)removeAssetForToken:(Token * _Nonnull)assetToken;
1174
+ - (void)save;
1175
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1176
+ @end
1177
+
1178
+
1179
+ @class Domain;
1180
+
1181
+ SWIFT_CLASS("_TtC6UBQKit12ChannelState")
1182
+ @interface ChannelState : NSObject <NSCoding>
1183
+ /// Address of this end point to the associated channel.
1184
+ @property (nonatomic, strong) Token * _Nonnull token;
1185
+ /// Domain that specifies the server at the end of the associated channel. This should be the domain whose serverToken corresponds to the ChannelState’s serverToken.
1186
+ @property (nonatomic, strong) Domain * _Nonnull domain;
1187
+ /// The encrypted master key.
1188
+ @property (nonatomic, copy) NSData * _Nullable wrappedMasterKey;
1189
+ /// The encrypted active channel key.
1190
+ @property (nonatomic, copy) NSData * _Nullable wrappedChannelKey;
1191
+ @property (nonatomic, copy) NSString * _Nullable apnsRegistrationID;
1192
+ @property (nonatomic, copy) NSData * _Nullable svm;
1193
+ @property (nonatomic, readonly) BOOL isInitial;
1194
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
1195
+ - (void)registerForToken:(Token * _Nonnull)token wrappedChannelKey:(NSData * _Nonnull)wrappedChannelKey;
1196
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1197
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1198
+ @end
1199
+
1200
+
1201
+ @interface ChannelState (SWIFT_EXTENSION(UBQKit))
1202
+ - (void)encodeWithCoder:(NSCoder * _Nonnull)coder;
1203
+ @end
1204
+
1205
+
1206
+ SWIFT_CLASS("_TtC6UBQKit6Domain")
1207
+ @interface Domain : NSObject
1208
+ /// The current domain.
1209
+ /// note:
1210
+ /// There is only one domain per application.
1211
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) Domain * _Null_unspecified current;)
1212
+ + (Domain * _Null_unspecified)current SWIFT_WARN_UNUSED_RESULT;
1213
+ + (void)setCurrent:(Domain * _Null_unspecified)value;
1214
+ /// The public key data.
1215
+ @property (nonatomic, readonly, copy) NSData * _Nonnull publicKeyData;
1216
+ /// All loaded assets.
1217
+ @property (nonatomic, readonly, copy) NSArray<Asset *> * _Nonnull assets;
1218
+ /// Retrieve an asset by its token.
1219
+ /// \param token The token to search with.
1220
+ ///
1221
+ ///
1222
+ /// returns:
1223
+ /// The found asset or <code>nil</code> when it was not found.
1224
+ - (Asset * _Nullable)assetFor:(Token * _Nonnull)token SWIFT_WARN_UNUSED_RESULT;
1225
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1226
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1227
+ @end
1228
+
1229
+ @class DomainSecurityModule;
1230
+ @class UBQPacket;
1231
+
1232
+ SWIFT_CLASS("_TtC6UBQKit13DomainChannel")
1233
+ @interface DomainChannel : NSObject
1234
+ /// Stores the security module used to sign and verify UBQ packets.
1235
+ @property (nonatomic, readonly, strong) DomainSecurityModule * _Nonnull securityModule;
1236
+ /// Stores the state of the connection.
1237
+ @property (nonatomic, readonly, strong) ChannelState * _Nonnull channelState;
1238
+ - (nonnull instancetype)initWithDomainSecurityModule:(DomainSecurityModule * _Nonnull)dsm channelState:(ChannelState * _Nonnull)channelState OBJC_DESIGNATED_INITIALIZER;
1239
+ - (void)send:(ApplicationMessage * _Nonnull)msg priority:(BOOL)priority success:(void (^ _Nonnull)(ApplicationMessage * _Nonnull))success failure:(void (^ _Nonnull)(NSError * _Nonnull))failure;
1240
+ - (void)send:(ApplicationMessage * _Nonnull)msg success:(void (^ _Nonnull)(ApplicationMessage * _Nonnull))success failure:(void (^ _Nonnull)(NSError * _Nonnull))failure;
1241
+ - (dispatch_semaphore_t _Nonnull)setBlock SWIFT_WARN_UNUSED_RESULT;
1242
+ - (UBQPacket * _Nonnull)createSignedPacketFromPayload:(NSString * _Nonnull)payload SWIFT_WARN_UNUSED_RESULT;
1243
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1244
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1245
+ @end
1246
+
1247
+
1248
+ SWIFT_CLASS("_TtC6UBQKit13DomainManager")
1249
+ @interface DomainManager : NSObject
1250
+ /// The default domain manager.
1251
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) DomainManager * _Nonnull standard;)
1252
+ + (DomainManager * _Nonnull)standard SWIFT_WARN_UNUSED_RESULT;
1253
+ + (void)setStandard:(DomainManager * _Nonnull)value;
1254
+ /// Stores a reference to the security module used to authenticate messages.
1255
+ @property (nonatomic, readonly, strong) DomainSecurityModule * _Nonnull securityModule;
1256
+ /// Creates an unitialized channel for the default domain.
1257
+ /// TODO: When in full Swift, add the throws
1258
+ - (DomainChannel * _Nullable)createChannel SWIFT_WARN_UNUSED_RESULT;
1259
+ /// Add a channel state to the list of the registered channel states.
1260
+ - (void)addWithChannelState:(ChannelState * _Nonnull)state;
1261
+ - (DomainChannel * _Nullable)channelForChannelToken:(Token * _Nonnull)token SWIFT_WARN_UNUSED_RESULT;
1262
+ /// Save the channel states and write to disk.
1263
+ - (void)save;
1264
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1265
+ @end
1266
+
1267
+
1268
+ SWIFT_CLASS("_TtC6UBQKit9FMVersion")
1269
+ @interface FMVersion : NSObject
1270
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1271
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1272
+ @end
1273
+
1274
+
1275
+
1276
+
1277
+ SWIFT_CLASS("_TtC6UBQKit10HMACSHA256")
1278
+ @interface HMACSHA256 : NSObject
1279
+ /// Calculate the HMAC using SHA-256 for the data.
1280
+ /// \param data The data to mac.
1281
+ ///
1282
+ /// \param key The key used to mac.
1283
+ ///
1284
+ ///
1285
+ /// returns:
1286
+ /// The computed HMAC.
1287
+ + (NSData * _Nonnull)mac:(NSData * _Nonnull)data key:(NSData * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
1288
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1289
+ @end
1290
+
1291
+
1292
+ SWIFT_CLASS("_TtC6UBQKit16IdentityProvider")
1293
+ @interface IdentityProvider : NSObject
1294
+ /// The identifier.
1295
+ @property (nonatomic, readonly, strong) Token * _Nonnull token;
1296
+ /// The name.
1297
+ @property (nonatomic, readonly, copy) NSString * _Nonnull name;
1298
+ /// The public key.
1299
+ @property (nonatomic, readonly, copy) NSData * _Nonnull publicKey;
1300
+ /// The URL scheme used for URL scheme querying.
1301
+ @property (nonatomic, copy) NSString * _Nullable urlScheme;
1302
+ /// The theme of the identity provider.
1303
+ @property (nonatomic, readonly) NSInteger theme;
1304
+ /// The assets of the identity provider.
1305
+ @property (nonatomic, copy) NSArray<Asset *> * _Nonnull assets;
1306
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1307
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1308
+ @end
1309
+
1310
+
1311
+
1312
+
1313
+ @interface NSData (SWIFT_EXTENSION(UBQKit))
1314
+ /// Generate random data of a specific size.
1315
+ /// note:
1316
+ /// Uses both a system random and a mersenne twister implementation.
1317
+ /// \param size The number of random bytes to generate.
1318
+ ///
1319
+ ///
1320
+ /// returns:
1321
+ /// The randomly generated bytes.
1322
+ + (NSData * _Nonnull)randomOfSize:(NSInteger)size SWIFT_WARN_UNUSED_RESULT;
1323
+ @end
1324
+
1325
+
1326
+ @interface NSData (SWIFT_EXTENSION(UBQKit))
1327
+ /// Initialize a <code>Data</code> object from a hexadecimal <code>String</code>.
1328
+ /// note:
1329
+ /// The initializer will fail when invalid hexadecimal data is provided.
1330
+ /// \param hexString The hexadecimal string.
1331
+ ///
1332
+ - (nullable instancetype)initWithHexString:(NSString * _Nonnull)hexString;
1333
+ /// Retrieve the hexadecimal string for the data.
1334
+ @property (nonatomic, readonly, copy) NSString * _Nonnull hexadecimal;
1335
+ /// XOR operation for two <code>NSData</code> objects.
1336
+ /// note:
1337
+ /// The function will fail if the two parameters differ from size.
1338
+ /// \param lhs The first <code>NSData</code> object.
1339
+ ///
1340
+ /// \param rhs The second <code>NSData</code> object.
1341
+ ///
1342
+ + (NSData * _Nonnull)xorWithBytes:(NSData * _Nonnull)lhs with:(NSData * _Nonnull)rhs SWIFT_WARN_UNUSED_RESULT;
1343
+ @end
1344
+
1345
+
1346
+ @interface NSDate (SWIFT_EXTENSION(UBQKit))
1347
+ /// Creates a 4-byte UNIX timestamp of the specified date and time.
1348
+ @property (nonatomic, readonly, strong) NSString * _Nonnull hexTimeStamp;
1349
+ @end
1350
+
1351
+
1352
+ @interface NSString (SWIFT_EXTENSION(UBQKit))
1353
+ /// Indication if a <code>String</code> contains only hexadecimal characters.
1354
+ @property (nonatomic, readonly) BOOL isHexString;
1355
+ - (NSString * _Nonnull)insertWithSeparator:(NSString * _Nonnull)separator every:(NSInteger)n SWIFT_WARN_UNUSED_RESULT;
1356
+ @end
1357
+
1358
+
1359
+ SWIFT_CLASS("_TtC6UBQKit3RSA")
1360
+ @interface RSA : NSObject
1361
+ + (NSData * _Nullable)encrypt:(NSData * _Nonnull)data publicKeyData:(NSData * _Nonnull)keyData SWIFT_WARN_UNUSED_RESULT;
1362
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1363
+ @end
1364
+
1365
+
1366
+ SWIFT_CLASS("_TtC6UBQKit14SecKeyDelegate")
1367
+ @interface SecKeyDelegate : NSObject
1368
+ /// This is a replacement for the old <code>RootStore</code>.
1369
+ /// \param alias The alias/identifier of the secret key.
1370
+ ///
1371
+ /// \param overwrite Boolean value indicating whether or not the key should be overwritten or not.
1372
+ ///
1373
+ + (NSData * _Nonnull)secretKeyWithAlias:(NSString * _Nonnull)alias overwrite:(BOOL)overwrite SWIFT_WARN_UNUSED_RESULT;
1374
+ /// The Objective-C helper function, as the <code>Tags</code> class is unavailable.
1375
+ /// \param identifier The identifier of the key.
1376
+ ///
1377
+ + (NSData * _Nullable)getSymmetricKeyWithIdentifier:(NSString * _Nonnull)identifier SWIFT_WARN_UNUSED_RESULT;
1378
+ + (void)storeSymmetricKeyWithIdentifier:(NSString * _Nonnull)identifier key:(NSData * _Nonnull)key;
1379
+ + (void)deleteSymmetricKeyWithIdentifier:(NSString * _Nonnull)identifier;
1380
+ + (NSData * _Nullable)wrapWithKey:(NSData * _Nonnull)key with:(NSData * _Nonnull)wrapperKey SWIFT_WARN_UNUSED_RESULT;
1381
+ + (NSData * _Nullable)unwrapWithKey:(NSData * _Nonnull)key with:(NSData * _Nonnull)wrapperKey SWIFT_WARN_UNUSED_RESULT;
1382
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1383
+ @end
1384
+
1385
+
1386
+ /// Objective-C helper class.
1387
+ /// The nested <code>Tags</code> class in the <code>SecKeyDelegate</code> object cannot be accessed with Objective-C.
1388
+ /// This class will assist in that matter.
1389
+ SWIFT_CLASS("_TtC6UBQKit18SecKeyDelegateTags")
1390
+ @interface SecKeyDelegateTags : NSObject
1391
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull assets;)
1392
+ + (NSString * _Nonnull)assets SWIFT_WARN_UNUSED_RESULT;
1393
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull secureState;)
1394
+ + (NSString * _Nonnull)secureState SWIFT_WARN_UNUSED_RESULT;
1395
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull secureStateOld;)
1396
+ + (NSString * _Nonnull)secureStateOld SWIFT_WARN_UNUSED_RESULT;
1397
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull channelState;)
1398
+ + (NSString * _Nonnull)channelState SWIFT_WARN_UNUSED_RESULT;
1399
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull channelStateOld;)
1400
+ + (NSString * _Nonnull)channelStateOld SWIFT_WARN_UNUSED_RESULT;
1401
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull wrapper;)
1402
+ + (NSString * _Nonnull)wrapper SWIFT_WARN_UNUSED_RESULT;
1403
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1404
+ @end
1405
+
1406
+
1407
+ SWIFT_CLASS("_TtC6UBQKit20SecureEnclaveManager")
1408
+ @interface SecureEnclaveManager : NSObject
1409
+ /// Create an ECDSA X962 SHA-256 signature of data. Data will be hashed by the functon.
1410
+ + (NSData * _Nullable)signWithKey:(SecKeyRef _Nonnull)key data:(NSData * _Nonnull)data error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1411
+ /// Returns a DER formatted publick key based upon the reference to the private key
1412
+ + (NSData * _Nullable)getPublicKeyDerFormatted:(SecKeyRef _Nonnull)privateKeyReference error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1413
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1414
+ @end
1415
+
1416
+
1417
+ SWIFT_CLASS("_TtC6UBQKit15TemporaryHelper")
1418
+ @interface TemporaryHelper : NSObject
1419
+ + (void)decodeCardRequest:(NSData * _Nonnull)data;
1420
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1421
+ @end
1422
+
1423
+
1424
+ SWIFT_CLASS("_TtC6UBQKit5Token")
1425
+ @interface Token : NSObject <NSCoding>
1426
+ /// Contains the byte data for the token.
1427
+ @property (nonatomic, readonly, copy) NSData * _Nonnull data;
1428
+ @property (nonatomic, readonly, copy) NSString * _Nonnull hexValue;
1429
+ @property (nonatomic, readonly, copy) NSString * _Nonnull description;
1430
+ + (Token * _Nullable)tokenWithHexString:(NSString * _Nonnull)hex SWIFT_WARN_UNUSED_RESULT;
1431
+ + (Token * _Nullable)tokenWithData:(NSData * _Nonnull)data SWIFT_WARN_UNUSED_RESULT;
1432
+ - (nullable instancetype)initWithHexString:(NSString * _Nonnull)hexString;
1433
+ - (BOOL)isEqualTo:(Token * _Nonnull)token SWIFT_WARN_UNUSED_RESULT;
1434
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
1435
+ - (void)encodeWithCoder:(NSCoder * _Nonnull)coder;
1436
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1437
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1438
+ @end
1439
+
1440
+
1441
+ @interface Token (SWIFT_EXTENSION(UBQKit)) <NSCopying>
1442
+ - (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
1443
+ @end
1444
+
1445
+
1446
+ SWIFT_CLASS("_TtC6UBQKit14UBQInternalPad")
1447
+ @interface UBQInternalPad : UIView
1448
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1449
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
1450
+ - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
1451
+ @end
1452
+
1453
+
1454
+
1455
+ SWIFT_CLASS("_TtC6UBQKit9UBQKeyPad")
1456
+ @interface UBQKeyPad : UBQInternalPad
1457
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1458
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1459
+ @end
1460
+
1461
+
1462
+ SWIFT_CLASS("_TtC6UBQKit9UBQPinPad")
1463
+ @interface UBQPinPad : UBQInternalPad
1464
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1465
+ @end
1466
+
1467
+
1468
+ SWIFT_CLASS("_TtC6UBQKit19UBQSecurityStrategy")
1469
+ @interface UBQSecurityStrategy : NSObject
1470
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) UBQSecurityStrategy * _Nonnull standard;)
1471
+ + (UBQSecurityStrategy * _Nonnull)standard SWIFT_WARN_UNUSED_RESULT;
1472
+ + (void)setStandard:(UBQSecurityStrategy * _Nonnull)value;
1473
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1474
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1475
+ - (BOOL)verify:(NSData * _Nonnull)message signature:(NSData * _Nonnull)signature publicSlotGroupKey:(NSData * _Nonnull)publicSlotGroupKey SWIFT_WARN_UNUSED_RESULT;
1476
+ - (NSData * _Nullable)createTransportKeysWithProviderID:(NSData * _Nonnull)providerID cardUUID:(NSData * _Nonnull)cardUUID hashes:(NSData * _Nonnull)hashes SWIFT_WARN_UNUSED_RESULT;
1477
+ - (NSData * _Nullable)encryptedPhoneRandom:(NSData * _Nonnull)publicSlotGroupKey SWIFT_WARN_UNUSED_RESULT;
1478
+ /// Encrypt bind response for V1/V3
1479
+ - (NSData * _Nullable)aesEncryptedBindResponseWithProviderID:(NSData * _Nonnull)providerID cardUUID:(NSData * _Nonnull)cardUUID hashes:(NSData * _Nonnull)hashes hsmRandom:(NSData * _Nonnull)hsmRandom SWIFT_WARN_UNUSED_RESULT;
1480
+ /// Encrypt bind response for V4 (contains device public key)
1481
+ - (NSData * _Nullable)aesEncryptedBindResponseWithProviderID:(NSData * _Nonnull)providerID cardUUID:(NSData * _Nonnull)cardUUID hashes:(NSData * _Nonnull)hashes hsmRandom:(NSData * _Nonnull)hsmRandom devicePublicKey:(NSData * _Nonnull)devicePublicKey SWIFT_WARN_UNUSED_RESULT;
1482
+ - (NSData * _Nullable)decryptWithDisplayKey:(NSData * _Nonnull)providerId cardUUID:(NSData * _Nonnull)cardUUID hash:(NSData * _Nonnull)hash cipherText:(NSData * _Nonnull)cipherText svm:(NSData * _Nullable)svmKey SWIFT_WARN_UNUSED_RESULT;
1483
+ - (NSData * _Nullable)encryptWithEntryKey:(NSData * _Nonnull)providerId cardUUID:(NSData * _Nonnull)cardUUID hash:(NSData * _Nonnull)hash plainText:(NSData * _Nonnull)plainText svm:(NSData * _Nullable)svmKey SWIFT_WARN_UNUSED_RESULT;
1484
+ @end
1485
+
1486
+
1487
+
1488
+
1489
+
1490
+
1491
+
1492
+
1493
+ SWIFT_CLASS("_TtC6UBQKit18UITransactionTitle")
1494
+ @interface UITransactionTitle : UILabel
1495
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
1496
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1497
+ - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
1498
+ @end
1499
+
1500
+
1501
+ SWIFT_CLASS("_TtC6UBQKit6UbqSdk")
1502
+ @interface UbqSdk : NSObject
1503
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nullable sdkHeader;)
1504
+ + (NSString * _Nullable)sdkHeader SWIFT_WARN_UNUSED_RESULT;
1505
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1506
+ @end
1507
+
1508
+
1509
+
1510
+
1511
+ #endif
1512
+ #if __has_attribute(external_source_symbol)
1513
+ # pragma clang attribute pop
1514
+ #endif
1515
+ #if defined(__cplusplus)
1516
+ #endif
1517
+ #pragma clang diagnostic pop
1518
+ #endif
1519
+
1520
+ #else
1521
+ #error unsupported Swift architecture
1522
+ #endif