@procivis/react-native-one-core 1.123589.0 → 1.133039.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.
@@ -30,6 +30,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
30
30
  ErrorResponse(
31
31
  "BR_0184",
32
32
  "core not initialized",
33
+ null,
33
34
  null
34
35
  )
35
36
  )
@@ -41,6 +42,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
41
42
  ErrorResponse(
42
43
  "BR_0184",
43
44
  "ubiqu not initialized",
45
+ null,
44
46
  null
45
47
  )
46
48
  )
@@ -208,14 +210,20 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
208
210
  promise: Promise
209
211
  ) {
210
212
  asyncCall(promise, scope) {
211
- return@asyncCall getCore().holderAcceptCredential(construct(request))
213
+ val result = getCore().holderAcceptCredential(construct(request))
214
+ return@asyncCall convertToRN(result)
212
215
  }
213
216
  }
214
217
 
215
218
  @ReactMethod
216
- fun holderRejectCredential(interactionId: String, promise: Promise) {
219
+ fun holderRejectCredential(
220
+ interactionId: String,
221
+ credentialIds: ReadableArray?,
222
+ promise: Promise
223
+ ) {
217
224
  asyncCall(promise, scope) {
218
- getCore().holderRejectCredential(interactionId)
225
+ val ids = credentialIds?.let { DeserializeSpecific.ids(it) }
226
+ getCore().holderRejectCredential(interactionId, ids)
219
227
  return@asyncCall null
220
228
  }
221
229
  }
@@ -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 {
@@ -70,8 +71,15 @@ object SerializeSpecific {
70
71
  )
71
72
  }
72
73
 
73
- is HistoryMetadata.WalletUnitJwt -> {
74
- result.putString("type_", "WALLET_UNIT_JWT")
74
+ is HistoryMetadata.ManagedInstanceAttestation -> {
75
+ result.putString("type_", "MANAGED_INSTANCE_ATTESTATION")
76
+ val values = Arguments.createArray()
77
+ values.pushString(metadata.v1)
78
+ result.putArray("value", values)
79
+ }
80
+
81
+ is HistoryMetadata.WalletAttestation -> {
82
+ result.putString("type_", "WALLET_ATTESTATION")
75
83
  val values = Arguments.createArray()
76
84
  values.pushString(metadata.v1)
77
85
  result.putArray("value", values)
@@ -92,6 +100,14 @@ object SerializeSpecific {
92
100
  convertToRN(metadata.value) as ReadableMap
93
101
  )
94
102
  }
103
+
104
+ is HistoryMetadata.EcosystemsResolved -> {
105
+ result.putString("type_", "ECOSYSTEMS_RESOLVED")
106
+ result.putMap(
107
+ "value",
108
+ convertToRN(metadata.value) as ReadableMap
109
+ )
110
+ }
95
111
  }
96
112
  return result
97
113
  }
@@ -230,6 +246,10 @@ object SerializeSpecific {
230
246
  value.ecosystem?.let {
231
247
  result.putString("ecosystem", it)
232
248
  }
249
+ result.putMap(
250
+ "ecosystemErrors",
251
+ convertToRN(value.ecosystemErrors) as ReadableMap
252
+ )
233
253
  }
234
254
 
