@procivis/react-native-one-core 1.81885.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/81885/android/onecore-debug.aar",
5
- "sha1": "c3d51c2d8d7fe33f2d96f3c86940eebaf9a4020f"
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/81885/android/onecore-release.aar",
9
- "sha1": "89f8fe0cd515100fa9eb701128a140f3c3b535c8"
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/81885/ios/deploy.zip",
14
- "sha1": "466211b3ff0189cd55462fc2175da099937bc2b7"
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;
@@ -63,6 +64,15 @@ export interface ContinueIssuanceResponseBindingDto {
63
64
  keyStorageSecurityLevels?: Array<KeyStorageSecurityBindingEnum>;
64
65
  keyAlgorithms?: Array<string>;
65
66
  }
67
+ export interface CreateCaCsrRequestBindingDto {
68
+ subject: KeyGenerateCsrRequestSubjectBindingDto;
69
+ }
70
+ export interface CreateCertificateAuthorityRequestBindingDto {
71
+ name?: string;
72
+ keyId: string;
73
+ chain?: string;
74
+ selfSigned?: CreateSelfSignedCertificateAuthorityRequestBindingDto;
75
+ }
66
76
  export interface CreateCertificateRequestBindingDto {
67
77
  name?: string;
68
78
  chain: string;
@@ -74,12 +84,18 @@ export interface CreateIdentifierDidRequestBindingDto {
74
84
  keys: DidRequestKeysBindingDto;
75
85
  params: Record<string, string>;
76
86
  }
87
+ export interface CreateIdentifierKeyRequestBindingDto {
88
+ keyId: string;
89
+ }
77
90
  export interface CreateIdentifierRequestBindingDto {
78
91
  organisationId: string;
79
92
  name: string;
93
+ /** Deprecated. Use the `key` field instead. */
80
94
  keyId?: string;
95
+ key?: CreateIdentifierKeyRequestBindingDto;
81
96
  did?: CreateIdentifierDidRequestBindingDto;
82
97
  certificates?: Array<CreateCertificateRequestBindingDto>;
98
+ certificateAuthorities?: Array<CreateCertificateAuthorityRequestBindingDto>;
83
99
  }
84
100
  export interface CreateOrganisationRequestBindingDto {
85
101
  id?: string;
@@ -126,6 +142,12 @@ export interface CreateRemoteTrustEntityRequestBindingDto {
126
142
  website?: string;
127
143
  role: TrustEntityRoleBindingEnum;
128
144
  }
145
+ export interface CreateSelfSignedCertificateAuthorityRequestBindingDto {
146
+ content: CreateCaCsrRequestBindingDto;
147
+ signer: string;
148
+ validityStart?: string;
149
+ validityEnd?: string;
150
+ }
129
151
  export interface CreateTrustAnchorRequestBindingDto {
130
152
  name: string;
131
153
  type: string;
@@ -246,12 +268,14 @@ export interface CredentialSchemaBindingDto {
246
268
  lastModified: string;
247
269
  name: string;
248
270
  format: string;
249
- revocationMethod: string;
271
+ revocationMethod?: string;
250
272
  keyStorageSecurity?: KeyStorageSecurityBindingEnum;
251
273
  schemaId: string;
252
274
  layoutType?: LayoutTypeBindingEnum;
253
275
  importedSourceUrl: string;
254
276
  layoutProperties?: CredentialSchemaLayoutPropertiesBindingDto;
277
+ allowSuspension: boolean;
278
+ requiresWalletInstanceAttestation: boolean;
255
279
  }
256
280
  export interface CredentialSchemaCodePropertiesBindingDto {
257
281
  attribute: string;
@@ -263,13 +287,16 @@ export interface CredentialSchemaDetailBindingDto {
263
287
  lastModified: string;
264
288
  name: string;
265
289
  format: string;
266
- revocationMethod: string;
290
+ revocationMethod?: string;
267
291
  claims: Array<CredentialClaimSchemaBindingDto>;
268
292
  keyStorageSecurity?: KeyStorageSecurityBindingEnum;
269
293
  schemaId: string;
270
294
  importedSourceUrl: string;
271
295
  layoutType?: LayoutTypeBindingEnum;
272
296
  layoutProperties?: CredentialSchemaLayoutPropertiesBindingDto;
297
+ allowSuspension: boolean;
298
+ requiresWalletInstanceAttestation: boolean;
299
+ transactionCode?: CredentialSchemaTransactionCodeBindingDto;
273
300
  }
274
301
  export interface CredentialSchemaLayoutPropertiesBindingDto {
275
302
  background?: CredentialSchemaBackgroundPropertiesBindingDto;
@@ -309,6 +336,11 @@ export interface CredentialSchemaLogoPropertiesBindingDto {
309
336
  export interface CredentialSchemaShareResponseBindingDto {
310
337
  url: string;
311
338
  }
339
+ export interface CredentialSchemaTransactionCodeBindingDto {
340
+ type: TransactionCodeTypeBindingEnum;
341
+ length: number;
342
+ description?: string;
343
+ }
312
344
  export interface CredentialSetResponseBindingDto {
313
345
  required: boolean;
314
346
  options: Array<Array<string>>;
@@ -625,6 +657,13 @@ export interface ImportCredentialSchemaRequestSchemaBindingDto {
625
657
  layoutType?: LayoutTypeBindingEnum;
626
658
  layoutProperties?: ImportCredentialSchemaLayoutPropertiesBindingDto;
627
659
  allowSuspension?: boolean;
660
+ requiresWalletInstanceAttestation?: boolean;
661
+ transactionCode?: ImportCredentialSchemaTransactionCodeBindingDto;
662
+ }
663
+ export interface ImportCredentialSchemaTransactionCodeBindingDto {
664
+ type: TransactionCodeTypeBindingEnum;
665
+ length: number;
666
+ description?: string;
628
667
  }
629
668
  export interface ImportProofSchemaBindingDto {
630
669
  id: string;
@@ -649,14 +688,17 @@ export interface ImportProofSchemaCredentialSchemaBindingDto {
649
688
  id: string;
650
689
  createdDate: string;
651
690
  lastModified: string;
691
+ deletedAt?: string;
652
692
  name: string;
653
693
  format: string;
654
- revocationMethod: string;
694
+ revocationMethod?: string;
655
695
  keyStorageSecurity?: KeyStorageSecurityBindingEnum;
656
696
  schemaId: string;
657
697
  importedSourceUrl: string;
658
698
  layoutType?: LayoutTypeBindingEnum;
659
699
  layoutProperties?: CredentialSchemaLayoutPropertiesBindingDto;
700
+ allowSuspension?: boolean;
701
+ requiresWalletInstanceAttestation?: boolean;
660
702
  }
661
703
  export interface ImportProofSchemaInputSchemaBindingDto {
662
704
  claimSchemas: Array<ImportProofSchemaClaimSchemaBindingDto>;
@@ -692,6 +734,20 @@ export interface InitiateIssuanceRequestBindingDto {
692
734
  export interface InitiateIssuanceResponseBindingDto {
693
735
  url: string;
694
736
  }
737
+ export interface KeyGenerateCsrRequestBindingDto {
738
+ profile: KeyGenerateCsrRequestProfileBinding;
739
+ subject: KeyGenerateCsrRequestSubjectBindingDto;
740
+ }
741
+ export interface KeyGenerateCsrRequestSubjectBindingDto {
742
+ /** Two-letter country code. */
743
+ countryName?: string;
744
+ /** Common name to include in the CSR, typically the domain name of the organization. */
745
+ commonName?: string;
746
+ stateOrProvinceName?: string;
747
+ organisationName?: string;
748
+ localityName?: string;
749
+ serialNumber?: string;
750
+ }
695
751
  export interface KeyListItemBindingDto {
696
752
  id: string;
697
753
  createdDate: string;
@@ -1297,6 +1353,8 @@ export type HandleInvitationResponseBindingEnum = {
1297
1353
  * This code is typically sent through a separate channel such as SMS or email.
1298
1354
  */
1299
1355
  txCode?: OpenId4vciTxCodeBindingDto;
1356
+ protocol: string;
1357
+ requiresWalletInstanceAttestation: boolean;
1300
1358
  } | {
1301
1359
  type_: "AUTHORIZATION_CODE_FLOW";
1302
1360
  /** For reference. */
@@ -1312,6 +1370,7 @@ export type HandleInvitationResponseBindingEnum = {
1312
1370
  interactionId: string;
1313
1371
  /** Proof request. */
1314
1372
  proofId: string;
1373
+ protocol: string;
1315
1374
  };
1316
1375
  export declare enum HistoryActionBindingEnum {
1317
1376
  ACCEPTED = "ACCEPTED",
@@ -1392,7 +1451,13 @@ export declare enum IdentifierStateBindingEnum {
1392
1451
  export declare enum IdentifierTypeBindingEnum {
1393
1452
  KEY = "KEY",
1394
1453
  DID = "DID",
1395
- CERTIFICATE = "CERTIFICATE"
1454
+ CERTIFICATE = "CERTIFICATE",
1455
+ CERTIFICATE_AUTHORITY = "CERTIFICATE_AUTHORITY"
1456
+ }
1457
+ export declare enum KeyGenerateCsrRequestProfileBinding {
1458
+ GENERIC = "GENERIC",
1459
+ MDL = "MDL",
1460
+ CA = "CA"
1396
1461
  }
1397
1462
  export declare enum KeyRoleBindingEnum {
1398
1463
  AUTHENTICATION = "AUTHENTICATION",
@@ -1550,6 +1615,10 @@ export declare enum SortableTrustEntityColumnBindings {
1550
1615
  LAST_MODIFIED = "LAST_MODIFIED",
1551
1616
  STATE = "STATE"
1552
1617
  }
1618
+ export declare enum TransactionCodeTypeBindingEnum {
1619
+ NUMERIC = "NUMERIC",
1620
+ ALPHANUMERIC = "ALPHANUMERIC"
1621
+ }
1553
1622
  export declare enum TrustEntityRoleBindingEnum {
1554
1623
  ISSUER = "ISSUER",
1555
1624
  VERIFIER = "VERIFIER",
@@ -191,7 +191,14 @@ export var IdentifierTypeBindingEnum;
191
191
  IdentifierTypeBindingEnum["KEY"] = "KEY";
192
192
  IdentifierTypeBindingEnum["DID"] = "DID";
193
193
  IdentifierTypeBindingEnum["CERTIFICATE"] = "CERTIFICATE";
194
+ IdentifierTypeBindingEnum["CERTIFICATE_AUTHORITY"] = "CERTIFICATE_AUTHORITY";
194
195
  })(IdentifierTypeBindingEnum || (IdentifierTypeBindingEnum = {}));
196
+ export var KeyGenerateCsrRequestProfileBinding;
197
+ (function (KeyGenerateCsrRequestProfileBinding) {
198
+ KeyGenerateCsrRequestProfileBinding["GENERIC"] = "GENERIC";
199
+ KeyGenerateCsrRequestProfileBinding["MDL"] = "MDL";
200
+ KeyGenerateCsrRequestProfileBinding["CA"] = "CA";
201
+ })(KeyGenerateCsrRequestProfileBinding || (KeyGenerateCsrRequestProfileBinding = {}));
195
202
  export var KeyRoleBindingEnum;
196
203
  (function (KeyRoleBindingEnum) {
197
204
  KeyRoleBindingEnum["AUTHENTICATION"] = "AUTHENTICATION";
@@ -317,6 +324,11 @@ export var SortableTrustEntityColumnBindings;
317
324
  SortableTrustEntityColumnBindings["LAST_MODIFIED"] = "LAST_MODIFIED";
318
325
  SortableTrustEntityColumnBindings["STATE"] = "STATE";
319
326
  })(SortableTrustEntityColumnBindings || (SortableTrustEntityColumnBindings = {}));
327
+ export var TransactionCodeTypeBindingEnum;
328
+ (function (TransactionCodeTypeBindingEnum) {
329
+ TransactionCodeTypeBindingEnum["NUMERIC"] = "NUMERIC";
330
+ TransactionCodeTypeBindingEnum["ALPHANUMERIC"] = "ALPHANUMERIC";
331
+ })(TransactionCodeTypeBindingEnum || (TransactionCodeTypeBindingEnum = {}));
320
332
  export var TrustEntityRoleBindingEnum;
321
333
  (function (TrustEntityRoleBindingEnum) {
322
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.81885.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",