@procivis/react-native-one-core 1.107844.0 → 1.112847.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.
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
 
@@ -21,8 +21,16 @@ object Deserialize {
21
21
  return when (kClass) {
22
22
  Boolean::class -> data.getBoolean(index)
23
23
  String::class -> data.getString(index)
24
- UInt::class -> data.getInt(index).toUInt()
25
- Long::class -> data.getInt(index).toLong()
24
+
25
+ Byte::class -> data.getInt(index).toByte()
26
+ UByte::class -> data.getInt(index).toUByte()
27
+ Short::class -> data.getInt(index).toShort()
28
+ UShort::class -> data.getInt(index).toUShort()
29
+ Int::class -> data.getInt(index)
30
+ UInt::class -> data.getDouble(index).toUInt()
31
+ Long::class -> data.getDouble(index).toLong()
32
+ ULong::class -> data.getDouble(index).toULong()
33
+
26
34
  List::class -> {
27
35
  val itemType = kType.arguments.first().type
28
36
  val values = data.getArray(index)
@@ -80,8 +88,16 @@ object Deserialize {
80
88
  return when (kClass) {
81
89
  Boolean::class -> data.getBoolean(name)
82
90
  String::class -> data.getString(name)
83
- UInt::class -> data.getInt(name).toUInt()
84
- Long::class -> data.getInt(name).toLong()
91
+
92
+ Byte::class -> data.getInt(name).toByte()
93
+ UByte::class -> data.getInt(name).toUByte()
94
+ Short::class -> data.getInt(name).toShort()
95
+ UShort::class -> data.getInt(name).toUShort()
96
+ Int::class -> data.getInt(name)
97
+ UInt::class -> data.getDouble(name).toUInt()
98
+ Long::class -> data.getDouble(name).toLong()
99
+ ULong::class -> data.getDouble(name).toULong()
100
+
85
101
  List::class -> {
86
102
  val values = data.getArray(name)!!
87
103
  val itemType = type.arguments.first().type
@@ -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
 
@@ -469,6 +468,22 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
469
468
  }
470
469
  }
471
470
 
471
+ @ReactMethod
472
+ fun qesAuthorize(request: ReadableMap, promise: Promise) {
473
+ asyncCall(promise, scope) {
474
+ val result = getCore().qesAuthorize(construct(request))
475
+ return@asyncCall convertToRN(result)
476
+ }
477
+ }
478
+
479
+ @ReactMethod
480
+ fun qesSign(request: ReadableMap, promise: Promise) {
481
+ asyncCall(promise, scope) {
482
+ val result = getCore().qesSign(construct(request))
483
+ return@asyncCall convertToRN(result)
484
+ }
485
+ }
486
+
472
487
  @ReactMethod
473
488
  fun createProofSchema(request: ReadableMap, promise: Promise) {
474
489
  asyncCall(promise, scope) {
@@ -604,6 +619,14 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
604
619
  }
605
620
  }
606
621
 
622
+ @ReactMethod
623
+ fun holderActivateWalletUnit(id: String, request: ReadableMap, promise: Promise) {
624
+ asyncCall(promise, scope) {
625
+ getCore().holderActivateWalletUnit(id, construct(request))
626
+ return@asyncCall null
627
+ }
628
+ }
629
+
607
630
  @ReactMethod
608
631
  fun holderWalletUnitStatus(walletUnitId: String, promise: Promise) {
609
632
  asyncCall(promise, scope) {
@@ -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/112847/android/onecore-debug.aar",
5
+ "sha1": "745cfc30063f218eb87ec59e1f940973d955bcd0"
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/112847/android/onecore-release.aar",
9
+ "sha1": "322c4c1a08a3d1a5b117589a891240289ad29953"
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/112847/ios/deploy.zip",
14
+ "sha1": "ae26db6dc511a977aaa0454f7fbd28e3c8f09810"
15
15
  }
16
16
  }
package/dist/index.js CHANGED
@@ -13,11 +13,14 @@ interfaceMethodNames.forEach((method) => ONE?.[method]);
13
13
  // Config entities are exposed as serialized JSON, here conversion to structs
14
14
  const originalGetConfig = ONE?.getConfig;
15
15
  if (originalGetConfig) {
16
- ONE.getConfig = () => originalGetConfig().then((config) => objectMap(config, (entityValue) => {
17
- return typeof entityValue === "string"
18
- ? entityValue
19
- : objectMap(entityValue, (json) => JSON.parse(json));
20
- }));
16
+ ONE.getConfig = () => originalGetConfig().then((config) => {
17
+ const { globalSettings, ...providers } = config;
18
+ const parsed = objectMap(providers, (entityValue) => objectMap(entityValue, (json) => JSON.parse(json)));
19
+ return {
20
+ globalSettings,
21
+ ...parsed
22
+ };
23
+ });
21
24
  }
22
25
  /**
23
26
  * Initialize ONE Core
@@ -1,4 +1,4 @@
1
- import { IdentifierType } from "./one-core-uniffi-intf";
1
+ import { GlobalSettings, IdentifierType } from "./one-core-uniffi-intf";
2
2
  export declare enum KeyAlgorithmFeature {
3
3
  GENERATE_CSR = "GENERATE_CSR"
4
4
  }
@@ -156,6 +156,6 @@ export interface CoreConfig {
156
156
  credentialIssuer: ConfigEntities<undefined, {}>;
157
157
  walletProvider: ConfigEntities;
158
158
  verifierProvider: ConfigEntities<undefined, {}>;
159
- defaultLanguage: string;
159
+ globalSettings: GlobalSettings;
160
160
  }
161
161
  export {};
@@ -10,4 +10,4 @@ export interface ONECore extends Omit<OneCore, "version" | "getConfig"> {
10
10
  * @hidden
11
11
  * New Architecture bridgeless issue workaround: see https://github.com/facebook/react-native/issues/43221
12
12
  */
13
- export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "upsertOrganisation", "getOrganisation", "generateKey", "createDid", "listDids", "createIdentifier", "getIdentifier", "listIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "holderRefreshCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinition", "getPresentationDefinitionV2", "holderRejectProof", "holderSubmitProof", "holderSubmitProofV2", "listCredentials", "runTask", "deleteProofClaims", "getCredential", "getCredentialTrustInformation", "deleteCredential", "importCredentialSchema", "getCredentialSchema", "createCredentialSchema", "listCredentialSchemas", "deleteCredentialSchema", "createProof", "shareProof", "shareProofSchema", "shareCredentialSchema", "getProof", "getProofTrustInformation", "listProofs", "deleteProof", "proposeProof", "createProofSchema", "listProofSchemas", "getProofSchema", "deleteProofSchema", "importProofSchema", "checkRevocation", "listHistory", "getHistoryEntry", "createBackup", "backupInfo", "deleteCache", "unpackBackup", "finalizeImport", "rollbackImport", "resolveJsonldContext", "holderRegisterWalletUnit", "holderWalletUnitStatus", "holderGetWalletUnit", "holderWalletUnitUpdate", "holderGetWalletUnitTrustCollections", "registerVerifierInstance", "updateVerifierInstance", "getVerifierInstanceTrustCollections", "nfcReadIsoMdlEngagement", "nfcStopIsoMdlEngagement", "uninitialize"];
13
+ export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "upsertOrganisation", "getOrganisation", "generateKey", "createDid", "listDids", "createIdentifier", "getIdentifier", "listIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "holderRefreshCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinition", "getPresentationDefinitionV2", "holderRejectProof", "holderSubmitProof", "holderSubmitProofV2", "listCredentials", "runTask", "deleteProofClaims", "getCredential", "getCredentialTrustInformation", "deleteCredential", "importCredentialSchema", "getCredentialSchema", "createCredentialSchema", "listCredentialSchemas", "deleteCredentialSchema", "createProof", "shareProof", "shareProofSchema", "shareCredentialSchema", "getProof", "getProofTrustInformation", "listProofs", "deleteProof", "proposeProof", "qesAuthorize", "qesSign", "createProofSchema", "listProofSchemas", "getProofSchema", "deleteProofSchema", "importProofSchema", "checkRevocation", "listHistory", "getHistoryEntry", "createBackup", "backupInfo", "deleteCache", "unpackBackup", "finalizeImport", "rollbackImport", "resolveJsonldContext", "holderRegisterWalletUnit", "holderActivateWalletUnit", "holderWalletUnitStatus", "holderGetWalletUnit", "holderWalletUnitUpdate", "holderGetWalletUnitTrustCollections", "registerVerifierInstance", "updateVerifierInstance", "getVerifierInstanceTrustCollections", "nfcReadIsoMdlEngagement", "nfcStopIsoMdlEngagement", "uninitialize"];
package/dist/src/core.js CHANGED
@@ -48,6 +48,8 @@ export const interfaceMethodNames = [
48
48
  "listProofs",
49
49
  "deleteProof",
50
50
  "proposeProof",
51
+ "qesAuthorize",
52
+ "qesSign",
51
53
  "createProofSchema",
52
54
  "listProofSchemas",
53
55
  "getProofSchema",
@@ -64,6 +66,7 @@ export const interfaceMethodNames = [
64
66
  "rollbackImport",
65
67
  "resolveJsonldContext",
66
68
  "holderRegisterWalletUnit",
69
+ "holderActivateWalletUnit",
67
70
  "holderWalletUnitStatus",
68
71
  "holderGetWalletUnit",
69
72
  "holderWalletUnitUpdate",
@@ -103,7 +103,8 @@ export interface Config {
103
103
  */
104
104
  walletProvider: Record<string, string>;
105
105
  verifierProvider: Record<string, string>;
106
- defaultLanguage: string;
106
+ /** Deployment-wide settings that are not tied to a specific config entity. */
107
+ globalSettings: GlobalSettings;
107
108
  }
108
109
  export interface ContinueIssuanceResponse {
109
110
  /** For reference. */
@@ -143,6 +144,7 @@ export interface CreateCredentialSchemaRequest {
143
144
  requiresWalletInstanceAttestation: boolean;
144
145
  transactionCode?: CredentialSchemaTransactionCodeRequest;
145
146
  translations?: CredentialSchemaTranslations;
147
+ embeddedDisclosurePolicy?: DisclosurePolicyCreateRequest;
146
148
  }
147
149
  export interface CreateDidRequest {
148
150
  organisationId: string;
@@ -315,6 +317,10 @@ export interface CredentialDetail {
315
317
  /** Country profile associated with the credential. */
316
318
  profile?: string;
317
319
  trustInformation?: TrustInformation;
320
+ consumedAt?: string;
321
+ type: CredentialType;
322
+ remainingBatchItemCount?: number;
323
+ parentId?: string;
318
324
  }
319
325
  export interface CredentialList {
320
326
  values: Array<CredentialListItem>;
@@ -346,6 +352,9 @@ export interface CredentialListItem {
346
352
  protocol: string;
347
353
  /** Country profile associated with the credential. */
348
354
  profile?: string;
355
+ consumedAt?: string;
356
+ type: CredentialType;
357
+ parentId?: string;
349
358
  }
350
359
  export interface CredentialListQuery {
351
360
  /** Page number to retrieve (0-based indexing). */
@@ -378,8 +387,12 @@ export interface CredentialListQuery {
378
387
  roles?: Array<CredentialRole>;
379
388
  /** Filter by one or more UUIDs. */
380
389
  ids?: Array<string>;
390
+ /** Filter by batch parent UUID. */
391
+ parentId?: string;
381
392
  /** Filter by one or more credential states. */
382
393
  states?: Array<CredentialState>;
394
+ /** Filter by one or more credential types. */
395
+ types?: Array<CredentialType>;
383
396
  /**
384
397
  * Additional fields to include in response objects. Omitting
385
398
  * this keeps responses shorter.
@@ -647,6 +660,32 @@ export interface DidRequestKeys {
647
660
  capabilityInvocation: Array<string>;
648
661
  capabilityDelegation: Array<string>;
649
662
  }
663
+ export interface DisclosurePolicy {
664
+ id: string;
665
+ policy: string;
666
+ description?: string;
667
+ url?: string;
668
+ options?: DisclosurePolicyOptions;
669
+ }
670
+ export interface DisclosurePolicyCreateRequest {
671
+ policy: string;
672
+ description?: string;
673
+ url?: string;
674
+ options?: DisclosurePolicyOptions;
675
+ }
676
+ export interface DisclosurePolicyOption {
677
+ dn?: string;
678
+ entitlement?: string;
679
+ serial?: string;
680
+ }
681
+ export interface DisclosurePolicyOptions {
682
+ values: Array<DisclosurePolicyOption>;
683
+ }
684
+ export interface DisclosurePolicyViolation {
685
+ id: string;
686
+ description?: string;
687
+ url?: string;
688
+ }
650
689
  export interface DisplayName {
651
690
  lang: string;
652
691
  value: string;
@@ -704,6 +743,9 @@ export interface GeneratedKey {
704
743
  keyReference: number[];
705
744
  publicKey: number[];
706
745
  }
746
+ export interface GlobalSettings {
747
+ defaultLanguage: string;
748
+ }
707
749
  export interface HandleInvitationRequest {
708
750
  /**
709
751
  * Typically encoded as a QR code or deep link by the issuer or
@@ -739,12 +781,29 @@ export interface HistoryListItem {
739
781
  id: string;
740
782
  createdDate: string;
741
783
  action: HistoryAction;
784
+ /**
785
+ * For credential events, this is the credential schema name. For
786
+ * presentation events, this is the proof schema name. For all other
787
+ * entity types, it is the entity name.
788
+ */
742
789
  name: string;
743
790
  entityId?: string;
744
791
  entityType: HistoryEntityType;
792
+ /**
793
+ * Structured metadata attached to the event. The variant depends on
794
+ * the type.
795
+ */
745
796
  metadata?: HistoryMetadata;
746
797
  organisationId?: string;
798
+ /**
799
+ * Identifier UUID of the external participant in the interaction, if
800
+ * applicable. For credential events, this is the counterpart's identifier
801
+ * (holder when the system is issuer, issuer when the system is holder).
802
+ * For presentation events, this is the holder's identifier when the system
803
+ * is verifier, or the verifier's identifier when the system is holder.
804
+ */
747
805
  target?: string;
806
+ /** Identifier of the user who triggered the event. */
748
807
  user?: string;
749
808
  }
750
809
  export interface HistoryListQuery {
@@ -762,7 +821,7 @@ export interface HistoryListQuery {
762
821
  entityIds?: Array<string>;
763
822
  /** Return only events associated with the provided entity types. */
764
823
  entityTypes?: Array<HistoryEntityType>;
765
- /** Return only the provided events. */
824
+ /** Return only events of the specified action types. */
766
825
  actions?: Array<HistoryAction>;
767
826
  /**
768
827
  * Return only entries created after this time. Timestamp in
@@ -784,13 +843,21 @@ export interface HistoryListQuery {
784
843
  proofId?: string;
785
844
  /** Return only events associated with the provided proof schema ID. */
786
845
  proofSchemaId?: string;
787
- /** Search for a string. */
846
+ /**
847
+ * Search history events by string. Set `text` to specify the search
848
+ * string and optionally `type` to restrict which field is searched.
849
+ * When `type` is omitted, all searchable fields are checked.
850
+ */
788
851
  search?: HistorySearch;
789
- /** Return only events associated with the provided user(s). */
852
+ /** Return only events triggered by the specified users. */
790
853
  users?: Array<string>;
791
854
  }
792
855
  export interface HistorySearch {
793
856
  text: string;
857
+ /**
858
+ * When omitted, all searchable fields are checked. Set to restrict
859
+ * the search to a specific field.
860
+ */
794
861
  type?: HistorySearchType;
795
862
  }
796
863
  export interface HolderAcceptCredentialRequest {
@@ -808,8 +875,11 @@ export interface HolderAcceptCredentialRequest {
808
875
  /** User-provided transaction code. */
809
876
  txCode?: string;
810
877
  }
811
- export interface HolderAcceptCredentialResponse {
812
- credentialIds: Array<string>;
878
+ export interface HolderActivateWalletUnitRequest {
879
+ /** Key type for the authentication key generated during activation. */
880
+ keyType: string;
881
+ /** Identity token obtained from the identity provider after user authentication. */
882
+ userIdToken?: string;
813
883
  }
814
884
  export interface HolderRefreshCredentialResponse {
815
885
  credentialIds: Array<string>;
@@ -834,6 +904,7 @@ export interface HolderRegisterWalletUnitRequest {
834
904
  export interface HolderRegisterWalletUnitResponse {
835
905
  id: string;
836
906
  status: WalletUnitStatus;
907
+ userNonce?: string;
837
908
  }
838
909
  export interface HolderWalletInstanceDetail {
839
910
  id: string;
@@ -853,6 +924,7 @@ export interface HolderWalletUnit {
853
924
  status: WalletUnitStatus;
854
925
  authenticationKey?: KeyListItem;
855
926
  trustedRpRequired: boolean;
927
+ userNonce?: string;
856
928
  }
857
929
  export interface HolderWalletUnitUpdateRequest {
858
930
  /**
@@ -975,6 +1047,7 @@ export interface ImportCredentialSchemaRequestSchema {
975
1047
  allowRevocation?: boolean;
976
1048
  batchSize?: number;
977
1049
  translations?: CredentialSchemaTranslations;
1050
+ embeddedDisclosurePolicy?: DisclosurePolicy;
978
1051
  }
979
1052
  export interface ImportCredentialSchemaTransactionCode {
980
1053
  type: TransactionCodeType;
@@ -1207,6 +1280,8 @@ export interface PresentationDefinitionV2Credential {
1207
1280
  mdocMsoValidity?: MdocMsoValidity;
1208
1281
  protocol: string;
1209
1282
  profile?: string;
1283
+ /** if violated, issuer's disclosure policy information */
1284
+ embeddedDisclosurePolicyViolation?: DisclosurePolicyViolation;
1210
1285
  }
1211
1286
  export interface PresentationSubmitCredentialRequest {
1212
1287
  /** ID of the credential to submit. */
@@ -1459,6 +1534,27 @@ export interface ProposeProofResponse {
1459
1534
  interactionId: string;
1460
1535
  url?: string;
1461
1536
  }
1537
+ export interface QesAuthorizeRequest {
1538
+ provider: string;
1539
+ document: string;
1540
+ redirectUri?: string;
1541
+ organisationId?: string;
1542
+ }
1543
+ export interface QesAuthorizeResponse {
1544
+ authorizationUrl: string;
1545
+ codeVerifier: string;
1546
+ }
1547
+ export interface QesSignRequest {
1548
+ provider: string;
1549
+ code: string;
1550
+ codeVerifier: string;
1551
+ document: string;
1552
+ redirectUri?: string;
1553
+ organisationId?: string;
1554
+ }
1555
+ export interface QesSignResponse {
1556
+ signedDocument: string;
1557
+ }
1462
1558
  export interface RegisterVerifierInstanceRequest {
1463
1559
  /** The verifier unit's organization. */
1464
1560
  organisationId: string;
@@ -1666,15 +1762,23 @@ export type BleError = {
1666
1762
  export declare enum CacheType {
1667
1763
  DID_DOCUMENT = "DID_DOCUMENT",
1668
1764
  JSON_LD_CONTEXT = "JSON_LD_CONTEXT",
1765
+ /** Credential status list fetched from an external source. */
1669
1766
  STATUS_LIST_CREDENTIAL = "STATUS_LIST_CREDENTIAL",
1767
+ /** Metadata for SD-JWT VC type (VCT). */
1670
1768
  VCT_METADATA = "VCT_METADATA",
1671
1769
  JSON_SCHEMA = "JSON_SCHEMA",
1672
1770
  TRUST_LIST = "TRUST_LIST",
1771
+ /** X.509 certificate revocation list. */
1673
1772
  X509_CRL = "X509_CRL",
1773
+ /** Certificate revocation list used for Android key attestation. */
1674
1774
  ANDROID_ATTESTATION_CRL = "ANDROID_ATTESTATION_CRL",
1775
+ /** OpenID provider metadata fetched from holder endpoints. */
1675
1776
  OPEN_ID_METADATA_HOLDER = "OPEN_ID_METADATA_HOLDER",
1777
+ /** OpenID provider metadata fetched from issuer endpoints. */
1676
1778
  OPEN_ID_METADATA_ISSUER = "OPEN_ID_METADATA_ISSUER",
1779
+ /** Metadata fetched from the registered wallet provider. */
1677
1780
  WALLET_PROVIDER_METADATA = "WALLET_PROVIDER_METADATA",
1781
+ /** Trust collection data fetched from a remote source. */
1678
1782
  REMOTE_TRUST_COLLECTION = "REMOTE_TRUST_COLLECTION"
1679
1783
  }
1680
1784
  export declare enum CertificateRole {
@@ -1786,6 +1890,11 @@ export declare enum CredentialState {
1786
1890
  ERROR = "ERROR",
1787
1891
  INTERACTION_EXPIRED = "INTERACTION_EXPIRED"
1788
1892
  }
1893
+ export declare enum CredentialType {
1894
+ SINGLE = "SINGLE",
1895
+ BATCH_PARENT = "BATCH_PARENT",
1896
+ BATCH_ITEM = "BATCH_ITEM"
1897
+ }
1789
1898
  export declare enum DidListQueryExactColumn {
1790
1899
  NAME = "NAME",
1791
1900
  DID = "DID"
@@ -1865,7 +1974,9 @@ export declare enum HistoryAction {
1865
1974
  WRP_AC_RECEIVED = "WRP_AC_RECEIVED",
1866
1975
  WRP_RC_RECEIVED = "WRP_RC_RECEIVED",
1867
1976
  WRP_NR_RECEIVED = "WRP_NR_RECEIVED",
1868
- TRUST_RESOLVED = "TRUST_RESOLVED"
1977
+ TRUST_RESOLVED = "TRUST_RESOLVED",
1978
+ REFRESHED = "REFRESHED",
1979
+ SIGNED = "SIGNED"
1869
1980
  }
1870
1981
  export declare enum HistoryEntityType {
1871
1982
  KEY = "KEY",
@@ -1893,7 +2004,8 @@ export declare enum HistoryEntityType {
1893
2004
  TRUST_LIST_PUBLICATION = "TRUST_LIST_PUBLICATION",
1894
2005
  TRUST_COLLECTION = "TRUST_COLLECTION",
1895
2006
  TRUST_LIST_SUBSCRIPTION = "TRUST_LIST_SUBSCRIPTION",
1896
- VERIFIER_INSTANCE = "VERIFIER_INSTANCE"
2007
+ VERIFIER_INSTANCE = "VERIFIER_INSTANCE",
2008
+ QES_DOCUMENT = "QES_DOCUMENT"
1897
2009
  }
1898
2010
  export type HistoryMetadata = {
1899
2011
  type_: "UNEXPORTABLE_ENTITIES";
@@ -2051,7 +2163,6 @@ export declare enum SortableCredentialColumn {
2051
2163
  }
2052
2164
  export declare enum SortableCredentialSchemaColumn {
2053
2165
  NAME = "NAME",
2054
- FORMAT = "FORMAT",
2055
2166
  CREATED_DATE = "CREATED_DATE"
2056
2167
  }
2057
2168
  export declare enum SortableDidColumn {
@@ -2240,9 +2351,9 @@ export interface OneCore {
2240
2351
  */
2241
2352
  createProofSchema(request: CreateProofSchemaRequest): Promise<string>;
2242
2353
  /**
2243
- * Deletes the system cache. See the
2354
+ * Deletes entries from the system cache. See
2244
2355
  * [Caching](https://docs.procivis.ch/configure/caching#cached-entities)
2245
- * guide for details on cached entities.
2356
+ * for details on cached entity types.
2246
2357
  */
2247
2358
  deleteCache(types: Array<CacheType> | undefined): Promise<void>;
2248
2359
  deleteCredential(credentialId: string): Promise<void>;
@@ -2277,7 +2388,10 @@ export interface OneCore {
2277
2388
  getCredentialSchema(credentialSchemaId: string): Promise<CredentialSchemaDetail>;
2278
2389
  /** Returns detailed trust information about a credential issuer. */
2279
2390
  getCredentialTrustInformation(credentialId: string): Promise<TrustInformationDetail>;
2280
- /** Returns details on a single event. */
2391
+ /**
2392
+ * Returns the full record for a single history event, including metadata
2393
+ * if present.
2394
+ */
2281
2395
  getHistoryEntry(historyId: string): Promise<HistoryListItem>;
2282
2396
  getIdentifier(id: string): Promise<IdentifierDetail>;
2283
2397
  /** Returns details of an existing organization. */
@@ -2305,7 +2419,9 @@ export interface OneCore {
2305
2419
  * identifier that matches issuer's restrictions. Alternatively,
2306
2420
  * you can specify an existing identifier.
2307
2421
  */
2308
- holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<HolderAcceptCredentialResponse>;
2422
+ holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<string>;
2423
+ /** Activates the wallet instance with the Wallet Provider after user authentication. */
2424
+ holderActivateWalletUnit(id: string, request: HolderActivateWalletUnitRequest): Promise<void>;
2309
2425
  /** Returns wallet registration details from the Wallet Provider. */
2310
2426
  holderGetWalletUnit(id: string): Promise<HolderWalletUnit>;
2311
2427
  /** Returns trust collections curated by the Wallet Provider. */
@@ -2366,15 +2482,21 @@ export interface OneCore {
2366
2482
  * options for `engagement`.
2367
2483
  */
2368
2484
  proposeProof(request: ProposeProofRequest): Promise<ProposeProofResponse>;
2485
+ qesAuthorize(request: QesAuthorizeRequest): Promise<QesAuthorizeResponse>;
2486
+ qesSign(request: QesSignRequest): Promise<QesSignResponse>;
2369
2487
  /** Registers the verifier unit with a Verifier Provider. */
2370
2488
  registerVerifierInstance(request: RegisterVerifierInstanceRequest): Promise<RegisterVerifierInstanceResponse>;
2371
- /** Returns the @context of a JSON-LD credential. The result is cached. */
2489
+ /**
2490
+ * Returns the JSON-LD context document for a given URI. This is a
2491
+ * [cached entity](https://docs.procivis.ch/configure/caching).
2492
+ */
2372
2493
  resolveJsonldContext(url: string): Promise<ResolvedJsonLdContext>;
2373
2494
  /** Discards the restored database and continues using the original. */
2374
2495
  rollbackImport(): Promise<void>;
2375
2496
  /**
2376
- * Runs a task. Check the `task` object of your configuration and reference
2377
- * the configured instance.
2497
+ * Triggers a configured task by name. Pass the task name as defined in the
2498
+ * `task` configuration object, and optionally a JSON string of task-specific
2499
+ * parameters. Returns the result as a JSON string.
2378
2500
  */
2379
2501
  runTask(task: string, params: string | undefined): Promise<string>;
2380
2502
  /**
@@ -5,15 +5,23 @@ export var CacheType;
5
5
  (function (CacheType) {
6
6
  CacheType["DID_DOCUMENT"] = "DID_DOCUMENT";
7
7
  CacheType["JSON_LD_CONTEXT"] = "JSON_LD_CONTEXT";
8
+ /** Credential status list fetched from an external source. */
8
9
  CacheType["STATUS_LIST_CREDENTIAL"] = "STATUS_LIST_CREDENTIAL";
10
+ /** Metadata for SD-JWT VC type (VCT). */
9
11
  CacheType["VCT_METADATA"] = "VCT_METADATA";
10
12
  CacheType["JSON_SCHEMA"] = "JSON_SCHEMA";
11
13
  CacheType["TRUST_LIST"] = "TRUST_LIST";
14
+ /** X.509 certificate revocation list. */
12
15
  CacheType["X509_CRL"] = "X509_CRL";
16
+ /** Certificate revocation list used for Android key attestation. */
13
17
  CacheType["ANDROID_ATTESTATION_CRL"] = "ANDROID_ATTESTATION_CRL";
18
+ /** OpenID provider metadata fetched from holder endpoints. */
14
19
  CacheType["OPEN_ID_METADATA_HOLDER"] = "OPEN_ID_METADATA_HOLDER";
20
+ /** OpenID provider metadata fetched from issuer endpoints. */
15
21
  CacheType["OPEN_ID_METADATA_ISSUER"] = "OPEN_ID_METADATA_ISSUER";
22
+ /** Metadata fetched from the registered wallet provider. */
16
23
  CacheType["WALLET_PROVIDER_METADATA"] = "WALLET_PROVIDER_METADATA";
24
+ /** Trust collection data fetched from a remote source. */
17
25
  CacheType["REMOTE_TRUST_COLLECTION"] = "REMOTE_TRUST_COLLECTION";
18
26
  })(CacheType || (CacheType = {}));
19
27
  export var CertificateRole;
@@ -119,6 +127,12 @@ export var CredentialState;
119
127
  CredentialState["ERROR"] = "ERROR";
120
128
  CredentialState["INTERACTION_EXPIRED"] = "INTERACTION_EXPIRED";
121
129
  })(CredentialState || (CredentialState = {}));
130
+ export var CredentialType;
131
+ (function (CredentialType) {
132
+ CredentialType["SINGLE"] = "SINGLE";
133
+ CredentialType["BATCH_PARENT"] = "BATCH_PARENT";
134
+ CredentialType["BATCH_ITEM"] = "BATCH_ITEM";
135
+ })(CredentialType || (CredentialType = {}));
122
136
  export var DidListQueryExactColumn;
123
137
  (function (DidListQueryExactColumn) {
124
138
  DidListQueryExactColumn["NAME"] = "NAME";
@@ -163,6 +177,8 @@ export var HistoryAction;
163
177
  HistoryAction["WRP_RC_RECEIVED"] = "WRP_RC_RECEIVED";
164
178
  HistoryAction["WRP_NR_RECEIVED"] = "WRP_NR_RECEIVED";
165
179
  HistoryAction["TRUST_RESOLVED"] = "TRUST_RESOLVED";
180
+ HistoryAction["REFRESHED"] = "REFRESHED";
181
+ HistoryAction["SIGNED"] = "SIGNED";
166
182
  })(HistoryAction || (HistoryAction = {}));
167
183
  export var HistoryEntityType;
168
184
  (function (HistoryEntityType) {
@@ -192,6 +208,7 @@ export var HistoryEntityType;
192
208
  HistoryEntityType["TRUST_COLLECTION"] = "TRUST_COLLECTION";
193
209
  HistoryEntityType["TRUST_LIST_SUBSCRIPTION"] = "TRUST_LIST_SUBSCRIPTION";
194
210
  HistoryEntityType["VERIFIER_INSTANCE"] = "VERIFIER_INSTANCE";
211
+ HistoryEntityType["QES_DOCUMENT"] = "QES_DOCUMENT";
195
212
  })(HistoryEntityType || (HistoryEntityType = {}));
196
213
  export var HistorySearchType;
197
214
  (function (HistorySearchType) {
@@ -295,7 +312,6 @@ export var SortableCredentialColumn;
295
312
  export var SortableCredentialSchemaColumn;
296
313
  (function (SortableCredentialSchemaColumn) {
297
314
  SortableCredentialSchemaColumn["NAME"] = "NAME";
298
- SortableCredentialSchemaColumn["FORMAT"] = "FORMAT";
299
315
  SortableCredentialSchemaColumn["CREATED_DATE"] = "CREATED_DATE";
300
316
  })(SortableCredentialSchemaColumn || (SortableCredentialSchemaColumn = {}));
301
317
  export var SortableDidColumn;
@@ -215,6 +215,14 @@ RCT_EXTERN_METHOD(proposeProof:(NSDictionary *)request
215
215
  resolver:(RCTPromiseResolveBlock)resolve
216
216
  rejecter:(RCTPromiseRejectBlock)reject)
217
217
 
218
+ RCT_EXTERN_METHOD(qesAuthorize:(NSDictionary *)request
219
+ resolver:(RCTPromiseResolveBlock)resolve
220
+ rejecter:(RCTPromiseRejectBlock)reject)
221
+
222
+ RCT_EXTERN_METHOD(qesSign:(NSDictionary *)request
223
+ resolver:(RCTPromiseResolveBlock)resolve
224
+ rejecter:(RCTPromiseRejectBlock)reject)
225
+
218
226
  RCT_EXTERN_METHOD(checkRevocation:(NSArray *)credentialIds
219
227
  forceRefresh:(BOOL *)forceRefresh
220
228
  resolver:(RCTPromiseResolveBlock)resolve
@@ -255,6 +263,11 @@ RCT_EXTERN_METHOD(holderRegisterWalletUnit:(NSDictionary *)request
255
263
  resolver:(RCTPromiseResolveBlock)resolve
256
264
  rejecter:(RCTPromiseRejectBlock)reject)
257
265
 
266
+ RCT_EXTERN_METHOD(holderActivateWalletUnit:(NSString *)unitId
267
+ request:(NSDictionary *)request
268
+ resolver:(RCTPromiseResolveBlock)resolve
269
+ rejecter:(RCTPromiseRejectBlock)reject)
270
+
258
271
  RCT_EXTERN_METHOD(holderWalletUnitStatus:(NSString *)walletUnitId
259
272
  resolver:(RCTPromiseResolveBlock)resolve
260
273
  rejecter:(RCTPromiseRejectBlock)reject)
@@ -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
 
@@ -657,6 +656,30 @@ class ProcivisOneCoreModule: RCTEventEmitter {
657
656
  }
658
657
  }
659
658
 
659
+ @objc(qesAuthorize:resolver:rejecter:)
660
+ func qesAuthorize(
661
+ request: NSDictionary,
662
+ resolve: @escaping RCTPromiseResolveBlock,
663
+ reject: @escaping RCTPromiseRejectBlock
664
+ ) {
665
+ asyncCall(resolve, reject) {
666
+ let result = try await self.getCore().qesAuthorize(request: try deserialize(request))
667
+ return try serializeAny(result)
668
+ }
669
+ }
670
+
671
+ @objc(qesSign:resolver:rejecter:)
672
+ func qesSign(
673
+ request: NSDictionary,
674
+ resolve: @escaping RCTPromiseResolveBlock,
675
+ reject: @escaping RCTPromiseRejectBlock
676
+ ) {
677
+ asyncCall(resolve, reject) {
678
+ let result = try await self.getCore().qesSign(request: try deserialize(request))
679
+ return try serializeAny(result)
680
+ }
681
+ }
682
+
660
683
  @objc(checkRevocation:forceRefresh:resolver:rejecter:)
661
684
  func checkRevocation(
662
685
  credentialIds: NSArray,
@@ -792,6 +815,19 @@ class ProcivisOneCoreModule: RCTEventEmitter {
792
815
  }
793
816
  }
794
817
 
818
+ @objc(holderActivateWalletUnit:request:resolver:rejecter:)
819
+ func holderActivateWalletUnit(
820
+ id: String,
821
+ request: NSDictionary,
822
+ resolve: @escaping RCTPromiseResolveBlock,
823
+ reject: @escaping RCTPromiseRejectBlock
824
+ ) {
825
+ asyncCall(resolve, reject) {
826
+ try await self.getCore().holderActivateWalletUnit(id: id, request: try deserialize(request))
827
+ return nil as NSDictionary?
828
+ }
829
+ }
830
+
795
831
  @objc(holderWalletUnitStatus:resolver:rejecter:)
796
832
  func holderWalletUnitStatus(
797
833
  walletUnitId: String,
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.112847.0",
4
4
  "author": "Procivis AG (https://procivis.ch)",
5
5
  "license": "Apache-2.0",
6
6
  "description": "ONE core bindings for React Native",