@procivis/react-native-one-core 1.107844.0 → 1.109666.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
@@ -13,49 +13,48 @@ The SDK's SSI functionality is powered by the [Procivis One Core][core], a compl
13
13
  solution capable of powering every element of the digital identity credential lifecycle.
14
14
  See the [key features][key] and complete solution [architecture][archi].
15
15
 
16
- ## Table of Contents
16
+ ## Installation
17
17
 
18
- - [How to use the One Core SDK](#how-to-use-the-one-core-react-native-sdk)
19
- - [Getting started](#getting-started)
20
- - [Background](#background)
21
- - [EU Digital Identity Ecosystem](#eu-digital-identity-ecosystem)
22
- - [Interoperability and conformance](#interoperability-and-conformance)
23
- - [Supported standards](#supported-standards)
24
- - [Support](#support)
25
- - [License](#license)
18
+ ```bash
19
+ yarn add @procivis/react-native-one-core
20
+ ```
26
21
 
27
- ## How to use the One Core React Native SDK
22
+ ### Android
23
+
24
+ Add the following to `android/build.gradle`:
25
+
26
+ ```kotlin
27
+ allprojects {
28
+ repositories {
29
+ flatDir { dirs "$rootDir/../node_modules/@procivis/react-native-one-core/android/libs" }
30
+ }
31
+ }
32
+ ```
33
+
34
+ ### iOS
35
+
36
+ ```bash
37
+ cd ios && pod install
38
+ ```
39
+
40
+ ## Documentation
41
+
42
+ Full documentation including configuration, initialization, and SDK reference is available at
43
+ [docs.procivis.ch/sdk][sdkref].
44
+
45
+ ## How to use the Procivis One SDK
28
46
 
29
47
  - Use this SDK to embed wallet capabilities into an existing app
30
48
  - Use the [Procivis One Wallet][pow] for a free-standing solution that can be white-labeled
31
49
  - Use the [One Core React Components][comp] library for UI elements for your digital wallet app
32
50
 
33
- ## Getting started
34
-
35
- ### Trial
51
+ ## Procivis One Trial
36
52
 
37
53
  The fastest way to get started with the _Procivis One Wallet_ is to download the app
38
54
  from the iOS or Android app stores and [join our Trial Environment][trial].
39
55
  In the trial environment, you are given control of an organization on our server
40
56
  solution, the _Procivis One Desk_, and can quickly begin issuing and verifying credentials.
41
57
 
42
- ### Documentation
43
-
44
- See our documentation:
45
-
46
- - [SDK docs][sdkref]
47
- - [Docs home][docs]
48
-
49
- ## Background
50
-
51
- Decentralized digital identities and credentials is an approach to identity that relocates
52
- digital credentials from the possession and control of centralized authorities to the
53
- digital wallet of the credentials holder. This architecture eliminates the need for the
54
- user to "phone home" to use their credentials as well as the verifier to communicate to
55
- the issuer via back-channels, keeping the wallet holder's interactions private between only
56
- those parties directly involved in each interaction. This model of digital identity is
57
- often referred to as Self-Sovereign Identity, or SSI.
58
-
59
58
  ## EU Digital Identity Ecosystem
60
59
 
61
60
  ![Procivis One in the EU Digital Identity Ecosystem](https://onesdk.blob.core.windows.net/doc-assets/img/EUDI_Architecture.png)
@@ -128,9 +127,9 @@ and regulations mature and harden.
128
127
  - [Draft 20][vp20]
129
128
  - [OID4VP over BLE][ble]; optimized version of Draft 00
130
129
  - OID4VP over MQTT; proprietary adaptation of "OID4VP over BLE" via MQTT channel
131
- - ISO/IEC 18013
130
+ - ISO/IEC 18013 (Verification)
132
131
  - [18013-5][iso5]: Device engagement using either NFC or QR Code, data retrieval using BLE
133
- - [18013-7][iso7]: Online data retrieval via OID4VP
132
+ - [18013-7 Annex B][iso7]: Online data retrieval via OID4VP
134
133
 
135
134
  ### Key storage
136
135
 
@@ -208,8 +208,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
208
208
  promise: Promise
209
209
  ) {
210
210
  asyncCall(promise, scope) {
211
- val result = getCore().holderAcceptCredential(construct(request))
212
- return@asyncCall convertToRN(result)
211
+ return@asyncCall getCore().holderAcceptCredential(construct(request))
213
212
  }
214
213
  }
215
214
 
@@ -40,6 +40,14 @@ object Serialize {
40
40
  return Pair(RNType.BOOLEAN, input as Boolean)
41
41
  } else if (type == String::class.java || type == java.lang.String::class.java) {
42
42
  return Pair(RNType.STRING, input as String)
43
+ } else if (type == UByte::class.java) {
44
+ return Pair(RNType.INT, (input as UByte).toInt())
45
+ } else if (type == UShort::class.java) {
46
+ return Pair(RNType.INT, (input as UShort).toInt())
47
+ } else if (type == UInt::class.java) {
48
+ return Pair(RNType.DOUBLE, (input as UInt).toDouble())
49
+ } else if (type == ULong::class.java) {
50
+ return Pair(RNType.DOUBLE, (input as ULong).toDouble())
43
51
  } else if (type == Int::class.java || type == java.lang.Integer::class.java) {
44
52
  return Pair(RNType.INT, input as Int)
45
53
  } else if (type == Byte::class.java || type == java.lang.Byte::class.java) {
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/107844/android/onecore-debug.aar",
5
- "sha1": "266d4a4b4f16e414185907578e83ebd3f8fdd429"
4
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/109666/android/onecore-debug.aar",
5
+ "sha1": "282e37ace7c1f2fe5d76801c491ef7d9dc5d5802"
6
6
  },
7
7
  "release": {
8
- "url": "https://onesdk.blob.core.windows.net/core-sdk/107844/android/onecore-release.aar",
9
- "sha1": "08fc02676a2aaad715e45f80750c847f49e7faad"
8
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/109666/android/onecore-release.aar",
9
+ "sha1": "06ac88f54cb4e28b5df88114fe5ec067f21cad0a"
10
10
  }
11
11
  },
12
12
  "ios": {
13
- "url": "https://onesdk.blob.core.windows.net/core-sdk/107844/ios/deploy.zip",
14
- "sha1": "a3f6525899a9e7e4bb5081621aee5562de57f2e9"
13
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/109666/ios/deploy.zip",
14
+ "sha1": "2230a7d583857c37b6938518f6259f006986a757"
15
15
  }
16
16
  }
@@ -315,6 +315,10 @@ export interface CredentialDetail {
315
315
  /** Country profile associated with the credential. */
316
316
  profile?: string;
317
317
  trustInformation?: TrustInformation;
318
+ consumedAt?: string;
319
+ type: CredentialType;
320
+ remainingBatchItemCount?: number;
321
+ parentId?: string;
318
322
  }
319
323
  export interface CredentialList {
320
324
  values: Array<CredentialListItem>;
@@ -346,6 +350,9 @@ export interface CredentialListItem {
346
350
  protocol: string;
347
351
  /** Country profile associated with the credential. */
348
352
  profile?: string;
353
+ consumedAt?: string;
354
+ type: CredentialType;
355
+ parentId?: string;
349
356
  }
350
357
  export interface CredentialListQuery {
351
358
  /** Page number to retrieve (0-based indexing). */
@@ -378,8 +385,12 @@ export interface CredentialListQuery {
378
385
  roles?: Array<CredentialRole>;
379
386
  /** Filter by one or more UUIDs. */
380
387
  ids?: Array<string>;
388
+ /** Filter by batch parent UUID. */
389
+ parentId?: string;
381
390
  /** Filter by one or more credential states. */
382
391
  states?: Array<CredentialState>;
392
+ /** Filter by one or more credential types. */
393
+ types?: Array<CredentialType>;
383
394
  /**
384
395
  * Additional fields to include in response objects. Omitting
385
396
  * this keeps responses shorter.
@@ -808,9 +819,6 @@ export interface HolderAcceptCredentialRequest {
808
819
  /** User-provided transaction code. */
809
820
  txCode?: string;
810
821
  }
811
- export interface HolderAcceptCredentialResponse {
812
- credentialIds: Array<string>;
813
- }
814
822
  export interface HolderRefreshCredentialResponse {
815
823
  credentialIds: Array<string>;
816
824
  }
@@ -1786,6 +1794,11 @@ export declare enum CredentialState {
1786
1794
  ERROR = "ERROR",
1787
1795
  INTERACTION_EXPIRED = "INTERACTION_EXPIRED"
1788
1796
  }
1797
+ export declare enum CredentialType {
1798
+ SINGLE = "SINGLE",
1799
+ BATCH_PARENT = "BATCH_PARENT",
1800
+ BATCH_ITEM = "BATCH_ITEM"
1801
+ }
1789
1802
  export declare enum DidListQueryExactColumn {
1790
1803
  NAME = "NAME",
1791
1804
  DID = "DID"
@@ -1865,7 +1878,8 @@ export declare enum HistoryAction {
1865
1878
  WRP_AC_RECEIVED = "WRP_AC_RECEIVED",
1866
1879
  WRP_RC_RECEIVED = "WRP_RC_RECEIVED",
1867
1880
  WRP_NR_RECEIVED = "WRP_NR_RECEIVED",
1868
- TRUST_RESOLVED = "TRUST_RESOLVED"
1881
+ TRUST_RESOLVED = "TRUST_RESOLVED",
1882
+ REFRESHED = "REFRESHED"
1869
1883
  }
1870
1884
  export declare enum HistoryEntityType {
1871
1885
  KEY = "KEY",
@@ -2305,7 +2319,7 @@ export interface OneCore {
2305
2319
  * identifier that matches issuer's restrictions. Alternatively,
2306
2320
  * you can specify an existing identifier.
2307
2321
  */
2308
- holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<HolderAcceptCredentialResponse>;
2322
+ holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<string>;
2309
2323
  /** Returns wallet registration details from the Wallet Provider. */
2310
2324
  holderGetWalletUnit(id: string): Promise<HolderWalletUnit>;
2311
2325
  /** Returns trust collections curated by the Wallet Provider. */
@@ -119,6 +119,12 @@ export var CredentialState;
119
119
  CredentialState["ERROR"] = "ERROR";
120
120
  CredentialState["INTERACTION_EXPIRED"] = "INTERACTION_EXPIRED";
121
121
  })(CredentialState || (CredentialState = {}));
122
+ export var CredentialType;
123
+ (function (CredentialType) {
124
+ CredentialType["SINGLE"] = "SINGLE";
125
+ CredentialType["BATCH_PARENT"] = "BATCH_PARENT";
126
+ CredentialType["BATCH_ITEM"] = "BATCH_ITEM";
127
+ })(CredentialType || (CredentialType = {}));
122
128
  export var DidListQueryExactColumn;
123
129
  (function (DidListQueryExactColumn) {
124
130
  DidListQueryExactColumn["NAME"] = "NAME";
@@ -163,6 +169,7 @@ export var HistoryAction;
163
169
  HistoryAction["WRP_RC_RECEIVED"] = "WRP_RC_RECEIVED";
164
170
  HistoryAction["WRP_NR_RECEIVED"] = "WRP_NR_RECEIVED";
165
171
  HistoryAction["TRUST_RESOLVED"] = "TRUST_RESOLVED";
172
+ HistoryAction["REFRESHED"] = "REFRESHED";
166
173
  })(HistoryAction || (HistoryAction = {}));
167
174
  export var HistoryEntityType;
168
175
  (function (HistoryEntityType) {
@@ -233,8 +233,7 @@ class ProcivisOneCoreModule: RCTEventEmitter {
233
233
  reject: @escaping RCTPromiseRejectBlock
234
234
  ) {
235
235
  asyncCall(resolve, reject) {
236
- let result = try await self.getCore().holderAcceptCredential(request: try deserialize(request))
237
- return try serializeAny(result)
236
+ return try await self.getCore().holderAcceptCredential(request: try deserialize(request))
238
237
  }
239
238
  }
240
239
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procivis/react-native-one-core",
3
- "version": "1.107844.0",
3
+ "version": "1.109666.1",
4
4
  "author": "Procivis AG (https://procivis.ch)",
5
5
  "license": "Apache-2.0",
6
6
  "description": "ONE core bindings for React Native",