@procivis/react-native-one-core 1.75488.0 → 1.81885.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 (167) hide show
  1. package/README.md +15 -14
  2. package/android/build.gradle +0 -11
  3. package/android/src/main/java/ch/procivis/one/core/DeserializeSpecific.kt +1 -15
  4. package/android/src/main/java/ch/procivis/one/core/ProcivisOneCoreModule.kt +4 -4
  5. package/android/src/main/java/ch/procivis/one/core/Serialize.kt +0 -2
  6. package/android/src/main/java/ch/procivis/one/core/SerializeSpecific.kt +124 -107
  7. package/android/src/main/java/ch/procivis/one/core/ubiqu/PinPadViewManager.kt +5 -8
  8. package/android/src/main/java/ch/procivis/one/core/ubiqu/UbiquKeyStorage.kt +17 -222
  9. package/core-sdk.json +6 -6
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.js +2 -0
  12. package/dist/src/config.d.ts +3 -2
  13. package/dist/src/config.js +5 -0
  14. package/dist/src/core.d.ts +9 -182
  15. package/dist/src/core.js +9 -20
  16. package/dist/src/nfc.d.ts +0 -5
  17. package/dist/src/one-core-uniffi-intf.d.ts +1773 -0
  18. package/dist/src/one-core-uniffi-intf.js +356 -0
  19. package/ios/Deserialize.swift +0 -28
  20. package/ios/ProcivisOneCoreModule.m +4 -4
  21. package/ios/ProcivisOneCoreModule.swift +10 -10
  22. package/ios/RSEKeyStorage.swift +17 -571
  23. package/ios/RSEPinPad.swift +3 -56
  24. package/ios/Serialize.swift +80 -44
  25. package/package.json +4 -2
  26. package/react-native-one-core.podspec +1 -1
  27. package/android/build.gradle_opensource +0 -122
  28. package/android/libs/core-reactnative-compatible-2025.0305.1.aar +0 -0
  29. package/android/src/main/java/ch/procivis/one/core/ubiqu/PinPadRunner.kt +0 -123
  30. package/android/src/main/java/ch/procivis/one/core/ubiqu/PinPadViewManager.kt_opensource +0 -20
  31. package/android/src/main/java/ch/procivis/one/core/ubiqu/PinPadWrapper.kt +0 -396
  32. package/android/src/main/java/ch/procivis/one/core/ubiqu/RegistrationManager.kt +0 -59
  33. package/android/src/main/java/ch/procivis/one/core/ubiqu/TokenManager.kt +0 -48
  34. package/android/src/main/java/ch/procivis/one/core/ubiqu/UbiquKeyStorage.kt_opensource +0 -63
  35. package/android/src/main/java/ch/procivis/one/core/ubiqu/Util.kt +0 -74
  36. package/android/src/main/java/ch/procivis/one/core/ubiqu/dataformats/CreateIdentityRequest.kt +0 -9
  37. package/android/src/main/java/ch/procivis/one/core/ubiqu/dataformats/CreateIdentityResponse.kt +0 -9
  38. package/android/src/main/java/ch/procivis/one/core/ubiqu/dataformats/RegisterRSEResponse.kt +0 -10
  39. package/dist/src/backup.d.ts +0 -22
  40. package/dist/src/backup.js +0 -1
  41. package/dist/src/cache.d.ts +0 -11
  42. package/dist/src/cache.js +0 -12
  43. package/dist/src/credential.d.ts +0 -201
  44. package/dist/src/credential.js +0 -44
  45. package/dist/src/credentialSchema.d.ts +0 -135
  46. package/dist/src/credentialSchema.js +0 -34
  47. package/dist/src/did.d.ts +0 -63
  48. package/dist/src/did.js +0 -27
  49. package/dist/src/history.d.ts +0 -101
  50. package/dist/src/history.js +0 -63
  51. package/dist/src/identifier.d.ts +0 -133
  52. package/dist/src/identifier.js +0 -29
  53. package/dist/src/key.d.ts +0 -17
  54. package/dist/src/key.js +0 -1
  55. package/dist/src/list.d.ts +0 -14
  56. package/dist/src/list.js +0 -5
  57. package/dist/src/organisation.d.ts +0 -9
  58. package/dist/src/organisation.js +0 -1
  59. package/dist/src/proof.d.ts +0 -234
  60. package/dist/src/proof.js +0 -43
  61. package/dist/src/proofSchema.d.ts +0 -116
  62. package/dist/src/proofSchema.js +0 -9
  63. package/dist/src/trust.d.ts +0 -173
  64. package/dist/src/trust.js +0 -44
  65. package/dist/src/walletUnit.d.ts +0 -30
  66. package/dist/src/walletUnit.js +0 -11
  67. package/ios/RSEKeyStorage.swift_opensource +0 -61
  68. package/ios/RSEPinPad.swift_opensource +0 -21
  69. package/ios/UBQKit.xcframework/Info.plist +0 -44
  70. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Assets.car +0 -0
  71. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFCompatibilityMacros.h +0 -37
  72. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFHTTPSessionManager.h +0 -304
  73. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFNetworkReachabilityManager.h +0 -216
  74. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFNetworking.h +0 -41
  75. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFPlainTextRequestSerializer.h +0 -16
  76. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFSecurityPolicy.h +0 -156
  77. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFURLRequestSerialization.h +0 -479
  78. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFURLResponseSerialization.h +0 -310
  79. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/AFURLSessionManager.h +0 -501
  80. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/CardRequestProtocol.h +0 -72
  81. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/Constants.h +0 -222
  82. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/DeviceBindProtocol.h +0 -38
  83. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/DomainSecurityModule.h +0 -43
  84. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/ErrorDomains.h +0 -68
  85. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/FreeAssetProtocol.h +0 -40
  86. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/GDataXMLNode.h +0 -214
  87. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/NSDictionary+Utilities.h +0 -23
  88. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/NSFileManager+Utilities.h +0 -20
  89. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/NSString+Utilities.h +0 -23
  90. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/NSURL+Utilities.h +0 -12
  91. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/ProtocolBase.h +0 -38
  92. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/ResetPinProtocol.h +0 -45
  93. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/Settings.h +0 -120
  94. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequest.h +0 -58
  95. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestBaseProcessor.h +0 -37
  96. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestBindProcessor.h +0 -34
  97. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestNullProcessor.h +0 -28
  98. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestResetPinProcessor.h +0 -35
  99. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestUnlockProcessor.h +0 -31
  100. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQCardRequestUseProcessor.h +0 -34
  101. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQKit-Swift.h +0 -761
  102. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQKit.h +0 -56
  103. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Headers/UBQPacket.h +0 -38
  104. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Info.plist +0 -0
  105. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios.abi.json +0 -89006
  106. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios.private.swiftinterface +0 -1099
  107. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  108. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios.swiftinterface +0 -1099
  109. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/Modules/module.modulemap +0 -11
  110. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/UBQKit +0 -0
  111. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/_CodeSignature/CodeResources +0 -597
  112. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/certs +0 -0
  113. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/checksums +0 -0
  114. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/pinning_pub +0 -0
  115. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/static +0 -0
  116. package/ios/UBQKit.xcframework/ios-arm64/UBQKit.framework/stream +0 -0
  117. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Assets.car +0 -0
  118. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFCompatibilityMacros.h +0 -37
  119. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFHTTPSessionManager.h +0 -304
  120. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFNetworkReachabilityManager.h +0 -216
  121. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFNetworking.h +0 -41
  122. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFPlainTextRequestSerializer.h +0 -16
  123. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFSecurityPolicy.h +0 -156
  124. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFURLRequestSerialization.h +0 -479
  125. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFURLResponseSerialization.h +0 -310
  126. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/AFURLSessionManager.h +0 -501
  127. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/CardRequestProtocol.h +0 -72
  128. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/Constants.h +0 -222
  129. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/DeviceBindProtocol.h +0 -38
  130. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/DomainSecurityModule.h +0 -43
  131. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/ErrorDomains.h +0 -68
  132. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/FreeAssetProtocol.h +0 -40
  133. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/GDataXMLNode.h +0 -214
  134. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/NSDictionary+Utilities.h +0 -23
  135. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/NSFileManager+Utilities.h +0 -20
  136. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/NSString+Utilities.h +0 -23
  137. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/NSURL+Utilities.h +0 -12
  138. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/ProtocolBase.h +0 -38
  139. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/ResetPinProtocol.h +0 -45
  140. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/Settings.h +0 -120
  141. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequest.h +0 -58
  142. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestBaseProcessor.h +0 -37
  143. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestBindProcessor.h +0 -34
  144. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestNullProcessor.h +0 -28
  145. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestResetPinProcessor.h +0 -35
  146. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestUnlockProcessor.h +0 -31
  147. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQCardRequestUseProcessor.h +0 -34
  148. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQKit-Swift.h +0 -1522
  149. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQKit.h +0 -56
  150. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Headers/UBQPacket.h +0 -38
  151. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Info.plist +0 -0
  152. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios-simulator.abi.json +0 -89006
  153. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +0 -1099
  154. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  155. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +0 -1099
  156. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +0 -89006
  157. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +0 -1099
  158. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  159. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/UBQKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +0 -1099
  160. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/Modules/module.modulemap +0 -11
  161. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/UBQKit +0 -0
  162. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/_CodeSignature/CodeResources +0 -652
  163. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/certs +0 -0
  164. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/checksums +0 -0
  165. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/pinning_pub +0 -0
  166. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/static +0 -0
  167. package/ios/UBQKit.xcframework/ios-arm64_x86_64-simulator/UBQKit.framework/stream +0 -0
