@procivis/react-native-one-core 1.101239.0 → 1.107844.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -122,7 +122,6 @@ and regulations mature and harden.
122
122
 
123
123
  - OpenID4VCI (Issuance)
124
124
  - [v1.0][vci1]
125
- - [ID-1][vci]
126
125
  - OpenID4VP (Verification)
127
126
  - [v1.0][vp1.0]
128
127
  - [Draft 25][vp25]
@@ -199,7 +198,6 @@ Version 2.0](./LICENSE).
199
198
  [tsl]: https://datatracker.ietf.org/doc/html/draft-ietf-oauth-status-list-03
200
199
  [vcdi]: https://www.w3.org/TR/vc-data-integrity/
201
200
  [vcdm]: https://www.w3.org/TR/vc-data-model-2.0/
202
- [vci]: https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0-ID1.html
203
201
  [vci1]: https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html
204
202
  [vp1.0]: https://openid.net/specs/openid-4-verifiable-presentations-1_0-final.html
205
203
  [vp20]: https://openid.net/specs/openid-4-verifiable-presentations-1_0-20.html
@@ -130,6 +130,14 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
130
130
  }
131
131
  }
132
132
 
133
+ @ReactMethod
134
+ fun getOrganisation(organisationId: String, promise: Promise) {
135
+ asyncCall(promise, scope) {
136
+ val organisation = getCore().getOrganisation(organisationId)
137
+ return@asyncCall convertToRN(organisation)
138
+ }
139
+ }
140
+
133
141
  @ReactMethod
134
142
  fun generateKey(keyRequest: ReadableMap, promise: Promise) {
135
143
  asyncCall(promise, scope) {
@@ -200,7 +208,8 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
200
208
  promise: Promise
201
209
  ) {
202
210
  asyncCall(promise, scope) {
203
- return@asyncCall getCore().holderAcceptCredential(construct(request))
211
+ val result = getCore().holderAcceptCredential(construct(request))
212
+ return@asyncCall convertToRN(result)
204
213
  }
205
214
  }
206
215
 
@@ -212,6 +221,14 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
212
221
  }
213
222
  }
214
223
 
224
+ @ReactMethod
225
+ fun holderRefreshCredential(interactionId: String, promise: Promise) {
226
+ asyncCall(promise, scope) {
227
+ val result = getCore().holderRefreshCredential(interactionId)
228
+ return@asyncCall convertToRN(result)
229
+ }
230
+ }
231
+
215
232
  @ReactMethod
216
233
  fun initiateIssuance(request: ReadableMap, promise: Promise) {
217
234
  asyncCall(promise, scope) {
@@ -374,6 +391,13 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
374
391
  }
375
392
  }
376
393
 
394
+ @ReactMethod
395
+ fun createCredentialSchema(request: ReadableMap, promise: Promise) {
396
+ asyncCall(promise, scope) {
397
+ return@asyncCall getCore().createCredentialSchema(construct(request))
398
+ }
399
+ }
400
+
377
401
  @ReactMethod
378
402
  fun listCredentialSchemas(query: ReadableMap, promise: Promise) {
379
403
  asyncCall(promise, scope) {
@@ -512,99 +536,6 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
512
536
  }
513
537
  }
514
538
 