235
255
  is HandleInvitationResponse.AuthorizationCodeFlow -> {
@@ -240,6 +260,10 @@ object SerializeSpecific {
240
260
  value.ecosystem?.let {
241
261
  result.putString("ecosystem", it)
242
262
  }
263
+ result.putMap(
264
+ "ecosystemErrors",
265
+ convertToRN(value.ecosystemErrors) as ReadableMap
266
+ )
243
267
  }
244
268
 
245
269
  is HandleInvitationResponse.ProofRequest -> {
@@ -250,6 +274,10 @@ object SerializeSpecific {
250
274
  value.ecosystem?.let {
251
275
  result.putString("ecosystem", it)
252
276
  }
277
+ result.putMap(
278
+ "ecosystemErrors",
279
+ convertToRN(value.ecosystemErrors) as ReadableMap
280
+ )
253
281
  }
254
282
  }
255
283
  return result
@@ -1,12 +1,18 @@
1
1
  package ch.procivis.one.core
2
2
 
3
+ import android.annotation.SuppressLint
4
+ import android.util.Log
5
+ import ch.procivis.one.core.Serialize.convertToRN
3
6
  import com.facebook.react.bridge.Arguments
4
7
  import com.facebook.react.bridge.Promise
5
8
  import com.facebook.react.bridge.ReadableMap
6
9
  import kotlinx.coroutines.CoroutineScope
7
10
  import kotlinx.coroutines.launch
8
11
 
12
+ @SuppressLint("LogNotTimber")
9
13
  object Util {
14
+ private const val TAG = "ch.procivis.one.core.Util"
15
+
10
16
  // error handling + running core code outside JS thread
11
17
  fun syncCall(promise: Promise, function: () -> Any?) {
12
18
  object : Thread() {
@@ -36,11 +42,19 @@ object Util {
36
42
 
37
43
  private fun handleBindingException(promise: Promise, error: OneCoreException.Response) {
38
44
  val userInfo = Arguments.createMap()
39
- val cause = error.data.cause?.message
40
- if (!cause.isNullOrEmpty()) {
41
- userInfo.putString("cause", cause)
42
- }
43
45
 
46
+ try {
47
+ error.data.cause?.let { cause ->
48
+ userInfo.putMap("cause", convertToRN(cause) as ReadableMap)
49
+ }
50
+
51
+ error.data.data?.let { data ->
52
+ userInfo.putMap("data", convertToRN(data) as ReadableMap)
53
+ }
54
+ } catch (error: Throwable) {
55
+ Log.w(TAG, "Failed to parse error userInfo: $error")
56
+ }
57
+
44
58
  promise.reject(
45
59
  error.data.code,
46
60
  error.data.message,
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/133039/android/onecore-debug.aar",
5
+ "sha1": "784656f7849f8ad2898a52815c4bad4a2285efab"
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/133039/android/onecore-release.aar",
9
+ "sha1": "d6d85c3b594dd214905f366bc80451e7b06c6601"
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/133039/ios/deploy.zip",
14
+ "sha1": "b0a910facc05bdfa239b31a1c7f09c8c9feb0092"
15
15
  }
16
16
  }
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NativeModules } from "react-native";
2
2
  import { OneError } from "./src/error";
3
- import { interfaceMethodNames } from "./src/core";
3
+ import { interfaceMethodNames, } from "./src/core";
4
4
  import * as ubiqu from "./src/ubiqu";
5
5
  export * from "./src/core";
6
6
  export * from "./src/error";
@@ -18,7 +18,7 @@ if (originalGetConfig) {
18
18
  const parsed = objectMap(providers, (entityValue) => objectMap(entityValue, (json) => JSON.parse(json)));
19
19
  return {
20
20
  globalSettings,
21
- ...parsed
21
+ ...parsed,
22
22
  };
23
23
  });
24
24
  }
@@ -40,18 +40,22 @@ const objectMap = (obj, fn) => Object.fromEntries(Object.entries(obj).map(([k, v
40
40
  function wrapFn(fn, operation) {
41
41
  return (...args) => {
42
42
  const errHandler = (e) => {
43
- if (e instanceof Error && "code" in e) {
43
+ if (e instanceof Error && "code" in e && typeof e.code === "string") {
44
44
  const userInfo = "userInfo" in e && typeof e.userInfo === "object"
45
45
  ? e.userInfo
46
46
  : undefined;
47
- const cause = userInfo && "cause" in userInfo && typeof userInfo.cause === "string"
47
+ const cause = userInfo && "cause" in userInfo && typeof userInfo.cause === "object"
48
48
  ? userInfo.cause
49
49
  : undefined;
50
+ const data = userInfo && "data" in userInfo && typeof userInfo.data === "object"
51
+ ? userInfo.data
52
+ : undefined;
50
53
  throw new OneError({
51
54
  operation,
52
55
  code: e.code,
53
56
  message: e.message,
54
57
  cause,
58
+ data,
55
59
  originalError: e,
56
60
  });
57
61
  // iOS additional fields: "nativeStackIOS"
@@ -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;
@@ -1,16 +1,19 @@
1
+ import { ErrorData, Cause } from "./core";
1
2
  /**
2
3
  * Specific errors being thrown from the {@link ONECore} functions
3
4
  */
4
5
  export declare class OneError extends Error {
5
6
  readonly operation: string;
6
7
  readonly code: string;
7
- readonly cause?: string;
8
+ readonly cause?: Cause;
9
+ readonly data?: ErrorData;
8
10
  readonly originalError: Error;
9
11
  constructor(params: {
10
12
  operation: string;
11
13
  code: string;
12
14
  message: string;
13
- cause?: string;
15
+ cause?: Cause;
16
+ data?: ErrorData;
14
17
  originalError: Error;
15
18
  });
16
19
  }
package/dist/src/error.js CHANGED
@@ -5,12 +5,14 @@ export class OneError extends Error {
5
5
  operation;
6
6
  code;
7
7
  cause;
8
+ data;
8
9
  originalError;
9
10
  constructor(params) {
10
11
  super(params.message);
11
12
  this.operation = params.operation;
12
13
  this.code = params.code;
13
14
  this.cause = params.cause;
15
+ this.data = params.data;
14
16
  this.originalError = params.originalError;
15
17
  }
16
18
  }
@@ -102,7 +102,13 @@ export interface Config {
102
102
  * management, trust collections, and feature flags.
103
103
  */
104
104
  walletProvider: Record<string, string>;
105
+ /**
106
+ * Configurations from the Verifier Provider, incluiding
107
+ * version management, ecosystems, and feature flags.
108
+ */
105
109
  verifierProvider: Record<string, string>;
110
+ /** Transaction data types and their capabilities. */
111
+ transactionDataProvider: Record<string, string>;
106
112
  ecosystem: Record<string, string>;
107
113
  /** Deployment-wide settings that are not tied to a specific config entity. */
108
114
  globalSettings: GlobalSettings;
@@ -137,12 +143,11 @@ export interface CreateCredentialSchemaRequest {
137
143
  formats: Array<CredentialSchemaFormatRequest>;
138
144
  organisationId: string;
139
145
  claims: Array<CredentialClaimSchemaRequest>;
140
- keyStorageSecurity?: KeyStorageSecurity;
146
+ walletAttestation?: CredentialSchemaWalletAttestation;
141
147
  layoutProperties?: CredentialSchemaLayoutProperties;
142
148
  allowSuspension?: boolean;
143
149
  allowRevocation?: boolean;
144
150
  batchSize?: number;
145
- requiresWalletInstanceAttestation: boolean;
146
151
  transactionCode?: CredentialSchemaTransactionCodeRequest;
147
152
  translations?: CredentialSchemaTranslations;
148
153
  embeddedDisclosurePolicy?: DisclosurePolicyCreateRequest;
@@ -175,6 +180,8 @@ export interface CreateIdentifierRequest {
175
180
  certificates?: Array<CreateCertificateRequest>;
176
181
  certificateAuthorities?: Array<CreateCertificateAuthorityRequest>;
177
182
  trustInformation: Array<CreateIdentifierTrustInformationRequest>;
183
+ translations?: IdentifierTranslations;
184
+ logo?: string;
178
185
  }
179
186
  export interface CreateIdentifierTrustInformationRequest {
180
187
  data: string;
@@ -240,6 +247,11 @@ export interface CreateProofRequest {
240
247
  ecosystem?: string;
241
248
  }
242
249
  export interface CreateProofSchemaInput {
250
+ /**
251
+ * Formatter provider names selected for this input. If omitted, all
252
+ * formats of the credential schema are selected.
253
+ */
254
+ formats?: Array<string>;
243
255
  credentialSchemaId: string;
244
256
  claimSchemas: Array<CreateProofSchemaInputClaim>;
245
257
  }
@@ -305,7 +317,7 @@ export interface CredentialDetail {
305
317
  /** State representation of the credential in the system. */
306
318
  state: CredentialState;
307
319
  /** Schema of the credential. */
308
- schema: CredentialSchemaInfo;
320
+ schema: CredentialSchemaListItem;
309
321
  claims: Array<Claim>;
310
322
  redirectUri?: string;
311
323
  /**
@@ -327,7 +339,8 @@ export interface CredentialDetail {
327
339
  trustInformation?: TrustInformation;
328
340
  consumedAt?: string;
329
341
  type: CredentialType;
330
- remainingBatchItemCount?: number;
342
+ remainingBatchItemCount?: Record<string, number>;
343
+ format?: string;
331
344
  parentId?: string;
332
345
  ecosystem?: string;
333
346
  }
@@ -348,7 +361,7 @@ export interface CredentialListItem {
348
361
  /** State representation of the credential in the system. */
349
362
  state: CredentialState;
350
363
  /** Schema of the credential. */
351
- schema: CredentialSchemaInfo;
364
+ schema: CredentialSchemaListItem;
352
365
  /**
353
366
  * The role the system has in relation to the credential. For example,
354
367
  * if the system received the credential as a wallet this value will
@@ -364,6 +377,7 @@ export interface CredentialListItem {
364
377
  profile?: string;
365
378
  consumedAt?: string;
366
379
  type: CredentialType;
380
+ format?: string;
367
381
  parentId?: string;
368
382
  redirectUri?: string;
369
383
  ecosystem?: string;
@@ -383,6 +397,8 @@ export interface CredentialListQuery {
383
397
  name?: string;
384
398
  /** Filter by one or more country profiles. */
385
399
  profiles?: Array<string>;
400
+ /** Filter by one or more formatter configuration names. */
401
+ formats?: Array<string>;
386
402
  /** Search for a string. */
387
403
  searchText?: string;
388
404
  /**
@@ -484,13 +500,12 @@ export interface CredentialSchemaDetail {
484
500
  formats: Array<CredentialSchemaFormatResponse>;
485
501
  organisationId: string;
486
502
  claims: Array<ClaimSchema>;
487
- keyStorageSecurity?: KeyStorageSecurity;
503
+ walletAttestation: CredentialSchemaWalletAttestation;
488
504
  importedSourceUrl: string;
489
505
  layoutProperties?: CredentialSchemaLayoutProperties;
490
506
  allowSuspension: boolean;
491
507
  allowRevocation?: boolean;
492
508
  batchSize?: number;
493
- requiresWalletInstanceAttestation: boolean;
494
509
  transactionCode?: CredentialSchemaTransactionCode;
495
510
  translations: CredentialSchemaTranslations;
496
511
  expiration?: number;
@@ -515,11 +530,11 @@ export interface CredentialSchemaDetailInfo {
515
530
  }
516
531
  export interface CredentialSchemaFormatRequest {
517
532
  format: string;
518
- schemaId?: string;
533
+ ecosystemSchemaId?: string;
519
534
  }
520
535
  export interface CredentialSchemaFormatResponse {
521
536
  format: string;
522
- schemaId: string;
537
+ ecosystemSchemaId: string;
523
538
  }
524
539
  export interface CredentialSchemaInfo {
525
540
  id: string;
@@ -527,7 +542,6 @@ export interface CredentialSchemaInfo {
527
542
  lastModified: string;
528
543
  name: string;
529
544
  format: string;
530
- revocationMethod?: string;
531
545
  keyStorageSecurity?: KeyStorageSecurity;
532
546
  schemaId: string;
533
547
  importedSourceUrl: string;
@@ -555,15 +569,15 @@ export interface CredentialSchemaListItem {
555
569
  lastModified: string;
556
570
  name: string;
557
571
  formats: Array<CredentialSchemaFormatResponse>;
558
- keyStorageSecurity?: KeyStorageSecurity;
572
+ walletAttestation: CredentialSchemaWalletAttestation;
559
573
  importedSourceUrl: string;
560
574
  layoutProperties?: CredentialSchemaLayoutProperties;
561
575
  allowSuspension: boolean;
562
576
  allowRevocation?: boolean;
563
577
  batchSize?: number;
564
- requiresWalletInstanceAttestation: boolean;
565
578
  expiration?: number;
566
579
  ecosystem?: string;
580
+ translations?: CredentialSchemaTranslations;
567
581
  }
568
582
  export interface CredentialSchemaListQuery {
569
583
  page: number;
@@ -575,7 +589,7 @@ export interface CredentialSchemaListQuery {
575
589
  ids?: Array<string>;
576
590
  exact?: Array<CredentialSchemaListQueryExactColumn>;
577
591
  include?: Array<CredentialSchemaListIncludeEntityType>;
578
- schemaIds?: Array<string>;
592
+ ecosystemSchemaIds?: Array<string>;
579
593
  formats?: Array<string>;
580
594
  ecosystems?: Array<string>;
581
595
  usesBatchIssuance?: boolean;
@@ -607,6 +621,12 @@ export interface CredentialSchemaTranslations {
607
621
  name: Record<string, string>;
608
622
  description?: Record<string, string>;
609
623
  }
624
+ export interface CredentialSchemaWalletAttestation {
625
+ requireInstanceAttestation: boolean;
626
+ keyStorageSecurityLevel?: KeyStorageSecurity;
627
+ preferredKeyStorageAttestationLifetime?: number;
628
+ preferredInstanceAttestationLifetime?: number;
629
+ }
610
630
  export interface CredentialSet {
611
631
  required: boolean;
612
632
  options: Array<Array<string>>;
@@ -714,15 +734,26 @@ export interface EcosystemInfo {
714
734
  description: Array<DisplayName>;
715
735
  logo: string;
716
736
  }
737
+ export interface EcosystemOutcome {
738
+ result: EcosystemTrustResult;
739
+ /** Why the provider did not trust the interaction. `None` when it did. */
740
+ error?: HistoryErrorMetadata;
741
+ }
742
+ export interface ErrorData {
743
+ ecosystemErrors?: Record<string, EcosystemOutcome>;
744
+ }
717
745
  export interface ErrorResponse {
718
746
  code: string;
719
747
  message: string;
720
748
  cause?: Cause;
749
+ /** Only set when ecosystems rejected the interaction */
750
+ data?: ErrorData;
721
751
  }
722
752
  export interface EudiIntermediary {
723
753
  name?: string;
724
754
  identifier: string;
725
- website: string;
755
+ supportUrl?: string;
756
+ infoUrl?: string;
726
757
  email?: string;
727
758
  phone?: string;
728
759
  country: string;
@@ -734,7 +765,9 @@ export interface EudiSupervisoryAuthority {
734
765
  }
735
766
  export interface EudiTrustInformation {
736
767
  name: string;
737
- website: string;
768
+ supportUrl?: string;
769
+ infoUrl?: string;
770
+ privacyPolicyUrl?: string;
738
771
  email?: string;
739
772
  phone?: string;
740
773
  country: string;
@@ -902,6 +935,17 @@ export interface HolderAcceptCredentialRequest {
902
935
  /** User-provided transaction code. */
903
936
  txCode?: string;
904
937
  }
938
+ export interface HolderAcceptCredentialResponse {
939
+ /** One credential per accepted credential configuration. */
940
+ credentialIds: Array<string>;
941
+ /**
942
+ * Some of the offered credential configurations could not be issued.
943
+ * Only set when several configurations were offered.
944
+ */
945
+ partiallySuccessful?: boolean;
946
+ /** One entry per ecosystem provider that rejected the artifact, keyed by provider id. */
947
+ ecosystemErrors: Record<string, EcosystemOutcome>;
948
+ }
905
949
  export interface HolderActivateInstanceRequest {
906
950
  /** Key type for the authentication key generated during activation. */
907
951
  keyType: string;
@@ -956,11 +1000,14 @@ export interface IdentifierDetail {
956
1000
  organisationId?: string;
957
1001
  type: IdentifierType;
958
1002
  isRemote: boolean;
1003
+ autogenerated: boolean;
959
1004
  state: IdentifierState;
960
1005
  did?: DidDetail;
961
1006
  key?: KeyDetail;
962
1007
  certificates?: Array<CertificateDetail>;
963
1008
  trustInformation: Array<IdentifierTrustInformationResponseDto>;
1009
+ logo?: string;
1010
+ translations: IdentifierTranslationsResponse;
964
1011
  }
965
1012
  export interface IdentifierList {
966
1013
  values: Array<IdentifierListItem>;
@@ -974,8 +1021,11 @@ export interface IdentifierListItem {
974
1021
  name: string;
975
1022
  type: IdentifierType;
976
1023
  isRemote: boolean;
1024
+ autogenerated: boolean;
977
1025
  state: IdentifierState;
978
1026
  organisationId?: string;
1027
+ logo?: string;
1028
+ translations?: IdentifierTranslationsResponse;
979
1029
  }
980
1030
  export interface IdentifierListQuery {
981
1031
  page: number;
@@ -988,8 +1038,10 @@ export interface IdentifierListQuery {
988
1038
  types?: Array<IdentifierType>;
989
1039
  states?: Array<IdentifierState>;
990
1040
  exact?: Array<IdentifierListQueryExactColumn>;
1041
+ include?: Array<IdentifierListIncludeEntity>;
991
1042
  didMethods?: Array<string>;
992
1043
  isRemote?: boolean;
1044
+ autogenerated?: boolean;
993
1045
  keyAlgorithms?: Array<string>;
994
1046
  keyRoles?: Array<KeyRole>;
995
1047
  keyStorages?: Array<string>;
@@ -1008,6 +1060,14 @@ export interface IdentifierListQuery {
1008
1060
  lastModifiedAfter?: string;
1009
1061
  lastModifiedBefore?: string;
1010
1062
  }
1063
+ export interface IdentifierTranslations {
1064
+ name: Record<string, string>;
1065
+ logoAltText?: Record<string, string>;
1066
+ }
1067
+ export interface IdentifierTranslationsResponse {
1068
+ name: Record<string, string>;
1069
+ logoAltText?: Record<string, string>;
1070
+ }
1011
1071
  export interface IdentifierTrustInformationResponseDto {
1012
1072
  data: string;
1013
1073
  type: IdentifierTrustInformationType;
@@ -1028,7 +1088,7 @@ export interface ImportCredentialSchemaClaimSchema {
1028
1088
  }
1029
1089
  export interface ImportCredentialSchemaFormat {
1030
1090
  format: string;
1031
- schemaId: string;
1091
+ ecosystemSchemaId: string;
1032
1092
  }
1033
1093
  export interface ImportCredentialSchemaLayoutProperties {
1034
1094
  background?: CredentialSchemaBackgroundProperties;
@@ -1050,17 +1110,17 @@ export interface ImportCredentialSchemaRequestSchema {
1050
1110
  formats: Array<ImportCredentialSchemaFormat>;
1051
1111
  organisationId: string;
1052
1112
  claims: Array<ImportCredentialSchemaClaimSchema>;
1053
- keyStorageSecurity?: KeyStorageSecurity;
1113
+ walletAttestation?: CredentialSchemaWalletAttestation;
1054
1114
  importedSourceUrl: string;
1055
1115
  layoutProperties?: ImportCredentialSchemaLayoutProperties;
1056
1116
  allowSuspension?: boolean;
1057
- requiresWalletInstanceAttestation?: boolean;
1058
1117
  transactionCode?: ImportCredentialSchemaTransactionCode;
1059
1118
  allowRevocation?: boolean;
1060
1119
  batchSize?: number;
1061
1120
  translations?: CredentialSchemaTranslations;
1062
1121
  embeddedDisclosurePolicy?: DisclosurePolicy;
1063
1122
  expiration?: number;
1123
+ ecosystem?: string;
1064
1124
  }
1065
1125
  export interface ImportCredentialSchemaTransactionCode {
1066
1126
  type: TransactionCodeType;
@@ -1084,6 +1144,7 @@ export interface ImportProofSchema {
1084
1144
  importedSourceUrl: string;
1085
1145
  /** Set of all claims to request. */
1086
1146
  proofInputSchemas: Array<ImportProofSchemaInputSchema>;
1147
+ ecosystem?: string;
1087
1148
  }
1088
1149
  export interface ImportProofSchemaClaimSchema {
1089
1150
  id: string;
@@ -1108,8 +1169,14 @@ export interface ImportProofSchemaCredentialSchema {
1108
1169
  layoutProperties?: CredentialSchemaLayoutProperties;
1109
1170
  allowSuspension?: boolean;
1110
1171
  requiresWalletInstanceAttestation?: boolean;
1172
+ ecosystem?: string;
1111
1173
  }
1112
1174
  export interface ImportProofSchemaInputSchema {
1175
+ /**
1176
+ * Formatter provider names selected for this input. Defaulting
1177
+ * to all formats of the resolved credential schema if omitted.
1178
+ */
1179
+ formats?: Array<string>;
1113
1180
  claimSchemas: Array<ImportProofSchemaClaimSchema>;
1114
1181
  credentialSchema: ImportProofSchemaCredentialSchema;
1115
1182
  }
@@ -1172,6 +1239,7 @@ export interface KeyDetail {
1172
1239
  publicKey: number[];
1173
1240
  keyType: string;
1174
1241
  storageType: string;
1242
+ autogenerated: boolean;
1175
1243
  }
1176
1244
  export interface KeyListItem {
1177
1245
  id: string;
@@ -1181,6 +1249,7 @@ export interface KeyListItem {
1181
1249
  publicKey: number[];
1182
1250
  keyType: string;
1183
1251
  storageType: string;
1252
+ autogenerated: boolean;
1184
1253
  }
1185
1254
  export interface MdocMsoValidity {
1186
1255
  expiration: string;
@@ -1304,6 +1373,7 @@ export interface PresentationDefinitionV2Credential {
1304
1373
  mdocMsoValidity?: MdocMsoValidity;
1305
1374
  protocol: string;
1306
1375
  profile?: string;
1376
+ format?: string;
1307
1377
  /**
1308
1378
  * Present when the relying party's certificates do not satisfy
1309
1379
  * the embedded disclosure policy attached to the requested
@@ -1395,8 +1465,12 @@ export interface ProofInput {
1395
1465
  credential?: CredentialDetail;
1396
1466
  /** Credential schema metadata. */
1397
1467
  credentialSchema: CredentialSchemaInfo;
1468
+ /** Trust of the credential shared for this input, and of its issuer. */
1469
+ trustInformation?: TrustInformation;
1398
1470
  }
1399
1471
  export interface ProofInputSchema {
1472
+ /** Formatter provider names saved for this proof input. */
1473
+ formats: Array<string>;
1400
1474
  claimSchemas: Array<ProofClaimSchema>;
1401
1475
  credentialSchema: CredentialSchemaInfo;
1402
1476
  }
@@ -1693,11 +1767,15 @@ export interface TrustInformation {
1693
1767
  receivedAt: string;
1694
1768
  name?: string;
1695
1769
  result: TrustResolutionResult;
1770
+ /** One entry per ecosystem provider that rejected the artifact, keyed by provider id. */
1771
+ ecosystemErrors: Record<string, EcosystemOutcome>;
1696
1772
  }
1697
1773
  export interface TrustInformationDetail {
1698
1774
  ecosystem?: string;
1699
1775
  issuer?: TrustInformationDetailInfo;
1700
1776
  verifier?: TrustInformationDetailInfo;
1777
+ /** One entry per ecosystem provider that rejected the artifact, keyed by provider id. */
1778
+ ecosystemErrors: Record<string, EcosystemOutcome>;
1701
1779
  }
1702
1780
  export interface TrustResolutionMetadata {
1703
1781
  result: TrustResolutionResult;
@@ -2023,6 +2101,10 @@ export declare enum EcosystemRole {
2023
2101
  NATIONAL_REGISTRY_REGISTRAR = "NATIONAL_REGISTRY_REGISTRAR",
2024
2102
  WALLET_PROVIDER = "WALLET_PROVIDER"
2025
2103
  }
2104
+ export declare enum EcosystemTrustResult {
2105
+ TRUSTED = "TRUSTED",
2106
+ NOT_TRUSTED = "NOT_TRUSTED"
2107
+ }
2026
2108
  export type HandleInvitationResponse = {
2027
2109
  type_: "CREDENTIAL_ISSUANCE";
2028
2110
  /** For reference. */
@@ -2043,6 +2125,8 @@ export type HandleInvitationResponse = {
2043
2125
  /** Whether a valid WIA is required to complete issuance. */
2044
2126
  requiresWalletInstanceAttestation: boolean;
2045
2127
  ecosystem?: string;
2128
+ /** One entry per ecosystem provider that rejected the artifact, keyed by provider id. */
2129
+ ecosystemErrors: Record<string, EcosystemOutcome>;
2046
2130
  } | {
2047
2131
  type_: "AUTHORIZATION_CODE_FLOW";
2048
2132
  /** For reference. */
@@ -2055,6 +2139,8 @@ export type HandleInvitationResponse = {
2055
2139
  /** Protocol used for issuance. */
2056
2140
  protocol: string;
2057
2141
  ecosystem?: string;
2142
+ /** One entry per ecosystem provider that rejected the artifact, keyed by provider id. */
2143
+ ecosystemErrors: Record<string, EcosystemOutcome>;
2058
2144
  } | {
2059
2145
  type_: "PROOF_REQUEST";
2060
2146
  /** For reference. */
@@ -2064,6 +2150,8 @@ export type HandleInvitationResponse = {
2064
2150
  /** Protocol used for issuance. */
2065
2151
  protocol: string;
2066
2152
  ecosystem?: string;
2153
+ /** One entry per ecosystem provider that rejected the artifact, keyed by provider id. */
2154
+ ecosystemErrors: Record<string, EcosystemOutcome>;
2067
2155
  };
2068
2156
  export declare enum HistoryAction {
2069
2157
  ACCEPTED = "ACCEPTED",
@@ -2099,8 +2187,12 @@ export declare enum HistoryAction {
2099
2187
  WRP_RC_RECEIVED = "WRP_RC_RECEIVED",
2100
2188
  WRP_NR_RECEIVED = "WRP_NR_RECEIVED",
2101
2189
  TRUST_RESOLVED = "TRUST_RESOLVED",
2190
+ ECOSYSTEMS_RESOLVED = "ECOSYSTEMS_RESOLVED",
2102
2191
  REFRESHED = "REFRESHED",
2103
- SIGNED = "SIGNED"
2192
+ SIGNED = "SIGNED",
2193
+ KA_CREATED = "KA_CREATED",
2194
+ WIA_CREATED = "WIA_CREATED",
2195
+ CLIENT_SECRET_REGENERATED = "CLIENT_SECRET_REGENERATED"
2104
2196
  }
2105
2197
  export declare enum HistoryEntityType {
2106
2198
  KEY = "KEY",
@@ -2113,7 +2205,8 @@ export declare enum HistoryEntityType {
2113
2205
  PROOF_SCHEMA = "PROOF_SCHEMA",
2114
2206
  ORGANISATION = "ORGANISATION",
2115
2207
  BACKUP = "BACKUP",
2116
- WALLET_UNIT = "WALLET_UNIT",
2208
+ INSTANCE = "INSTANCE",
2209
+ MANAGED_INSTANCE = "MANAGED_INSTANCE",
2117
2210
  USER = "USER",
2118
2211
  PROVIDER = "PROVIDER",
2119
2212
  WALLET_RELYING_PARTY = "WALLET_RELYING_PARTY",
@@ -2137,7 +2230,10 @@ export type HistoryMetadata = {
2137
2230
  type_: "ERROR_METADATA";
2138
2231
  value: HistoryErrorMetadata;
2139
2232
  } | {
2140
- type_: "WALLET_UNIT_JWT";
2233
+ type_: "MANAGED_INSTANCE_ATTESTATION";
2234
+ value: [string];
2235
+ } | {
2236
+ type_: "WALLET_ATTESTATION";
2141
2237
  value: [string];
2142
2238
  } | {
2143
2239
  type_: "WALLET_RELYING_PARTY";
@@ -2145,6 +2241,10 @@ export type HistoryMetadata = {
2145
2241
  } | {
2146
2242
  type_: "TRUST_RESOLUTION";
2147
2243
  value: TrustResolutionMetadata;
2244
+ } | {
2245
+ type_: "ECOSYSTEMS_RESOLVED";
2246
+ /** One entry per ecosystem provider consulted, keyed by provider id. */
2247
+ value: Record<string, EcosystemOutcome>;
2148
2248
  };
2149
2249
  export declare enum HistorySearchType {
2150
2250
  ALL = "ALL",
@@ -2157,6 +2257,10 @@ export declare enum HistorySearchType {
2157
2257
  VERIFIER_NAME = "VERIFIER_NAME",
2158
2258
  PROOF_SCHEMA_NAME = "PROOF_SCHEMA_NAME"
2159
2259
  }
2260
+ export declare enum IdentifierListIncludeEntity {
2261
+ LOGO = "LOGO",
2262
+ TRANSLATIONS = "TRANSLATIONS"
2263
+ }
2160
2264
  export declare enum IdentifierListQueryExactColumn {
2161
2265
  NAME = "NAME"
2162
2266
  }
@@ -2542,7 +2646,7 @@ export interface OneCore {
2542
2646
  * identifier that matches issuer's restrictions. Alternatively,
2543
2647
  * you can specify an existing identifier.
2544
2648
  */
2545
- holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<string>;
2649
+ holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<HolderAcceptCredentialResponse>;
2546
2650
  /** Activates the instance with the provider after user authentication. */
2547
2651
  holderActivateInstance(id: string, request: HolderActivateInstanceRequest): Promise<HolderActivateInstanceResponse>;
2548
2652
  /** Returns instance registration details from the provider. */
@@ -2555,16 +2659,20 @@ export interface OneCore {
2555
2659
  */
2556
2660
  holderGetTransactionData(proofId: string, transactionDataId: string): Promise<ProofTransactionData>;
2557
2661
  /**
2558
- * Check status of the instance with the provider. Will return an error
2559
- * if the instance has been revoked.
2662
+ * Checks the status of an instance with the provider. Successful calls return `204`.
2663
+ * To see the result, call `holderGetInstance`.
2560
2664
  */
2561
2665
  holderInstanceStatus(id: string): Promise<void>;
2562
2666
  /** Receive a new credential batch */
2563
2667
  holderRefreshCredential(interactionId: string): Promise<HolderRefreshCredentialResponse>;
2564
2668
  /** Registers the instance with a Wallet or Verifier Provider. */
2565
2669
  holderRegisterInstance(request: HolderRegisterInstanceRequest): Promise<HolderRegisterInstanceResponse>;
2566
- /** Rejects an offered credential. */
2567
- holderRejectCredential(interactionId: string): Promise<void>;
2670
+ /**
2671
+ * Rejects credentials or individual batch items. Selecting a batch parent rejects all its items.
2672
+ * Without `credential_ids`, all credentials of the interaction are rejected.
2673
+ * A batch format is notified as rejected and excluded from refreshes only when all its items are rejected.
2674
+ */
2675
+ holderRejectCredential(interactionId: string, credentialIds: Array<string> | undefined): Promise<void>;
2568
2676
  /** Rejects a proof request. */
2569
2677
  holderRejectProof(interactionId: string): Promise<void>;
2570
2678
  /**
@@ -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,8 +194,12 @@ 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";
200
+ HistoryAction["KA_CREATED"] = "KA_CREATED";
201
+ HistoryAction["WIA_CREATED"] = "WIA_CREATED";
202
+ HistoryAction["CLIENT_SECRET_REGENERATED"] = "CLIENT_SECRET_REGENERATED";
194
203
  })(HistoryAction || (HistoryAction = {}));
195
204
  export var HistoryEntityType;
196
205
  (function (HistoryEntityType) {
@@ -204,7 +213,8 @@ export var HistoryEntityType;
204
213
  HistoryEntityType["PROOF_SCHEMA"] = "PROOF_SCHEMA";
205
214
  HistoryEntityType["ORGANISATION"] = "ORGANISATION";
206
215
  HistoryEntityType["BACKUP"] = "BACKUP";
207
- HistoryEntityType["WALLET_UNIT"] = "WALLET_UNIT";
216
+ HistoryEntityType["INSTANCE"] = "INSTANCE";
217
+ HistoryEntityType["MANAGED_INSTANCE"] = "MANAGED_INSTANCE";
208
218
  HistoryEntityType["USER"] = "USER";
209
219
  HistoryEntityType["PROVIDER"] = "PROVIDER";
210
220
  HistoryEntityType["WALLET_RELYING_PARTY"] = "WALLET_RELYING_PARTY";
@@ -233,6 +243,11 @@ export var HistorySearchType;
233
243
  HistorySearchType["VERIFIER_NAME"] = "VERIFIER_NAME";
234
244
  HistorySearchType["PROOF_SCHEMA_NAME"] = "PROOF_SCHEMA_NAME";
235
245
  })(HistorySearchType || (HistorySearchType = {}));
246
+ export var IdentifierListIncludeEntity;
247
+ (function (IdentifierListIncludeEntity) {
248
+ IdentifierListIncludeEntity["LOGO"] = "LOGO";
249
+ IdentifierListIncludeEntity["TRANSLATIONS"] = "TRANSLATIONS";
250
+ })(IdentifierListIncludeEntity || (IdentifierListIncludeEntity = {}));
236
251
  export var IdentifierListQueryExactColumn;
237
252
  (function (IdentifierListQueryExactColumn) {
238
253
  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
 
@@ -35,7 +35,8 @@ class ProcivisOneCoreModule: RCTEventEmitter {
35
35
  data: ErrorResponse(
36
36
  code: "BR_0183",
37
37
  message: "core already initialized",
38
- cause: nil
38
+ cause: nil,
39
+ data: nil
39
40
  )
40
41
  )
41
42
  }
@@ -70,7 +71,7 @@ class ProcivisOneCoreModule: RCTEventEmitter {
70
71
  private func getCore() throws -> OneCoreProtocol {
71
72
  guard let result = core else {
72
73
  throw OneCoreError.Response(
73
- data: ErrorResponse(code: "BR_0184", message: "core not initialized", cause: nil)
74
+ data: ErrorResponse(code: "BR_0184", message: "core not initialized", cause: nil, data: nil)
74
75
  )
75
76
  }
76
77
  return result
@@ -233,18 +234,23 @@ class ProcivisOneCoreModule: RCTEventEmitter {
233
234
  reject: @escaping RCTPromiseRejectBlock
234
235
  ) {
235
236
  asyncCall(resolve, reject) {
236
- return try await self.getCore().holderAcceptCredential(request: try deserialize(request))
237
+ let result = try await self.getCore().holderAcceptCredential(request: try deserialize(request))
238
+ return try serializeAny(result)
237
239
  }
238
240
  }
239
241
 
240
- @objc(holderRejectCredential:resolver:rejecter:)
242
+ @objc(holderRejectCredential:credentialIds:resolver:rejecter:)
241
243
  func holderRejectCredential(
242
244
  interactionId: String,
245
+ credentialIds: NSArray?,
243
246
  resolve: @escaping RCTPromiseResolveBlock,
244
247
  reject: @escaping RCTPromiseRejectBlock
245
248
  ) {
246
249
  asyncCall(resolve, reject) {
247
- try await self.getCore().holderRejectCredential(interactionId: interactionId)
250
+ try await self.getCore().holderRejectCredential(
251
+ interactionId: interactionId,
252
+ credentialIds: try deserializeOpt(credentialIds)
253
+ )
248
254
  return nil as NSDictionary?
249
255
  }
250
256
  }
@@ -901,7 +907,8 @@ class ProcivisOneCoreModule: RCTEventEmitter {
901
907
  data: ErrorResponse(
902
908
  code: "BR_0184",
903
909
  message: "ubiqu not initialized",
904
- cause: nil
910
+ cause: nil,
911
+ data: nil
905
912
  )
906
913
  )
907
914
  }
@@ -921,7 +928,8 @@ class ProcivisOneCoreModule: RCTEventEmitter {
921
928
  data: ErrorResponse(
922
929
  code: "BR_0184",
923
930
  message: "ubiqu not initialized",
924
- cause: nil
931
+ cause: nil,
932
+ data: nil
925
933
  )
926
934
  )
927
935
  }
@@ -940,7 +948,8 @@ class ProcivisOneCoreModule: RCTEventEmitter {
940
948
  data: ErrorResponse(
941
949
  code: "BR_0184",
942
950
  message: "ubiqu not initialized",
943
- cause: nil
951
+ cause: nil,
952
+ data: nil
944
953
  )
945
954
  )
946
955
  }
@@ -960,7 +969,8 @@ class ProcivisOneCoreModule: RCTEventEmitter {
960
969
  data: ErrorResponse(
961
970
  code: "BR_0184",
962
971
  message: "ubiqu not initialized",
963
- cause: nil
972
+ cause: nil,
973
+ data: nil
964
974
  )
965
975
  )
966
976
  }
@@ -997,7 +1007,8 @@ class ProcivisOneCoreModule: RCTEventEmitter {
997
1007
  data: ErrorResponse(
998
1008
  code: "BR_0184",
999
1009
  message: "ubiqu not initialized",
1000
- cause: nil
1010
+ cause: nil,
1011
+ data: nil
1001
1012
  )
1002
1013
  )
1003
1014
  }
@@ -61,9 +61,14 @@ private func serialize(historyMetadata: HistoryMetadata) throws -> NSDictionary
61
61
  "type_": "ERROR_METADATA",
62
62
  "value": try serializeAny(value)
63
63
  ];
64
- case let .walletUnitJwt(value):
64
+ case let .managedInstanceAttestation(value):
65
65
  return [
66
- "type_": "WALLET_UNIT_JWT",
66
+ "type_": "MANAGED_INSTANCE_ATTESTATION",
67
+ "value": [value]
68
+ ];
69
+ case let .walletAttestation(value):
70
+ return [
71
+ "type_": "WALLET_ATTESTATION",
67
72
  "value": [value]
68
73
  ];
69
74
  case let .walletRelyingParty(value):
@@ -76,6 +81,11 @@ private func serialize(historyMetadata: HistoryMetadata) throws -> NSDictionary
76
81
  "type_": "TRUST_RESOLUTION",
77
82
  "value": try serializeAny(value)
78
83
  ];
84
+ case let .ecosystemsResolved(value):
85
+ return [
86
+ "type_": "ECOSYSTEMS_RESOLVED",
87
+ "value": try serializeAny(value)
88
+ ];
79
89
  }
80
90
  }
81
91
 
@@ -126,7 +136,7 @@ private func serialize(proofRequestClaimValue: ProofClaimValue) throws -> NSDict
126
136
 
127
137
  private func serialize(invitationResponse: HandleInvitationResponse) throws -> NSDictionary {
128
138
  switch (invitationResponse) {
129
- case let .credentialIssuance(interactionId, keyStorageSecurityLevels, keyAlgorithms, txCode, `protocol`, requiresWalletInstanceAttestation, ecosystem):
139
+ case let .credentialIssuance(interactionId, keyStorageSecurityLevels, keyAlgorithms, txCode, `protocol`, requiresWalletInstanceAttestation, ecosystem, ecosystemErrors):
130
140
  var result: [String: Any] = [
131
141
  "type_": "CREDENTIAL_ISSUANCE",
132
142
  "interactionId": interactionId,
@@ -145,9 +155,10 @@ private func serialize(invitationResponse: HandleInvitationResponse) throws -> N
145
155
  if let ecosystem = ecosystem {
146
156
  result["ecosystem"] = ecosystem
147
157
  }
158
+ result["ecosystemErrors"] = try serializeAny(ecosystemErrors)
148
159
  return result as NSDictionary;
149
160
 
150
- case let .proofRequest(interactionId, proofId, `protocol`, ecosystem):
161
+ case let .proofRequest(interactionId, proofId, `protocol`, ecosystem, ecosystemErrors):
151
162
  var result: [String: Any] = [
152
163
  "type_": "PROOF_REQUEST",
153
164
  "interactionId": interactionId,
@@ -157,9 +168,10 @@ private func serialize(invitationResponse: HandleInvitationResponse) throws -> N
157
168
  if let ecosystem = ecosystem {
158
169
  result["ecosystem"] = ecosystem
159
170
  }
171
+ result["ecosystemErrors"] = try serializeAny(ecosystemErrors)
160
172
  return result as NSDictionary;
161
173
 
162
- case let .authorizationCodeFlow(interactionId, authorizationCodeFlowUrl, `protocol`, ecosystem):
174
+ case let .authorizationCodeFlow(interactionId, authorizationCodeFlowUrl, `protocol`, ecosystem, ecosystemErrors):
163
175
  var result: [String: Any] = [
164
176
  "type_": "AUTHORIZATION_CODE_FLOW",
165
177
  "interactionId": interactionId,
@@ -169,6 +181,7 @@ private func serialize(invitationResponse: HandleInvitationResponse) throws -> N
169
181
  if let ecosystem = ecosystem {
170
182
  result["ecosystem"] = ecosystem
171
183
  }
184
+ result["ecosystemErrors"] = try serializeAny(ecosystemErrors)
172
185
  return result as NSDictionary;
173
186
  }
174
187
  }
package/ios/Util.swift CHANGED
@@ -38,8 +38,15 @@ func asyncCall<Result>(
38
38
  private func handleError(error: Error, _ reject: @escaping RCTPromiseRejectBlock) {
39
39
  if case OneCoreError.Response(data: let errorResponse) = error {
40
40
  var userInfo: [String: Any] = [NSUnderlyingErrorKey: error]
41
- if let cause = errorResponse.cause?.message {
42
- userInfo["cause"] = cause
41
+ do {
42
+ if let cause = errorResponse.cause {
43
+ userInfo["cause"] = try serializeAny(cause)
44
+ }
45
+ if let data = errorResponse.data {
46
+ userInfo["data"] = try serializeAny(data)
47
+ }
48
+ } catch {
49
+ print("error: while parsing OneCoreError: \(error).")
43
50
  }
44
51
 
45
52
  reject(
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.133039.0",
4
4
  "author": "Procivis AG (https://procivis.ch)",
5
5
  "license": "Apache-2.0",
6
6
  "description": "ONE core bindings for React Native",