@procivis/react-native-one-core 1.84437.0 → 1.88624.1

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.
package/README.md CHANGED
@@ -18,7 +18,7 @@ See the [key features][key] and complete solution [architecture][archi].
18
18
  - [How to use the One Core SDK](#how-to-use-the-one-core-react-native-sdk)
19
19
  - [Getting started](#getting-started)
20
20
  - [Background](#background)
21
- - [eIDAS 2.0](#eidas-20)
21
+ - [EU Digital Identity Ecosystem](#eu-digital-identity-ecosystem)
22
22
  - [Interoperability and conformance](#interoperability-and-conformance)
23
23
  - [Supported standards](#supported-standards)
24
24
  - [Support](#support)
@@ -43,35 +43,9 @@ solution, the _Procivis One Desk_, and can quickly begin issuing and verifying c
43
43
 
44
44
  See our documentation:
45
45
 
46
- - [SDK Reference][sdkref]
46
+ - [SDK docs][sdkref]
47
47
  - [Docs home][docs]
48
48
 
49
- ### Installation
50
-
51
- `$ yarn add react-native-one-core`
52
-
53
- Add following to your app `android/build.gradle`:
54
-
55
- ```
56
- ...
57
- allprojects {
58
- repositories {
59
- ...
60
-
61
- flatDir { dirs "$rootDir/../node_modules/react-native-one-core/android/libs" }
62
- }
63
- }
64
- ```
65
-
66
- ## Usage
67
-
68
- ```typescript
69
- import { initializeCore } from "react-native-one-core";
70
- ...
71
- const ONE = await initializeCore();
72
- await ONE.getVersion();
73
- ```
74
-
75
49
  ## Background
76
50
 
77
51
  Decentralized digital identities and credentials is an approach to identity that relocates
@@ -82,18 +56,13 @@ the issuer via back-channels, keeping the wallet holder's interactions private b
82
56
  those parties directly involved in each interaction. This model of digital identity is
83
57
  often referred to as Self-Sovereign Identity, or SSI.
84
58
 
85
- ## eIDAS 2.0
86
-
87
- If you want to provide an **EUDI Wallet**, _Procivis One_ provides production grade open
88
- source components to get certified and connect your organization to the eIDAS 2.0 ecosystem.
59
+ ## EU Digital Identity Ecosystem
89
60
 
90
- ![Procivis One in the eIDAS ARF](https://assets.procivis-one.com/static/diff/eIDAS_Architecture.png)
61
+ ![Procivis One in the EU Digital Identity Ecosystem](https://onesdk.blob.core.windows.net/doc-assets/img/EUDI_Architecture.png)
91
62
 
92
- For an EUDI Wallet, use the [One Core React Native SDK][rncore] for embedding into
93
- an existing app, or use the [Procivis One Wallet][pow] with adaptations to fit your
94
- needs.
63
+ For an EUDI Wallet, you can also use the [Procivis One Wallet][pow].
95
64
 
96
- If you want to issue into an EUDI Wallet or offer services to an EUDI Wallet holder,
65
+ For issuing into an EUDI Wallet or offering services to an EUDI Wallet holder,
97
66
  use the [Procivis One Core][core].
98
67
 
99
68
  ## Interoperability and conformance
@@ -50,11 +50,10 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
50
50
  fun initialize(configJson: String, promise: Promise) {
51
51
  syncCall(promise) {
52
52
  val context = this.reactApplicationContext
53
- val dataDirPath = context.filesDir.absolutePath
54
53
  ubiqu = ubiqu ?: UbiquKeyStorage(context)
55
54
  oneCore =
56
55
  initializeCore(
57
- dataDirPath = dataDirPath,
56
+ context = context,
58
57
  params = InitParamsDto(
59
58
  configJson = configJson,
60
59
  nativeSecureElement = AndroidKeyStoreKeyStorage(context),
@@ -200,6 +200,8 @@ object SerializeSpecific {
200
200
  value.txCode?.let {
201
201
  result.putMap("txCode", convertToRN(it) as ReadableMap)
202
202
  }
203
+ result.putString("protocol", value.protocol)
204
+ result.putBoolean("requiresWalletInstanceAttestation", value.requiresWalletInstanceAttestation)
203
205
  }
204
206
 
205
207
  is HandleInvitationResponseBindingEnum.AuthorizationCodeFlow -> {
@@ -212,6 +214,7 @@ object SerializeSpecific {
212
214
  result.putString("type_", "PROOF_REQUEST")
213
215
  result.putString("interactionId", value.interactionId)
214
216
  result.putString("proofId", value.proofId)
217
+ result.putString("protocol", value.protocol)
215
218
  }
216
219
  }
217
220
  return result
package/core-sdk.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "android": {
3
3
  "debug": {
4
- "url": "https://onesdk.blob.core.windows.net/core-sdk/84437/android/onecore-debug.aar",
5
- "sha1": "602d75e25a7d8d556ed9233199eeb4444f654582"
4
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/88624/android/onecore-debug.aar",
5
+ "sha1": "9746aa781a18c0daf111655f1721db1781484aa0"
6
6
  },
7
7
  "release": {
8
- "url": "https://onesdk.blob.core.windows.net/core-sdk/84437/android/onecore-release.aar",
9
- "sha1": "61a8d7bd0380ff8701353a669c4cd6634d96f8b9"
8
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/88624/android/onecore-release.aar",
9
+ "sha1": "de6810e3813b4702c2fab18b99446f1b79774877"
10
10
  }
11
11
  },
12
12
  "ios": {
13
- "url": "https://onesdk.blob.core.windows.net/core-sdk/84437/ios/deploy.zip",
14
- "sha1": "8b73ced41ea8078a36944dc51f432f9dfe9abd97"
13
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/88624/ios/deploy.zip",
14
+ "sha1": "59126be3ab846ca2ad5cb86ecc43c04f01bfab91"
15
15
  }
16
16
  }
@@ -8,6 +8,7 @@ export interface Cause {
8
8
  }
9
9
  export interface CertificateResponseBindingDto {
10
10
  id: string;
11
+ identifierId: string;
11
12
  createdDate: string;
12
13
  lastModified: string;
13
14
  state: CertificateStateBindingEnum;
@@ -274,7 +275,7 @@ export interface CredentialSchemaBindingDto {
274
275
  importedSourceUrl: string;
275
276
  layoutProperties?: CredentialSchemaLayoutPropertiesBindingDto;
276
277
  allowSuspension: boolean;
277
- requiresAppAttestation: boolean;
278
+ requiresWalletInstanceAttestation: boolean;
278
279
  }
279
280
  export interface CredentialSchemaCodePropertiesBindingDto {
280
281
  attribute: string;
@@ -294,7 +295,8 @@ export interface CredentialSchemaDetailBindingDto {
294
295
  layoutType?: LayoutTypeBindingEnum;
295
296
  layoutProperties?: CredentialSchemaLayoutPropertiesBindingDto;
296
297
  allowSuspension: boolean;
297
- requiresAppAttestation: boolean;
298
+ requiresWalletInstanceAttestation: boolean;
299
+ transactionCode?: CredentialSchemaTransactionCodeBindingDto;
298
300
  }
299
301
  export interface CredentialSchemaLayoutPropertiesBindingDto {
300
302
  background?: CredentialSchemaBackgroundPropertiesBindingDto;
@@ -334,6 +336,11 @@ export interface CredentialSchemaLogoPropertiesBindingDto {
334
336
  export interface CredentialSchemaShareResponseBindingDto {
335
337
  url: string;
336
338
  }
339
+ export interface CredentialSchemaTransactionCodeBindingDto {
340
+ type: TransactionCodeTypeBindingEnum;
341
+ length: number;
342
+ description?: string;
343
+ }
337
344
  export interface CredentialSetResponseBindingDto {
338
345
  required: boolean;
339
346
  options: Array<Array<string>>;
@@ -650,7 +657,13 @@ export interface ImportCredentialSchemaRequestSchemaBindingDto {
650
657
  layoutType?: LayoutTypeBindingEnum;
651
658
  layoutProperties?: ImportCredentialSchemaLayoutPropertiesBindingDto;
652
659
  allowSuspension?: boolean;
653
- requiresAppAttestation?: boolean;
660
+ requiresWalletInstanceAttestation?: boolean;
661
+ transactionCode?: ImportCredentialSchemaTransactionCodeBindingDto;
662
+ }
663
+ export interface ImportCredentialSchemaTransactionCodeBindingDto {
664
+ type: TransactionCodeTypeBindingEnum;
665
+ length: number;
666
+ description?: string;
654
667
  }
655
668
  export interface ImportProofSchemaBindingDto {
656
669
  id: string;
@@ -685,7 +698,7 @@ export interface ImportProofSchemaCredentialSchemaBindingDto {
685
698
  layoutType?: LayoutTypeBindingEnum;
686
699
  layoutProperties?: CredentialSchemaLayoutPropertiesBindingDto;
687
700
  allowSuspension?: boolean;
688
- requiresAppAttestation?: boolean;
701
+ requiresWalletInstanceAttestation?: boolean;
689
702
  }
690
703
  export interface ImportProofSchemaInputSchemaBindingDto {
691
704
  claimSchemas: Array<ImportProofSchemaClaimSchemaBindingDto>;
@@ -1340,6 +1353,8 @@ export type HandleInvitationResponseBindingEnum = {
1340
1353
  * This code is typically sent through a separate channel such as SMS or email.
1341
1354
  */
1342
1355
  txCode?: OpenId4vciTxCodeBindingDto;
1356
+ protocol: string;
1357
+ requiresWalletInstanceAttestation: boolean;
1343
1358
  } | {
1344
1359
  type_: "AUTHORIZATION_CODE_FLOW";
1345
1360
  /** For reference. */
@@ -1355,6 +1370,7 @@ export type HandleInvitationResponseBindingEnum = {
1355
1370
  interactionId: string;
1356
1371
  /** Proof request. */
1357
1372
  proofId: string;
1373
+ protocol: string;
1358
1374
  };
1359
1375
  export declare enum HistoryActionBindingEnum {
1360
1376
  ACCEPTED = "ACCEPTED",
@@ -1599,6 +1615,10 @@ export declare enum SortableTrustEntityColumnBindings {
1599
1615
  LAST_MODIFIED = "LAST_MODIFIED",
1600
1616
  STATE = "STATE"
1601
1617
  }
1618
+ export declare enum TransactionCodeTypeBindingEnum {
1619
+ NUMERIC = "NUMERIC",
1620
+ ALPHANUMERIC = "ALPHANUMERIC"
1621
+ }
1602
1622
  export declare enum TrustEntityRoleBindingEnum {
1603
1623
  ISSUER = "ISSUER",
1604
1624
  VERIFIER = "VERIFIER",
@@ -324,6 +324,11 @@ export var SortableTrustEntityColumnBindings;
324
324
  SortableTrustEntityColumnBindings["LAST_MODIFIED"] = "LAST_MODIFIED";
325
325
  SortableTrustEntityColumnBindings["STATE"] = "STATE";
326
326
  })(SortableTrustEntityColumnBindings || (SortableTrustEntityColumnBindings = {}));
327
+ export var TransactionCodeTypeBindingEnum;
328
+ (function (TransactionCodeTypeBindingEnum) {
329
+ TransactionCodeTypeBindingEnum["NUMERIC"] = "NUMERIC";
330
+ TransactionCodeTypeBindingEnum["ALPHANUMERIC"] = "ALPHANUMERIC";
331
+ })(TransactionCodeTypeBindingEnum || (TransactionCodeTypeBindingEnum = {}));
327
332
  export var TrustEntityRoleBindingEnum;
328
333
  (function (TrustEntityRoleBindingEnum) {
329
334
  TrustEntityRoleBindingEnum["ISSUER"] = "ISSUER";
@@ -30,24 +30,6 @@ class ProcivisOneCoreModule: RCTEventEmitter {
30
30
  ) {
31
31
  ProcivisOneCoreEventEmitter.shared.eventEmitter = self
32
32
  syncCall(resolve, reject) {
33
- guard
34
- let dataDirPath = NSSearchPathForDirectoriesInDomains(
35
- .applicationSupportDirectory,
36
- .userDomainMask,
37
- true
38
- ).first
39
- else {
40
- throw BindingError.ErrorResponse(
41
- data: ErrorResponseBindingDto(code: "BR_0000", message: "invalid DataDir", cause: nil)
42
- )
43
- }
44
-
45
- // create folder if not exists
46
- try FileManager.default.createDirectory(
47
- atPath: dataDirPath,
48
- withIntermediateDirectories: true
49
- )
50
-
51
33
  if self.core != nil {
52
34
  throw BindingError.ErrorResponse(
53
35
  data: ErrorResponseBindingDto(
@@ -70,7 +52,6 @@ class ProcivisOneCoreModule: RCTEventEmitter {
70
52
  }
71
53
 
72
54
  self.core = try initializeCore(
73
- dataDirPath: dataDirPath,
74
55
  params: InitParamsDto(
75
56
  configJson: configJson,
76
57
  nativeSecureElement: SecureEnclaveKeyStorage(),
@@ -114,10 +114,12 @@ private func serialize(proofRequestClaimValue: ProofRequestClaimValueBindingDto)
114
114
 
115
115
  private func serialize(invitationResponse: HandleInvitationResponseBindingEnum) throws -> NSDictionary {
116
116
  switch (invitationResponse) {
117
- case let .credentialIssuance(interactionId, keyStorageSecurityLevels, keyAlgorithms, txCode):
117
+ case let .credentialIssuance(interactionId, keyStorageSecurityLevels, keyAlgorithms, txCode, `protocol`, requiresWalletInstanceAttestation):
118
118
  var result: [String: Any] = [
119
119
  "type_": "CREDENTIAL_ISSUANCE",
120
- "interactionId": interactionId
120
+ "interactionId": interactionId,
121
+ "protocol": `protocol`,
122
+ "requiresWalletInstanceAttestation": requiresWalletInstanceAttestation
121
123
  ];
122
124
  if let keyStorageSecurityLevels = keyStorageSecurityLevels {
123
125
  result["keyStorageSecurityLevels"] = keyStorageSecurityLevels.map { serializeEnumValue(value: $0) }
@@ -130,11 +132,12 @@ private func serialize(invitationResponse: HandleInvitationResponseBindingEnum)
130
132
  }
131
133
  return result as NSDictionary;
132
134
 
133
- case let .proofRequest(interactionId, proofId):
135
+ case let .proofRequest(interactionId, proofId, `protocol`):
134
136
  return [
135
137
  "type_": "PROOF_REQUEST",
136
138
  "interactionId": interactionId,
137
- "proofId": proofId
139
+ "proofId": proofId,
140
+ "protocol": `protocol`
138
141
  ];
139
142
 
140
143
  case let .authorizationCodeFlow(interactionId, authorizationCodeFlowUrl):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procivis/react-native-one-core",
3
- "version": "1.84437.0",
3
+ "version": "1.88624.1",
4
4
  "author": "Procivis AG (https://procivis.ch)",
5
5
  "license": "Apache-2.0",
6
6
  "description": "ONE core bindings for React Native",