@procivis/react-native-one-core 1.60807.0 → 1.73295.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/ProcivisOneCoreModule.kt +68 -25
- package/android/src/main/java/ch/procivis/one/core/SerializeSpecific.kt +63 -0
- package/core-sdk.json +6 -6
- package/dist/src/cache.d.ts +4 -1
- package/dist/src/cache.js +3 -0
- package/dist/src/config.d.ts +7 -4
- package/dist/src/config.js +3 -1
- package/dist/src/core.d.ts +12 -10
- package/dist/src/core.js +4 -2
- package/dist/src/credential.d.ts +21 -16
- package/dist/src/credentialSchema.d.ts +7 -16
- package/dist/src/credentialSchema.js +7 -13
- package/dist/src/history.d.ts +2 -0
- package/dist/src/identifier.d.ts +1 -1
- package/dist/src/nfc.d.ts +1 -0
- package/dist/src/nfc.js +3 -1
- package/dist/src/proof.d.ts +42 -3
- package/dist/src/proofSchema.d.ts +2 -3
- package/dist/src/trust.d.ts +8 -3
- package/dist/src/walletUnit.d.ts +10 -21
- package/dist/src/walletUnit.js +7 -7
- package/ios/ProcivisOneCoreModule.m +18 -15
- package/ios/ProcivisOneCoreModule.swift +68 -42
- package/ios/RSEKeyStorage.swift +67 -51
- package/ios/Serialize.swift +45 -11
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
22
22
|
override fun getName() = "ProcivisOneCoreModule"
|
|
23
23
|
|
|
24
24
|
private var oneCore: OneCoreBindingInterface? = null
|
|
25
|
+
private var nfcHce: NfcHce = NfcHCE(reactContext)
|
|
25
26
|
private val scope = CoroutineScope(EmptyCoroutineContext)
|
|
26
27
|
|
|
27
28
|
private fun getCore(): OneCoreBindingInterface {
|
|
@@ -60,7 +61,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
60
61
|
remoteSecureElement = ubiqu,
|
|
61
62
|
bleCentral = AndroidBLECentral(context),
|
|
62
63
|
blePeripheral = AndroidBLEPeripheral(context),
|
|
63
|
-
nfcHce =
|
|
64
|
+
nfcHce = nfcHce,
|
|
64
65
|
nfcScanner = NfcScanner(context) { context.currentActivity }
|
|
65
66
|
)
|
|
66
67
|
)
|
|
@@ -196,16 +197,11 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
196
197
|
|
|
197
198
|
@ReactMethod
|
|
198
199
|
fun holderAcceptCredential(
|
|
199
|
-
|
|
200
|
-
didId: String?,
|
|
201
|
-
identifierId: String?,
|
|
202
|
-
keyId: String?,
|
|
203
|
-
txCode: String?,
|
|
200
|
+
request: ReadableMap,
|
|
204
201
|
promise: Promise
|
|
205
202
|
) {
|
|
206
203
|
asyncCall(promise, scope) {
|
|
207
|
-
getCore().holderAcceptCredential(
|
|
208
|
-
return@asyncCall null
|
|
204
|
+
return@asyncCall getCore().holderAcceptCredential(construct(request))
|
|
209
205
|
}
|
|
210
206
|
}
|
|
211
207
|
|
|
@@ -241,6 +237,14 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
241
237
|
}
|
|
242
238
|
}
|
|
243
239
|
|
|
240
|
+
@ReactMethod
|
|
241
|
+
fun getPresentationDefinitionV2(proofId: String, promise: Promise) {
|
|
242
|
+
asyncCall(promise, scope) {
|
|
243
|
+
val presentationDefinition = getCore().getPresentationDefinitionV2(proofId)
|
|
244
|
+
return@asyncCall convertToRN(presentationDefinition)
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
244
248
|
@ReactMethod
|
|
245
249
|
fun holderRejectProof(interactionId: String, promise: Promise) {
|
|
246
250
|
asyncCall(promise, scope) {
|
|
@@ -253,9 +257,6 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
253
257
|
fun holderSubmitProof(
|
|
254
258
|
interactionId: String,
|
|
255
259
|
credentials: ReadableMap,
|
|
256
|
-
didId: String?,
|
|
257
|
-
identifierId: String?,
|
|
258
|
-
keyId: String?,
|
|
259
260
|
promise: Promise
|
|
260
261
|
) {
|
|
261
262
|
asyncCall(promise, scope) {
|
|
@@ -279,12 +280,49 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
279
280
|
}
|
|
280
281
|
submitCredentials[entry.key] = credentialList
|
|
281
282
|
}
|
|
282
|
-
getCore().holderSubmitProof(
|
|
283
|
+
getCore().holderSubmitProof(interactionId, submitCredentials)
|
|
284
|
+
return@asyncCall null
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
@ReactMethod
|
|
289
|
+
fun holderSubmitProofV2(
|
|
290
|
+
interactionId: String,
|
|
291
|
+
credentials: ReadableMap,
|
|
292
|
+
promise: Promise
|
|
293
|
+
) {
|
|
294
|
+
asyncCall(promise, scope) {
|
|
295
|
+
val submission =
|
|
296
|
+
mutableMapOf<String, List<PresentationSubmitV2CredentialRequestBindingDto>>()
|
|
297
|
+
for (entry in credentials.entryIterator) {
|
|
298
|
+
val credentialList = when (val credentialValue = entry.value) {
|
|
299
|
+
is ReadableMap -> {
|
|
300
|
+
// Single credential object - convert to list
|
|
301
|
+
listOf(
|
|
302
|
+
construct<PresentationSubmitV2CredentialRequestBindingDto>(
|
|
303
|
+
credentialValue
|
|
304
|
+
)
|
|
305
|
+
)
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
is ReadableArray -> {
|
|
309
|
+
// Array of credentials - convert each one
|
|
310
|
+
(0 until credentialValue.size()).map { index ->
|
|
311
|
+
construct<PresentationSubmitV2CredentialRequestBindingDto>(
|
|
312
|
+
credentialValue.getMap(index)!!
|
|
313
|
+
)
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
else -> {
|
|
318
|
+
throw IllegalArgumentException("Credential value must be either a Map or Array")
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
submission[entry.key] = credentialList
|
|
322
|
+
}
|
|
323
|
+
getCore().holderSubmitProofV2(
|
|
283
324
|
interactionId,
|
|
284
|
-
|
|
285
|
-
didId,
|
|
286
|
-
identifierId,
|
|
287
|
-
keyId
|
|
325
|
+
submission
|
|
288
326
|
)
|
|
289
327
|
return@asyncCall null
|
|
290
328
|
}
|
|
@@ -385,10 +423,9 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
385
423
|
}
|
|
386
424
|
|
|
387
425
|
@ReactMethod
|
|
388
|
-
fun proposeProof(
|
|
426
|
+
fun proposeProof(request: ReadableMap, promise: Promise) {
|
|
389
427
|
asyncCall(promise, scope) {
|
|
390
|
-
val
|
|
391
|
-
val result = getCore().proposeProof(exchange, organisationId, engagement)
|
|
428
|
+
val result = getCore().proposeProof(construct(request))
|
|
392
429
|
return@asyncCall convertToRN(result)
|
|
393
430
|
}
|
|
394
431
|
}
|
|
@@ -616,23 +653,22 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
616
653
|
@ReactMethod
|
|
617
654
|
fun holderRegisterWalletUnit(request: ReadableMap, promise: Promise) {
|
|
618
655
|
asyncCall(promise, scope) {
|
|
619
|
-
|
|
620
|
-
return@asyncCall convertToRN(result)
|
|
656
|
+
return@asyncCall getCore().holderRegisterWalletUnit(construct(request))
|
|
621
657
|
}
|
|
622
658
|
}
|
|
623
659
|
|
|
624
660
|
@ReactMethod
|
|
625
|
-
fun
|
|
661
|
+
fun holderWalletUnitStatus(walletUnitId: String, promise: Promise) {
|
|
626
662
|
asyncCall(promise, scope) {
|
|
627
|
-
getCore().
|
|
663
|
+
getCore().holderWalletUnitStatus(walletUnitId)
|
|
628
664
|
return@asyncCall null
|
|
629
665
|
}
|
|
630
666
|
}
|
|
631
667
|
|
|
632
668
|
@ReactMethod
|
|
633
|
-
fun
|
|
669
|
+
fun holderGetWalletUnit(walletUnitId: String, promise: Promise) {
|
|
634
670
|
asyncCall(promise, scope) {
|
|
635
|
-
val result = getCore().
|
|
671
|
+
val result = getCore().holderGetWalletUnit(walletUnitId)
|
|
636
672
|
return@asyncCall convertToRN(result)
|
|
637
673
|
}
|
|
638
674
|
}
|
|
@@ -664,6 +700,13 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
664
700
|
}
|
|
665
701
|
}
|
|
666
702
|
|
|
703
|
+
@ReactMethod
|
|
704
|
+
fun isNfcHceSupported(promise: Promise) {
|
|
705
|
+
asyncCall(promise, scope) {
|
|
706
|
+
return@asyncCall nfcHce.isSupported()
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
|
|
667
710
|
// ===== Ubiqu specific methods
|
|
668
711
|
@ReactMethod
|
|
669
712
|
fun changeRSEPin(promise: Promise) {
|
|
@@ -12,6 +12,8 @@ object SerializeSpecific {
|
|
|
12
12
|
HistoryMetadataBinding::class.java,
|
|
13
13
|
ClaimBindingDto::class.java,
|
|
14
14
|
ProofRequestClaimBindingDto::class.java,
|
|
15
|
+
CredentialQueryResponseBindingDto::class.java,
|
|
16
|
+
PresentationDefinitionV2ClaimBindingDto::class.java
|
|
15
17
|
)
|
|
16
18
|
|
|
17
19
|
fun isCustomConversionType(input: Any?): Boolean {
|
|
@@ -33,6 +35,12 @@ object SerializeSpecific {
|
|
|
33
35
|
if (input is ProofRequestClaimBindingDto) {
|
|
34
36
|
return proofClaim(input)
|
|
35
37
|
}
|
|
38
|
+
if (input is CredentialQueryResponseBindingDto) {
|
|
39
|
+
return credentialQuery(input)
|
|
40
|
+
}
|
|
41
|
+
if (input is PresentationDefinitionV2ClaimBindingDto) {
|
|
42
|
+
return presentationDefinitionV2Claim(input)
|
|
43
|
+
}
|
|
36
44
|
throw IllegalArgumentException("Invalid map conversion: $input")
|
|
37
45
|
}
|
|
38
46
|
|
|
@@ -53,6 +61,22 @@ object SerializeSpecific {
|
|
|
53
61
|
}
|
|
54
62
|
}
|
|
55
63
|
|
|
64
|
+
private fun credentialQuery(dto: CredentialQueryResponseBindingDto): ReadableMap {
|
|
65
|
+
val result = Arguments.createMap()
|
|
66
|
+
result.putBoolean("multiple", dto.multiple)
|
|
67
|
+
when (val value = dto.credentialOrFailureHint) {
|
|
68
|
+
is ApplicableCredentialOrFailureHintBindingEnum.ApplicableCredentials -> result.putArray(
|
|
69
|
+
"applicableCredentials",
|
|
70
|
+
convertToRN(value.applicableCredentials) as ReadableArray
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
is ApplicableCredentialOrFailureHintBindingEnum.FailureHint -> {
|
|
74
|
+
result.putMap("failureHint", convertToRN(value.failureHint) as ReadableMap)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return result
|
|
78
|
+
}
|
|
79
|
+
|
|
56
80
|
private fun claim(c: ClaimBindingDto): ReadableMap {
|
|
57
81
|
val result = Arguments.createMap()
|
|
58
82
|
result.putString("id", c.id)
|
|
@@ -70,6 +94,7 @@ object SerializeSpecific {
|
|
|
70
94
|
result.putInt("value", value.value.toInt())
|
|
71
95
|
}
|
|
72
96
|
}
|
|
97
|
+
|
|
73
98
|
is ClaimValueBindingDto.String -> result.putString("value", value.value)
|
|
74
99
|
is ClaimValueBindingDto.Nested ->
|
|
75
100
|
result.putArray("value", convertToRN(value.value) as ReadableArray)
|
|
@@ -94,6 +119,44 @@ object SerializeSpecific {
|
|
|
94
119
|
|
|
95
120
|
return result
|
|
96
121
|
}
|
|
122
|
+
|
|
123
|
+
private fun presentationDefinitionV2Claim(c: PresentationDefinitionV2ClaimBindingDto): ReadableMap {
|
|
124
|
+
val result = Arguments.createMap()
|
|
125
|
+
result.putString("path", c.path)
|
|
126
|
+
result.putMap("schema", convertToRN(c.schema) as ReadableMap)
|
|
127
|
+
result.putBoolean("userSelection", c.userSelection)
|
|
128
|
+
result.putBoolean("required", c.required)
|
|
129
|
+
|
|
130
|
+
when (val value = c.value) {
|
|
131
|
+
is PresentationDefinitionV2ClaimValueBindingDto.Boolean -> result.putBoolean(
|
|
132
|
+
"value",
|
|
133
|
+
value.value
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
is PresentationDefinitionV2ClaimValueBindingDto.Float -> result.putDouble(
|
|
137
|
+
"value",
|
|
138
|
+
value.value
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
is PresentationDefinitionV2ClaimValueBindingDto.Integer -> {
|
|
142
|
+
if (value.value < Int.MIN_VALUE || value.value > Int.MAX_VALUE) {
|
|
143
|
+
result.putDouble("value", value.value.toDouble())
|
|
144
|
+
} else {
|
|
145
|
+
result.putInt("value", value.value.toInt())
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
is PresentationDefinitionV2ClaimValueBindingDto.String -> result.putString(
|
|
150
|
+
"value",
|
|
151
|
+
value.value
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
is PresentationDefinitionV2ClaimValueBindingDto.Nested ->
|
|
155
|
+
result.putArray("value", convertToRN(value.value) as ReadableArray)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return result
|
|
159
|
+
}
|
|
97
160
|
}
|
|
98
161
|
|
|
99
162
|
object Str {
|
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/73295/android/onecore-debug.aar",
|
|
5
|
+
"sha1": "d3c6fd084ca2aa6b5ae413031ac29092a1dd86fe"
|
|
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/73295/android/onecore-release.aar",
|
|
9
|
+
"sha1": "1507598dda415366737cf806132c8e5550eeb3c0"
|
|
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/73295/ios/deploy.zip",
|
|
14
|
+
"sha1": "0d6ade39b50c670d553be0ca592747629d5d4114"
|
|
15
15
|
}
|
|
16
16
|
}
|
package/dist/src/cache.d.ts
CHANGED
|
@@ -4,5 +4,8 @@ export declare enum CacheType {
|
|
|
4
4
|
STATUS_LIST_CREDENTIAL = "STATUS_LIST_CREDENTIAL",
|
|
5
5
|
VCT_METADATA = "VCT_METADATA",
|
|
6
6
|
JSON_SCHEMA = "JSON_SCHEMA",
|
|
7
|
-
TRUST_LIST = "TRUST_LIST"
|
|
7
|
+
TRUST_LIST = "TRUST_LIST",
|
|
8
|
+
X509_CRL = "X509_CRL",
|
|
9
|
+
ANDROID_ATTESTATION_CRL = "ANDROID_ATTESTATION_CRL",
|
|
10
|
+
OPEN_ID_METADATA = "OPEN_ID_METADATA"
|
|
8
11
|
}
|
package/dist/src/cache.js
CHANGED
|
@@ -6,4 +6,7 @@ export var CacheType;
|
|
|
6
6
|
CacheType["VCT_METADATA"] = "VCT_METADATA";
|
|
7
7
|
CacheType["JSON_SCHEMA"] = "JSON_SCHEMA";
|
|
8
8
|
CacheType["TRUST_LIST"] = "TRUST_LIST";
|
|
9
|
+
CacheType["X509_CRL"] = "X509_CRL";
|
|
10
|
+
CacheType["ANDROID_ATTESTATION_CRL"] = "ANDROID_ATTESTATION_CRL";
|
|
11
|
+
CacheType["OPEN_ID_METADATA"] = "OPEN_ID_METADATA";
|
|
9
12
|
})(CacheType || (CacheType = {}));
|
package/dist/src/config.d.ts
CHANGED
|
@@ -71,9 +71,11 @@ export declare enum DataTypeEnum {
|
|
|
71
71
|
String = "STRING",
|
|
72
72
|
Number = "NUMBER",
|
|
73
73
|
Date = "DATE",
|
|
74
|
-
|
|
74
|
+
Picture = "PICTURE",
|
|
75
|
+
SwiyuPicture = "SWIYU_PICTURE",
|
|
75
76
|
Boolean = "BOOLEAN",
|
|
76
|
-
Object = "OBJECT"
|
|
77
|
+
Object = "OBJECT",
|
|
78
|
+
Array = "ARRAY"
|
|
77
79
|
}
|
|
78
80
|
type DataTypeError = string | Record<string, string>;
|
|
79
81
|
export interface StringDataTypeParams {
|
|
@@ -107,10 +109,10 @@ export type DataTypeParams = {
|
|
|
107
109
|
type: DataTypeEnum.Date;
|
|
108
110
|
params?: DateDataTypeParams;
|
|
109
111
|
} | {
|
|
110
|
-
type: DataTypeEnum.
|
|
112
|
+
type: DataTypeEnum.Picture | DataTypeEnum.SwiyuPicture;
|
|
111
113
|
params?: FileDataTypeParams;
|
|
112
114
|
} | {
|
|
113
|
-
type: DataTypeEnum.Object;
|
|
115
|
+
type: DataTypeEnum.Object | DataTypeEnum.Array | DataTypeEnum.Boolean;
|
|
114
116
|
params?: undefined;
|
|
115
117
|
};
|
|
116
118
|
export declare enum IssuanceProtocolFeatureEnum {
|
|
@@ -146,5 +148,6 @@ export interface Config {
|
|
|
146
148
|
cacheEntities: ConfigEntities;
|
|
147
149
|
task: ConfigEntities;
|
|
148
150
|
credentialIssuer: ConfigEntities<undefined, {}>;
|
|
151
|
+
walletProvider: ConfigEntities;
|
|
149
152
|
}
|
|
150
153
|
export {};
|
package/dist/src/config.js
CHANGED
|
@@ -38,9 +38,11 @@ export var DataTypeEnum;
|
|
|
38
38
|
DataTypeEnum["String"] = "STRING";
|
|
39
39
|
DataTypeEnum["Number"] = "NUMBER";
|
|
40
40
|
DataTypeEnum["Date"] = "DATE";
|
|
41
|
-
DataTypeEnum["
|
|
41
|
+
DataTypeEnum["Picture"] = "PICTURE";
|
|
42
|
+
DataTypeEnum["SwiyuPicture"] = "SWIYU_PICTURE";
|
|
42
43
|
DataTypeEnum["Boolean"] = "BOOLEAN";
|
|
43
44
|
DataTypeEnum["Object"] = "OBJECT";
|
|
45
|
+
DataTypeEnum["Array"] = "ARRAY";
|
|
44
46
|
})(DataTypeEnum || (DataTypeEnum = {}));
|
|
45
47
|
export var IssuanceProtocolFeatureEnum;
|
|
46
48
|
(function (IssuanceProtocolFeatureEnum) {
|
package/dist/src/core.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { BackupCreate, ImportBackupMetadata, UnexportableEntities } from "./backup";
|
|
2
2
|
import { Config } from "./config";
|
|
3
|
-
import { AuthorizationCodeFlow, ContinueIssuanceResponse, CredentialDetail, CredentialListItem, CredentialListQuery, CredentialRevocationCheckResponse, InitiateIssuanceRequest, InitiateIssuanceResponse, InvitationResultCredentialIssuance } from "./credential";
|
|
3
|
+
import { AuthorizationCodeFlow, ContinueIssuanceResponse, CredentialDetail, CredentialListItem, CredentialListQuery, CredentialRevocationCheckResponse, HolderAcceptCredentialRequest, InitiateIssuanceRequest, InitiateIssuanceResponse, InvitationResultCredentialIssuance } from "./credential";
|
|
4
4
|
import { CredentialSchema, CredentialSchemaDetail, CredentialSchemaListQuery, ImportCredentialSchemaRequest, ShareCredentialSchemaResponse } from "./credentialSchema";
|
|
5
5
|
import { DidListItem, DidListQuery, DidRequest } from "./did";
|
|
6
6
|
import { HistoryListItem, HistoryListQuery } from "./history";
|
|
7
7
|
import { KeyRequest } from "./key";
|
|
8
8
|
import { ItemList } from "./list";
|
|
9
|
-
import { CreateProofRequest, InvitationResultProofRequest, PresentationDefinition, PresentationDefinitionRequestedCredential, PresentationSubmitCredentialRequest, ProofDetail, ProofListItem, ProofListQuery, ProposeProofResponse, ShareProofRequest, ShareProofResponse } from "./proof";
|
|
9
|
+
import { CreateProofRequest, InvitationResultProofRequest, PresentationDefinition, PresentationDefinitionRequestedCredential, PresentationDefinitionV2, PresentationSubmitCredentialRequest, PresentationSubmitV2CredentialRequest, ProofDetail, ProofListItem, ProofListQuery, ProposeProofRequest, ProposeProofResponse, ShareProofRequest, ShareProofResponse } from "./proof";
|
|
10
10
|
import { CreateProofSchemaRequest, ImportProofSchemaRequest, ProofSchema, ProofSchemaListItem, ProofSchemaListQuery, ShareProofSchemaResponse } from "./proofSchema";
|
|
11
11
|
import { CreateRemoteTrustEntityRequest, CreateTrustAnchorRequest, CreateTrustEntityRequest, RemoteTrustEntity, ResolvedIdentifierTrustEntity, ResolveTrustEntityByIdentifierRequest, TrustAnchor, TrustAnchorListItem, TrustAnchorListQuery, TrustEntity, TrustEntityListItem, TrustEntityListQuery, UpdateRemoteTrustEntityRequest } from "./trust";
|
|
12
12
|
import { CacheType } from "./cache";
|
|
13
13
|
import { CreateOrganisationRequest, UpsertOrganisationRequest } from "./organisation";
|
|
14
14
|
import { CreateIdentifierRequest, IdentifierDetail, IdentifierListItem, IdentifierListQuery } from "./identifier";
|
|
15
|
-
import {
|
|
15
|
+
import { HolderRegisterWalletUnitRequest, HolderWalletUnitDetail } from "./walletUnit";
|
|
16
16
|
import { NfcScanRequest } from "./nfc";
|
|
17
17
|
export * from "./backup";
|
|
18
18
|
export * from "./cache";
|
|
@@ -76,7 +76,7 @@ export interface ONECore {
|
|
|
76
76
|
* request for proof).
|
|
77
77
|
*/
|
|
78
78
|
handleInvitation(request: HandleInvitationRequest): Promise<InvitationResult>;
|
|
79
|
-
holderAcceptCredential(
|
|
79
|
+
holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<CredentialDetail["id"]>;
|
|
80
80
|
holderRejectCredential(interactionId: InvitationResultCredentialIssuance["interactionId"]): Promise<void>;
|
|
81
81
|
/** For wallets, starts the OID4VCI Authorization Code Flow. */
|
|
82
82
|
initiateIssuance(request: InitiateIssuanceRequest): Promise<InitiateIssuanceResponse>;
|
|
@@ -89,8 +89,10 @@ export interface ONECore {
|
|
|
89
89
|
* "myapp://example/credential-offer?code=xxx&clientId=myWallet&..." */
|
|
90
90
|
url: string): Promise<ContinueIssuanceResponse>;
|
|
91
91
|
getPresentationDefinition(proofId: ProofDetail["id"]): Promise<PresentationDefinition>;
|
|
92
|
+
getPresentationDefinitionV2(proofId: ProofDetail["id"]): Promise<PresentationDefinitionV2>;
|
|
92
93
|
holderRejectProof(interactionId: InvitationResultProofRequest["interactionId"]): Promise<void>;
|
|
93
|
-
holderSubmitProof(interactionId: InvitationResultProofRequest["interactionId"], credentials: Record<PresentationDefinitionRequestedCredential["id"], PresentationSubmitCredentialRequest | PresentationSubmitCredentialRequest[]
|
|
94
|
+
holderSubmitProof(interactionId: InvitationResultProofRequest["interactionId"], credentials: Record<PresentationDefinitionRequestedCredential["id"], PresentationSubmitCredentialRequest | PresentationSubmitCredentialRequest[]>): Promise<void>;
|
|
95
|
+
holderSubmitProofV2(interactionId: InvitationResultProofRequest["interactionId"], credentials: Record<string, PresentationSubmitV2CredentialRequest | PresentationSubmitV2CredentialRequest[]>): Promise<void>;
|
|
94
96
|
getCredentials(query: CredentialListQuery): Promise<ItemList<CredentialListItem>>;
|
|
95
97
|
runTask(task: string): Promise<string>;
|
|
96
98
|
deleteProofClaims(proofId: ProofDetail["id"]): Promise<void>;
|
|
@@ -112,7 +114,7 @@ export interface ONECore {
|
|
|
112
114
|
* Reference the `verificationEngagement` entry of your configuration
|
|
113
115
|
* for your options for `engagement`.
|
|
114
116
|
*/
|
|
115
|
-
proposeProof(
|
|
117
|
+
proposeProof(request: ProposeProofRequest): Promise<ProposeProofResponse>;
|
|
116
118
|
createProofSchema(request: CreateProofSchemaRequest): Promise<ProofSchema["id"]>;
|
|
117
119
|
getProofSchemas(query: ProofSchemaListQuery): Promise<ItemList<ProofSchemaListItem>>;
|
|
118
120
|
getProofSchema(proofSchemaId: ProofSchema["id"]): Promise<ProofSchema>;
|
|
@@ -158,9 +160,9 @@ export interface ONECore {
|
|
|
158
160
|
*/
|
|
159
161
|
rollbackImport(): Promise<void>;
|
|
160
162
|
resolveJsonldContext(url: string): Promise<ResolveJsonLdContextResponse>;
|
|
161
|
-
holderRegisterWalletUnit(request: HolderRegisterWalletUnitRequest): Promise<
|
|
162
|
-
|
|
163
|
-
|
|
163
|
+
holderRegisterWalletUnit(request: HolderRegisterWalletUnitRequest): Promise<HolderWalletUnitDetail["id"]>;
|
|
164
|
+
holderWalletUnitStatus(walletUnitId: HolderWalletUnitDetail["id"]): Promise<void>;
|
|
165
|
+
holderGetWalletUnit(walletUnitId: HolderWalletUnitDetail["id"]): Promise<HolderWalletUnitDetail>;
|
|
164
166
|
/**
|
|
165
167
|
* Start scanning for ISO 18013-5 NFC engagement
|
|
166
168
|
*
|
|
@@ -181,4 +183,4 @@ export interface ONECore {
|
|
|
181
183
|
*/
|
|
182
184
|
uninitialize(deleteData: boolean): Promise<void>;
|
|
183
185
|
}
|
|
184
|
-
export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "upsertOrganisation", "generateKey", "createDid", "getDids", "createIdentifier", "getIdentifier", "getIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinition", "holderRejectProof", "holderSubmitProof", "getCredentials", "runTask", "deleteProofClaims", "getCredential", "deleteCredential", "importCredentialSchema", "getCredentialSchema", "getCredentialSchemas", "deleteCredentialSchema", "createProof", "shareProof", "shareProofSchema", "shareCredentialSchema", "getProof", "getProofs", "deleteProof", "proposeProof", "createProofSchema", "getProofSchemas", "getProofSchema", "deleteProofSchema", "importProofSchema", "checkRevocation", "createTrustAnchor", "deleteTrustAnchor", "getTrustAnchor", "getTrustAnchors", "createTrustEntity", "getTrustEntity", "getTrustEntities", "getTrustEntityByDid", "resolveTrustEntityByIdentifier", "createRemoteTrustEntity", "getRemoteTrustEntity", "updateRemoteTrustEntity", "getHistory", "getHistoryEntry", "createBackup", "backupInfo", "deleteCache", "unpackBackup", "finalizeImport", "rollbackImport", "resolveJsonldContext", "holderRegisterWalletUnit", "
|
|
186
|
+
export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "upsertOrganisation", "generateKey", "createDid", "getDids", "createIdentifier", "getIdentifier", "getIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinition", "getPresentationDefinitionV2", "holderRejectProof", "holderSubmitProof", "holderSubmitProofV2", "getCredentials", "runTask", "deleteProofClaims", "getCredential", "deleteCredential", "importCredentialSchema", "getCredentialSchema", "getCredentialSchemas", "deleteCredentialSchema", "createProof", "shareProof", "shareProofSchema", "shareCredentialSchema", "getProof", "getProofs", "deleteProof", "proposeProof", "createProofSchema", "getProofSchemas", "getProofSchema", "deleteProofSchema", "importProofSchema", "checkRevocation", "createTrustAnchor", "deleteTrustAnchor", "getTrustAnchor", "getTrustAnchors", "createTrustEntity", "getTrustEntity", "getTrustEntities", "getTrustEntityByDid", "resolveTrustEntityByIdentifier", "createRemoteTrustEntity", "getRemoteTrustEntity", "updateRemoteTrustEntity", "getHistory", "getHistoryEntry", "createBackup", "backupInfo", "deleteCache", "unpackBackup", "finalizeImport", "rollbackImport", "resolveJsonldContext", "holderRegisterWalletUnit", "holderWalletUnitStatus", "holderGetWalletUnit", "nfcReadIsoMdlEngagement", "nfcStopIsoMdlEngagement", "uninitialize"];
|
package/dist/src/core.js
CHANGED
|
@@ -33,8 +33,10 @@ export const interfaceMethodNames = [
|
|
|
33
33
|
"initiateIssuance",
|
|
34
34
|
"continueIssuance",
|
|
35
35
|
"getPresentationDefinition",
|
|
36
|
+
"getPresentationDefinitionV2",
|
|
36
37
|
"holderRejectProof",
|
|
37
38
|
"holderSubmitProof",
|
|
39
|
+
"holderSubmitProofV2",
|
|
38
40
|
"getCredentials",
|
|
39
41
|
"runTask",
|
|
40
42
|
"deleteProofClaims",
|
|
@@ -80,8 +82,8 @@ export const interfaceMethodNames = [
|
|
|
80
82
|
"rollbackImport",
|
|
81
83
|
"resolveJsonldContext",
|
|
82
84
|
"holderRegisterWalletUnit",
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
+
"holderWalletUnitStatus",
|
|
86
|
+
"holderGetWalletUnit",
|
|
85
87
|
"nfcReadIsoMdlEngagement",
|
|
86
88
|
"nfcStopIsoMdlEngagement",
|
|
87
89
|
"uninitialize",
|
package/dist/src/credential.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataTypeEnum } from "./config";
|
|
2
|
-
import { CredentialSchema } from "./credentialSchema";
|
|
2
|
+
import { CredentialSchema, KeyStorageSecurity } from "./credentialSchema";
|
|
3
3
|
import { ListQuery, SortDirection } from "./list";
|
|
4
4
|
import { IdentifierListItem } from "./identifier";
|
|
5
5
|
export declare enum CredentialStateEnum {
|
|
@@ -13,7 +13,7 @@ export declare enum CredentialStateEnum {
|
|
|
13
13
|
ERROR = "ERROR"
|
|
14
14
|
}
|
|
15
15
|
export type ClaimValue = {
|
|
16
|
-
dataType: DataTypeEnum.String | DataTypeEnum.Date | DataTypeEnum.
|
|
16
|
+
dataType: DataTypeEnum.String | DataTypeEnum.Date | DataTypeEnum.Picture | DataTypeEnum.SwiyuPicture;
|
|
17
17
|
value: string;
|
|
18
18
|
array: false;
|
|
19
19
|
} | {
|
|
@@ -95,10 +95,10 @@ export type CredentialListQuery = ListQuery & {
|
|
|
95
95
|
sort?: SortableCredentialColumnEnum;
|
|
96
96
|
sortDirection?: SortDirection;
|
|
97
97
|
exact?: CredentialListQueryExactColumnEnum[];
|
|
98
|
-
|
|
98
|
+
roles?: CredentialRoleEnum[];
|
|
99
99
|
ids?: Array<CredentialListItem["id"]>;
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
states?: CredentialStateEnum[];
|
|
101
|
+
profiles?: string[];
|
|
102
102
|
credentialSchemaIds?: Array<CredentialSchema["id"]>;
|
|
103
103
|
include?: CredentialListIncludeEntityType[];
|
|
104
104
|
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
@@ -135,16 +135,16 @@ export interface CredentialRevocationCheckResponse {
|
|
|
135
135
|
export interface InvitationResultCredentialIssuance {
|
|
136
136
|
/** For reference. */
|
|
137
137
|
interactionId: string;
|
|
138
|
-
/** Offered credential. */
|
|
139
|
-
credentialIds: Array<CredentialListItem["id"]>;
|
|
140
138
|
/** Metadata for entering a transaction code.
|
|
141
139
|
* If a pre-authorized code is issued with a transaction code object, the wallet
|
|
142
140
|
* user must input a transaction code to receive the offered credential. This code
|
|
143
141
|
* is typically sent through a separate channel such as SMS or email.
|
|
144
142
|
*/
|
|
145
143
|
txCode?: OpenID4VCITxCode;
|
|
146
|
-
/**
|
|
147
|
-
|
|
144
|
+
/** Accepted storage security levels for holder binding key */
|
|
145
|
+
keyStorageSecurityLevels?: KeyStorageSecurity[];
|
|
146
|
+
/** Accepted algorithms for holder binding key */
|
|
147
|
+
keyAlgorithms?: string[];
|
|
148
148
|
}
|
|
149
149
|
export interface OpenID4VCITxCode {
|
|
150
150
|
inputMode?: OpenID4VCITxCodeInputMode;
|
|
@@ -176,13 +176,10 @@ export interface InitiateIssuanceResponse {
|
|
|
176
176
|
export interface ContinueIssuanceResponse {
|
|
177
177
|
/** For reference. */
|
|
178
178
|
interactionId: string;
|
|
179
|
-
/**
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
export interface CredentialConfigurationSupported {
|
|
185
|
-
proofTypesSupported: Record<string, OpenID4VCIProofTypeSupported>;
|
|
179
|
+
/** Accepted storage security levels for holder binding key */
|
|
180
|
+
keyStorageSecurityLevels?: KeyStorageSecurity[];
|
|
181
|
+
/** Accepted algorithms for holder binding key */
|
|
182
|
+
keyAlgorithms?: string[];
|
|
186
183
|
}
|
|
187
184
|
export interface OpenID4VCIProofTypeSupported {
|
|
188
185
|
proofSigningAlgValuesSupported: string[];
|
|
@@ -194,3 +191,11 @@ export interface AuthorizationCodeFlow {
|
|
|
194
191
|
* the authorization process with the authorization server. */
|
|
195
192
|
authorizationCodeFlowUrl: string;
|
|
196
193
|
}
|
|
194
|
+
export interface HolderAcceptCredentialRequest {
|
|
195
|
+
interactionId: string;
|
|
196
|
+
didId?: string;
|
|
197
|
+
identifierId?: string;
|
|
198
|
+
keyId?: string;
|
|
199
|
+
txCode?: string;
|
|
200
|
+
holderWalletUnitId?: string;
|
|
201
|
+
}
|
|
@@ -13,13 +13,11 @@ export interface ImportCredentialSchemaRequestSchema {
|
|
|
13
13
|
organisationId: string;
|
|
14
14
|
importedSourceUrl: string;
|
|
15
15
|
claims: ImportCredentialSchemaClaimSchema[];
|
|
16
|
-
|
|
16
|
+
keyStorageSecurity?: KeyStorageSecurity;
|
|
17
17
|
schemaId: string;
|
|
18
|
-
schemaType: CredentialSchemaType;
|
|
19
18
|
layoutType?: LayoutType;
|
|
20
19
|
layoutProperties?: ImportCredentialSchemaLayoutProperties;
|
|
21
20
|
allowSuspension?: boolean;
|
|
22
|
-
externalSchema: boolean;
|
|
23
21
|
}
|
|
24
22
|
export interface ImportCredentialSchemaClaimSchema {
|
|
25
23
|
id: string;
|
|
@@ -72,18 +70,12 @@ export interface CredentialSchemaListQuery extends ListQuery {
|
|
|
72
70
|
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
73
71
|
lastModifiedBefore?: string;
|
|
74
72
|
}
|
|
75
|
-
export declare enum
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
export declare enum KeyStorageSecurity {
|
|
74
|
+
HIGH = "HIGH",
|
|
75
|
+
MODERATE = "MODERATE",
|
|
76
|
+
ENHANCED_BASIC = "ENHANCED_BASIC",
|
|
77
|
+
BASIC = "BASIC"
|
|
79
78
|
}
|
|
80
|
-
export declare enum KnownCredentialSchemaType {
|
|
81
|
-
PROCIVIS_ONE_SCHEMA2024 = "PROCIVIS_ONE_SCHEMA2024",
|
|
82
|
-
FALLBACK_SCHEMA2024 = "FALLBACK_SCHEMA2024",
|
|
83
|
-
MDOC = "MDOC",
|
|
84
|
-
SD_JWT_VC = "SD_JWT_VC"
|
|
85
|
-
}
|
|
86
|
-
export type CredentialSchemaType = KnownCredentialSchemaType | string;
|
|
87
79
|
export declare enum LayoutType {
|
|
88
80
|
CARD = "CARD",
|
|
89
81
|
DOCUMENT = "DOCUMENT",
|
|
@@ -96,10 +88,9 @@ export interface CredentialSchema {
|
|
|
96
88
|
name: string;
|
|
97
89
|
format: string;
|
|
98
90
|
revocationMethod: string;
|
|
99
|
-
|
|
91
|
+
keyStorageSecurity?: KeyStorageSecurity;
|
|
100
92
|
schemaId: string;
|
|
101
93
|
importedSourceUrl: string;
|
|
102
|
-
schemaType: CredentialSchemaType;
|
|
103
94
|
layoutType?: LayoutType;
|
|
104
95
|
layoutProperties?: CredentialSchemaLayoutProperties;
|
|
105
96
|
}
|
|
@@ -13,19 +13,13 @@ export var ExactCredentialSchemaFilterColumnEnum;
|
|
|
13
13
|
ExactCredentialSchemaFilterColumnEnum["NAME"] = "NAME";
|
|
14
14
|
ExactCredentialSchemaFilterColumnEnum["SCHEMA_ID"] = "SCHEMA_ID";
|
|
15
15
|
})(ExactCredentialSchemaFilterColumnEnum || (ExactCredentialSchemaFilterColumnEnum = {}));
|
|
16
|
-
export var
|
|
17
|
-
(function (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
(function (KnownCredentialSchemaType) {
|
|
24
|
-
KnownCredentialSchemaType["PROCIVIS_ONE_SCHEMA2024"] = "PROCIVIS_ONE_SCHEMA2024";
|
|
25
|
-
KnownCredentialSchemaType["FALLBACK_SCHEMA2024"] = "FALLBACK_SCHEMA2024";
|
|
26
|
-
KnownCredentialSchemaType["MDOC"] = "MDOC";
|
|
27
|
-
KnownCredentialSchemaType["SD_JWT_VC"] = "SD_JWT_VC";
|
|
28
|
-
})(KnownCredentialSchemaType || (KnownCredentialSchemaType = {}));
|
|
16
|
+
export var KeyStorageSecurity;
|
|
17
|
+
(function (KeyStorageSecurity) {
|
|
18
|
+
KeyStorageSecurity["HIGH"] = "HIGH";
|
|
19
|
+
KeyStorageSecurity["MODERATE"] = "MODERATE";
|
|
20
|
+
KeyStorageSecurity["ENHANCED_BASIC"] = "ENHANCED_BASIC";
|
|
21
|
+
KeyStorageSecurity["BASIC"] = "BASIC";
|
|
22
|
+
})(KeyStorageSecurity || (KeyStorageSecurity = {}));
|
|
29
23
|
export var LayoutType;
|
|
30
24
|
(function (LayoutType) {
|
|
31
25
|
LayoutType["CARD"] = "CARD";
|
package/dist/src/history.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export interface HistoryListQuery extends ListQuery {
|
|
|
65
65
|
credentialSchemaId?: string;
|
|
66
66
|
proofSchemaId?: string;
|
|
67
67
|
search?: HistoryListSearch;
|
|
68
|
+
user?: string;
|
|
68
69
|
}
|
|
69
70
|
export interface HistoryListSearch {
|
|
70
71
|
text: string;
|
|
@@ -88,4 +89,5 @@ export interface HistoryListItem {
|
|
|
88
89
|
entityType: HistoryEntityTypeEnum;
|
|
89
90
|
organisationId: string;
|
|
90
91
|
metadata?: HistoryMetadata;
|
|
92
|
+
user?: string;
|
|
91
93
|
}
|
package/dist/src/identifier.d.ts
CHANGED
|
@@ -115,7 +115,7 @@ export interface IdentifierListQuery extends ListQuery {
|
|
|
115
115
|
sortDirection?: SortDirection;
|
|
116
116
|
name?: string;
|
|
117
117
|
types?: IdentifierTypeEnum[];
|
|
118
|
-
|
|
118
|
+
states?: IdentifierStateEnum[];
|
|
119
119
|
exact?: ExactIdentifierFilterColumnEnum[];
|
|
120
120
|
didMethods?: string[];
|
|
121
121
|
isRemote?: boolean;
|
package/dist/src/nfc.d.ts
CHANGED
package/dist/src/nfc.js
CHANGED