@procivis/react-native-one-core 1.109666.1 → 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.
@@ -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
@@ -468,6 +468,22 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
468
468
  }
469
469
  }
470
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
+
471
487
  @ReactMethod
472
488
  fun createProofSchema(request: ReadableMap, promise: Promise) {
473
489
  asyncCall(promise, scope) {
@@ -603,6 +619,14 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
603
619
  }
604
620
  }
605
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
+
606
630
  @ReactMethod
607
631
  fun holderWalletUnitStatus(walletUnitId: String, promise: Promise) {
608
632
  asyncCall(promise, scope) {
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/109666/android/onecore-debug.aar",
5
- "sha1": "282e37ace7c1f2fe5d76801c491ef7d9dc5d5802"
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/109666/android/onecore-release.aar",
9
- "sha1": "06ac88f54cb4e28b5df88114fe5ec067f21cad0a"
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/109666/ios/deploy.zip",
14
- "sha1": "2230a7d583857c37b6938518f6259f006986a757"
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;
@@ -658,6 +660,32 @@ export interface DidRequestKeys {
658
660
  capabilityInvocation: Array<string>;
659
661
  capabilityDelegation: Array<string>;
660
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
+ }
661
689
  export interface DisplayName {
662
690
  lang: string;
663
691
  value: string;
@@ -715,6 +743,9 @@ export interface GeneratedKey {
715
743
  keyReference: number[];
716
744
  publicKey: number[];
717
745
  }
746
+ export interface GlobalSettings {
747
+ defaultLanguage: string;
748
+ }
718
749
  export interface HandleInvitationRequest {
719
750
  /**
720
751
  * Typically encoded as a QR code or deep link by the issuer or
@@ -750,12 +781,29 @@ export interface HistoryListItem {
750
781
  id: string;
751
782
  createdDate: string;
752
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
+ */
753
789
  name: string;
754
790
  entityId?: string;
755
791
  entityType: HistoryEntityType;
792
+ /**
793
+ * Structured metadata attached to the event. The variant depends on
794
+ * the type.
795
+ */
756
796
  metadata?: HistoryMetadata;
757
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
+ */
758
805
  target?: string;
806
+ /** Identifier of the user who triggered the event. */
759
807
  user?: string;
760
808
  }
761
809
  export interface HistoryListQuery {
@@ -773,7 +821,7 @@ export interface HistoryListQuery {
773
821
  entityIds?: Array<string>;
774
822
  /** Return only events associated with the provided entity types. */
775
823
  entityTypes?: Array<HistoryEntityType>;
776
- /** Return only the provided events. */
824
+ /** Return only events of the specified action types. */
777
825
  actions?: Array<HistoryAction>;
778
826
  /**
779
827
  * Return only entries created after this time. Timestamp in
@@ -795,13 +843,21 @@ export interface HistoryListQuery {
795
843
  proofId?: string;
796
844
  /** Return only events associated with the provided proof schema ID. */
797
845
  proofSchemaId?: string;
798
- /** 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
+ */
799
851
  search?: HistorySearch;
800
- /** Return only events associated with the provided user(s). */
852
+ /** Return only events triggered by the specified users. */
801
853
  users?: Array<string>;
802
854
  }
803
855
  export interface HistorySearch {
804
856
  text: string;
857
+ /**
858
+ * When omitted, all searchable fields are checked. Set to restrict
859
+ * the search to a specific field.
860
+ */
805
861
  type?: HistorySearchType;
806
862
  }
807
863
  export interface HolderAcceptCredentialRequest {
@@ -819,6 +875,12 @@ export interface HolderAcceptCredentialRequest {
819
875
  /** User-provided transaction code. */
820
876
  txCode?: string;
821
877
  }
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;
883
+ }
822
884
  export interface HolderRefreshCredentialResponse {
823
885
  credentialIds: Array<string>;
824
886
  }
@@ -842,6 +904,7 @@ export interface HolderRegisterWalletUnitRequest {
842
904
  export interface HolderRegisterWalletUnitResponse {
843
905
  id: string;
844
906
  status: WalletUnitStatus;
907
+ userNonce?: string;
845
908
  }
846
909
  export interface HolderWalletInstanceDetail {
847
910
  id: string;
@@ -861,6 +924,7 @@ export interface HolderWalletUnit {
861
924
  status: WalletUnitStatus;
862
925
  authenticationKey?: KeyListItem;
863
926
  trustedRpRequired: boolean;
927
+ userNonce?: string;
864
928
  }
865
929
  export interface HolderWalletUnitUpdateRequest {
866
930
  /**
@@ -983,6 +1047,7 @@ export interface ImportCredentialSchemaRequestSchema {
983
1047
  allowRevocation?: boolean;
984
1048
  batchSize?: number;
985
1049
  translations?: CredentialSchemaTranslations;
1050
+ embeddedDisclosurePolicy?: DisclosurePolicy;
986
1051
  }
987
1052
  export interface ImportCredentialSchemaTransactionCode {
988
1053
  type: TransactionCodeType;
@@ -1215,6 +1280,8 @@ export interface PresentationDefinitionV2Credential {
1215
1280
  mdocMsoValidity?: MdocMsoValidity;
1216
1281
  protocol: string;
1217
1282
  profile?: string;
1283
+ /** if violated, issuer's disclosure policy information */
1284
+ embeddedDisclosurePolicyViolation?: DisclosurePolicyViolation;
1218
1285
  }
1219
1286
  export interface PresentationSubmitCredentialRequest {
1220
1287
  /** ID of the credential to submit. */
@@ -1467,6 +1534,27 @@ export interface ProposeProofResponse {
1467
1534
  interactionId: string;
1468
1535
  url?: string;
1469
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
+ }
1470
1558
  export interface RegisterVerifierInstanceRequest {
1471
1559
  /** The verifier unit's organization. */
1472
1560
  organisationId: string;
@@ -1674,15 +1762,23 @@ export type BleError = {
1674
1762
  export declare enum CacheType {
1675
1763
  DID_DOCUMENT = "DID_DOCUMENT",
1676
1764
  JSON_LD_CONTEXT = "JSON_LD_CONTEXT",
1765
+ /** Credential status list fetched from an external source. */
1677
1766
  STATUS_LIST_CREDENTIAL = "STATUS_LIST_CREDENTIAL",
1767
+ /** Metadata for SD-JWT VC type (VCT). */
1678
1768
  VCT_METADATA = "VCT_METADATA",
1679
1769
  JSON_SCHEMA = "JSON_SCHEMA",
1680
1770
  TRUST_LIST = "TRUST_LIST",
1771
+ /** X.509 certificate revocation list. */
1681
1772
  X509_CRL = "X509_CRL",
1773
+ /** Certificate revocation list used for Android key attestation. */
1682
1774
  ANDROID_ATTESTATION_CRL = "ANDROID_ATTESTATION_CRL",
1775
+ /** OpenID provider metadata fetched from holder endpoints. */
1683
1776
  OPEN_ID_METADATA_HOLDER = "OPEN_ID_METADATA_HOLDER",
1777
+ /** OpenID provider metadata fetched from issuer endpoints. */
1684
1778
  OPEN_ID_METADATA_ISSUER = "OPEN_ID_METADATA_ISSUER",
1779
+ /** Metadata fetched from the registered wallet provider. */
1685
1780
  WALLET_PROVIDER_METADATA = "WALLET_PROVIDER_METADATA",
1781
+ /** Trust collection data fetched from a remote source. */
1686
1782
  REMOTE_TRUST_COLLECTION = "REMOTE_TRUST_COLLECTION"
1687
1783
  }
1688
1784
  export declare enum CertificateRole {
@@ -1879,7 +1975,8 @@ export declare enum HistoryAction {
1879
1975
  WRP_RC_RECEIVED = "WRP_RC_RECEIVED",
1880
1976
  WRP_NR_RECEIVED = "WRP_NR_RECEIVED",
1881
1977
  TRUST_RESOLVED = "TRUST_RESOLVED",
1882
- REFRESHED = "REFRESHED"
1978
+ REFRESHED = "REFRESHED",
1979
+ SIGNED = "SIGNED"
1883
1980
  }
1884
1981
  export declare enum HistoryEntityType {
1885
1982
  KEY = "KEY",
@@ -1907,7 +2004,8 @@ export declare enum HistoryEntityType {
1907
2004
  TRUST_LIST_PUBLICATION = "TRUST_LIST_PUBLICATION",
1908
2005
  TRUST_COLLECTION = "TRUST_COLLECTION",
1909
2006
  TRUST_LIST_SUBSCRIPTION = "TRUST_LIST_SUBSCRIPTION",
1910
- VERIFIER_INSTANCE = "VERIFIER_INSTANCE"
2007
+ VERIFIER_INSTANCE = "VERIFIER_INSTANCE",
2008
+ QES_DOCUMENT = "QES_DOCUMENT"
1911
2009
  }
1912
2010
  export type HistoryMetadata = {
1913
2011
  type_: "UNEXPORTABLE_ENTITIES";
@@ -2065,7 +2163,6 @@ export declare enum SortableCredentialColumn {
2065
2163
  }
2066
2164
  export declare enum SortableCredentialSchemaColumn {
2067
2165
  NAME = "NAME",
2068
- FORMAT = "FORMAT",
2069
2166
  CREATED_DATE = "CREATED_DATE"
2070
2167
  }
2071
2168
  export declare enum SortableDidColumn {
@@ -2254,9 +2351,9 @@ export interface OneCore {
2254
2351
  */
2255
2352
  createProofSchema(request: CreateProofSchemaRequest): Promise<string>;
2256
2353
  /**
2257
- * Deletes the system cache. See the
2354
+ * Deletes entries from the system cache. See
2258
2355
  * [Caching](https://docs.procivis.ch/configure/caching#cached-entities)
2259
- * guide for details on cached entities.
2356
+ * for details on cached entity types.
2260
2357
  */
2261
2358
  deleteCache(types: Array<CacheType> | undefined): Promise<void>;
2262
2359
  deleteCredential(credentialId: string): Promise<void>;
@@ -2291,7 +2388,10 @@ export interface OneCore {
2291
2388
  getCredentialSchema(credentialSchemaId: string): Promise<CredentialSchemaDetail>;
2292
2389
  /** Returns detailed trust information about a credential issuer. */
2293
2390
  getCredentialTrustInformation(credentialId: string): Promise<TrustInformationDetail>;
2294
- /** Returns details on a single event. */
2391
+ /**
2392
+ * Returns the full record for a single history event, including metadata
2393
+ * if present.
2394
+ */
2295
2395
  getHistoryEntry(historyId: string): Promise<HistoryListItem>;
2296
2396
  getIdentifier(id: string): Promise<IdentifierDetail>;
2297
2397
  /** Returns details of an existing organization. */
@@ -2320,6 +2420,8 @@ export interface OneCore {
2320
2420
  * you can specify an existing identifier.
2321
2421
  */
2322
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>;
2323
2425
  /** Returns wallet registration details from the Wallet Provider. */
2324
2426
  holderGetWalletUnit(id: string): Promise<HolderWalletUnit>;
2325
2427
  /** Returns trust collections curated by the Wallet Provider. */
@@ -2380,15 +2482,21 @@ export interface OneCore {
2380
2482
  * options for `engagement`.
2381
2483
  */
2382
2484
  proposeProof(request: ProposeProofRequest): Promise<ProposeProofResponse>;
2485
+ qesAuthorize(request: QesAuthorizeRequest): Promise<QesAuthorizeResponse>;
2486
+ qesSign(request: QesSignRequest): Promise<QesSignResponse>;
2383
2487
  /** Registers the verifier unit with a Verifier Provider. */
2384
2488
  registerVerifierInstance(request: RegisterVerifierInstanceRequest): Promise<RegisterVerifierInstanceResponse>;
2385
- /** 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
+ */
2386
2493
  resolveJsonldContext(url: string): Promise<ResolvedJsonLdContext>;
2387
2494
  /** Discards the restored database and continues using the original. */
2388
2495
  rollbackImport(): Promise<void>;
2389
2496
  /**
2390
- * Runs a task. Check the `task` object of your configuration and reference
2391
- * 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.
2392
2500
  */
2393
2501
  runTask(task: string, params: string | undefined): Promise<string>;
2394
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;
@@ -170,6 +178,7 @@ export var HistoryAction;
170
178
  HistoryAction["WRP_NR_RECEIVED"] = "WRP_NR_RECEIVED";
171
179
  HistoryAction["TRUST_RESOLVED"] = "TRUST_RESOLVED";
172
180
  HistoryAction["REFRESHED"] = "REFRESHED";
181
+ HistoryAction["SIGNED"] = "SIGNED";
173
182
  })(HistoryAction || (HistoryAction = {}));
174
183
  export var HistoryEntityType;
175
184
  (function (HistoryEntityType) {
@@ -199,6 +208,7 @@ export var HistoryEntityType;
199
208
  HistoryEntityType["TRUST_COLLECTION"] = "TRUST_COLLECTION";
200
209
  HistoryEntityType["TRUST_LIST_SUBSCRIPTION"] = "TRUST_LIST_SUBSCRIPTION";
201
210
  HistoryEntityType["VERIFIER_INSTANCE"] = "VERIFIER_INSTANCE";
211
+ HistoryEntityType["QES_DOCUMENT"] = "QES_DOCUMENT";
202
212
  })(HistoryEntityType || (HistoryEntityType = {}));
203
213
  export var HistorySearchType;
204
214
  (function (HistorySearchType) {
@@ -302,7 +312,6 @@ export var SortableCredentialColumn;
302
312
  export var SortableCredentialSchemaColumn;
303
313
  (function (SortableCredentialSchemaColumn) {
304
314
  SortableCredentialSchemaColumn["NAME"] = "NAME";
305
- SortableCredentialSchemaColumn["FORMAT"] = "FORMAT";
306
315
  SortableCredentialSchemaColumn["CREATED_DATE"] = "CREATED_DATE";
307
316
  })(SortableCredentialSchemaColumn || (SortableCredentialSchemaColumn = {}));
308
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)
@@ -656,6 +656,30 @@ class ProcivisOneCoreModule: RCTEventEmitter {
656
656
  }
657
657
  }
658
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
+
659
683
  @objc(checkRevocation:forceRefresh:resolver:rejecter:)
660
684
  func checkRevocation(
661
685
  credentialIds: NSArray,
@@ -791,6 +815,19 @@ class ProcivisOneCoreModule: RCTEventEmitter {
791
815
  }
792
816
  }
793
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
+
794
831
  @objc(holderWalletUnitStatus:resolver:rejecter:)
795
832
  func holderWalletUnitStatus(
796
833
  walletUnitId: String,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procivis/react-native-one-core",
3
- "version": "1.109666.1",
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",