@procivis/react-native-one-core 1.123589.0 → 1.126524.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.
@@ -208,14 +208,20 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
208
208
  promise: Promise
209
209
  ) {
210
210
  asyncCall(promise, scope) {
211
- return@asyncCall getCore().holderAcceptCredential(construct(request))
211
+ val result = getCore().holderAcceptCredential(construct(request))
212
+ return@asyncCall convertToRN(result)
212
213
  }
213
214
  }
214
215
 
215
216
  @ReactMethod
216
- fun holderRejectCredential(interactionId: String, promise: Promise) {
217
+ fun holderRejectCredential(
218
+ interactionId: String,
219
+ credentialIds: ReadableArray?,
220
+ promise: Promise
221
+ ) {
217
222
  asyncCall(promise, scope) {
218
- getCore().holderRejectCredential(interactionId)
223
+ val ids = credentialIds?.let { DeserializeSpecific.ids(it) }
224
+ getCore().holderRejectCredential(interactionId, ids)
219
225
  return@asyncCall null
220
226
  }
221
227
  }
@@ -15,6 +15,7 @@ object SerializeSpecific {
15
15
  ApplicableCredentialOrFailureHint::class.java,
16
16
  PresentationDefinitionV2ClaimValue::class.java,
17
17
  HandleInvitationResponse::class.java,
18
+ TrustInformationDetailInfo::class.java,
18
19
  )
19
20
 
20
21
  fun isCustomConversionType(input: Any?): Boolean {
@@ -92,6 +93,14 @@ object SerializeSpecific {
92
93
  convertToRN(metadata.value) as ReadableMap
93
94
  )
94
95
  }
96
+
97
+ is HistoryMetadata.EcosystemsResolved -> {
98
+ result.putString("type_", "ECOSYSTEMS_RESOLVED")
99
+ result.putMap(
100
+ "value",
101
+ convertToRN(metadata.value) as ReadableMap
102
+ )
103
+ }
95
104
  }
96
105
  return result
97
106
  }
@@ -230,6 +239,10 @@ object SerializeSpecific {
230
239
  value.ecosystem?.let {
231
240
  result.putString("ecosystem", it)
232
241
  }
242
+ result.putMap(
243
+ "ecosystemErrors",
244
+ convertToRN(value.ecosystemErrors) as ReadableMap
245
+ )
233
246
  }
234
247
 
235
248
  is HandleInvitationResponse.AuthorizationCodeFlow -> {
@@ -240,6 +253,10 @@ object SerializeSpecific {
240
253
  value.ecosystem?.let {
241
254
  result.putString("ecosystem", it)
242
255
  }
256
+ result.putMap(
257
+ "ecosystemErrors",
258
+ convertToRN(value.ecosystemErrors) as ReadableMap
259
+ )
243
260
  }
244
261
 
245
262
  is HandleInvitationResponse.ProofRequest -> {
@@ -250,6 +267,10 @@ object SerializeSpecific {
250
267
  value.ecosystem?.let {
251
268
  result.putString("ecosystem", it)
252
269
  }
270
+ result.putMap(
271
+ "ecosystemErrors",
272
+ convertToRN(value.ecosystemErrors) as ReadableMap
273
+ )
253
274
  }
254
275
  }
255
276
  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/123589/android/onecore-debug.aar",
5
- "sha1": "766ed3ca27be31e8e53c8f653b9722953c18d723"
4
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/126524/android/onecore-debug.aar",
5
+ "sha1": "feef82a3e79882cda0339fdcf8fd9e086fb7a349"
6
6
  },
7
7
  "release": {
8
- "url": "https://onesdk.blob.core.windows.net/core-sdk/123589/android/onecore-release.aar",
9
- "sha1": "258c5ad012ab0da9a291d7b7dbb33094ca1b313e"
8
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/126524/android/onecore-release.aar",
9
+ "sha1": "fce0244e6bcb8abb19495818adbed33f17688326"
10
10
  }
11
11
  },
12
12
  "ios": {
13
- "url": "https://onesdk.blob.core.windows.net/core-sdk/123589/ios/deploy.zip",
14
- "sha1": "1667b6b7c84638dc7660eba00cdd8f904814c3f7"
13
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/126524/ios/deploy.zip",
14
+ "sha1": "2b1b11c6f9d1ead1713b92a0819f1d97c58de114"
15
15
  }