515
- @ReactMethod
516
- fun createTrustAnchor(request: ReadableMap, promise: Promise) {
517
- asyncCall(promise, scope) {
518
- return@asyncCall getCore().createTrustAnchor(construct(request))
519
- }
520
- }
521
-
522
- @ReactMethod
523
- fun deleteTrustAnchor(trustAnchorId: String, promise: Promise) {
524
- asyncCall(promise, scope) {
525
- return@asyncCall getCore().deleteTrustAnchor(trustAnchorId)
526
- }
527
- }
528
-
529
- @ReactMethod
530
- fun getTrustAnchor(trustAnchorId: String, promise: Promise) {
531
- asyncCall(promise, scope) {
532
- val trustAnchor = getCore().getTrustAnchor(trustAnchorId)
533
- return@asyncCall convertToRN(trustAnchor)
534
- }
535
- }
536
-
537
- @ReactMethod
538
- fun listTrustAnchors(query: ReadableMap, promise: Promise) {
539
- asyncCall(promise, scope) {
540
- val trustAnchors = getCore().listTrustAnchors(construct(query))
541
- return@asyncCall convertToRN(trustAnchors)
542
- }
543
- }
544
-
545
- @ReactMethod
546
- fun createTrustEntity(request: ReadableMap, promise: Promise) {
547
- asyncCall(promise, scope) {
548
- return@asyncCall getCore().createTrustEntity(construct(request))
549
- }
550
- }
551
-
552
- @ReactMethod
553
- fun getTrustEntity(trustEntityId: String, promise: Promise) {
554
- asyncCall(promise, scope) {
555
- val trustEntity = getCore().getTrustEntity(trustEntityId)
556
- return@asyncCall convertToRN(trustEntity)
557
- }
558
- }
559
-
560
- @ReactMethod
561
- fun listTrustEntities(query: ReadableMap, promise: Promise) {
562
- asyncCall(promise, scope) {
563
- val trustEntity = getCore().listTrustEntities(construct(query))
564
- return@asyncCall convertToRN(trustEntity)
565
- }
566
- }
567
-
568
-
569
- @ReactMethod
570
- fun getTrustEntityByDid(didId: String, promise: Promise) {
571
- asyncCall(promise, scope) {
572
- val trustEntity = getCore().getTrustEntityByDid(didId)
573
- return@asyncCall convertToRN(trustEntity)
574
- }
575
- }
576
-
577
- @ReactMethod
578
- fun resolveTrustEntityByIdentifier(request: ReadableMap, promise: Promise) {
579
- asyncCall(promise, scope) {
580
- val trustEntities = getCore().resolveTrustEntityByIdentifier(construct(request))
581
- return@asyncCall convertToRN(trustEntities)
582
- }
583
- }
584
-
585
- @ReactMethod
586
- fun createRemoteTrustEntity(request: ReadableMap, promise: Promise) {
587
- asyncCall(promise, scope) {
588
- return@asyncCall getCore().createRemoteTrustEntity(construct(request))
589
- }
590
- }
591
-
592
- @ReactMethod
593
- fun updateRemoteTrustEntity(request: ReadableMap, promise: Promise) {
594
- asyncCall(promise, scope) {
595
- getCore().updateRemoteTrustEntity(construct(request))
596
- return@asyncCall null
597
- }
598
- }
599
-
600
- @ReactMethod
601
- fun getRemoteTrustEntity(didId: String, promise: Promise) {
602
- asyncCall(promise, scope) {
603
- val trustEntity = getCore().getRemoteTrustEntity(didId)
604
- return@asyncCall convertToRN(trustEntity)
605
- }
606
- }
607
-
608
539
  @ReactMethod
609
540
  fun createBackup(password: String, outputPath: String, promise: Promise) {
610
541
  asyncCall(promise, scope) {
@@ -81,6 +81,14 @@ object SerializeSpecific {
81
81
  convertToRN(metadata.value) as ReadableMap
82
82
  )
83
83
  }
84
+
85
+ is HistoryMetadata.TrustResolution -> {
86
+ result.putString("type_", "TRUST_RESOLUTION")
87
+ result.putMap(
88
+ "value",
89
+ convertToRN(metadata.value) as ReadableMap
90
+ )
91
+ }
84
92
  }
85
93
  return result
86
94
  }
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/101239/android/onecore-debug.aar",
5
- "sha1": "203ac2e7d295a42a640e49231866af296044c7f6"
4
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/107844/android/onecore-debug.aar",
5
+ "sha1": "266d4a4b4f16e414185907578e83ebd3f8fdd429"
6
6
  },
7
7
  "release": {
8
- "url": "https://onesdk.blob.core.windows.net/core-sdk/101239/android/onecore-release.aar",
9
- "sha1": "ca6fa85ef86b49cd02897ca7ce44f7324c8d81fd"
8
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/107844/android/onecore-release.aar",
9
+ "sha1": "08fc02676a2aaad715e45f80750c847f49e7faad"
10
10
  }
11
11
  },
12
12
  "ios": {
13
- "url": "https://onesdk.blob.core.windows.net/core-sdk/101239/ios/deploy.zip",
14
- "sha1": "1190a61b7d55a6995e960e1e7618c0316c66bf38"
13
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/107844/ios/deploy.zip",
14
+ "sha1": "a3f6525899a9e7e4bb5081621aee5562de57f2e9"
15
15
  }
16
16
  }
package/dist/index.js CHANGED
@@ -13,7 +13,11 @@ 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, (entities) => objectMap(entities, (json) => JSON.parse(json))));
16
+ ONE.getConfig = () => originalGetConfig().then((config) => objectMap(config, (entityValue) => {
17
+ return typeof entityValue === "string"
18
+ ? entityValue
19
+ : objectMap(entityValue, (json) => JSON.parse(json));
20
+ }));
17
21
  }