package/README.md CHANGED
@@ -34,10 +34,10 @@ See the [key features][key] and complete solution [architecture][archi].
34
34
 
35
35
  ### Trial
36
36
 
37
- The fastest way to get started with the *Procivis One Wallet* is to download the app
37
+ The fastest way to get started with the _Procivis One Wallet_ is to download the app
38
38
  from the iOS or Android app stores and [join our Trial Environment][trial].
39
39
  In the trial environment, you are given control of an organization on our server
40
- solution, the *Procivis One Desk*, and can quickly begin issuing and verifying credentials.
40
+ solution, the _Procivis One Desk_, and can quickly begin issuing and verifying credentials.
41
41
 
42
42
  ### Documentation
43
43
 
@@ -65,9 +65,10 @@ allprojects {
65
65
 
66
66
  ## Usage
67
67
 
68
- ```javascript
69
- import ONE from "react-native-one-core";
68
+ ```typescript
69
+ import { initializeCore } from "react-native-one-core";
70
70
  ...
71
+ const ONE = await initializeCore();
71
72
  await ONE.getVersion();
72
73
  ```
73
74
 
@@ -83,7 +84,7 @@ often referred to as Self-Sovereign Identity, or SSI.
83
84
 
84
85
  ## eIDAS 2.0
85
86
 
86
- If you want to provide an **EUDI Wallet**, *Procivis One* provides production grade open
87
+ If you want to provide an **EUDI Wallet**, _Procivis One_ provides production grade open
87
88
  source components to get certified and connect your organization to the eIDAS 2.0 ecosystem.
88
89
 
89
90
  ![Procivis One in the eIDAS ARF](https://assets.procivis-one.com/static/diff/eIDAS_Architecture.png)
@@ -97,17 +98,17 @@ use the [Procivis One Core][core].
97
98
 
98
99
  ## Interoperability and conformance
99
100
 
100
- *Procivis One* is built using [open standards](#supported-standards) and tested to ensure
101
+ _Procivis One_ is built using [open standards](#supported-standards) and tested to ensure
101
102
  interoperability with different software vendors and across different international
102
103
  regulatory ecosystems.
103
104
 
104
105
  - W3C standards
105
106
  - The W3C offers several test suites for standards conformance. See
106
- the latest test results for *Procivis One* at [canivc.com][canivc].
107
+ the latest test results for _Procivis One_ at [canivc.com][canivc].
107
108
  - ISO/IEC 18013-5 mDL
108
- - *Procivis One*'s implementation of the ISO mDL standard is compatible with the
109
- OpenWallet Foundation's verifier: *Procivis One* can successfully issue mDL
110
- credentials to a *Procivis One Wallet*, and these credentials can successfully
109
+ - _Procivis One_'s implementation of the ISO mDL standard is compatible with the
110
+ OpenWallet Foundation's verifier: _Procivis One_ can successfully issue mDL
111
+ credentials to a _Procivis One Wallet_, and these credentials can successfully
111
112
  be verified by the OpenWallet Foundation's verifier. See the [OpenWallet Foundation libraries][owf].
112
113
  - eIDAS 2.0; EUDI Wallet
113
114
  - The EU Digital Wallet is developing [issuer][eudiwi] and [verifier][eudiwv] testing for
@@ -125,10 +126,10 @@ and regulations mature and harden.
125
126
 
126
127
  - [W3C Verifiable Credentials Data Model 2.0][vcdm] in the following variations:
127
128
 
128
- | Securing mechanism | Supported representations | Supported proof/signature types |
129
- | -------------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------ |
130
- | [W3C Data Integrity Proofs][vcdi] (embedded) | [JSON-LD][jld] in Compacted Document Form | <ul><li>[W3C Data Integrity ECDSA Cryptosuites v1.0][ecd] / [ecdsa-rdfc-2019][ecd2019]</li><li>[W3C Data Integrity EdDSA Cryptosuites v1.0][edd] / [eddsa-rdfc-2022][edd2022]</li><li>[W3C Data Integrity BBS Cryptosuites v1.0][bbs] / [bbs-2023][bbs2023]</li></ul> |
131
- | [W3C VC-JOSE-COSE][jose] (enveloping) | <ul><li>[SD-JWT][sdjwt]</li><li>[JWT][jw]</li></ul> | <ul><li>JOSE / ECDSA [ES256][es2]</li><li>JOSE / EdDSA [Ed25519][ed255]</li><li>JOSE / CRYSTALS-DILITHIUM 3 [CRYDI3][crydi3]* |
129
+ | Securing mechanism | Supported representations | Supported proof/signature types |
130
+ | -------------------------------------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
131
+ | [W3C Data Integrity Proofs][vcdi] (embedded) | [JSON-LD][jld] in Compacted Document Form | <ul><li>[W3C Data Integrity ECDSA Cryptosuites v1.0][ecd] / [ecdsa-rdfc-2019][ecd2019]</li><li>[W3C Data Integrity EdDSA Cryptosuites v1.0][edd] / [eddsa-rdfc-2022][edd2022]</li><li>[W3C Data Integrity BBS Cryptosuites v1.0][bbs] / [bbs-2023][bbs2023]</li></ul> |
132
+ | [W3C VC-JOSE-COSE][jose] (enveloping) | <ul><li>[SD-JWT][sdjwt]</li><li>[JWT][jw]</li></ul> | <ul><li>JOSE / ECDSA [ES256][es2]</li><li>JOSE / EdDSA [Ed25519][ed255]</li><li>JOSE / CRYSTALS-DILITHIUM 3 [CRYDI3][crydi3]\* |
132
133
 
133
134
  \* CRYSTALS-DILITHIUM is a post-quantum resistant signature scheme, selected by NIST for [Post-Quantum Cryptography Standardization][pqc].
134
135
  Support for the recently published [FIPS-204][fips] is planned for the near future.
@@ -75,17 +75,6 @@ dependencies {
75
75
  implementation 'net.java.dev.jna:jna:5.17.0@aar'
76
76
  implementation 'org.greenrobot:eventbus:3.3.1'
77
77
  implementation("org.jetbrains.kotlin:kotlin-reflect:${safeExtGet('kotlinVersion', '1.9.0')}")
78
-
79
- implementation(name: 'core-reactnative-compatible-2025.0305.1', ext: 'aar')
80
- implementation("com.google.android.material:material:1.9.0")
81
- implementation("com.squareup.retrofit2:retrofit:2.11.0")
82
- implementation("com.squareup.retrofit2:converter-scalars:2.11.0")
83
- implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
84
- implementation("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0")
85
- implementation("com.jakewharton.timber:timber:5.0.1")
86
- implementation("org.apache.commons:commons-math3:3.6.1")
87
- implementation 'androidx.appcompat:appcompat:1.6.1'
88
- implementation 'androidx.biometric:biometric:1.1.0'
89
78
  }
90
79
 
91
80
  def downloadFile = { url, file ->
@@ -6,7 +6,7 @@ import kotlin.reflect.KClass
6
6
 
7
7
  object DeserializeSpecific {
8
8
  object Obj {
9
- private val CustomConversionTypes = arrayOf(CredentialSchemaTypeBindingEnum::class, OptionalString::class)
9
+ private val CustomConversionTypes = arrayOf(OptionalString::class)
10
10
 
11
11
  fun isCustomConversionType(type: KClass<*>): Boolean {
12
12
  return CustomConversionTypes.contains(type)
@@ -14,8 +14,6 @@ object DeserializeSpecific {
14
14
 
15
15
  fun convertCustom(type: KClass<*>, input: ReadableMap, field: String): Any? {
16
16
  return when (type) {
17
- CredentialSchemaTypeBindingEnum::class -> input.getString(field)
18
- ?.let { credentialSchemaType(it) }
19
17
  OptionalString::class -> {
20
18
  val value = input.getString(field)
21
19
  if (value == null) {
@@ -31,18 +29,6 @@ object DeserializeSpecific {
31
29
  }
32
30
  }
33
31
 
34
- private fun credentialSchemaType(
35
- credentialSchemaType: String
36
- ): CredentialSchemaTypeBindingEnum {
37
- return when (credentialSchemaType) {
38
- "PROCIVIS_ONE_SCHEMA2024" -> CredentialSchemaTypeBindingEnum.ProcivisOneSchema2024
39
- "FALLBACK_SCHEMA2024" -> CredentialSchemaTypeBindingEnum.FallbackSchema2024
40
- "MDOC" -> CredentialSchemaTypeBindingEnum.Mdoc
41
- "SD_JWT_VC" -> CredentialSchemaTypeBindingEnum.SdJwtVc
42
- else -> CredentialSchemaTypeBindingEnum.Other(credentialSchemaType)
43
- }
44
- }
45
-
46
32
  fun ids(ids: ReadableArray): List<String> {
47
33
  val result = mutableListOf<String>()
48
34
  for (n in 0 until ids.size()) {
@@ -161,7 +161,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
161
161
  }
162
162
 
163
163
  @ReactMethod
164
- fun getIdentifiers(query: ReadableMap, promise: Promise) {
164
+ fun listIdentifiers(query: ReadableMap, promise: Promise) {
165
165
  asyncCall(promise, scope) {
166
166
  val identifiers = getCore().listIdentifiers(construct(query))
167
167
  return@asyncCall convertToRN(identifiers)
@@ -482,7 +482,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
482
482
  }
483
483
 
484
484
  @ReactMethod
485
- fun getHistory(query: ReadableMap, promise: Promise) {
485
+ fun getHistoryList(query: ReadableMap, promise: Promise) {
486
486
  asyncCall(promise, scope) {
487
487
  val history = getCore().getHistoryList(construct(query))
488
488
  return@asyncCall convertToRN(history)
@@ -520,7 +520,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
520
520
  }
521
521
 
522
522
  @ReactMethod
523
- fun getTrustAnchors(query: ReadableMap, promise: Promise) {
523
+ fun listTrustAnchors(query: ReadableMap, promise: Promise) {
524
524
  asyncCall(promise, scope) {
525
525
  val trustAnchors = getCore().listTrustAnchors(construct(query))
526
526
  return@asyncCall convertToRN(trustAnchors)
@@ -543,7 +543,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
543
543
  }
544
544
 
545
545
  @ReactMethod
546
- fun getTrustEntities(query: ReadableMap, promise: Promise) {
546
+ fun listTrustEntities(query: ReadableMap, promise: Promise) {
547
547
  asyncCall(promise, scope) {
548
548
  val trustEntity = getCore().listTrustEntities(construct(query))
549
549
  return@asyncCall convertToRN(trustEntity)
@@ -54,8 +54,6 @@ object Serialize {
54
54
  return Pair(RNType.DOUBLE, input as Double)
55
55
  } else if (type == Char::class.java || type == java.lang.Character::class.java) {
56
56
  return Pair(RNType.STRING, (input as Char).toString())
57
- } else if (SerializeSpecific.Str.isCustomConversionType(input)) {
58
- return Pair(RNType.STRING, SerializeSpecific.Str.convertCustom(input))
59
57
  } else if (SerializeSpecific.Arr.isCustomConversionType(input)) {
60
58
  return Pair(RNType.ARRAY, SerializeSpecific.Arr.convertCustom(input))
61
59
  } else {
@@ -10,10 +10,11 @@ object SerializeSpecific {
10
10
  private val CustomConversionTypes =
11
11
  arrayOf(
12
12
  HistoryMetadataBinding::class.java,
13
- ClaimBindingDto::class.java,
14
- ProofRequestClaimBindingDto::class.java,
15
- CredentialQueryResponseBindingDto::class.java,
16
- PresentationDefinitionV2ClaimBindingDto::class.java
13
+ ClaimValueBindingDto::class.java,
14
+ ProofRequestClaimValueBindingDto::class.java,
15
+ ApplicableCredentialOrFailureHintBindingEnum::class.java,
16
+ PresentationDefinitionV2ClaimValueBindingDto::class.java,
17
+ HandleInvitationResponseBindingEnum::class.java,
17
18
  )
18
19
 
19
20
  fun isCustomConversionType(input: Any?): Boolean {
@@ -29,65 +30,87 @@ object SerializeSpecific {
29
30
  if (input is HistoryMetadataBinding) {
30
31
  return historyMetadata(input)
31
32
  }
32
- if (input is ClaimBindingDto) {
33
- return claim(input)
33
+ if (input is ClaimValueBindingDto) {
34
+ return claimValue(input)
34
35
  }
35
- if (input is ProofRequestClaimBindingDto) {
36
- return proofClaim(input)
36
+ if (input is ProofRequestClaimValueBindingDto) {
37
+ return proofClaimValue(input)
37
38
  }
38
- if (input is CredentialQueryResponseBindingDto) {
39
+ if (input is ApplicableCredentialOrFailureHintBindingEnum) {
39
40
  return credentialQuery(input)
40
41
  }
41
- if (input is PresentationDefinitionV2ClaimBindingDto) {
42
- return presentationDefinitionV2Claim(input)
42
+ if (input is PresentationDefinitionV2ClaimValueBindingDto) {
43
+ return presentationDefinitionV2ClaimValue(input)
44
+ }
45
+ if (input is HandleInvitationResponseBindingEnum) {
46
+ return invitationResponse(input)
43
47
  }
44
48
  throw IllegalArgumentException("Invalid map conversion: $input")
45
49
  }
46
50
 
47
51
  private fun historyMetadata(metadata: HistoryMetadataBinding): ReadableMap {
52
+ val result = Arguments.createMap()
48
53
  when (metadata) {
49
- is HistoryMetadataBinding.UnexportableEntities ->
50
- return convertToRN(metadata.value) as ReadableMap
54
+ is HistoryMetadataBinding.UnexportableEntities -> {
55
+ result.putString("type_", "UNEXPORTABLE_ENTITIES")
56
+ result.putMap(
57
+ "value",
58
+ convertToRN(metadata.value) as ReadableMap
59
+ )
60
+ }
51
61
 
52
- is HistoryMetadataBinding.ErrorMetadata ->
53
- return convertToRN(metadata.value) as ReadableMap
62
+ is HistoryMetadataBinding.ErrorMetadata -> {
63
+ result.putString("type_", "ERROR_METADATA")
64
+ result.putMap(
65
+ "value",
66
+ convertToRN(metadata.value) as ReadableMap
67
+ )
68
+ }
54
69
 
55
70
  is HistoryMetadataBinding.WalletUnitJwt -> {
56
- val result = Arguments.createMap()
57
- result.putString("jwt", metadata.v1)
58
- return result
71
+ result.putString("type_", "WALLET_UNIT_JWT")
72
+ val values = Arguments.createArray()
73
+ values.pushString(metadata.v1)
74
+ result.putArray("value", values)
59
75
  }
60
-
61
76
  }
77
+ return result
62
78
  }
63
79
 
64
- private fun credentialQuery(dto: CredentialQueryResponseBindingDto): ReadableMap {
80
+ private fun credentialQuery(query: ApplicableCredentialOrFailureHintBindingEnum): ReadableMap {
65
81
  val result = Arguments.createMap()
66
- result.putBoolean("multiple", dto.multiple)
67
- when (val value = dto.credentialOrFailureHint) {
68
- is ApplicableCredentialOrFailureHintBindingEnum.ApplicableCredentials -> result.putArray(
69
- "applicableCredentials",
70
- convertToRN(value.applicableCredentials) as ReadableArray
71
- )
82
+ when (query) {
83
+ is ApplicableCredentialOrFailureHintBindingEnum.ApplicableCredentials -> {
84
+ result.putString("type_", "APPLICABLE_CREDENTIALS")
85
+ result.putArray(
86
+ "applicableCredentials",
87
+ convertToRN(query.applicableCredentials) as ReadableArray
88
+ )
89
+ }
72
90
 
73
91
  is ApplicableCredentialOrFailureHintBindingEnum.FailureHint -> {
74
- result.putMap("failureHint", convertToRN(value.failureHint) as ReadableMap)
92
+ result.putString("type_", "FAILURE_HINT")
93
+ result.putMap("failureHint", convertToRN(query.failureHint) as ReadableMap)
75
94
  }
76
95
  }
77
96
  return result
78
97
  }
79
98
 
80
- private fun claim(c: ClaimBindingDto): ReadableMap {
99
+ private fun claimValue(value: ClaimValueBindingDto): ReadableMap {
81
100
  val result = Arguments.createMap()
82
- result.putString("id", c.id)
83
- result.putString("key", c.key)
84
- result.putString("dataType", c.dataType)
85
- result.putBoolean("array", c.array)
86
-
87
- when (val value = c.value) {
88
- is ClaimValueBindingDto.Boolean -> result.putBoolean("value", value.value)
89
- is ClaimValueBindingDto.Float -> result.putDouble("value", value.value)
101
+ when (value) {
102
+ is ClaimValueBindingDto.Boolean -> {
103
+ result.putString("type_", "BOOLEAN")
104
+ result.putBoolean("value", value.value)
105
+ }
106
+
107
+ is ClaimValueBindingDto.Float -> {
108
+ result.putString("type_", "FLOAT")
109
+ result.putDouble("value", value.value)
110
+ }
111
+
90
112
  is ClaimValueBindingDto.Integer -> {
113
+ result.putString("type_", "INTEGER")
91
114
  if (value.value < Int.MIN_VALUE || value.value > Int.MAX_VALUE) {
92
115
  result.putDouble("value", value.value.toDouble())
93
116
  } else {
@@ -95,50 +118,50 @@ object SerializeSpecific {
95
118
  }
96
119
  }
97
120
 
98
- is ClaimValueBindingDto.String -> result.putString("value", value.value)
99
- is ClaimValueBindingDto.Nested ->
121
+ is ClaimValueBindingDto.String -> {
122
+ result.putString("type_", "STRING")
123
+ result.putString("value", value.value)
124
+ }
125
+
126
+ is ClaimValueBindingDto.Nested -> {
127
+ result.putString("type_", "NESTED")
100
128
  result.putArray("value", convertToRN(value.value) as ReadableArray)
129
+ }
101
130
  }
102
-
103
131
  return result
104
132
  }
105
133
 
106
- private fun proofClaim(c: ProofRequestClaimBindingDto): ReadableMap {
134
+ private fun proofClaimValue(value: ProofRequestClaimValueBindingDto): ReadableMap {
107
135
  val result = Arguments.createMap()
108
- result.putMap("schema", convertToRN(c.schema) as ReadableMap)
109
-
110
- c.value?.let {
111
- when (val value = it) {
112
- is ProofRequestClaimValueBindingDto.Value ->
113
- result.putString("value", value.value)
136
+ when (value) {
137
+ is ProofRequestClaimValueBindingDto.Value -> {
138
+ result.putString("type_", "VALUE")
139
+ result.putString("value", value.value)
140
+ }
114
141
 
115
- is ProofRequestClaimValueBindingDto.Claims ->
116
- result.putArray("value", convertToRN(value.value) as ReadableArray)
142
+ is ProofRequestClaimValueBindingDto.Claims -> {
143
+ result.putString("type_", "CLAIMS")
144
+ result.putArray("value", convertToRN(value.value) as ReadableArray)
117
145
  }
118
146
  }
119
-
120
147
  return result
121
148
  }
122
149
 
123
- private fun presentationDefinitionV2Claim(c: PresentationDefinitionV2ClaimBindingDto): ReadableMap {
150
+ private fun presentationDefinitionV2ClaimValue(value: PresentationDefinitionV2ClaimValueBindingDto): ReadableMap {
124
151
  val result = Arguments.createMap()
125
- result.putString("path", c.path)
126
- result.putMap("schema", convertToRN(c.schema) as ReadableMap)
127
- result.putBoolean("userSelection", c.userSelection)
128
- result.putBoolean("required", c.required)
129
-
130
- when (val value = c.value) {
131
- is PresentationDefinitionV2ClaimValueBindingDto.Boolean -> result.putBoolean(
132
- "value",
133
- value.value
134
- )
135
-
136
- is PresentationDefinitionV2ClaimValueBindingDto.Float -> result.putDouble(
137
- "value",
138
- value.value
139
- )
152
+ when (value) {
153
+ is PresentationDefinitionV2ClaimValueBindingDto.Boolean -> {
154
+ result.putString("type_", "BOOLEAN")
155
+ result.putBoolean("value", value.value)
156
+ }
157
+
158
+ is PresentationDefinitionV2ClaimValueBindingDto.Float -> {
159
+ result.putString("type_", "FLOAT")
160
+ result.putDouble("value", value.value)
161
+ }
140
162
 
141
163
  is PresentationDefinitionV2ClaimValueBindingDto.Integer -> {
164
+ result.putString("type_", "INTEGER")
142
165
  if (value.value < Int.MIN_VALUE || value.value > Int.MAX_VALUE) {
143
166
  result.putDouble("value", value.value.toDouble())
144
167
  } else {
@@ -146,58 +169,52 @@ object SerializeSpecific {
146
169
  }
147
170
  }
148
171
 
149
- is PresentationDefinitionV2ClaimValueBindingDto.String -> result.putString(
150
- "value",
151
- value.value
152
- )
172
+ is PresentationDefinitionV2ClaimValueBindingDto.String -> {
173
+ result.putString("type_", "STRING")
174
+ result.putString("value", value.value)
175
+ }
153
176
 
154
- is PresentationDefinitionV2ClaimValueBindingDto.Nested ->
177
+ is PresentationDefinitionV2ClaimValueBindingDto.Nested -> {
178
+ result.putString("type_", "NESTED")
155
179
  result.putArray("value", convertToRN(value.value) as ReadableArray)
180
+ }
156
181
  }
157
-
158
182
  return result
159
183
  }
160
- }
161
184
 
162
- object Str {
163
- private val CustomConversionTypes =
164
- arrayOf(
165
- CredentialSchemaTypeBindingEnum::class.java,
166
- )
167
-
168
- fun isCustomConversionType(input: Any?): Boolean {
169
- for (customType in CustomConversionTypes) {
170
- if (customType.isInstance(input)) {
171
- return true
185
+ private fun invitationResponse(value: HandleInvitationResponseBindingEnum): ReadableMap {
186
+ val result = Arguments.createMap()
187
+ when (value) {
188
+ is HandleInvitationResponseBindingEnum.CredentialIssuance -> {
189
+ result.putString("type_", "CREDENTIAL_ISSUANCE")
190
+ result.putString("interactionId", value.interactionId)
191
+ value.keyStorageSecurityLevels?.let {
192
+ result.putArray(
193
+ "keyStorageSecurityLevels",
194
+ convertToRN(it) as ReadableArray
195
+ )
196
+ }
197
+ value.keyAlgorithms?.let {
198
+ result.putArray("keyAlgorithms", convertToRN(it) as ReadableArray)
199
+ }
200
+ value.txCode?.let {
201
+ result.putMap("txCode", convertToRN(it) as ReadableMap)
202
+ }
172
203
  }
173
- }
174
- return false
175
- }
176
-
177
- fun convertCustom(input: Any): String {
178
- if (input is CredentialSchemaTypeBindingEnum) {
179
- return credentialSchemaType(input)
180
- }
181
- throw IllegalArgumentException("Invalid string conversion: $input")
182
- }
183
204
 
184
- private fun credentialSchemaType(type: CredentialSchemaTypeBindingEnum): String {
185
- return when (type) {
186
- is CredentialSchemaTypeBindingEnum.ProcivisOneSchema2024 ->
187
- "PROCIVIS_ONE_SCHEMA2024"
188
-
189
- is CredentialSchemaTypeBindingEnum.FallbackSchema2024 ->
190
- "FALLBACK_SCHEMA2024"
191
-
192
- is CredentialSchemaTypeBindingEnum.Mdoc ->
193
- "MDOC"
194
-
195
- is CredentialSchemaTypeBindingEnum.SdJwtVc ->
196
- "SD_JWT_VC"
205
+ is HandleInvitationResponseBindingEnum.AuthorizationCodeFlow -> {
206
+ result.putString("type_", "AUTHORIZATION_CODE_FLOW")
207
+ result.putString("interactionId", value.interactionId)
208
+ result.putString("authorizationCodeFlowUrl", value.authorizationCodeFlowUrl)
209
+ }
197
210
 
198
- is CredentialSchemaTypeBindingEnum.Other ->
199
- type.value
211
+ is HandleInvitationResponseBindingEnum.ProofRequest -> {
212
+ result.putString("type_", "PROOF_REQUEST")
213
+ result.putString("interactionId", value.interactionId)
214
+ result.putString("proofId", value.proofId)
215
+ }
200
216
  }
217
+ return result
201
218
  }
202
219
  }
203
220
 
@@ -1,23 +1,20 @@
1
1
  package ch.procivis.one.core.ubiqu
2
2
 
3
+ import android.view.View
4
+ import ch.procivis.one.core.NativeKeyStorageException
3
5
  import com.facebook.react.bridge.ReactApplicationContext
4
6
  import com.facebook.react.uimanager.SimpleViewManager
5
7
  import com.facebook.react.uimanager.ThemedReactContext
6
- import com.ubiqu.eid.sdk.components.UbqInternalPad
7
- import com.ubiqu.eid.sdk.components.UbqPinPad
8
8
 
9
9
  class PinPadViewManager(private val callerContext: ReactApplicationContext) :
10
- SimpleViewManager<UbqPinPad>() {
10
+ SimpleViewManager<View>() {
11
11
  companion object {
12
12
  const val REACT_CLASS = "RCTProcivisRSEPinPad"
13
13
  }
14
14
 
15
15
  override fun getName() = REACT_CLASS
16
16
 
17
- override fun createViewInstance(context: ThemedReactContext): UbqPinPad {
18
- val pinPad = UbqPinPad(context, extraButton = UbqInternalPad.ExtraButtonFunctionality.BIOMETRICS_AUTO.code)
19
- val activeFlow = PinPadRunner.getActiveFlow()
20
- PinPadWrapper(callerContext, pinPad, activeFlow.flow, activeFlow.type)
21
- return pinPad
17
+ override fun createViewInstance(context: ThemedReactContext): View {
18
+ throw NativeKeyStorageException.Unsupported()
22
19
  }
23
20
  }