@procivis/react-native-one-core 1.109666.1 → 1.114714.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/android/src/main/java/ch/procivis/one/core/Deserialize.kt +20 -4
- package/android/src/main/java/ch/procivis/one/core/ProcivisOneCoreModule.kt +24 -40
- package/core-sdk.json +6 -6
- package/dist/index.js +8 -5
- package/dist/src/config.d.ts +3 -3
- package/dist/src/config.js +1 -1
- package/dist/src/core.d.ts +1 -1
- package/dist/src/core.js +3 -2
- package/dist/src/one-core-uniffi-intf.d.ts +165 -62
- package/dist/src/one-core-uniffi-intf.js +10 -6
- package/ios/ProcivisOneCoreModule.m +13 -9
- package/ios/ProcivisOneCoreModule.swift +37 -28
- package/package.json +1 -1
|
@@ -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
|
-
|
|
25
|
-
|
|
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
|
-
|
|
84
|
-
|
|
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
|
|
@@ -244,14 +244,6 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
@ReactMethod
|
|
248
|
-
fun getPresentationDefinition(proofId: String, promise: Promise) {
|
|
249
|
-
asyncCall(promise, scope) {
|
|
250
|
-
val presentationDefinition = getCore().getPresentationDefinition(proofId)
|
|
251
|
-
return@asyncCall convertToRN(presentationDefinition)
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
247
|
@ReactMethod
|
|
256
248
|
fun getPresentationDefinitionV2(proofId: String, promise: Promise) {
|
|
257
249
|
asyncCall(promise, scope) {
|
|
@@ -268,38 +260,6 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
268
260
|
}
|
|
269
261
|
}
|
|
270
262
|
|
|
271
|
-
@ReactMethod
|
|
272
|
-
fun holderSubmitProof(
|
|
273
|
-
interactionId: String,
|
|
274
|
-
credentials: ReadableMap,
|
|
275
|
-
promise: Promise
|
|
276
|
-
) {
|
|
277
|
-
asyncCall(promise, scope) {
|
|
278
|
-
val submitCredentials =
|
|
279
|
-
mutableMapOf<String, List<PresentationSubmitCredentialRequest>>()
|
|
280
|
-
for (entry in credentials.entryIterator) {
|
|
281
|
-
val credentialList = when (val credentialValue = entry.value) {
|
|
282
|
-
is ReadableMap -> {
|
|
283
|
-
// Single credential object - convert to list
|
|
284
|
-
listOf(construct<PresentationSubmitCredentialRequest>(credentialValue))
|
|
285
|
-
}
|
|
286
|
-
is ReadableArray -> {
|
|
287
|
-
// Array of credentials - convert each one
|
|
288
|
-
(0 until credentialValue.size()).map { index ->
|
|
289
|
-
construct<PresentationSubmitCredentialRequest>(credentialValue.getMap(index)!!)
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
else -> {
|
|
293
|
-
throw IllegalArgumentException("Credential value must be either a Map or Array")
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
submitCredentials[entry.key] = credentialList
|
|
297
|
-
}
|
|
298
|
-
getCore().holderSubmitProof(interactionId, submitCredentials)
|
|
299
|
-
return@asyncCall null
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
263
|
@ReactMethod
|
|
304
264
|
fun holderSubmitProofV2(
|
|
305
265
|
interactionId: String,
|
|
@@ -468,6 +428,22 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
468
428
|
}
|
|
469
429
|
}
|
|
470
430
|
|
|
431
|
+
@ReactMethod
|
|
432
|
+
fun qesAuthorize(request: ReadableMap, promise: Promise) {
|
|
433
|
+
asyncCall(promise, scope) {
|
|
434
|
+
val result = getCore().qesAuthorize(construct(request))
|
|
435
|
+
return@asyncCall convertToRN(result)
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
@ReactMethod
|
|
440
|
+
fun qesSign(request: ReadableMap, promise: Promise) {
|
|
441
|
+
asyncCall(promise, scope) {
|
|
442
|
+
val result = getCore().qesSign(construct(request))
|
|
443
|
+
return@asyncCall convertToRN(result)
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
471
447
|
@ReactMethod
|
|
472
448
|
fun createProofSchema(request: ReadableMap, promise: Promise) {
|
|
473
449
|
asyncCall(promise, scope) {
|
|
@@ -603,6 +579,14 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
603
579
|
}
|
|
604
580
|
}
|
|
605
581
|
|
|
582
|
+
@ReactMethod
|
|
583
|
+
fun holderActivateWalletUnit(id: String, request: ReadableMap, promise: Promise) {
|
|
584
|
+
asyncCall(promise, scope) {
|
|
585
|
+
getCore().holderActivateWalletUnit(id, construct(request))
|
|
586
|
+
return@asyncCall null
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
606
590
|
@ReactMethod
|
|
607
591
|
fun holderWalletUnitStatus(walletUnitId: String, promise: Promise) {
|
|
608
592
|
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/
|
|
5
|
-
"sha1": "
|
|
4
|
+
"url": "https://onesdk.blob.core.windows.net/core-sdk/114714/android/onecore-debug.aar",
|
|
5
|
+
"sha1": "05eda2790fdbbb206e7de0db8619cde513d8a075"
|
|
6
6
|
},
|
|
7
7
|
"release": {
|
|
8
|
-
"url": "https://onesdk.blob.core.windows.net/core-sdk/
|
|
9
|
-
"sha1": "
|
|
8
|
+
"url": "https://onesdk.blob.core.windows.net/core-sdk/114714/android/onecore-release.aar",
|
|
9
|
+
"sha1": "3e91e6fc7cbf80469be7fcc1bcf8eaeb878c3f89"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"ios": {
|
|
13
|
-
"url": "https://onesdk.blob.core.windows.net/core-sdk/
|
|
14
|
-
"sha1": "
|
|
13
|
+
"url": "https://onesdk.blob.core.windows.net/core-sdk/114714/ios/deploy.zip",
|
|
14
|
+
"sha1": "898f981aa7fd51088bc707eedcab991e44f99251"
|
|
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) =>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
package/dist/src/config.d.ts
CHANGED
|
@@ -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
|
}
|
|
@@ -33,7 +33,7 @@ export declare enum FormatFeature {
|
|
|
33
33
|
}
|
|
34
34
|
export declare enum FormatSelectiveDisclosure {
|
|
35
35
|
AnyLevel = "ANY_LEVEL",
|
|
36
|
-
|
|
36
|
+
FirstLevel = "FIRST_LEVEL"
|
|
37
37
|
}
|
|
38
38
|
export interface FormatCapabilities {
|
|
39
39
|
features: FormatFeature[];
|
|
@@ -156,6 +156,6 @@ export interface CoreConfig {
|
|
|
156
156
|
credentialIssuer: ConfigEntities<undefined, {}>;
|
|
157
157
|
walletProvider: ConfigEntities;
|
|
158
158
|
verifierProvider: ConfigEntities<undefined, {}>;
|
|
159
|
-
|
|
159
|
+
globalSettings: GlobalSettings;
|
|
160
160
|
}
|
|
161
161
|
export {};
|
package/dist/src/config.js
CHANGED
|
@@ -26,7 +26,7 @@ export var FormatFeature;
|
|
|
26
26
|
export var FormatSelectiveDisclosure;
|
|
27
27
|
(function (FormatSelectiveDisclosure) {
|
|
28
28
|
FormatSelectiveDisclosure["AnyLevel"] = "ANY_LEVEL";
|
|
29
|
-
FormatSelectiveDisclosure["
|
|
29
|
+
FormatSelectiveDisclosure["FirstLevel"] = "FIRST_LEVEL";
|
|
30
30
|
})(FormatSelectiveDisclosure || (FormatSelectiveDisclosure = {}));
|
|
31
31
|
export var RevocationOperation;
|
|
32
32
|
(function (RevocationOperation) {
|
package/dist/src/core.d.ts
CHANGED
|
@@ -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", "
|
|
13
|
+
export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "upsertOrganisation", "getOrganisation", "generateKey", "createDid", "listDids", "createIdentifier", "getIdentifier", "listIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "holderRefreshCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinitionV2", "holderRejectProof", "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
|
@@ -23,10 +23,8 @@ export const interfaceMethodNames = [
|
|
|
23
23
|
"holderRefreshCredential",
|
|
24
24
|
"initiateIssuance",
|
|
25
25
|
"continueIssuance",
|
|
26
|
-
"getPresentationDefinition",
|
|
27
26
|
"getPresentationDefinitionV2",
|
|
28
27
|
"holderRejectProof",
|
|
29
|
-
"holderSubmitProof",
|
|
30
28
|
"holderSubmitProofV2",
|
|
31
29
|
"listCredentials",
|
|
32
30
|
"runTask",
|
|
@@ -48,6 +46,8 @@ export const interfaceMethodNames = [
|
|
|
48
46
|
"listProofs",
|
|
49
47
|
"deleteProof",
|
|
50
48
|
"proposeProof",
|
|
49
|
+
"qesAuthorize",
|
|
50
|
+
"qesSign",
|
|
51
51
|
"createProofSchema",
|
|
52
52
|
"listProofSchemas",
|
|
53
53
|
"getProofSchema",
|
|
@@ -64,6 +64,7 @@ export const interfaceMethodNames = [
|
|
|
64
64
|
"rollbackImport",
|
|
65
65
|
"resolveJsonldContext",
|
|
66
66
|
"holderRegisterWalletUnit",
|
|
67
|
+
"holderActivateWalletUnit",
|
|
67
68
|
"holderWalletUnitStatus",
|
|
68
69
|
"holderGetWalletUnit",
|
|
69
70
|
"holderWalletUnitUpdate",
|
|
@@ -103,7 +103,8 @@ export interface Config {
|
|
|
103
103
|
*/
|
|
104
104
|
walletProvider: Record<string, string>;
|
|
105
105
|
verifierProvider: Record<string, string>;
|
|
106
|
-
|
|
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;
|
|
@@ -560,7 +562,6 @@ export interface CredentialSchemaListQuery {
|
|
|
560
562
|
ids?: Array<string>;
|
|
561
563
|
exact?: Array<CredentialSchemaListQueryExactColumn>;
|
|
562
564
|
include?: Array<CredentialSchemaListIncludeEntityType>;
|
|
563
|
-
schemaId?: string;
|
|
564
565
|
schemaIds?: Array<string>;
|
|
565
566
|
formats?: Array<string>;
|
|
566
567
|
usesBatchIssuance?: boolean;
|
|
@@ -658,6 +659,32 @@ export interface DidRequestKeys {
|
|
|
658
659
|
capabilityInvocation: Array<string>;
|
|
659
660
|
capabilityDelegation: Array<string>;
|
|
660
661
|
}
|
|
662
|
+
export interface DisclosurePolicy {
|
|
663
|
+
id: string;
|
|
664
|
+
policy: string;
|
|
665
|
+
description?: string;
|
|
666
|
+
url?: string;
|
|
667
|
+
options?: DisclosurePolicyOptions;
|
|
668
|
+
}
|
|
669
|
+
export interface DisclosurePolicyCreateRequest {
|
|
670
|
+
policy: string;
|
|
671
|
+
description?: string;
|
|
672
|
+
url?: string;
|
|
673
|
+
options?: DisclosurePolicyOptions;
|
|
674
|
+
}
|
|
675
|
+
export interface DisclosurePolicyOption {
|
|
676
|
+
dn?: string;
|
|
677
|
+
entitlement?: string;
|
|
678
|
+
serial?: string;
|
|
679
|
+
}
|
|
680
|
+
export interface DisclosurePolicyOptions {
|
|
681
|
+
values: Array<DisclosurePolicyOption>;
|
|
682
|
+
}
|
|
683
|
+
export interface DisclosurePolicyViolation {
|
|
684
|
+
id: string;
|
|
685
|
+
description?: string;
|
|
686
|
+
url?: string;
|
|
687
|
+
}
|
|
661
688
|
export interface DisplayName {
|
|
662
689
|
lang: string;
|
|
663
690
|
value: string;
|
|
@@ -715,6 +742,9 @@ export interface GeneratedKey {
|
|
|
715
742
|
keyReference: number[];
|
|
716
743
|
publicKey: number[];
|
|
717
744
|
}
|
|
745
|
+
export interface GlobalSettings {
|
|
746
|
+
defaultLanguage: string;
|
|
747
|
+
}
|
|
718
748
|
export interface HandleInvitationRequest {
|
|
719
749
|
/**
|
|
720
750
|
* Typically encoded as a QR code or deep link by the issuer or
|
|
@@ -750,12 +780,29 @@ export interface HistoryListItem {
|
|
|
750
780
|
id: string;
|
|
751
781
|
createdDate: string;
|
|
752
782
|
action: HistoryAction;
|
|
783
|
+
/**
|
|
784
|
+
* For credential events, this is the credential schema name. For
|
|
785
|
+
* presentation events, this is the proof schema name. For all other
|
|
786
|
+
* entity types, it is the entity name.
|
|
787
|
+
*/
|
|
753
788
|
name: string;
|
|
754
789
|
entityId?: string;
|
|
755
790
|
entityType: HistoryEntityType;
|
|
791
|
+
/**
|
|
792
|
+
* Structured metadata attached to the event. The variant depends on
|
|
793
|
+
* the type.
|
|
794
|
+
*/
|
|
756
795
|
metadata?: HistoryMetadata;
|
|
757
796
|
organisationId?: string;
|
|
797
|
+
/**
|
|
798
|
+
* Identifier UUID of the external participant in the interaction, if
|
|
799
|
+
* applicable. For credential events, this is the counterpart's identifier
|
|
800
|
+
* (holder when the system is issuer, issuer when the system is holder).
|
|
801
|
+
* For presentation events, this is the holder's identifier when the system
|
|
802
|
+
* is verifier, or the verifier's identifier when the system is holder.
|
|
803
|
+
*/
|
|
758
804
|
target?: string;
|
|
805
|
+
/** Identifier of the user who triggered the event. */
|
|
759
806
|
user?: string;
|
|
760
807
|
}
|
|
761
808
|
export interface HistoryListQuery {
|
|
@@ -773,7 +820,7 @@ export interface HistoryListQuery {
|
|
|
773
820
|
entityIds?: Array<string>;
|
|
774
821
|
/** Return only events associated with the provided entity types. */
|
|
775
822
|
entityTypes?: Array<HistoryEntityType>;
|
|
776
|
-
/** Return only the
|
|
823
|
+
/** Return only events of the specified action types. */
|
|
777
824
|
actions?: Array<HistoryAction>;
|
|
778
825
|
/**
|
|
779
826
|
* Return only entries created after this time. Timestamp in
|
|
@@ -795,13 +842,23 @@ export interface HistoryListQuery {
|
|
|
795
842
|
proofId?: string;
|
|
796
843
|
/** Return only events associated with the provided proof schema ID. */
|
|
797
844
|
proofSchemaId?: string;
|
|
798
|
-
/**
|
|
845
|
+
/** Return only events associated with the provided trust collection D. */
|
|
846
|
+
trustCollectionId?: string;
|
|
847
|
+
/**
|
|
848
|
+
* Search history events by string. Set `text` to specify the search
|
|
849
|
+
* string and optionally `type` to restrict which field is searched.
|
|
850
|
+
* When `type` is omitted, all searchable fields are checked.
|
|
851
|
+
*/
|
|
799
852
|
search?: HistorySearch;
|
|
800
|
-
/** Return only events
|
|
853
|
+
/** Return only events triggered by the specified users. */
|
|
801
854
|
users?: Array<string>;
|
|
802
855
|
}
|
|
803
856
|
export interface HistorySearch {
|
|
804
857
|
text: string;
|
|
858
|
+
/**
|
|
859
|
+
* When omitted, all searchable fields are checked. Set to restrict
|
|
860
|
+
* the search to a specific field.
|
|
861
|
+
*/
|
|
805
862
|
type?: HistorySearchType;
|
|
806
863
|
}
|
|
807
864
|
export interface HolderAcceptCredentialRequest {
|
|
@@ -819,6 +876,12 @@ export interface HolderAcceptCredentialRequest {
|
|
|
819
876
|
/** User-provided transaction code. */
|
|
820
877
|
txCode?: string;
|
|
821
878
|
}
|
|
879
|
+
export interface HolderActivateWalletUnitRequest {
|
|
880
|
+
/** Key type for the authentication key generated during activation. */
|
|
881
|
+
keyType: string;
|
|
882
|
+
/** Identity token obtained from the identity provider after user authentication. */
|
|
883
|
+
userIdToken?: string;
|
|
884
|
+
}
|
|
822
885
|
export interface HolderRefreshCredentialResponse {
|
|
823
886
|
credentialIds: Array<string>;
|
|
824
887
|
}
|
|
@@ -842,6 +905,7 @@ export interface HolderRegisterWalletUnitRequest {
|
|
|
842
905
|
export interface HolderRegisterWalletUnitResponse {
|
|
843
906
|
id: string;
|
|
844
907
|
status: WalletUnitStatus;
|
|
908
|
+
userNonce?: string;
|
|
845
909
|
}
|
|
846
910
|
export interface HolderWalletInstanceDetail {
|
|
847
911
|
id: string;
|
|
@@ -861,6 +925,7 @@ export interface HolderWalletUnit {
|
|
|
861
925
|
status: WalletUnitStatus;
|
|
862
926
|
authenticationKey?: KeyListItem;
|
|
863
927
|
trustedRpRequired: boolean;
|
|
928
|
+
userNonce?: string;
|
|
864
929
|
}
|
|
865
930
|
export interface HolderWalletUnitUpdateRequest {
|
|
866
931
|
/**
|
|
@@ -948,6 +1013,7 @@ export interface ImportCredentialSchemaClaimSchema {
|
|
|
948
1013
|
array?: boolean;
|
|
949
1014
|
claims?: Array<ImportCredentialSchemaClaimSchema>;
|
|
950
1015
|
mappings?: Array<CredentialClaimSchemaMapping>;
|
|
1016
|
+
translations?: CredentialClaimSchemaTranslations;
|
|
951
1017
|
}
|
|
952
1018
|
export interface ImportCredentialSchemaFormat {
|
|
953
1019
|
format: string;
|
|
@@ -983,6 +1049,7 @@ export interface ImportCredentialSchemaRequestSchema {
|
|
|
983
1049
|
allowRevocation?: boolean;
|
|
984
1050
|
batchSize?: number;
|
|
985
1051
|
translations?: CredentialSchemaTranslations;
|
|
1052
|
+
embeddedDisclosurePolicy?: DisclosurePolicy;
|
|
986
1053
|
}
|
|
987
1054
|
export interface ImportCredentialSchemaTransactionCode {
|
|
988
1055
|
type: TransactionCodeType;
|
|
@@ -1153,39 +1220,6 @@ export interface PeripheralDiscoveryData {
|
|
|
1153
1220
|
advertisedServices: Array<string>;
|
|
1154
1221
|
advertisedServiceData?: Record<string, number[]>;
|
|
1155
1222
|
}
|
|
1156
|
-
export interface PresentationDefinition {
|
|
1157
|
-
requestGroups: Array<PresentationDefinitionRequestGroup>;
|
|
1158
|
-
credentials: Array<CredentialDetail>;
|
|
1159
|
-
}
|
|
1160
|
-
export interface PresentationDefinitionField {
|
|
1161
|
-
id: string;
|
|
1162
|
-
name?: string;
|
|
1163
|
-
purpose?: string;
|
|
1164
|
-
required: boolean;
|
|
1165
|
-
keyMap: Record<string, string>;
|
|
1166
|
-
}
|
|
1167
|
-
export interface PresentationDefinitionRequestGroup {
|
|
1168
|
-
id: string;
|
|
1169
|
-
name?: string;
|
|
1170
|
-
purpose?: string;
|
|
1171
|
-
rule: PresentationDefinitionRule;
|
|
1172
|
-
requestedCredentials: Array<PresentationDefinitionRequestedCredential>;
|
|
1173
|
-
}
|
|
1174
|
-
export interface PresentationDefinitionRequestedCredential {
|
|
1175
|
-
id: string;
|
|
1176
|
-
name?: string;
|
|
1177
|
-
purpose?: string;
|
|
1178
|
-
fields: Array<PresentationDefinitionField>;
|
|
1179
|
-
applicableCredentials: Array<string>;
|
|
1180
|
-
inapplicableCredentials: Array<string>;
|
|
1181
|
-
multiple?: boolean;
|
|
1182
|
-
}
|
|
1183
|
-
export interface PresentationDefinitionRule {
|
|
1184
|
-
type: PresentationDefinitionRuleType;
|
|
1185
|
-
min?: number;
|
|
1186
|
-
max?: number;
|
|
1187
|
-
count?: number;
|
|
1188
|
-
}
|
|
1189
1223
|
export interface PresentationDefinitionV2 {
|
|
1190
1224
|
credentialQueries: Record<string, CredentialQuery>;
|
|
1191
1225
|
credentialSets: Array<CredentialSet>;
|
|
@@ -1215,11 +1249,14 @@ export interface PresentationDefinitionV2Credential {
|
|
|
1215
1249
|
mdocMsoValidity?: MdocMsoValidity;
|
|
1216
1250
|
protocol: string;
|
|
1217
1251
|
profile?: string;
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1252
|
+
/**
|
|
1253
|
+
* Present when the relying party's certificates do not satisfy
|
|
1254
|
+
* the embedded disclosure policy attached to the requested
|
|
1255
|
+
* credential. The wallet should surface this to the user as a
|
|
1256
|
+
* warning before they proceed with disclosure. See
|
|
1257
|
+
* [Handling Trust Information](https://docs.procivis.ch/wallet/handling-trust).
|
|
1258
|
+
*/
|
|
1259
|
+
embeddedDisclosurePolicyViolation?: DisclosurePolicyViolation;
|
|
1223
1260
|
}
|
|
1224
1261
|
export interface PresentationSubmitV2CredentialRequest {
|
|
1225
1262
|
/** ID of the credential to submit. */
|
|
@@ -1467,6 +1504,51 @@ export interface ProposeProofResponse {
|
|
|
1467
1504
|
interactionId: string;
|
|
1468
1505
|
url?: string;
|
|
1469
1506
|
}
|
|
1507
|
+
export interface QesAuthorizeRequest {
|
|
1508
|
+
/** Configured document signer name (for example, `SIGN8`). */
|
|
1509
|
+
provider: string;
|
|
1510
|
+
/** Base64-encoded document to be signed. */
|
|
1511
|
+
document: string;
|
|
1512
|
+
/**
|
|
1513
|
+
* Wallet deep link to which the provider redirects after authorization,
|
|
1514
|
+
* appending the authorization `code`. When omitted, the configured
|
|
1515
|
+
* default is used.
|
|
1516
|
+
*/
|
|
1517
|
+
redirectUri?: string;
|
|
1518
|
+
/** Organizational context. Optional when resolvable from STS auth. */
|
|
1519
|
+
organisationId?: string;
|
|
1520
|
+
}
|
|
1521
|
+
export interface QesAuthorizeResponse {
|
|
1522
|
+
/** Authorization URL the wallet opens to identify and authorize signing. */
|
|
1523
|
+
authorizationUrl: string;
|
|
1524
|
+
/** PKCE `code_verifier` to pass back to `qesSign`. */
|
|
1525
|
+
codeVerifier: string;
|
|
1526
|
+
}
|
|
1527
|
+
export interface QesSignRequest {
|
|
1528
|
+
/** Configured document signer name (for example, `SIGN8`). */
|
|
1529
|
+
provider: string;
|
|
1530
|
+
/** Authorization code from the document signer redirect. */
|
|
1531
|
+
code: string;
|
|
1532
|
+
/** `codeVerifier` returned from the `qesAuthorize` method. */
|
|
1533
|
+
codeVerifier: string;
|
|
1534
|
+
/**
|
|
1535
|
+
* Base64-encoded document to be signed. Must be identical to the
|
|
1536
|
+
* document provided to `qes_authorize`.
|
|
1537
|
+
*/
|
|
1538
|
+
document: string;
|
|
1539
|
+
/**
|
|
1540
|
+
* Wallet deep link. Must be identical to the one used at
|
|
1541
|
+
* `qesAuthorize`. When omitted, the configured default
|
|
1542
|
+
* is used.
|
|
1543
|
+
*/
|
|
1544
|
+
redirectUri?: string;
|
|
1545
|
+
/** Organizational context. Optional when resolvable from STS auth. */
|
|
1546
|
+
organisationId?: string;
|
|
1547
|
+
}
|
|
1548
|
+
export interface QesSignResponse {
|
|
1549
|
+
/** Base64-encoded signed document returned by the QES provider. */
|
|
1550
|
+
signedDocument: string;
|
|
1551
|
+
}
|
|
1470
1552
|
export interface RegisterVerifierInstanceRequest {
|
|
1471
1553
|
/** The verifier unit's organization. */
|
|
1472
1554
|
organisationId: string;
|
|
@@ -1674,15 +1756,23 @@ export type BleError = {
|
|
|
1674
1756
|
export declare enum CacheType {
|
|
1675
1757
|
DID_DOCUMENT = "DID_DOCUMENT",
|
|
1676
1758
|
JSON_LD_CONTEXT = "JSON_LD_CONTEXT",
|
|
1759
|
+
/** Credential status list fetched from an external source. */
|
|
1677
1760
|
STATUS_LIST_CREDENTIAL = "STATUS_LIST_CREDENTIAL",
|
|
1761
|
+
/** Metadata for SD-JWT VC type (VCT). */
|
|
1678
1762
|
VCT_METADATA = "VCT_METADATA",
|
|
1679
1763
|
JSON_SCHEMA = "JSON_SCHEMA",
|
|
1680
1764
|
TRUST_LIST = "TRUST_LIST",
|
|
1765
|
+
/** X.509 certificate revocation list. */
|
|
1681
1766
|
X509_CRL = "X509_CRL",
|
|
1767
|
+
/** Certificate revocation list used for Android key attestation. */
|
|
1682
1768
|
ANDROID_ATTESTATION_CRL = "ANDROID_ATTESTATION_CRL",
|
|
1769
|
+
/** OpenID provider metadata fetched from holder endpoints. */
|
|
1683
1770
|
OPEN_ID_METADATA_HOLDER = "OPEN_ID_METADATA_HOLDER",
|
|
1771
|
+
/** OpenID provider metadata fetched from issuer endpoints. */
|
|
1684
1772
|
OPEN_ID_METADATA_ISSUER = "OPEN_ID_METADATA_ISSUER",
|
|
1773
|
+
/** Metadata fetched from the registered wallet provider. */
|
|
1685
1774
|
WALLET_PROVIDER_METADATA = "WALLET_PROVIDER_METADATA",
|
|
1775
|
+
/** Trust collection data fetched from a remote source. */
|
|
1686
1776
|
REMOTE_TRUST_COLLECTION = "REMOTE_TRUST_COLLECTION"
|
|
1687
1777
|
}
|
|
1688
1778
|
export declare enum CertificateRole {
|
|
@@ -1879,7 +1969,8 @@ export declare enum HistoryAction {
|
|
|
1879
1969
|
WRP_RC_RECEIVED = "WRP_RC_RECEIVED",
|
|
1880
1970
|
WRP_NR_RECEIVED = "WRP_NR_RECEIVED",
|
|
1881
1971
|
TRUST_RESOLVED = "TRUST_RESOLVED",
|
|
1882
|
-
REFRESHED = "REFRESHED"
|
|
1972
|
+
REFRESHED = "REFRESHED",
|
|
1973
|
+
SIGNED = "SIGNED"
|
|
1883
1974
|
}
|
|
1884
1975
|
export declare enum HistoryEntityType {
|
|
1885
1976
|
KEY = "KEY",
|
|
@@ -1907,7 +1998,8 @@ export declare enum HistoryEntityType {
|
|
|
1907
1998
|
TRUST_LIST_PUBLICATION = "TRUST_LIST_PUBLICATION",
|
|
1908
1999
|
TRUST_COLLECTION = "TRUST_COLLECTION",
|
|
1909
2000
|
TRUST_LIST_SUBSCRIPTION = "TRUST_LIST_SUBSCRIPTION",
|
|
1910
|
-
VERIFIER_INSTANCE = "VERIFIER_INSTANCE"
|
|
2001
|
+
VERIFIER_INSTANCE = "VERIFIER_INSTANCE",
|
|
2002
|
+
QES_DOCUMENT = "QES_DOCUMENT"
|
|
1911
2003
|
}
|
|
1912
2004
|
export type HistoryMetadata = {
|
|
1913
2005
|
type_: "UNEXPORTABLE_ENTITIES";
|
|
@@ -2006,10 +2098,6 @@ export declare enum OpenId4vciTxCodeInputMode {
|
|
|
2006
2098
|
NUMERIC = "NUMERIC",
|
|
2007
2099
|
TEXT = "TEXT"
|
|
2008
2100
|
}
|
|
2009
|
-
export declare enum PresentationDefinitionRuleType {
|
|
2010
|
-
ALL = "ALL",
|
|
2011
|
-
PICK = "PICK"
|
|
2012
|
-
}
|
|
2013
2101
|
export type PresentationDefinitionV2ClaimValue = {
|
|
2014
2102
|
type_: "BOOLEAN";
|
|
2015
2103
|
value: boolean;
|
|
@@ -2065,7 +2153,6 @@ export declare enum SortableCredentialColumn {
|
|
|
2065
2153
|
}
|
|
2066
2154
|
export declare enum SortableCredentialSchemaColumn {
|
|
2067
2155
|
NAME = "NAME",
|
|
2068
|
-
FORMAT = "FORMAT",
|
|
2069
2156
|
CREATED_DATE = "CREATED_DATE"
|
|
2070
2157
|
}
|
|
2071
2158
|
export declare enum SortableDidColumn {
|
|
@@ -2254,9 +2341,9 @@ export interface OneCore {
|
|
|
2254
2341
|
*/
|
|
2255
2342
|
createProofSchema(request: CreateProofSchemaRequest): Promise<string>;
|
|
2256
2343
|
/**
|
|
2257
|
-
* Deletes the system cache. See
|
|
2344
|
+
* Deletes entries from the system cache. See
|
|
2258
2345
|
* [Caching](https://docs.procivis.ch/configure/caching#cached-entities)
|
|
2259
|
-
*
|
|
2346
|
+
* for details on cached entity types.
|
|
2260
2347
|
*/
|
|
2261
2348
|
deleteCache(types: Array<CacheType> | undefined): Promise<void>;
|
|
2262
2349
|
deleteCredential(credentialId: string): Promise<void>;
|
|
@@ -2291,12 +2378,14 @@ export interface OneCore {
|
|
|
2291
2378
|
getCredentialSchema(credentialSchemaId: string): Promise<CredentialSchemaDetail>;
|
|
2292
2379
|
/** Returns detailed trust information about a credential issuer. */
|
|
2293
2380
|
getCredentialTrustInformation(credentialId: string): Promise<TrustInformationDetail>;
|
|
2294
|
-
/**
|
|
2381
|
+
/**
|
|
2382
|
+
* Returns the full record for a single history event, including metadata
|
|
2383
|
+
* if present.
|
|
2384
|
+
*/
|
|
2295
2385
|
getHistoryEntry(historyId: string): Promise<HistoryListItem>;
|
|
2296
2386
|
getIdentifier(id: string): Promise<IdentifierDetail>;
|
|
2297
2387
|
/** Returns details of an existing organization. */
|
|
2298
2388
|
getOrganisation(id: string): Promise<OrganisationDetail>;
|
|
2299
|
-
getPresentationDefinition(proofId: string): Promise<PresentationDefinition>;
|
|
2300
2389
|
getPresentationDefinitionV2(proofId: string): Promise<PresentationDefinitionV2>;
|
|
2301
2390
|
/** Returns detailed information about a proof request. */
|
|
2302
2391
|
getProof(proofId: string): Promise<ProofDetail>;
|
|
@@ -2320,6 +2409,8 @@ export interface OneCore {
|
|
|
2320
2409
|
* you can specify an existing identifier.
|
|
2321
2410
|
*/
|
|
2322
2411
|
holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<string>;
|
|
2412
|
+
/** Activates the wallet instance with the Wallet Provider after user authentication. */
|
|
2413
|
+
holderActivateWalletUnit(id: string, request: HolderActivateWalletUnitRequest): Promise<void>;
|
|
2323
2414
|
/** Returns wallet registration details from the Wallet Provider. */
|
|
2324
2415
|
holderGetWalletUnit(id: string): Promise<HolderWalletUnit>;
|
|
2325
2416
|
/** Returns trust collections curated by the Wallet Provider. */
|
|
@@ -2332,11 +2423,6 @@ export interface OneCore {
|
|
|
2332
2423
|
holderRejectCredential(interactionId: string): Promise<void>;
|
|
2333
2424
|
/** Rejects a proof request. */
|
|
2334
2425
|
holderRejectProof(interactionId: string): Promise<void>;
|
|
2335
|
-
/**
|
|
2336
|
-
* Submits a presentation using Presentation Exchange as the query
|
|
2337
|
-
* language; this should be used after `getPresentationDefinition`.
|
|
2338
|
-
*/
|
|
2339
|
-
holderSubmitProof(interactionId: string, submitCredentials: Record<string, Array<PresentationSubmitCredentialRequest>>): Promise<void>;
|
|
2340
2426
|
/**
|
|
2341
2427
|
* Submits a presentation using DCQL as a query language; this should
|
|
2342
2428
|
* be used after `getPresentationDefinitionv2`.
|
|
@@ -2380,15 +2466,32 @@ export interface OneCore {
|
|
|
2380
2466
|
* options for `engagement`.
|
|
2381
2467
|
*/
|
|
2382
2468
|
proposeProof(request: ProposeProofRequest): Promise<ProposeProofResponse>;
|
|
2469
|
+
/**
|
|
2470
|
+
* Initiates the QES signing flow for a document with a configured
|
|
2471
|
+
* QES provider. Returns an `authorizationUrl` for the user to
|
|
2472
|
+
* authenticate with the provider, and a `codeVerifier` to be passed
|
|
2473
|
+
* to the `qesSign` method on return.
|
|
2474
|
+
*/
|
|
2475
|
+
qesAuthorize(request: QesAuthorizeRequest): Promise<QesAuthorizeResponse>;
|
|
2476
|
+
/**
|
|
2477
|
+
* Completes the QES signing flow. Exchanges the authorization
|
|
2478
|
+
* `code` received from the provider redirect and the `codeVerifier`
|
|
2479
|
+
* from `qesAuthorize` for a signed document.
|
|
2480
|
+
*/
|
|
2481
|
+
qesSign(request: QesSignRequest): Promise<QesSignResponse>;
|
|
2383
2482
|
/** Registers the verifier unit with a Verifier Provider. */
|
|
2384
2483
|
registerVerifierInstance(request: RegisterVerifierInstanceRequest): Promise<RegisterVerifierInstanceResponse>;
|
|
2385
|
-
/**
|
|
2484
|
+
/**
|
|
2485
|
+
* Returns the JSON-LD context document for a given URI. This is a
|
|
2486
|
+
* [cached entity](https://docs.procivis.ch/configure/caching).
|
|
2487
|
+
*/
|
|
2386
2488
|
resolveJsonldContext(url: string): Promise<ResolvedJsonLdContext>;
|
|
2387
2489
|
/** Discards the restored database and continues using the original. */
|
|
2388
2490
|
rollbackImport(): Promise<void>;
|
|
2389
2491
|
/**
|
|
2390
|
-
*
|
|
2391
|
-
*
|
|
2492
|
+
* Triggers a configured task by name. Pass the task name as defined in the
|
|
2493
|
+
* `task` configuration object, and optionally a JSON string of task-specific
|
|
2494
|
+
* parameters. Returns the result as a JSON string.
|
|
2392
2495
|
*/
|
|
2393
2496
|
runTask(task: string, params: string | undefined): Promise<string>;
|
|
2394
2497
|
/**
|
|
@@ -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) {
|
|
@@ -258,11 +268,6 @@ export var OpenId4vciTxCodeInputMode;
|
|
|
258
268
|
OpenId4vciTxCodeInputMode["NUMERIC"] = "NUMERIC";
|
|
259
269
|
OpenId4vciTxCodeInputMode["TEXT"] = "TEXT";
|
|
260
270
|
})(OpenId4vciTxCodeInputMode || (OpenId4vciTxCodeInputMode = {}));
|
|
261
|
-
export var PresentationDefinitionRuleType;
|
|
262
|
-
(function (PresentationDefinitionRuleType) {
|
|
263
|
-
PresentationDefinitionRuleType["ALL"] = "ALL";
|
|
264
|
-
PresentationDefinitionRuleType["PICK"] = "PICK";
|
|
265
|
-
})(PresentationDefinitionRuleType || (PresentationDefinitionRuleType = {}));
|
|
266
271
|
export var ProofListQueryExactColumn;
|
|
267
272
|
(function (ProofListQueryExactColumn) {
|
|
268
273
|
ProofListQueryExactColumn["NAME"] = "NAME";
|
|
@@ -302,7 +307,6 @@ export var SortableCredentialColumn;
|
|
|
302
307
|
export var SortableCredentialSchemaColumn;
|
|
303
308
|
(function (SortableCredentialSchemaColumn) {
|
|
304
309
|
SortableCredentialSchemaColumn["NAME"] = "NAME";
|
|
305
|
-
SortableCredentialSchemaColumn["FORMAT"] = "FORMAT";
|
|
306
310
|
SortableCredentialSchemaColumn["CREATED_DATE"] = "CREATED_DATE";
|
|
307
311
|
})(SortableCredentialSchemaColumn || (SortableCredentialSchemaColumn = {}));
|
|
308
312
|
export var SortableDidColumn;
|
|
@@ -91,10 +91,6 @@ RCT_EXTERN_METHOD(continueIssuance:(NSString *)url
|
|
|
91
91
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
92
92
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
93
93
|
|
|
94
|
-
RCT_EXTERN_METHOD(getPresentationDefinition:(NSString *)proofId
|
|
95
|
-
resolver:(RCTPromiseResolveBlock)resolve
|
|
96
|
-
rejecter:(RCTPromiseRejectBlock)reject)
|
|
97
|
-
|
|
98
94
|
RCT_EXTERN_METHOD(getPresentationDefinitionV2:(NSString *)proofId
|
|
99
95
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
100
96
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -103,11 +99,6 @@ RCT_EXTERN_METHOD(holderRejectProof:(NSString *)interactionId
|
|
|
103
99
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
104
100
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
105
101
|
|
|
106
|
-
RCT_EXTERN_METHOD(holderSubmitProof:(NSString *)interactionId
|
|
107
|
-
credentials:(NSDictionary *)credentials
|
|
108
|
-
resolver:(RCTPromiseResolveBlock)resolve
|
|
109
|
-
rejecter:(RCTPromiseRejectBlock)reject)
|
|
110
|
-
|
|
111
102
|
RCT_EXTERN_METHOD(holderSubmitProofV2:(NSString *)interactionId
|
|
112
103
|
submission:(NSDictionary *)submission
|
|
113
104
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
@@ -215,6 +206,14 @@ RCT_EXTERN_METHOD(proposeProof:(NSDictionary *)request
|
|
|
215
206
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
216
207
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
217
208
|
|
|
209
|
+
RCT_EXTERN_METHOD(qesAuthorize:(NSDictionary *)request
|
|
210
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
211
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
212
|
+
|
|
213
|
+
RCT_EXTERN_METHOD(qesSign:(NSDictionary *)request
|
|
214
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
215
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
216
|
+
|
|
218
217
|
RCT_EXTERN_METHOD(checkRevocation:(NSArray *)credentialIds
|
|
219
218
|
forceRefresh:(BOOL *)forceRefresh
|
|
220
219
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
@@ -255,6 +254,11 @@ RCT_EXTERN_METHOD(holderRegisterWalletUnit:(NSDictionary *)request
|
|
|
255
254
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
256
255
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
257
256
|
|
|
257
|
+
RCT_EXTERN_METHOD(holderActivateWalletUnit:(NSString *)unitId
|
|
258
|
+
request:(NSDictionary *)request
|
|
259
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
260
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
261
|
+
|
|
258
262
|
RCT_EXTERN_METHOD(holderWalletUnitStatus:(NSString *)walletUnitId
|
|
259
263
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
260
264
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -285,18 +285,6 @@ class ProcivisOneCoreModule: RCTEventEmitter {
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
@objc(getPresentationDefinition:resolver:rejecter:)
|
|
289
|
-
func getPresentationDefinition(
|
|
290
|
-
proofId: String,
|
|
291
|
-
resolve: @escaping RCTPromiseResolveBlock,
|
|
292
|
-
reject: @escaping RCTPromiseRejectBlock
|
|
293
|
-
) {
|
|
294
|
-
asyncCall(resolve, reject) {
|
|
295
|
-
let result = try await self.getCore().getPresentationDefinition(proofId: proofId)
|
|
296
|
-
return try serializeAny(result)
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
288
|
@objc(getPresentationDefinitionV2:resolver:rejecter:)
|
|
301
289
|
func getPresentationDefinitionV2(
|
|
302
290
|
proofId: String,
|
|
@@ -321,22 +309,6 @@ class ProcivisOneCoreModule: RCTEventEmitter {
|
|
|
321
309
|
}
|
|
322
310
|
}
|
|
323
311
|
|
|
324
|
-
@objc(holderSubmitProof:credentials:resolver:rejecter:)
|
|
325
|
-
func holderSubmitProof(
|
|
326
|
-
interactionId: String,
|
|
327
|
-
credentials: NSDictionary,
|
|
328
|
-
resolve: @escaping RCTPromiseResolveBlock,
|
|
329
|
-
reject: @escaping RCTPromiseRejectBlock
|
|
330
|
-
) {
|
|
331
|
-
asyncCall(resolve, reject) {
|
|
332
|
-
try await self.getCore().holderSubmitProof(
|
|
333
|
-
interactionId: interactionId,
|
|
334
|
-
submitCredentials: try deserialize(credentials)
|
|
335
|
-
)
|
|
336
|
-
return nil as NSDictionary?
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
312
|
@objc(holderSubmitProofV2:submission:resolver:rejecter:)
|
|
341
313
|
func holderSubmitProofV2(
|
|
342
314
|
interactionId: String,
|
|
@@ -656,6 +628,30 @@ class ProcivisOneCoreModule: RCTEventEmitter {
|
|
|
656
628
|
}
|
|
657
629
|
}
|
|
658
630
|
|
|
631
|
+
@objc(qesAuthorize:resolver:rejecter:)
|
|
632
|
+
func qesAuthorize(
|
|
633
|
+
request: NSDictionary,
|
|
634
|
+
resolve: @escaping RCTPromiseResolveBlock,
|
|
635
|
+
reject: @escaping RCTPromiseRejectBlock
|
|
636
|
+
) {
|
|
637
|
+
asyncCall(resolve, reject) {
|
|
638
|
+
let result = try await self.getCore().qesAuthorize(request: try deserialize(request))
|
|
639
|
+
return try serializeAny(result)
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
@objc(qesSign:resolver:rejecter:)
|
|
644
|
+
func qesSign(
|
|
645
|
+
request: NSDictionary,
|
|
646
|
+
resolve: @escaping RCTPromiseResolveBlock,
|
|
647
|
+
reject: @escaping RCTPromiseRejectBlock
|
|
648
|
+
) {
|
|
649
|
+
asyncCall(resolve, reject) {
|
|
650
|
+
let result = try await self.getCore().qesSign(request: try deserialize(request))
|
|
651
|
+
return try serializeAny(result)
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
659
655
|
@objc(checkRevocation:forceRefresh:resolver:rejecter:)
|
|
660
656
|
func checkRevocation(
|
|
661
657
|
credentialIds: NSArray,
|
|
@@ -791,6 +787,19 @@ class ProcivisOneCoreModule: RCTEventEmitter {
|
|
|
791
787
|
}
|
|
792
788
|
}
|
|
793
789
|
|
|
790
|
+
@objc(holderActivateWalletUnit:request:resolver:rejecter:)
|
|
791
|
+
func holderActivateWalletUnit(
|
|
792
|
+
id: String,
|
|
793
|
+
request: NSDictionary,
|
|
794
|
+
resolve: @escaping RCTPromiseResolveBlock,
|
|
795
|
+
reject: @escaping RCTPromiseRejectBlock
|
|
796
|
+
) {
|
|
797
|
+
asyncCall(resolve, reject) {
|
|
798
|
+
try await self.getCore().holderActivateWalletUnit(id: id, request: try deserialize(request))
|
|
799
|
+
return nil as NSDictionary?
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
794
803
|
@objc(holderWalletUnitStatus:resolver:rejecter:)
|
|
795
804
|
func holderWalletUnitStatus(
|
|
796
805
|
walletUnitId: String,
|