18
22
  /**
19
23
  * Initialize ONE Core
@@ -1,4 +1,4 @@
1
- import { TrustEntityType, IdentifierType } from "./one-core-uniffi-intf";
1
+ import { IdentifierType } from "./one-core-uniffi-intf";
2
2
  export declare enum KeyAlgorithmFeature {
3
3
  GENERATE_CSR = "GENERATE_CSR"
4
4
  }
@@ -140,14 +140,6 @@ export interface VerificationProtocolCapabilities {
140
140
  verifierIdentifierTypes: IdentifierType[];
141
141
  supportedPresentationDefinition: PresentationDefinitionVersion[];
142
142
  }
143
- export declare enum TrustOperation {
144
- Publish = "PUBLISH",
145
- Lookup = "LOOKUP"
146
- }
147
- export interface TrustCapabilities {
148
- operations: TrustOperation[];
149
- supportedTypes: TrustEntityType[];
150
- }
151
143
  export interface CoreConfig {
152
144
  format: ConfigEntities<FormatCapabilities>;
153
145
  issuanceProtocol: ConfigEntities<IssuanceProtocolCapabilities>;
@@ -159,10 +151,11 @@ export interface CoreConfig {
159
151
  datatype: ConfigEntities<undefined, DataTypeParams>;
160
152
  keyAlgorithm: ConfigEntities<KeyAlgorithmCapabilities, {}>;
161
153
  keyStorage: ConfigEntities<KeyStorageCapabilities>;
162
- trustManagement: ConfigEntities<TrustCapabilities>;
163
154
  cacheEntities: ConfigEntities;
164
155
  task: ConfigEntities;
165
156
  credentialIssuer: ConfigEntities<undefined, {}>;
166
157
  walletProvider: ConfigEntities;
158
+ verifierProvider: ConfigEntities<undefined, {}>;
159
+ defaultLanguage: string;
167
160
  }
168
161
  export {};
@@ -58,11 +58,6 @@ export var PresentationDefinitionVersion;
58
58
  PresentationDefinitionVersion["V1"] = "V1";
59
59
  PresentationDefinitionVersion["V2"] = "V2";
60
60
  })(PresentationDefinitionVersion || (PresentationDefinitionVersion = {}));
61
- export var TrustOperation;
62
- (function (TrustOperation) {
63
- TrustOperation["Publish"] = "PUBLISH";
64
- TrustOperation["Lookup"] = "LOOKUP";
65
- })(TrustOperation || (TrustOperation = {}));
66
61
  // Typescript automatic assertions to keep the fields of ONECore Config and typed Config in sync
67
62
  /** assert that all fields listed in {@link CoreConfig} exist in {@link Config} */
68
63
  const missingFieldsCheck = null;
@@ -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", "generateKey", "createDid", "listDids", "createIdentifier", "getIdentifier", "listIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinition", "getPresentationDefinitionV2", "holderRejectProof", "holderSubmitProof", "holderSubmitProofV2", "listCredentials", "runTask", "deleteProofClaims", "getCredential", "getCredentialTrustInformation", "deleteCredential", "importCredentialSchema", "getCredentialSchema", "listCredentialSchemas", "deleteCredentialSchema", "createProof", "shareProof", "shareProofSchema", "shareCredentialSchema", "getProof", "getProofTrustInformation", "listProofs", "deleteProof", "proposeProof", "createProofSchema", "listProofSchemas", "getProofSchema", "deleteProofSchema", "importProofSchema", "checkRevocation", "createTrustAnchor", "deleteTrustAnchor", "getTrustAnchor", "listTrustAnchors", "createTrustEntity", "getTrustEntity", "listTrustEntities", "getTrustEntityByDid", "resolveTrustEntityByIdentifier", "createRemoteTrustEntity", "getRemoteTrustEntity", "updateRemoteTrustEntity", "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", "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"];
package/dist/src/core.js CHANGED
@@ -9,6 +9,7 @@ export const interfaceMethodNames = [
9
9
  "getConfig",
10
10
  "createOrganisation",
11
11
  "upsertOrganisation",
12
+ "getOrganisation",
12
13
  "generateKey",
13
14
  "createDid",
14
15
  "listDids",
@@ -19,6 +20,7 @@ export const interfaceMethodNames = [
19
20
  "handleInvitation",
20
21
  "holderAcceptCredential",
21
22
  "holderRejectCredential",
23
+ "holderRefreshCredential",
22
24
  "initiateIssuance",
23
25
  "continueIssuance",
24
26
  "getPresentationDefinition",
@@ -34,6 +36,7 @@ export const interfaceMethodNames = [
34
36
  "deleteCredential",
35
37
  "importCredentialSchema",
36
38
  "getCredentialSchema",
39
+ "createCredentialSchema",
37
40
  "listCredentialSchemas",
38
41
  "deleteCredentialSchema",
39
42
  "createProof",
@@ -51,18 +54,6 @@ export const interfaceMethodNames = [
51
54
  "deleteProofSchema",
52
55
  "importProofSchema",
53
56
  "checkRevocation",
54
- "createTrustAnchor",
55
- "deleteTrustAnchor",
56
- "getTrustAnchor",
57
- "listTrustAnchors",
58
- "createTrustEntity",
59
- "getTrustEntity",
60
- "listTrustEntities",
61
- "getTrustEntityByDid",
62
- "resolveTrustEntityByIdentifier",
63
- "createRemoteTrustEntity",
64
- "getRemoteTrustEntity",
65
- "updateRemoteTrustEntity",
66
57
  "listHistory",
67
58
  "getHistoryEntry",
68
59
  "createBackup",