@pagopa/io-react-native-iso18013 0.1.0 → 0.2.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/IoReactNativeIso18013.podspec +2 -2
- package/android/src/main/java/com/ioreactnativeiso18013/IoReactNativeIso18013Module.kt +14 -13
- package/ios/IoReactNativeIso18013.swift +11 -9
- package/lib/module/cbor/cbor/schema.js +1 -1
- package/lib/module/cbor/cbor/schema.js.map +1 -1
- package/lib/module/iso18013/iso18013-5/proximity.js +1 -1
- package/lib/typescript/src/cbor/cbor/schema.d.ts +51 -51
- package/lib/typescript/src/iso18013/iso18013-5/proximity.d.ts +2 -2
- package/lib/typescript/src/iso18013/iso18013-5/proximity.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cbor/cbor/schema.ts +1 -1
- package/src/iso18013/iso18013-5/proximity.ts +2 -2
|
@@ -16,8 +16,8 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
17
17
|
|
|
18
18
|
# Module dependencies
|
|
19
|
-
s.dependency "IOWalletCBOR", "
|
|
20
|
-
s.dependency "IOWalletProximity", "
|
|
19
|
+
s.dependency "IOWalletCBOR", "0.2.1"
|
|
20
|
+
s.dependency "IOWalletProximity", "1.3.0"
|
|
21
21
|
|
|
22
22
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
23
23
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
@@ -54,16 +54,17 @@ class IoReactNativeIso18013Module(reactContext: ReactApplicationContext) :
|
|
|
54
54
|
clearBleCache = clearBleCache
|
|
55
55
|
)
|
|
56
56
|
|
|
57
|
-
val certificatesList = parseCertificates(certificates)
|
|
57
|
+
// val certificatesList = parseCertificates(certificates)
|
|
58
58
|
qrEngagement = QrEngagement.build(reactApplicationContext, listOf(retrievalMethod)).apply {
|
|
59
|
-
if (certificatesList.isNotEmpty()) {
|
|
60
|
-
withReaderTrustStore(certificatesList)
|
|
61
|
-
}
|
|
59
|
+
// if (certificatesList.isNotEmpty()) {
|
|
60
|
+
// withReaderTrustStore(certificatesList)
|
|
61
|
+
// }
|
|
62
62
|
}
|
|
63
63
|
qrEngagement?.configure()
|
|
64
64
|
setupProximityHandler()
|
|
65
65
|
promise.resolve(true)
|
|
66
66
|
} catch (e: Exception) {
|
|
67
|
+
print(e)
|
|
67
68
|
ModuleException.START_ERROR.reject(
|
|
68
69
|
promise,
|
|
69
70
|
Pair(ERROR_KEY, getExceptionMessageOrEmpty(e))
|
|
@@ -79,15 +80,15 @@ class IoReactNativeIso18013Module(reactContext: ReactApplicationContext) :
|
|
|
79
80
|
* @throws ClassCastException if the element in the array is not a string
|
|
80
81
|
*/
|
|
81
82
|
|
|
82
|
-
private fun parseCertificates(certificates: ReadableArray): ArrayList<ByteArray> {
|
|
83
|
-
return ArrayList(
|
|
84
|
-
(0 until certificates.size()).mapNotNull { i ->
|
|
85
|
-
certificates.getString(i)?.let { cert ->
|
|
86
|
-
Base64Utils.decodeBase64(cert)
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
}
|
|
83
|
+
// private fun parseCertificates(certificates: ReadableArray): ArrayList<ByteArray> {
|
|
84
|
+
// return ArrayList(
|
|
85
|
+
// (0 until certificates.size()).mapNotNull { i ->
|
|
86
|
+
// certificates.getString(i)?.let { cert ->
|
|
87
|
+
// Base64Utils.decodeBase64(cert)
|
|
88
|
+
// }
|
|
89
|
+
// }
|
|
90
|
+
// )
|
|
91
|
+
// }
|
|
91
92
|
|
|
92
93
|
/**
|
|
93
94
|
* Creates a QR code to be scanned in order to initialize the presentation.
|
|
@@ -42,19 +42,19 @@ class IoReactNativeProximity: RCTEventEmitter {
|
|
|
42
42
|
Resolves to true or rejects if an error occurs.
|
|
43
43
|
|
|
44
44
|
- Parameters:
|
|
45
|
-
- certificates:
|
|
45
|
+
- certificates: Two-dimensional array of base64 strings representing DER encoded X.509 certificate which are used to authenticate the verifier app
|
|
46
46
|
- resolve: The promise to be resolved
|
|
47
47
|
- reject: The promise to be rejected
|
|
48
48
|
*/
|
|
49
49
|
@objc(start:withResolver:withRejecter:)
|
|
50
50
|
func start(
|
|
51
|
-
certificates:
|
|
51
|
+
certificates: [Any],
|
|
52
52
|
_ resolve: @escaping RCTPromiseResolveBlock,
|
|
53
53
|
reject: @escaping RCTPromiseRejectBlock
|
|
54
54
|
){
|
|
55
55
|
do {
|
|
56
56
|
let certsData = parseCertificates(certificates)
|
|
57
|
-
try Proximity.shared.start(certsData
|
|
57
|
+
try Proximity.shared.start(certsData)
|
|
58
58
|
resolve(true)
|
|
59
59
|
} catch let error {
|
|
60
60
|
ME.startError.reject(reject: reject, ("error", error.localizedDescription))
|
|
@@ -65,17 +65,19 @@ class IoReactNativeProximity: RCTEventEmitter {
|
|
|
65
65
|
Utility function to parse an array coming from the React Native Bridge into an array of Data representing DER encoded X.509 certificates.
|
|
66
66
|
|
|
67
67
|
- Parameters:
|
|
68
|
-
- certificates:
|
|
68
|
+
- certificates:Two-dimensional array of base64 strings representing DER encoded X.509 certificate
|
|
69
69
|
|
|
70
|
-
- Returns:
|
|
70
|
+
- Returns: A two-dimensional array of Data containing DER encoded X.509 certificates.
|
|
71
71
|
*/
|
|
72
|
-
private func parseCertificates(_ certificates:
|
|
72
|
+
private func parseCertificates(_ certificates: Array<Any>) -> [[Data]] {
|
|
73
73
|
return certificates.compactMap { item in
|
|
74
|
-
guard let
|
|
75
|
-
let data = Data(base64Encoded: certString) else {
|
|
74
|
+
guard let certStrings = item as? [String] else {
|
|
76
75
|
return nil
|
|
77
76
|
}
|
|
78
|
-
|
|
77
|
+
let dataArray = certStrings.compactMap { certString in
|
|
78
|
+
Data(base64Encoded: certString)
|
|
79
|
+
}
|
|
80
|
+
return dataArray.isEmpty ? nil : dataArray
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
|
|
@@ -22,7 +22,7 @@ export const DocumentValue = z.object({
|
|
|
22
22
|
*/
|
|
23
23
|
export const IssuerAuthUnprotectedHeader = z.object({
|
|
24
24
|
algorithm: z.coerce.string().optional(),
|
|
25
|
-
|
|
25
|
+
kid: z.string().optional(),
|
|
26
26
|
x5chain: z.array(z.string()).optional()
|
|
27
27
|
});
|
|
28
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["z","coerceToJSON","DocumentTypeEnum","DocumentType","nativeEnum","DocumentValue","object","digestID","coerce","number","optional","random","string","elementIdentifier","elementValue","any","IssuerAuthUnprotectedHeader","algorithm","
|
|
1
|
+
{"version":3,"names":["z","coerceToJSON","DocumentTypeEnum","DocumentType","nativeEnum","DocumentValue","object","digestID","coerce","number","optional","random","string","elementIdentifier","elementValue","any","IssuerAuthUnprotectedHeader","algorithm","kid","x5chain","array","IssuerAuthPayloadValidityInfo","signed","date","validUntil","validFrom","expectedUpdate","ECKey","kty","enum","crv","x","y","RSAKEY","alg","e","n","PublicKey","union","IssuerAuthPayloadDeviceKeyInfo","deviceKey","IssuerAuthPayload","docType","version","validityInfo","digestAlgorithm","deviceKeyInfo","valueDigests","record","IssuerAuth","rawValue","protectedHeader","unprotectedHeader","payload","signature","IssuerSigned","nameSpaces","pipe","issuerAuth","MDOC","issuerSigned","Documents","status","documents","DocumentsFromString","IssuerSignedFromString"],"sourceRoot":"../../../../src","sources":["cbor/cbor/schema.ts"],"mappings":";;AAAA,SAASA,CAAC,QAAQ,KAAK;AACvB,SAASC,YAAY,QAAQ,mBAAgB;AAE7C,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAK5B,OAAO,MAAMC,YAAY,GAAGH,CAAC,CAACI,UAAU,CAACF,gBAAgB,CAAC;AAG1D;AACA;AACA;AACA,OAAO,MAAMG,aAAa,GAAGL,CAAC,CAACM,MAAM,CAAC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|
@@ -34,7 +34,7 @@ export let ErrorCode = /*#__PURE__*/function (ErrorCode) {
|
|
|
34
34
|
* @param config.peripheralMode (Android only) - Whether the device is in peripheral mode. Defaults to true
|
|
35
35
|
* @param config.centralClientMode (Android only) - Whether the device is in central client mode. Defaults to false
|
|
36
36
|
* @param config.clearBleCache (Android only) - Whether the BLE cache should be cleared. Defaults to true
|
|
37
|
-
* @param config.certificates -
|
|
37
|
+
* @param config.certificates - Two-dimensional array of base64 strings representing DER encoded X.509 certificate which are used to authenticate the verifier app
|
|
38
38
|
*/
|
|
39
39
|
export function start(config = {}) {
|
|
40
40
|
const {
|
|
@@ -30,15 +30,15 @@ export type DocumentValue = z.infer<typeof DocumentValue>;
|
|
|
30
30
|
*/
|
|
31
31
|
export declare const IssuerAuthUnprotectedHeader: z.ZodObject<{
|
|
32
32
|
algorithm: z.ZodOptional<z.ZodString>;
|
|
33
|
-
|
|
33
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
34
34
|
x5chain: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
36
|
algorithm?: string | undefined;
|
|
37
|
-
|
|
37
|
+
kid?: string | undefined;
|
|
38
38
|
x5chain?: string[] | undefined;
|
|
39
39
|
}, {
|
|
40
40
|
algorithm?: string | undefined;
|
|
41
|
-
|
|
41
|
+
kid?: string | undefined;
|
|
42
42
|
x5chain?: string[] | undefined;
|
|
43
43
|
}>;
|
|
44
44
|
export type IssuerAuthUnprotectedHeader = z.infer<typeof IssuerAuthUnprotectedHeader>;
|
|
@@ -262,15 +262,15 @@ export declare const IssuerAuth: z.ZodObject<{
|
|
|
262
262
|
protectedHeader: z.ZodOptional<z.ZodString>;
|
|
263
263
|
unprotectedHeader: z.ZodObject<{
|
|
264
264
|
algorithm: z.ZodOptional<z.ZodString>;
|
|
265
|
-
|
|
265
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
266
266
|
x5chain: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
267
267
|
}, "strip", z.ZodTypeAny, {
|
|
268
268
|
algorithm?: string | undefined;
|
|
269
|
-
|
|
269
|
+
kid?: string | undefined;
|
|
270
270
|
x5chain?: string[] | undefined;
|
|
271
271
|
}, {
|
|
272
272
|
algorithm?: string | undefined;
|
|
273
|
-
|
|
273
|
+
kid?: string | undefined;
|
|
274
274
|
x5chain?: string[] | undefined;
|
|
275
275
|
}>;
|
|
276
276
|
payload: z.ZodObject<{
|
|
@@ -404,7 +404,7 @@ export declare const IssuerAuth: z.ZodObject<{
|
|
|
404
404
|
}, "strip", z.ZodTypeAny, {
|
|
405
405
|
unprotectedHeader: {
|
|
406
406
|
algorithm?: string | undefined;
|
|
407
|
-
|
|
407
|
+
kid?: string | undefined;
|
|
408
408
|
x5chain?: string[] | undefined;
|
|
409
409
|
};
|
|
410
410
|
payload: {
|
|
@@ -438,7 +438,7 @@ export declare const IssuerAuth: z.ZodObject<{
|
|
|
438
438
|
}, {
|
|
439
439
|
unprotectedHeader: {
|
|
440
440
|
algorithm?: string | undefined;
|
|
441
|
-
|
|
441
|
+
kid?: string | undefined;
|
|
442
442
|
x5chain?: string[] | undefined;
|
|
443
443
|
};
|
|
444
444
|
payload: {
|
|
@@ -496,15 +496,15 @@ export declare const IssuerSigned: z.ZodObject<{
|
|
|
496
496
|
protectedHeader: z.ZodOptional<z.ZodString>;
|
|
497
497
|
unprotectedHeader: z.ZodObject<{
|
|
498
498
|
algorithm: z.ZodOptional<z.ZodString>;
|
|
499
|
-
|
|
499
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
500
500
|
x5chain: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
501
501
|
}, "strip", z.ZodTypeAny, {
|
|
502
502
|
algorithm?: string | undefined;
|
|
503
|
-
|
|
503
|
+
kid?: string | undefined;
|
|
504
504
|
x5chain?: string[] | undefined;
|
|
505
505
|
}, {
|
|
506
506
|
algorithm?: string | undefined;
|
|
507
|
-
|
|
507
|
+
kid?: string | undefined;
|
|
508
508
|
x5chain?: string[] | undefined;
|
|
509
509
|
}>;
|
|
510
510
|
payload: z.ZodObject<{
|
|
@@ -638,7 +638,7 @@ export declare const IssuerSigned: z.ZodObject<{
|
|
|
638
638
|
}, "strip", z.ZodTypeAny, {
|
|
639
639
|
unprotectedHeader: {
|
|
640
640
|
algorithm?: string | undefined;
|
|
641
|
-
|
|
641
|
+
kid?: string | undefined;
|
|
642
642
|
x5chain?: string[] | undefined;
|
|
643
643
|
};
|
|
644
644
|
payload: {
|
|
@@ -672,7 +672,7 @@ export declare const IssuerSigned: z.ZodObject<{
|
|
|
672
672
|
}, {
|
|
673
673
|
unprotectedHeader: {
|
|
674
674
|
algorithm?: string | undefined;
|
|
675
|
-
|
|
675
|
+
kid?: string | undefined;
|
|
676
676
|
x5chain?: string[] | undefined;
|
|
677
677
|
};
|
|
678
678
|
payload: {
|
|
@@ -714,7 +714,7 @@ export declare const IssuerSigned: z.ZodObject<{
|
|
|
714
714
|
issuerAuth: {
|
|
715
715
|
unprotectedHeader: {
|
|
716
716
|
algorithm?: string | undefined;
|
|
717
|
-
|
|
717
|
+
kid?: string | undefined;
|
|
718
718
|
x5chain?: string[] | undefined;
|
|
719
719
|
};
|
|
720
720
|
payload: {
|
|
@@ -751,7 +751,7 @@ export declare const IssuerSigned: z.ZodObject<{
|
|
|
751
751
|
issuerAuth: {
|
|
752
752
|
unprotectedHeader: {
|
|
753
753
|
algorithm?: string | undefined;
|
|
754
|
-
|
|
754
|
+
kid?: string | undefined;
|
|
755
755
|
x5chain?: string[] | undefined;
|
|
756
756
|
};
|
|
757
757
|
payload: {
|
|
@@ -812,15 +812,15 @@ export declare const MDOC: z.ZodObject<{
|
|
|
812
812
|
protectedHeader: z.ZodOptional<z.ZodString>;
|
|
813
813
|
unprotectedHeader: z.ZodObject<{
|
|
814
814
|
algorithm: z.ZodOptional<z.ZodString>;
|
|
815
|
-
|
|
815
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
816
816
|
x5chain: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
817
817
|
}, "strip", z.ZodTypeAny, {
|
|
818
818
|
algorithm?: string | undefined;
|
|
819
|
-
|
|
819
|
+
kid?: string | undefined;
|
|
820
820
|
x5chain?: string[] | undefined;
|
|
821
821
|
}, {
|
|
822
822
|
algorithm?: string | undefined;
|
|
823
|
-
|
|
823
|
+
kid?: string | undefined;
|
|
824
824
|
x5chain?: string[] | undefined;
|
|
825
825
|
}>;
|
|
826
826
|
payload: z.ZodObject<{
|
|
@@ -954,7 +954,7 @@ export declare const MDOC: z.ZodObject<{
|
|
|
954
954
|
}, "strip", z.ZodTypeAny, {
|
|
955
955
|
unprotectedHeader: {
|
|
956
956
|
algorithm?: string | undefined;
|
|
957
|
-
|
|
957
|
+
kid?: string | undefined;
|
|
958
958
|
x5chain?: string[] | undefined;
|
|
959
959
|
};
|
|
960
960
|
payload: {
|
|
@@ -988,7 +988,7 @@ export declare const MDOC: z.ZodObject<{
|
|
|
988
988
|
}, {
|
|
989
989
|
unprotectedHeader: {
|
|
990
990
|
algorithm?: string | undefined;
|
|
991
|
-
|
|
991
|
+
kid?: string | undefined;
|
|
992
992
|
x5chain?: string[] | undefined;
|
|
993
993
|
};
|
|
994
994
|
payload: {
|
|
@@ -1030,7 +1030,7 @@ export declare const MDOC: z.ZodObject<{
|
|
|
1030
1030
|
issuerAuth: {
|
|
1031
1031
|
unprotectedHeader: {
|
|
1032
1032
|
algorithm?: string | undefined;
|
|
1033
|
-
|
|
1033
|
+
kid?: string | undefined;
|
|
1034
1034
|
x5chain?: string[] | undefined;
|
|
1035
1035
|
};
|
|
1036
1036
|
payload: {
|
|
@@ -1067,7 +1067,7 @@ export declare const MDOC: z.ZodObject<{
|
|
|
1067
1067
|
issuerAuth: {
|
|
1068
1068
|
unprotectedHeader: {
|
|
1069
1069
|
algorithm?: string | undefined;
|
|
1070
|
-
|
|
1070
|
+
kid?: string | undefined;
|
|
1071
1071
|
x5chain?: string[] | undefined;
|
|
1072
1072
|
};
|
|
1073
1073
|
payload: {
|
|
@@ -1112,7 +1112,7 @@ export declare const MDOC: z.ZodObject<{
|
|
|
1112
1112
|
issuerAuth: {
|
|
1113
1113
|
unprotectedHeader: {
|
|
1114
1114
|
algorithm?: string | undefined;
|
|
1115
|
-
|
|
1115
|
+
kid?: string | undefined;
|
|
1116
1116
|
x5chain?: string[] | undefined;
|
|
1117
1117
|
};
|
|
1118
1118
|
payload: {
|
|
@@ -1152,7 +1152,7 @@ export declare const MDOC: z.ZodObject<{
|
|
|
1152
1152
|
issuerAuth: {
|
|
1153
1153
|
unprotectedHeader: {
|
|
1154
1154
|
algorithm?: string | undefined;
|
|
1155
|
-
|
|
1155
|
+
kid?: string | undefined;
|
|
1156
1156
|
x5chain?: string[] | undefined;
|
|
1157
1157
|
};
|
|
1158
1158
|
payload: {
|
|
@@ -1217,15 +1217,15 @@ export declare const Documents: z.ZodObject<{
|
|
|
1217
1217
|
protectedHeader: z.ZodOptional<z.ZodString>;
|
|
1218
1218
|
unprotectedHeader: z.ZodObject<{
|
|
1219
1219
|
algorithm: z.ZodOptional<z.ZodString>;
|
|
1220
|
-
|
|
1220
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
1221
1221
|
x5chain: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1222
1222
|
}, "strip", z.ZodTypeAny, {
|
|
1223
1223
|
algorithm?: string | undefined;
|
|
1224
|
-
|
|
1224
|
+
kid?: string | undefined;
|
|
1225
1225
|
x5chain?: string[] | undefined;
|
|
1226
1226
|
}, {
|
|
1227
1227
|
algorithm?: string | undefined;
|
|
1228
|
-
|
|
1228
|
+
kid?: string | undefined;
|
|
1229
1229
|
x5chain?: string[] | undefined;
|
|
1230
1230
|
}>;
|
|
1231
1231
|
payload: z.ZodObject<{
|
|
@@ -1359,7 +1359,7 @@ export declare const Documents: z.ZodObject<{
|
|
|
1359
1359
|
}, "strip", z.ZodTypeAny, {
|
|
1360
1360
|
unprotectedHeader: {
|
|
1361
1361
|
algorithm?: string | undefined;
|
|
1362
|
-
|
|
1362
|
+
kid?: string | undefined;
|
|
1363
1363
|
x5chain?: string[] | undefined;
|
|
1364
1364
|
};
|
|
1365
1365
|
payload: {
|
|
@@ -1393,7 +1393,7 @@ export declare const Documents: z.ZodObject<{
|
|
|
1393
1393
|
}, {
|
|
1394
1394
|
unprotectedHeader: {
|
|
1395
1395
|
algorithm?: string | undefined;
|
|
1396
|
-
|
|
1396
|
+
kid?: string | undefined;
|
|
1397
1397
|
x5chain?: string[] | undefined;
|
|
1398
1398
|
};
|
|
1399
1399
|
payload: {
|
|
@@ -1435,7 +1435,7 @@ export declare const Documents: z.ZodObject<{
|
|
|
1435
1435
|
issuerAuth: {
|
|
1436
1436
|
unprotectedHeader: {
|
|
1437
1437
|
algorithm?: string | undefined;
|
|
1438
|
-
|
|
1438
|
+
kid?: string | undefined;
|
|
1439
1439
|
x5chain?: string[] | undefined;
|
|
1440
1440
|
};
|
|
1441
1441
|
payload: {
|
|
@@ -1472,7 +1472,7 @@ export declare const Documents: z.ZodObject<{
|
|
|
1472
1472
|
issuerAuth: {
|
|
1473
1473
|
unprotectedHeader: {
|
|
1474
1474
|
algorithm?: string | undefined;
|
|
1475
|
-
|
|
1475
|
+
kid?: string | undefined;
|
|
1476
1476
|
x5chain?: string[] | undefined;
|
|
1477
1477
|
};
|
|
1478
1478
|
payload: {
|
|
@@ -1517,7 +1517,7 @@ export declare const Documents: z.ZodObject<{
|
|
|
1517
1517
|
issuerAuth: {
|
|
1518
1518
|
unprotectedHeader: {
|
|
1519
1519
|
algorithm?: string | undefined;
|
|
1520
|
-
|
|
1520
|
+
kid?: string | undefined;
|
|
1521
1521
|
x5chain?: string[] | undefined;
|
|
1522
1522
|
};
|
|
1523
1523
|
payload: {
|
|
@@ -1557,7 +1557,7 @@ export declare const Documents: z.ZodObject<{
|
|
|
1557
1557
|
issuerAuth: {
|
|
1558
1558
|
unprotectedHeader: {
|
|
1559
1559
|
algorithm?: string | undefined;
|
|
1560
|
-
|
|
1560
|
+
kid?: string | undefined;
|
|
1561
1561
|
x5chain?: string[] | undefined;
|
|
1562
1562
|
};
|
|
1563
1563
|
payload: {
|
|
@@ -1604,7 +1604,7 @@ export declare const Documents: z.ZodObject<{
|
|
|
1604
1604
|
issuerAuth: {
|
|
1605
1605
|
unprotectedHeader: {
|
|
1606
1606
|
algorithm?: string | undefined;
|
|
1607
|
-
|
|
1607
|
+
kid?: string | undefined;
|
|
1608
1608
|
x5chain?: string[] | undefined;
|
|
1609
1609
|
};
|
|
1610
1610
|
payload: {
|
|
@@ -1675,15 +1675,15 @@ export declare const DocumentsFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny, a
|
|
|
1675
1675
|
protectedHeader: z.ZodOptional<z.ZodString>;
|
|
1676
1676
|
unprotectedHeader: z.ZodObject<{
|
|
1677
1677
|
algorithm: z.ZodOptional<z.ZodString>;
|
|
1678
|
-
|
|
1678
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
1679
1679
|
x5chain: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1680
1680
|
}, "strip", z.ZodTypeAny, {
|
|
1681
1681
|
algorithm?: string | undefined;
|
|
1682
|
-
|
|
1682
|
+
kid?: string | undefined;
|
|
1683
1683
|
x5chain?: string[] | undefined;
|
|
1684
1684
|
}, {
|
|
1685
1685
|
algorithm?: string | undefined;
|
|
1686
|
-
|
|
1686
|
+
kid?: string | undefined;
|
|
1687
1687
|
x5chain?: string[] | undefined;
|
|
1688
1688
|
}>;
|
|
1689
1689
|
payload: z.ZodObject<{
|
|
@@ -1817,7 +1817,7 @@ export declare const DocumentsFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny, a
|
|
|
1817
1817
|
}, "strip", z.ZodTypeAny, {
|
|
1818
1818
|
unprotectedHeader: {
|
|
1819
1819
|
algorithm?: string | undefined;
|
|
1820
|
-
|
|
1820
|
+
kid?: string | undefined;
|
|
1821
1821
|
x5chain?: string[] | undefined;
|
|
1822
1822
|
};
|
|
1823
1823
|
payload: {
|
|
@@ -1851,7 +1851,7 @@ export declare const DocumentsFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny, a
|
|
|
1851
1851
|
}, {
|
|
1852
1852
|
unprotectedHeader: {
|
|
1853
1853
|
algorithm?: string | undefined;
|
|
1854
|
-
|
|
1854
|
+
kid?: string | undefined;
|
|
1855
1855
|
x5chain?: string[] | undefined;
|
|
1856
1856
|
};
|
|
1857
1857
|
payload: {
|
|
@@ -1893,7 +1893,7 @@ export declare const DocumentsFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny, a
|
|
|
1893
1893
|
issuerAuth: {
|
|
1894
1894
|
unprotectedHeader: {
|
|
1895
1895
|
algorithm?: string | undefined;
|
|
1896
|
-
|
|
1896
|
+
kid?: string | undefined;
|
|
1897
1897
|
x5chain?: string[] | undefined;
|
|
1898
1898
|
};
|
|
1899
1899
|
payload: {
|
|
@@ -1930,7 +1930,7 @@ export declare const DocumentsFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny, a
|
|
|
1930
1930
|
issuerAuth: {
|
|
1931
1931
|
unprotectedHeader: {
|
|
1932
1932
|
algorithm?: string | undefined;
|
|
1933
|
-
|
|
1933
|
+
kid?: string | undefined;
|
|
1934
1934
|
x5chain?: string[] | undefined;
|
|
1935
1935
|
};
|
|
1936
1936
|
payload: {
|
|
@@ -1975,7 +1975,7 @@ export declare const DocumentsFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny, a
|
|
|
1975
1975
|
issuerAuth: {
|
|
1976
1976
|
unprotectedHeader: {
|
|
1977
1977
|
algorithm?: string | undefined;
|
|
1978
|
-
|
|
1978
|
+
kid?: string | undefined;
|
|
1979
1979
|
x5chain?: string[] | undefined;
|
|
1980
1980
|
};
|
|
1981
1981
|
payload: {
|
|
@@ -2015,7 +2015,7 @@ export declare const DocumentsFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny, a
|
|
|
2015
2015
|
issuerAuth: {
|
|
2016
2016
|
unprotectedHeader: {
|
|
2017
2017
|
algorithm?: string | undefined;
|
|
2018
|
-
|
|
2018
|
+
kid?: string | undefined;
|
|
2019
2019
|
x5chain?: string[] | undefined;
|
|
2020
2020
|
};
|
|
2021
2021
|
payload: {
|
|
@@ -2062,7 +2062,7 @@ export declare const DocumentsFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny, a
|
|
|
2062
2062
|
issuerAuth: {
|
|
2063
2063
|
unprotectedHeader: {
|
|
2064
2064
|
algorithm?: string | undefined;
|
|
2065
|
-
|
|
2065
|
+
kid?: string | undefined;
|
|
2066
2066
|
x5chain?: string[] | undefined;
|
|
2067
2067
|
};
|
|
2068
2068
|
payload: {
|
|
@@ -2128,15 +2128,15 @@ export declare const IssuerSignedFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny
|
|
|
2128
2128
|
protectedHeader: z.ZodOptional<z.ZodString>;
|
|
2129
2129
|
unprotectedHeader: z.ZodObject<{
|
|
2130
2130
|
algorithm: z.ZodOptional<z.ZodString>;
|
|
2131
|
-
|
|
2131
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
2132
2132
|
x5chain: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2133
2133
|
}, "strip", z.ZodTypeAny, {
|
|
2134
2134
|
algorithm?: string | undefined;
|
|
2135
|
-
|
|
2135
|
+
kid?: string | undefined;
|
|
2136
2136
|
x5chain?: string[] | undefined;
|
|
2137
2137
|
}, {
|
|
2138
2138
|
algorithm?: string | undefined;
|
|
2139
|
-
|
|
2139
|
+
kid?: string | undefined;
|
|
2140
2140
|
x5chain?: string[] | undefined;
|
|
2141
2141
|
}>;
|
|
2142
2142
|
payload: z.ZodObject<{
|
|
@@ -2270,7 +2270,7 @@ export declare const IssuerSignedFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny
|
|
|
2270
2270
|
}, "strip", z.ZodTypeAny, {
|
|
2271
2271
|
unprotectedHeader: {
|
|
2272
2272
|
algorithm?: string | undefined;
|
|
2273
|
-
|
|
2273
|
+
kid?: string | undefined;
|
|
2274
2274
|
x5chain?: string[] | undefined;
|
|
2275
2275
|
};
|
|
2276
2276
|
payload: {
|
|
@@ -2304,7 +2304,7 @@ export declare const IssuerSignedFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny
|
|
|
2304
2304
|
}, {
|
|
2305
2305
|
unprotectedHeader: {
|
|
2306
2306
|
algorithm?: string | undefined;
|
|
2307
|
-
|
|
2307
|
+
kid?: string | undefined;
|
|
2308
2308
|
x5chain?: string[] | undefined;
|
|
2309
2309
|
};
|
|
2310
2310
|
payload: {
|
|
@@ -2346,7 +2346,7 @@ export declare const IssuerSignedFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny
|
|
|
2346
2346
|
issuerAuth: {
|
|
2347
2347
|
unprotectedHeader: {
|
|
2348
2348
|
algorithm?: string | undefined;
|
|
2349
|
-
|
|
2349
|
+
kid?: string | undefined;
|
|
2350
2350
|
x5chain?: string[] | undefined;
|
|
2351
2351
|
};
|
|
2352
2352
|
payload: {
|
|
@@ -2383,7 +2383,7 @@ export declare const IssuerSignedFromString: z.ZodPipeline<z.ZodEffects<z.ZodAny
|
|
|
2383
2383
|
issuerAuth: {
|
|
2384
2384
|
unprotectedHeader: {
|
|
2385
2385
|
algorithm?: string | undefined;
|
|
2386
|
-
|
|
2386
|
+
kid?: string | undefined;
|
|
2387
2387
|
x5chain?: string[] | undefined;
|
|
2388
2388
|
};
|
|
2389
2389
|
payload: {
|
|
@@ -38,13 +38,13 @@ export declare enum ErrorCode {
|
|
|
38
38
|
* @param config.peripheralMode (Android only) - Whether the device is in peripheral mode. Defaults to true
|
|
39
39
|
* @param config.centralClientMode (Android only) - Whether the device is in central client mode. Defaults to false
|
|
40
40
|
* @param config.clearBleCache (Android only) - Whether the BLE cache should be cleared. Defaults to true
|
|
41
|
-
* @param config.certificates -
|
|
41
|
+
* @param config.certificates - Two-dimensional array of base64 strings representing DER encoded X.509 certificate which are used to authenticate the verifier app
|
|
42
42
|
*/
|
|
43
43
|
export declare function start(config?: {
|
|
44
44
|
peripheralMode?: boolean;
|
|
45
45
|
centralClientMode?: boolean;
|
|
46
46
|
clearBleCache?: boolean;
|
|
47
|
-
certificates?:
|
|
47
|
+
certificates?: Array<Array<String>>;
|
|
48
48
|
}): Promise<boolean>;
|
|
49
49
|
/**
|
|
50
50
|
* Gets the QR code string this method is responsible for initializing the connection and retrieving the QR code string
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proximity.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-5/proximity.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIlD;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,kBAAkB,EAAE,SAAS,CAAC;IAC9B,iBAAiB,EAAE,SAAS,CAAC;IAE7B,yBAAyB,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IACzD,oBAAoB,EAAE,SAAS,CAAC;IAChC,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC;AAEzC;;;;GAIG;AACH,oBAAY,SAAS;IACnB,kBAAkB,KAAK;IACvB,aAAa,KAAK;IAClB,kBAAkB,KAAK;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CACnB,MAAM,GAAE;IACN,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"proximity.d.ts","sourceRoot":"","sources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AC,EACnC,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAC1C,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,QAG3C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,QAE3C"}
|
package/package.json
CHANGED
package/src/cbor/cbor/schema.ts
CHANGED
|
@@ -26,7 +26,7 @@ export type DocumentValue = z.infer<typeof DocumentValue>;
|
|
|
26
26
|
*/
|
|
27
27
|
export const IssuerAuthUnprotectedHeader = z.object({
|
|
28
28
|
algorithm: z.coerce.string().optional(),
|
|
29
|
-
|
|
29
|
+
kid: z.string().optional(),
|
|
30
30
|
x5chain: z.array(z.string()).optional(),
|
|
31
31
|
});
|
|
32
32
|
|
|
@@ -43,14 +43,14 @@ export enum ErrorCode {
|
|
|
43
43
|
* @param config.peripheralMode (Android only) - Whether the device is in peripheral mode. Defaults to true
|
|
44
44
|
* @param config.centralClientMode (Android only) - Whether the device is in central client mode. Defaults to false
|
|
45
45
|
* @param config.clearBleCache (Android only) - Whether the BLE cache should be cleared. Defaults to true
|
|
46
|
-
* @param config.certificates -
|
|
46
|
+
* @param config.certificates - Two-dimensional array of base64 strings representing DER encoded X.509 certificate which are used to authenticate the verifier app
|
|
47
47
|
*/
|
|
48
48
|
export function start(
|
|
49
49
|
config: {
|
|
50
50
|
peripheralMode?: boolean;
|
|
51
51
|
centralClientMode?: boolean;
|
|
52
52
|
clearBleCache?: boolean;
|
|
53
|
-
certificates?:
|
|
53
|
+
certificates?: Array<Array<String>>;
|
|
54
54
|
} = {}
|
|
55
55
|
): Promise<boolean> {
|
|
56
56
|
const { peripheralMode, centralClientMode, clearBleCache, certificates } =
|