16
16
  }
@@ -140,6 +140,14 @@ export interface VerificationProtocolCapabilities {
140
140
  verifierIdentifierTypes: IdentifierType[];
141
141
  supportedPresentationDefinition: PresentationDefinitionVersion[];
142
142
  }
143
+ export declare enum TransactionDataFeature {
144
+ SupportsMultipleTxDataPerPresentation = "SUPPORTS_MULTIPLE_TX_DATA_PER_PRESENTATION"
145
+ }
146
+ export interface TransactionDataCapabilities {
147
+ features: TransactionDataFeature[];
148
+ formats: string[];
149
+ transactionDataTypes: string[];
150
+ }
143
151
  export interface CoreConfig {
144
152
  format: ConfigEntities<FormatCapabilities>;
145
153
  issuanceProtocol: ConfigEntities<IssuanceProtocolCapabilities>;
@@ -157,6 +165,7 @@ export interface CoreConfig {
157
165
  walletProvider: ConfigEntities;
158
166
  verifierProvider: ConfigEntities<undefined, {}>;
159
167
  globalSettings: GlobalSettings;
168
+ transactionDataProvider: ConfigEntities<TransactionDataCapabilities>;
160
169
  ecosystem: ConfigEntities;
161
170
  }
162
171
  export {};
@@ -58,6 +58,10 @@ export var PresentationDefinitionVersion;
58
58
  PresentationDefinitionVersion["V1"] = "V1";
59
59
  PresentationDefinitionVersion["V2"] = "V2";
60
60
  })(PresentationDefinitionVersion || (PresentationDefinitionVersion = {}));
61
+ export var TransactionDataFeature;
62
+ (function (TransactionDataFeature) {
63
+ TransactionDataFeature["SupportsMultipleTxDataPerPresentation"] = "SUPPORTS_MULTIPLE_TX_DATA_PER_PRESENTATION";
64
+ })(TransactionDataFeature || (TransactionDataFeature = {}));
61
65
  // Typescript automatic assertions to keep the fields of ONECore Config and typed Config in sync
62
66
  /** assert that all fields listed in {@link CoreConfig} exist in {@link Config} */
63
67
  const missingFieldsCheck = null;
@@ -103,6 +103,8 @@ export interface Config {
103
103
  */
104
104
  walletProvider: Record<string, string>;
105
105
  verifierProvider: Record<string, string>;
106
+ /** Transaction data types and their capabilities. */
107
+ transactionDataProvider: Record<string, string>;
106
108
  ecosystem: Record<string, string>;
107
109
  /** Deployment-wide settings that are not tied to a specific config entity. */
108
110
  globalSettings: GlobalSettings;
@@ -175,6 +177,8 @@ export interface CreateIdentifierRequest {
175
177
  certificates?: Array<CreateCertificateRequest>;
176
178
  certificateAuthorities?: Array<CreateCertificateAuthorityRequest>;
177
179
  trustInformation: Array<CreateIdentifierTrustInformationRequest>;
180
+ translations?: IdentifierTranslations;
181
+ logo?: string;
178
182
  }
179
183
  export interface CreateIdentifierTrustInformationRequest {
180
184
  data: string;
@@ -305,7 +309,7 @@ export interface CredentialDetail {
305
309
  /** State representation of the credential in the system. */
306
310
  state: CredentialState;
307
311
  /** Schema of the credential. */
308
- schema: CredentialSchemaInfo;
312
+ schema: CredentialSchemaListItem;
309
313
  claims: Array<Claim>;
310
314
  redirectUri?: string;
311
315
  /**
@@ -348,7 +352,7 @@ export interface CredentialListItem {
348
352
  /** State representation of the credential in the system. */
349
353
  state: CredentialState;
350
354
  /** Schema of the credential. */
351
- schema: CredentialSchemaInfo;
355
+ schema: CredentialSchemaListItem;
352
356
  /**
353
357
  * The role the system has in relation to the credential. For example,
354
358
  * if the system received the credential as a wallet this value will
@@ -515,11 +519,11 @@ export interface CredentialSchemaDetailInfo {
515
519
  }
516
520
  export interface CredentialSchemaFormatRequest {
517
521
  format: string;
518
- schemaId?: string;
522
+ ecosystemSchemaId?: string;
519
523
  }
520
524
  export interface CredentialSchemaFormatResponse {
521
525
  format: string;
522
- schemaId: string;
526
+ ecosystemSchemaId: string;
523
527
  }
524
528
  export interface CredentialSchemaInfo {
525
529
  id: string;
@@ -527,7 +531,6 @@ export interface CredentialSchemaInfo {
527
531
  lastModified: string;
528
532
  name: string;
529
533
  format: string;
530
- revocationMethod?: string;
531
534
  keyStorageSecurity?: KeyStorageSecurity;
532
535
  schemaId: string;
533
536
  importedSourceUrl: string;
@@ -564,6 +567,7 @@ export interface CredentialSchemaListItem {
564
567
  requiresWalletInstanceAttestation: boolean;
565
568
  expiration?: number;
566
569
  ecosystem?: string;
570
+ translations?: CredentialSchemaTranslations;
567
571
  }
568
572
  export interface CredentialSchemaListQuery {
569
573
  page: number;
@@ -575,7 +579,7 @@ export interface CredentialSchemaListQuery {
575
579
  ids?: Array<string>;
576
580
  exact?: Array<CredentialSchemaListQueryExactColumn>;
577
581
  include?: Array<CredentialSchemaListIncludeEntityType>;
578
- schemaIds?: Array<string>;
582
+ ecosystemSchemaIds?: Array<string>;
579
583
  formats?: Array<string>;
580
584
  ecosystems?: Array<string>;
581
585
  usesBatchIssuance?: boolean;
@@ -714,6 +718,11 @@ export interface EcosystemInfo {
714
718
  description: Array<DisplayName>;
715
719
  logo: string;
716
720
  }
721
+ export interface EcosystemOutcome {
722
+ result: EcosystemTrustResult;
723
+ /** Why the provider did not trust the interaction. `None` when it did. */
724
+ error?: HistoryErrorMetadata;
725
+ }
717
726
  export interface ErrorResponse {
718
727
  code: string;
719
728
  message: string;
@@ -902,6 +911,17 @@ export interface HolderAcceptCredentialRequest {
902
911
  /** User-provided transaction code. */
903
912
  txCode?: string;
904
913
  }
914
+ export interface HolderAcceptCredentialResponse {
915
+ /** One credential per accepted credential configuration. */
916
+ credentialIds: Array<string>;
917
+ /**
918
+ * Some of the offered credential configurations could not be issued.
919
+ * Only set when several configurations were offered.
920
+ */
921
+ partiallySuccessful?: boolean;
922
+ /** One entry per ecosystem provider consulted, keyed by provider id. */
923
+ ecosystemErrors: Record<string, EcosystemOutcome>;
924
+ }
905
925
  export interface HolderActivateInstanceRequest {
906
926
  /** Key type for the authentication key generated during activation. */
907
927
  keyType: string;
@@ -956,11 +976,14 @@ export interface IdentifierDetail {
956
976
  organisationId?: string;
957
977
  type: IdentifierType;
958
978
  isRemote: boolean;
979
+ autogenerated: boolean;
959
980
  state: IdentifierState;
960
981
  did?: DidDetail;
961
982
  key?: KeyDetail;
962
983
  certificates?: Array<CertificateDetail>;
963
984
  trustInformation: Array<IdentifierTrustInformationResponseDto>;
985
+ logo?: string;
986
+ translations: IdentifierTranslationsResponse;
964
987
  }
965
988
  export interface IdentifierList {
966
989
  values: Array<IdentifierListItem>;
@@ -974,8 +997,11 @@ export interface IdentifierListItem {
974
997
  name: string;
975
998
  type: IdentifierType;
976
999
  isRemote: boolean;
1000
+ autogenerated: boolean;
977
1001
  state: IdentifierState;
978
1002
  organisationId?: string;
1003
+ logo?: string;
1004
+ translations?: IdentifierTranslationsResponse;
979
1005
  }
980
1006
  export interface IdentifierListQuery {
981
1007
  page: number;
@@ -988,8 +1014,10 @@ export interface IdentifierListQuery {
988
1014
  types?: Array<IdentifierType>;
989
1015
  states?: Array<IdentifierState>;
990
1016
  exact?: Array<IdentifierListQueryExactColumn>;
1017
+ include?: Array<IdentifierListIncludeEntity>;
991
1018
  didMethods?: Array<string>;
992
1019
  isRemote?: boolean;
1020
+ autogenerated?: boolean;
993
1021
  keyAlgorithms?: Array<string>;
994
1022
  keyRoles?: Array<KeyRole>;
995
1023
  keyStorages?: Array<string>;
@@ -1008,6 +1036,14 @@ export interface IdentifierListQuery {
1008
1036
  lastModifiedAfter?: string;
1009
1037
  lastModifiedBefore?: string;
1010
1038
  }
1039
+ export interface IdentifierTranslations {
1040
+ name: Record<string, string>;
1041
+ logoAltText?: Record<string, string>;
1042
+ }
1043
+ export interface IdentifierTranslationsResponse {
1044
+ name: Record<string, string>;
1045
+ logoAltText?: Record<string, string>;
1046
+ }
1011
1047
  export interface IdentifierTrustInformationResponseDto {
1012
1048
  data: string;
1013
1049
  type: IdentifierTrustInformationType;
@@ -1028,7 +1064,7 @@ export interface ImportCredentialSchemaClaimSchema {
1028
1064
  }
1029
1065
  export interface ImportCredentialSchemaFormat {
1030
1066
  format: string;
1031
- schemaId: string;
1067
+ ecosystemSchemaId: string;
1032
1068
  }
1033
1069
  export interface ImportCredentialSchemaLayoutProperties {
1034
1070
  background?: CredentialSchemaBackgroundProperties;
@@ -1061,6 +1097,7 @@ export interface ImportCredentialSchemaRequestSchema {
1061
1097
  translations?: CredentialSchemaTranslations;
1062
1098
  embeddedDisclosurePolicy?: DisclosurePolicy;
1063
1099
  expiration?: number;
1100
+ ecosystem?: string;
1064
1101
  }
1065
1102
  export interface ImportCredentialSchemaTransactionCode {
1066
1103
  type: TransactionCodeType;
@@ -1172,6 +1209,7 @@ export interface KeyDetail {
1172
1209
  publicKey: number[];
1173
1210
  keyType: string;
1174
1211
  storageType: string;
1212
+ autogenerated: boolean;
1175
1213
  }
1176
1214
  export interface KeyListItem {
1177
1215
  id: string;
@@ -1181,6 +1219,7 @@ export interface KeyListItem {
1181
1219
  publicKey: number[];
1182
1220
  keyType: string;
1183
1221
  storageType: string;
1222
+ autogenerated: boolean;
1184
1223
  }
1185
1224
  export interface MdocMsoValidity {
1186
1225
  expiration: string;
@@ -1395,6 +1434,8 @@ export interface ProofInput {
1395
1434
  credential?: CredentialDetail;
1396
1435
  /** Credential schema metadata. */
1397
1436
  credentialSchema: CredentialSchemaInfo;
1437
+ /** Trust of the credential shared for this input, and of its issuer. */
1438
+ trustInformation?: TrustInformation;
1398
1439
  }
1399
1440
  export interface ProofInputSchema {
1400
1441
  claimSchemas: Array<ProofClaimSchema>;
@@ -1693,11 +1734,15 @@ export interface TrustInformation {
1693
1734
  receivedAt: string;
1694
1735
  name?: string;
1695
1736
  result: TrustResolutionResult;
1737
+ /** One entry per ecosystem provider consulted, keyed by provider id. */
1738
+ ecosystemErrors: Record<string, EcosystemOutcome>;
1696
1739
  }
1697
1740
  export interface TrustInformationDetail {
1698
1741
  ecosystem?: string;
1699
1742
  issuer?: TrustInformationDetailInfo;
1700
1743
  verifier?: TrustInformationDetailInfo;
1744
+ /** One entry per ecosystem provider consulted, keyed by provider id. */
1745
+ ecosystemErrors: Record<string, EcosystemOutcome>;
1701
1746
  }
1702
1747
  export interface TrustResolutionMetadata {
1703
1748
  result: TrustResolutionResult;
@@ -2023,6 +2068,10 @@ export declare enum EcosystemRole {
2023
2068
  NATIONAL_REGISTRY_REGISTRAR = "NATIONAL_REGISTRY_REGISTRAR",
2024
2069
  WALLET_PROVIDER = "WALLET_PROVIDER"
2025
2070
  }
2071
+ export declare enum EcosystemTrustResult {
2072
+ TRUSTED = "TRUSTED",
2073
+ NOT_TRUSTED = "NOT_TRUSTED"
2074
+ }
2026
2075
  export type HandleInvitationResponse = {
2027
2076
  type_: "CREDENTIAL_ISSUANCE";
2028
2077
  /** For reference. */
@@ -2043,6 +2092,8 @@ export type HandleInvitationResponse = {
2043
2092
  /** Whether a valid WIA is required to complete issuance. */
2044
2093
  requiresWalletInstanceAttestation: boolean;
2045
2094
  ecosystem?: string;
2095
+ /** One entry per ecosystem provider consulted, keyed by provider id. */
2096
+ ecosystemErrors: Record<string, EcosystemOutcome>;
2046
2097
  } | {
2047
2098
  type_: "AUTHORIZATION_CODE_FLOW";
2048
2099
  /** For reference. */
@@ -2055,6 +2106,8 @@ export type HandleInvitationResponse = {
2055
2106
  /** Protocol used for issuance. */
2056
2107
  protocol: string;
2057
2108
  ecosystem?: string;
2109
+ /** One entry per ecosystem provider consulted, keyed by provider id. */
2110
+ ecosystemErrors: Record<string, EcosystemOutcome>;
2058
2111
  } | {
2059
2112
  type_: "PROOF_REQUEST";
2060
2113
  /** For reference. */
@@ -2064,6 +2117,8 @@ export type HandleInvitationResponse = {
2064
2117
  /** Protocol used for issuance. */
2065
2118
  protocol: string;
2066
2119
  ecosystem?: string;
2120
+ /** One entry per ecosystem provider consulted, keyed by provider id. */
2121
+ ecosystemErrors: Record<string, EcosystemOutcome>;
2067
2122
  };
2068
2123
  export declare enum HistoryAction {
2069
2124
  ACCEPTED = "ACCEPTED",
@@ -2099,6 +2154,7 @@ export declare enum HistoryAction {
2099
2154
  WRP_RC_RECEIVED = "WRP_RC_RECEIVED",
2100
2155
  WRP_NR_RECEIVED = "WRP_NR_RECEIVED",
2101
2156
  TRUST_RESOLVED = "TRUST_RESOLVED",
2157
+ ECOSYSTEMS_RESOLVED = "ECOSYSTEMS_RESOLVED",
2102
2158
  REFRESHED = "REFRESHED",
2103
2159
  SIGNED = "SIGNED"
2104
2160
  }
@@ -2145,6 +2201,11 @@ export type HistoryMetadata = {
2145
2201
  } | {
2146
2202
  type_: "TRUST_RESOLUTION";
2147
2203
  value: TrustResolutionMetadata;
2204
+ }
2205
+ /** One entry per ecosystem provider consulted, keyed by provider id. */
2206
+ | {
2207
+ type_: "ECOSYSTEMS_RESOLVED";
2208
+ value: Record<string, EcosystemOutcome>;
2148
2209
  };
2149
2210
  export declare enum HistorySearchType {
2150
2211
  ALL = "ALL",
@@ -2157,6 +2218,10 @@ export declare enum HistorySearchType {
2157
2218
  VERIFIER_NAME = "VERIFIER_NAME",
2158
2219
  PROOF_SCHEMA_NAME = "PROOF_SCHEMA_NAME"
2159
2220
  }
2221
+ export declare enum IdentifierListIncludeEntity {
2222
+ LOGO = "LOGO",
2223
+ TRANSLATIONS = "TRANSLATIONS"
2224
+ }
2160
2225
  export declare enum IdentifierListQueryExactColumn {
2161
2226
  NAME = "NAME"
2162
2227
  }
@@ -2542,7 +2607,7 @@ export interface OneCore {
2542
2607
  * identifier that matches issuer's restrictions. Alternatively,
2543
2608
  * you can specify an existing identifier.
2544
2609
  */
2545
- holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<string>;
2610
+ holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<HolderAcceptCredentialResponse>;
2546
2611
  /** Activates the instance with the provider after user authentication. */
2547
2612
  holderActivateInstance(id: string, request: HolderActivateInstanceRequest): Promise<HolderActivateInstanceResponse>;
2548
2613
  /** Returns instance registration details from the provider. */
@@ -2563,8 +2628,8 @@ export interface OneCore {
2563
2628
  holderRefreshCredential(interactionId: string): Promise<HolderRefreshCredentialResponse>;
2564
2629
  /** Registers the instance with a Wallet or Verifier Provider. */
2565
2630
  holderRegisterInstance(request: HolderRegisterInstanceRequest): Promise<HolderRegisterInstanceResponse>;
2566
- /** Rejects an offered credential. */
2567
- holderRejectCredential(interactionId: string): Promise<void>;
2631
+ /** Rejects offered credentials. Without `credential_ids`, all credentials of the interaction are rejected. */
2632
+ holderRejectCredential(interactionId: string, credentialIds: Array<string> | undefined): Promise<void>;
2568
2633
  /** Rejects a proof request. */
2569
2634
  holderRejectProof(interactionId: string): Promise<void>;
2570
2635
  /**
@@ -154,6 +154,11 @@ export var EcosystemRole;
154
154
  EcosystemRole["NATIONAL_REGISTRY_REGISTRAR"] = "NATIONAL_REGISTRY_REGISTRAR";
155
155
  EcosystemRole["WALLET_PROVIDER"] = "WALLET_PROVIDER";
156
156
  })(EcosystemRole || (EcosystemRole = {}));
157
+ export var EcosystemTrustResult;
158
+ (function (EcosystemTrustResult) {
159
+ EcosystemTrustResult["TRUSTED"] = "TRUSTED";
160
+ EcosystemTrustResult["NOT_TRUSTED"] = "NOT_TRUSTED";
161
+ })(EcosystemTrustResult || (EcosystemTrustResult = {}));
157
162
  export var HistoryAction;
158
163
  (function (HistoryAction) {
159
164
  HistoryAction["ACCEPTED"] = "ACCEPTED";
@@ -189,6 +194,7 @@ export var HistoryAction;
189
194
  HistoryAction["WRP_RC_RECEIVED"] = "WRP_RC_RECEIVED";
190
195
  HistoryAction["WRP_NR_RECEIVED"] = "WRP_NR_RECEIVED";
191
196
  HistoryAction["TRUST_RESOLVED"] = "TRUST_RESOLVED";
197
+ HistoryAction["ECOSYSTEMS_RESOLVED"] = "ECOSYSTEMS_RESOLVED";
192
198
  HistoryAction["REFRESHED"] = "REFRESHED";
193
199
  HistoryAction["SIGNED"] = "SIGNED";
194
200
  })(HistoryAction || (HistoryAction = {}));
@@ -233,6 +239,11 @@ export var HistorySearchType;
233
239
  HistorySearchType["VERIFIER_NAME"] = "VERIFIER_NAME";
234
240
  HistorySearchType["PROOF_SCHEMA_NAME"] = "PROOF_SCHEMA_NAME";
235
241
  })(HistorySearchType || (HistorySearchType = {}));
242
+ export var IdentifierListIncludeEntity;
243
+ (function (IdentifierListIncludeEntity) {
244
+ IdentifierListIncludeEntity["LOGO"] = "LOGO";
245
+ IdentifierListIncludeEntity["TRANSLATIONS"] = "TRANSLATIONS";
246
+ })(IdentifierListIncludeEntity || (IdentifierListIncludeEntity = {}));
236
247
  export var IdentifierListQueryExactColumn;
237
248
  (function (IdentifierListQueryExactColumn) {
238
249
  IdentifierListQueryExactColumn["NAME"] = "NAME";
@@ -76,6 +76,7 @@ RCT_EXTERN_METHOD(holderAcceptCredential:(NSDictionary *)request
76
76
  rejecter:(RCTPromiseRejectBlock)reject)
77
77
 
78
78
  RCT_EXTERN_METHOD(holderRejectCredential:(NSString *)interactionId
79
+ credentialIds:(NSArray *)credentialIds
79
80
  resolver:(RCTPromiseResolveBlock)resolve
80
81
  rejecter:(RCTPromiseRejectBlock)reject)
81
82
 
@@ -233,18 +233,23 @@ class ProcivisOneCoreModule: RCTEventEmitter {
233
233
  reject: @escaping RCTPromiseRejectBlock
234
234
  ) {
235
235
  asyncCall(resolve, reject) {
236
- return try await self.getCore().holderAcceptCredential(request: try deserialize(request))
236
+ let result = try await self.getCore().holderAcceptCredential(request: try deserialize(request))
237
+ return try serializeAny(result)
237
238
  }
238
239
  }
239
240
 
240
- @objc(holderRejectCredential:resolver:rejecter:)
241
+ @objc(holderRejectCredential:credentialIds:resolver:rejecter:)
241
242
  func holderRejectCredential(
242
243
  interactionId: String,
244
+ credentialIds: NSArray?,
243
245
  resolve: @escaping RCTPromiseResolveBlock,
244
246
  reject: @escaping RCTPromiseRejectBlock
245
247
  ) {
246
248
  asyncCall(resolve, reject) {
247
- try await self.getCore().holderRejectCredential(interactionId: interactionId)
249
+ try await self.getCore().holderRejectCredential(
250
+ interactionId: interactionId,
251
+ credentialIds: try deserializeOpt(credentialIds)
252
+ )
248
253
  return nil as NSDictionary?
249
254
  }
250
255
  }
@@ -76,6 +76,11 @@ private func serialize(historyMetadata: HistoryMetadata) throws -> NSDictionary
76
76
  "type_": "TRUST_RESOLUTION",
77
77
  "value": try serializeAny(value)
78
78
  ];
79
+ case let .ecosystemsResolved(value):
80
+ return [
81
+ "type_": "ECOSYSTEMS_RESOLVED",
82
+ "value": try serializeAny(value)
83
+ ];
79
84
  }
80
85
  }
81
86
 
@@ -126,7 +131,7 @@ private func serialize(proofRequestClaimValue: ProofClaimValue) throws -> NSDict
126
131
 
127
132
  private func serialize(invitationResponse: HandleInvitationResponse) throws -> NSDictionary {
128
133
  switch (invitationResponse) {
129
- case let .credentialIssuance(interactionId, keyStorageSecurityLevels, keyAlgorithms, txCode, `protocol`, requiresWalletInstanceAttestation, ecosystem):
134
+ case let .credentialIssuance(interactionId, keyStorageSecurityLevels, keyAlgorithms, txCode, `protocol`, requiresWalletInstanceAttestation, ecosystem, ecosystemErrors):
130
135
  var result: [String: Any] = [
131
136
  "type_": "CREDENTIAL_ISSUANCE",
132
137
  "interactionId": interactionId,
@@ -145,9 +150,10 @@ private func serialize(invitationResponse: HandleInvitationResponse) throws -> N
145
150
  if let ecosystem = ecosystem {
146
151
  result["ecosystem"] = ecosystem
147
152
  }
153
+ result["ecosystemErrors"] = try serializeAny(ecosystemErrors)
148
154
  return result as NSDictionary;
149
155
 
150
- case let .proofRequest(interactionId, proofId, `protocol`, ecosystem):
156
+ case let .proofRequest(interactionId, proofId, `protocol`, ecosystem, ecosystemErrors):
151
157
  var result: [String: Any] = [
152
158
  "type_": "PROOF_REQUEST",
153
159
  "interactionId": interactionId,
@@ -157,9 +163,10 @@ private func serialize(invitationResponse: HandleInvitationResponse) throws -> N
157
163
  if let ecosystem = ecosystem {
158
164
  result["ecosystem"] = ecosystem
159
165
  }
166
+ result["ecosystemErrors"] = try serializeAny(ecosystemErrors)
160
167
  return result as NSDictionary;
161
168
 
162
- case let .authorizationCodeFlow(interactionId, authorizationCodeFlowUrl, `protocol`, ecosystem):
169
+ case let .authorizationCodeFlow(interactionId, authorizationCodeFlowUrl, `protocol`, ecosystem, ecosystemErrors):
163
170
  var result: [String: Any] = [
164
171
  "type_": "AUTHORIZATION_CODE_FLOW",
165
172
  "interactionId": interactionId,
@@ -169,6 +176,7 @@ private func serialize(invitationResponse: HandleInvitationResponse) throws -> N
169
176
  if let ecosystem = ecosystem {
170
177
  result["ecosystem"] = ecosystem
171
178
  }
179
+ result["ecosystemErrors"] = try serializeAny(ecosystemErrors)
172
180
  return result as NSDictionary;
173
181
  }
174
182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procivis/react-native-one-core",
3
- "version": "1.123589.0",
3
+ "version": "1.126524.0",
4
4
  "author": "Procivis AG (https://procivis.ch)",
5
5
  "license": "Apache-2.0",
6
6
  "description": "ONE core bindings for React Native",