@trustchex/react-native-sdk 1.487.0 → 1.488.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/lib/module/Shared/Components/EIDScanner.js +95 -36
- package/lib/module/Shared/Components/IdentityDocumentCamera.constants.js +9 -1
- package/lib/module/Shared/EIDReader/cardFileInputStream.js +25 -2
- package/lib/module/Shared/EIDReader/defaultFileSystem.js +56 -6
- package/lib/module/Shared/EIDReader/eidReader.js +124 -14
- package/lib/module/Shared/EIDReader/lds/icao/dg11File.js +23 -6
- package/lib/module/Shared/EIDReader/nfcManagerCardService.js +79 -9
- package/lib/module/Shared/EIDReader/protocol/paceDH.js +101 -0
- package/lib/module/Shared/EIDReader/protocol/paceErrors.js +34 -0
- package/lib/module/Shared/EIDReader/protocol/paceProtocol.js +53 -4
- package/lib/module/Shared/EIDReader/protocol/readBinaryAPDUSender.js +7 -3
- package/lib/module/Shared/Libs/country-display.utils.js +13 -1
- package/lib/module/Shared/Libs/diagnosticReport.js +24 -1
- package/lib/module/Shared/Libs/diagnostics.js +30 -8
- package/lib/module/Shared/Libs/mrz.utils.js +22 -5
- package/lib/module/Shared/Libs/mrzTransliteration.js +14 -1
- package/lib/module/Translation/Resources/en.js +12 -0
- package/lib/module/Translation/Resources/tr.js +12 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/src/Shared/Components/EIDScanner.d.ts.map +1 -1
- package/lib/typescript/src/Shared/Components/IdentityDocumentCamera.constants.d.ts.map +1 -1
- package/lib/typescript/src/Shared/EIDReader/cardFileInputStream.d.ts +3 -0
- package/lib/typescript/src/Shared/EIDReader/cardFileInputStream.d.ts.map +1 -1
- package/lib/typescript/src/Shared/EIDReader/defaultFileSystem.d.ts +4 -0
- package/lib/typescript/src/Shared/EIDReader/defaultFileSystem.d.ts.map +1 -1
- package/lib/typescript/src/Shared/EIDReader/eidReader.d.ts.map +1 -1
- package/lib/typescript/src/Shared/EIDReader/lds/icao/dg11File.d.ts.map +1 -1
- package/lib/typescript/src/Shared/EIDReader/nfcManagerCardService.d.ts +9 -1
- package/lib/typescript/src/Shared/EIDReader/nfcManagerCardService.d.ts.map +1 -1
- package/lib/typescript/src/Shared/EIDReader/protocol/paceDH.d.ts +56 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/paceDH.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/paceErrors.d.ts +26 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/paceErrors.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/paceProtocol.d.ts.map +1 -1
- package/lib/typescript/src/Shared/EIDReader/protocol/readBinaryAPDUSender.d.ts.map +1 -1
- package/lib/typescript/src/Shared/Libs/country-display.utils.d.ts.map +1 -1
- package/lib/typescript/src/Shared/Libs/diagnosticReport.d.ts.map +1 -1
- package/lib/typescript/src/Shared/Libs/diagnostics.d.ts +9 -1
- package/lib/typescript/src/Shared/Libs/diagnostics.d.ts.map +1 -1
- package/lib/typescript/src/Shared/Libs/mrz.utils.d.ts.map +1 -1
- package/lib/typescript/src/Shared/Libs/mrzTransliteration.d.ts.map +1 -1
- package/lib/typescript/src/Translation/Resources/en.d.ts +12 -0
- package/lib/typescript/src/Translation/Resources/en.d.ts.map +1 -1
- package/lib/typescript/src/Translation/Resources/tr.d.ts +12 -0
- package/lib/typescript/src/Translation/Resources/tr.d.ts.map +1 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/Shared/Components/EIDScanner.tsx +148 -68
- package/src/Shared/Components/IdentityDocumentCamera.constants.ts +9 -1
- package/src/Shared/EIDReader/cardFileInputStream.ts +30 -6
- package/src/Shared/EIDReader/defaultFileSystem.ts +75 -17
- package/src/Shared/EIDReader/eidReader.ts +154 -21
- package/src/Shared/EIDReader/lds/icao/dg11File.ts +28 -13
- package/src/Shared/EIDReader/nfcManagerCardService.ts +91 -13
- package/src/Shared/EIDReader/protocol/paceDH.ts +183 -0
- package/src/Shared/EIDReader/protocol/paceErrors.ts +41 -0
- package/src/Shared/EIDReader/protocol/paceProtocol.ts +72 -6
- package/src/Shared/EIDReader/protocol/readBinaryAPDUSender.ts +7 -4
- package/src/Shared/Libs/country-display.utils.ts +12 -1
- package/src/Shared/Libs/diagnosticReport.ts +32 -1
- package/src/Shared/Libs/diagnostics.ts +38 -14
- package/src/Shared/Libs/mrz.utils.ts +27 -6
- package/src/Shared/Libs/mrzTransliteration.ts +16 -3
- package/src/Translation/Resources/en.ts +19 -0
- package/src/Translation/Resources/tr.ts +19 -0
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardFileInputStream.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/EIDReader/cardFileInputStream.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAG9E,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,kBAAkB,CAAU;IACpC,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,UAAU,CAAU;IAC5B,OAAO,CAAC,EAAE,CAAuB;IACjC,OAAO,CAAC,YAAY,CAAS;gBAEjB,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,oBAAoB;IAMpD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBrB,IAAI;
|
|
1
|
+
{"version":3,"file":"cardFileInputStream.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/EIDReader/cardFileInputStream.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAG9E,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;uEACmE;IACnE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAK;IAEnD,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,kBAAkB,CAAU;IACpC,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,UAAU,CAAU;IAC5B,OAAO,CAAC,EAAE,CAAuB;IACjC,OAAO,CAAC,YAAY,CAAS;gBAEjB,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,oBAAoB;IAMpD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBrB,IAAI;IA2EV,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAahC,SAAS,IAAI,MAAM;IAInB,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAI9B,KAAK,IAAI,IAAI;IAUb,aAAa,IAAI,OAAO;IAIxB,SAAS,IAAI,MAAM;IAInB,WAAW,IAAI,MAAM;YAIP,kBAAkB;IA+BhC,OAAO,CAAC,YAAY;CAoBrB"}
|
|
@@ -15,6 +15,10 @@ export declare class DefaultFileSystem implements FileSystemStructured {
|
|
|
15
15
|
private wrapper;
|
|
16
16
|
private oldWrapper;
|
|
17
17
|
constructor(service: APDULevelReadBinaryCapable, isSFIEnabled: boolean, fidToSFI?: Map<number, number>);
|
|
18
|
+
/** Deep-copy a secure-messaging wrapper PRESERVING its cipher type (AES vs
|
|
19
|
+
* 3DES), so the SSC can be rewound for a retry without changing the MAC/enc
|
|
20
|
+
* algorithm. Non-SM wrappers are returned as-is. */
|
|
21
|
+
private cloneWrapper;
|
|
18
22
|
setWrapper(wrapper: APDUWrapper): void;
|
|
19
23
|
getWrapper(): APDUWrapper;
|
|
20
24
|
getMaxReadBinaryLength(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultFileSystem.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/EIDReader/defaultFileSystem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG/E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"defaultFileSystem.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/EIDReader/defaultFileSystem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG/E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,qBAAa,iBAAkB,YAAW,oBAAoB;IAC5D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAc;IAC5C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAa;IAEtD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,UAAU,CAAU;IAC5B,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,SAAS,CAA+B;IAChD,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,UAAU,CAAe;gBAG/B,OAAO,EAAE,0BAA0B,EACnC,YAAY,EAAE,OAAO,EACrB,QAAQ,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAA6B;IAsB3D;;yDAEqD;IACrD,OAAO,CAAC,YAAY;IAgBb,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAKtC,UAAU;IAIV,sBAAsB,IAAI,MAAM;IAI1B,eAAe,IAAI,OAAO,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC;IASnD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQvB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;YA2G9D,WAAW;YA4DX,cAAc;IAI5B,OAAO,CAAC,mBAAmB;IAqB3B,OAAO,CAAC,cAAc;YAgBR,aAAa;CAgC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eidReader.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/EIDReader/eidReader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"eidReader.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/EIDReader/eidReader.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AA0X7C,QAAA,MAAM,SAAS,GACb,gBAAgB,MAAM,EACtB,aAAa,MAAM,EACnB,cAAc,MAAM,EACpB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,KAC5C,OAAO,CACN;IACE,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,GACD,SAAS,CA+XZ,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dg11File.d.ts","sourceRoot":"","sources":["../../../../../../../src/Shared/EIDReader/lds/icao/dg11File.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEz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AAM,GAAG,IAAI;IAItB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;cAIX,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBpE,SAAS,CAAC,YAAY,IAAI,IAAI;IAI9B;;;OAGG;IACH,OAAO,CAAC,SAAS;CAgClB"}
|
|
@@ -5,9 +5,17 @@ export declare class NFCManagerCardService extends CardService {
|
|
|
5
5
|
private isOpened;
|
|
6
6
|
open(): Promise<void>;
|
|
7
7
|
getIsOpen(): boolean;
|
|
8
|
+
private sessionRestartEnabled;
|
|
9
|
+
setSessionRestartEnabled(enabled: boolean): void;
|
|
8
10
|
transmit(commandAPDU: CommandAPDU): Promise<ResponseAPDU>;
|
|
9
11
|
getATR(): Uint8Array;
|
|
10
|
-
getIsConnectionLost(
|
|
12
|
+
getIsConnectionLost(error: Error): boolean;
|
|
13
|
+
/** True if the error looks like a dropped/timed-out CoreNFC tag connection
|
|
14
|
+
* (as opposed to a real APDU/crypto failure). */
|
|
15
|
+
isTagLost(error: unknown): boolean;
|
|
16
|
+
/** Re-establish the CoreNFC session (iOS) so a fresh handshake can be retried
|
|
17
|
+
* after a tag drop. No-op on Android. Best-effort. */
|
|
18
|
+
restartSession(): Promise<void>;
|
|
11
19
|
close(): Promise<void>;
|
|
12
20
|
}
|
|
13
21
|
//# sourceMappingURL=nfcManagerCardService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nfcManagerCardService.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/EIDReader/nfcManagerCardService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"nfcManagerCardService.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/EIDReader/nfcManagerCardService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAiCzD,qBAAa,qBAAsB,SAAQ,WAAW;IACpD,OAAO,CAAC,QAAQ,CAAS;IACZ,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAc3B,SAAS,IAAI,OAAO;IAQ3B,OAAO,CAAC,qBAAqB,CAAS;IAE/B,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAI1C,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAwC/D,MAAM,IAAI,UAAU;IAIpB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAKjD;sDACkD;IAC3C,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAIzC;2DACuD;IAC1C,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAM/B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAIpC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DH (modular exponentiation, non-EC) primitives for PACE Generic Mapping.
|
|
3
|
+
*
|
|
4
|
+
* Modern ePassports/eIDs use ECDH almost universally; a minority of documents
|
|
5
|
+
* negotiate classic DH PACE. This module provides the DH math as pure,
|
|
6
|
+
* unit-testable functions so it can be verified against the ICAO 9303 Part 11
|
|
7
|
+
* worked example before it ever touches a chip. It is deliberately separate from
|
|
8
|
+
* the EC path in paceProtocol.ts — the working ECDH handshake is not modified.
|
|
9
|
+
*
|
|
10
|
+
* References: ICAO Doc 9303 Part 11 §4.4.3.2 (Generic Mapping), BSI TR-03110
|
|
11
|
+
* Part 3 §3.3.1, RFC 5114 (standardized MODP groups), TR-03110 Table A.1
|
|
12
|
+
* (standardized domain parameter IDs 0–7).
|
|
13
|
+
*/
|
|
14
|
+
/** A DH group: safe-prime modulus p, generator g, and subgroup order q. */
|
|
15
|
+
export interface DHGroup {
|
|
16
|
+
/** prime modulus */
|
|
17
|
+
p: bigint;
|
|
18
|
+
/** generator */
|
|
19
|
+
g: bigint;
|
|
20
|
+
/** subgroup order (q) — used to size exponents */
|
|
21
|
+
q: bigint;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Standardized DH domain parameters by TR-03110 parameter ID.
|
|
25
|
+
* 0 → RFC 5114 §2.1 1024-bit MODP Group with 160-bit Prime Order Subgroup
|
|
26
|
+
* 1 → RFC 5114 §2.2 2048-bit MODP Group with 224-bit Prime Order Subgroup
|
|
27
|
+
* 2 → RFC 5114 §2.3 2048-bit MODP Group with 256-bit Prime Order Subgroup
|
|
28
|
+
* (IDs 3–7 are reserved/unused in practice; EC params start at 8.)
|
|
29
|
+
*/
|
|
30
|
+
export declare const DH_GROUPS: Record<number, DHGroup>;
|
|
31
|
+
/**
|
|
32
|
+
* PACE DH Generic Mapping (ICAO 9303 Part 11 §4.4.3.2):
|
|
33
|
+
* shared secret h = PK_PICC ^ SK_PCD mod p
|
|
34
|
+
* mapped generator g~ = g^s · h mod p
|
|
35
|
+
* where s is the decrypted PICC nonce (a big-endian integer).
|
|
36
|
+
*
|
|
37
|
+
* Pure function over the group + the three inputs, so it can be checked against
|
|
38
|
+
* the ICAO worked example. `pkPicc` is the PICC mapping public key; `skPcd` the
|
|
39
|
+
* PCD mapping private key; `nonce` the decrypted nonce s.
|
|
40
|
+
*/
|
|
41
|
+
export declare const dhGenericMapping: (group: DHGroup, skPcd: bigint, pkPicc: bigint, nonce: bigint) => {
|
|
42
|
+
sharedH: bigint;
|
|
43
|
+
mappedGenerator: bigint;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* DH key agreement with a mapped generator (PACE step 3):
|
|
47
|
+
* PK = g~ ^ SK mod p (public key to send)
|
|
48
|
+
* K = PK_PICC ^ SK mod p (shared secret)
|
|
49
|
+
*/
|
|
50
|
+
export declare const dhPublicKey: (group: DHGroup, mappedGenerator: bigint, sk: bigint) => bigint;
|
|
51
|
+
export declare const dhSharedSecret: (group: DHGroup, pkPicc: bigint, sk: bigint) => bigint;
|
|
52
|
+
/** Square-and-multiply modular exponentiation (constant-shape, bigint). */
|
|
53
|
+
export declare function modPow(base: bigint, exp: bigint, mod: bigint): bigint;
|
|
54
|
+
/** Fixed-width big-endian byte encoding of a DH value (left-padded to p's size). */
|
|
55
|
+
export declare const dhEncode: (value: bigint, group: DHGroup) => Buffer;
|
|
56
|
+
//# sourceMappingURL=paceDH.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paceDH.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/protocol/paceDH.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,2EAA2E;AAC3E,MAAM,WAAW,OAAO;IACtB,oBAAoB;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,gBAAgB;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,kDAAkD;IAClD,CAAC,EAAE,MAAM,CAAC;CACX;AAID;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAoF7C,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,OAAO,EACd,OAAO,MAAM,EACb,QAAQ,MAAM,EACd,OAAO,MAAM,KACZ;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAK5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GACtB,OAAO,OAAO,EACd,iBAAiB,MAAM,EACvB,IAAI,MAAM,KACT,MAA8C,CAAC;AAElD,eAAO,MAAM,cAAc,GACzB,OAAO,OAAO,EACd,QAAQ,MAAM,EACd,IAAI,MAAM,KACT,MAAqC,CAAC;AAEzC,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAWrE;AAED,oFAAoF;AACpF,eAAO,MAAM,QAAQ,GAAI,OAAO,MAAM,EAAE,OAAO,OAAO,KAAG,MASxD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed PACE errors.
|
|
3
|
+
*
|
|
4
|
+
* The point is to let the caller distinguish a PACE CAPABILITY gap (this build
|
|
5
|
+
* cannot run the variant the chip advertises — e.g. DH agreement, CAM mapping,
|
|
6
|
+
* an unregistered curve) from a RUNTIME failure (wrong key, tag lost, APDU
|
|
7
|
+
* error). Both fall back to BAC, but the diagnostics reason must differ so we
|
|
8
|
+
* can tell "we don't support this document's PACE" from "the read went wrong".
|
|
9
|
+
*/
|
|
10
|
+
/** Why a PACE attempt could not even be run by this implementation. */
|
|
11
|
+
export type PACEUnsupportedReason = 'agreement' | 'mapping' | 'curve' | 'cipher';
|
|
12
|
+
/**
|
|
13
|
+
* Thrown when the chip advertises a PACE variant this build cannot perform.
|
|
14
|
+
* Carries a coarse, non-PII reason that maps directly to a diagnostics fallback
|
|
15
|
+
* reason (`pace_unsupported_<reason>`), so support can see exactly which
|
|
16
|
+
* capability was missing for a given document.
|
|
17
|
+
*/
|
|
18
|
+
export declare class PACEUnsupportedError extends Error {
|
|
19
|
+
readonly paceUnsupported = true;
|
|
20
|
+
readonly reason: PACEUnsupportedReason;
|
|
21
|
+
constructor(reason: PACEUnsupportedReason, detail: string);
|
|
22
|
+
}
|
|
23
|
+
/** Type guard usable across module boundaries (instanceof is unreliable after
|
|
24
|
+
* transpilation/bundling, so we also check the marker flag). */
|
|
25
|
+
export declare const isPACEUnsupportedError: (e: unknown) => e is PACEUnsupportedError;
|
|
26
|
+
//# sourceMappingURL=paceErrors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paceErrors.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/protocol/paceErrors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,uEAAuE;AACvE,MAAM,MAAM,qBAAqB,GAC7B,WAAW,GACX,SAAS,GACT,OAAO,GACP,QAAQ,CAAC;AAEb;;;;;GAKG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,eAAe,QAAQ;IAChC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;gBAE3B,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM;CAK1D;AAED;iEACiE;AACjE,eAAO,MAAM,sBAAsB,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,oBAIS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paceProtocol.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/protocol/paceProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"paceProtocol.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/protocol/paceProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAKxE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoI1C;;;;;GAKG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CA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;OAEG;WACW,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;CAgCxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readBinaryAPDUSender.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/protocol/readBinaryAPDUSender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAO7D,qBAAa,oBAAqB,YAAW,0BAA0B;IACrE,OAAO,CAAC,qBAAqB,CAA4B;IACzD,OAAO,CAAC,OAAO,CAAc;gBAEjB,OAAO,EAAE,WAAW;IAKnB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,EAAE,GAAG,EAAE,UAAU;IAuB7D,YAAY;IAqBZ,cAAc,CACzB,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC;IA0BH,cAAc,CACzB,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,OAAO,EACrB,wBAAwB,EAAE,OAAO,GAChC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"readBinaryAPDUSender.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/protocol/readBinaryAPDUSender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAO7D,qBAAa,oBAAqB,YAAW,0BAA0B;IACrE,OAAO,CAAC,qBAAqB,CAA4B;IACzD,OAAO,CAAC,OAAO,CAAc;gBAEjB,OAAO,EAAE,WAAW;IAKnB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,EAAE,GAAG,EAAE,UAAU;IAuB7D,YAAY;IAqBZ,cAAc,CACzB,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC;IA0BH,cAAc,CACzB,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,OAAO,EACrB,wBAAwB,EAAE,OAAO,GAChC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAqF7B,OAAO,CAAC,MAAM,CAAC,eAAe;IAgC9B,OAAO,CAAC,MAAM,CAAC,iCAAiC;CAsCjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country-display.utils.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/country-display.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"country-display.utils.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/country-display.utils.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,uBAAuB,GAClC,aAAa,MAAM,GAAG,IAAI,EAC1B,YAAY,MAAM,GAAG,IAAI,KACxB,MA0CF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnosticReport.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/diagnosticReport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"diagnosticReport.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/diagnosticReport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA2CpD,MAAM,WAAW,iBAAiB;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,6EAA6E;IAC7E,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAyDD,MAAM,WAAW,sBAAsB;IACrC,uCAAuC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,GAAI,QAAQ;IAC5C,IAAI,EAAE,mBAAmB,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,iBAAiB,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,KAAG,sBAuFH,CAAC"}
|
|
@@ -38,7 +38,9 @@ export interface NfcDiagnostics {
|
|
|
38
38
|
/** PACE object identifier string when PACE was attempted. */
|
|
39
39
|
paceOid?: string;
|
|
40
40
|
/** Why PACE wasn't used / fell back: 'no_card_access' | 'no_pace_info' |
|
|
41
|
-
* 'pace_failed'
|
|
41
|
+
* 'pace_failed' | 'pace_unsupported_<agreement|mapping|curve|cipher>'.
|
|
42
|
+
* The pace_unsupported_* reasons mark a CAPABILITY gap (this build can't run
|
|
43
|
+
* the variant the chip advertises) vs pace_failed (a runtime failure). */
|
|
42
44
|
paceFallbackReason?: string;
|
|
43
45
|
steps: NfcStep[];
|
|
44
46
|
/** Name of the first failing step, if any. */
|
|
@@ -131,6 +133,12 @@ export declare class DiagnosticsCollector {
|
|
|
131
133
|
nfcPaceFellBackToBac(reason?: string): void;
|
|
132
134
|
/** Record one completed step. Keep messages short and free of PII. */
|
|
133
135
|
nfcStep(step: NfcStep): void;
|
|
136
|
+
/** The first NFC step that failed in the current attempt (e.g. 'paceAuth',
|
|
137
|
+
* 'readDG2'), or undefined. Lets the caller build a step-specific error code
|
|
138
|
+
* without taking a full snapshot. */
|
|
139
|
+
getFailureStep(): string | undefined;
|
|
140
|
+
/** APDU status word recorded for the failing step, if any (e.g. '6982'). */
|
|
141
|
+
getFailureStatusWord(): string | undefined;
|
|
134
142
|
nfcResult(succeeded: boolean, errorCategory?: string): void;
|
|
135
143
|
addError(e: {
|
|
136
144
|
code?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,sEAAsE;AACtE,MAAM,WAAW,OAAO;IACtB;sDACkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,kFAAkF;IAClF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;kEAC8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW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,MAAM,EAAE,MAAM,GAAG,mBAAmB;CAe7D;AAED,iEAAiE;AACjE,eAAO,MAAM,WAAW,sBAA6B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mrz.utils.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/mrz.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"mrz.utils.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/mrz.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA4EpD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;;sBAOwB,MAAM,KAAG,MAAM;2BA+oC7B,MAAM,gBACF,OAAO,KACnB,mBAAmB;0CAwKuB,MAAM,KAAG,mBAAmB;wCApnC9B,MAAM,KAAG,MAAM,EAAE,EAAE;wCA8nCnB,MAAM,KAAG,MAAM;gCAmDvB,MAAM;;;;;+BA/1BP,MAAM,KAAG,OAAO;iCA4Bd,MAAM,KAAG,MAAM;wCAi1BR,MAAM,GAAG,IAAI,KAAG,MAAM,GAAG,IAAI;kCAn9ChE,MAAM,GAAG,IAAI,GAAG,SAAS,KAC9B,MAAM,GAAG,IAAI;;AAk+ChB,wBAWE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mrzTransliteration.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/mrzTransliteration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAyFhE,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACvC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,YAAY,
|
|
1
|
+
{"version":3,"file":"mrzTransliteration.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/mrzTransliteration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAyFhE,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACvC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,YAAY,CAgDd"}
|
|
@@ -48,6 +48,11 @@ declare const _default: {
|
|
|
48
48
|
'diagnosticReport.noticeBody': string;
|
|
49
49
|
'diagnosticReport.continue': string;
|
|
50
50
|
'diagnosticReport.cancel': string;
|
|
51
|
+
'diagnosticReport.shareFailedTitle': string;
|
|
52
|
+
'diagnosticReport.shareFailedBody': string;
|
|
53
|
+
'diagnosticReport.uploadAction': string;
|
|
54
|
+
'diagnosticReport.uploadSuccess': string;
|
|
55
|
+
'diagnosticReport.uploadFailed': string;
|
|
51
56
|
'livenessDetectionScreen.guideHeader': string;
|
|
52
57
|
'livenessDetectionScreen.guideText': string;
|
|
53
58
|
'livenessDetectionScreen.guidePoint1': string;
|
|
@@ -70,6 +75,13 @@ declare const _default: {
|
|
|
70
75
|
'eidScannerScreen.guideHeader': string;
|
|
71
76
|
'eidScannerScreen.guideText': string;
|
|
72
77
|
'eidScannerScreen.invalidMRZFields': string;
|
|
78
|
+
'eidScannerScreen.error': string;
|
|
79
|
+
'eidScannerScreen.errorCode': string;
|
|
80
|
+
'eidScannerScreen.nfcGenericError': string;
|
|
81
|
+
'eidScannerScreen.nfcReadFailed': string;
|
|
82
|
+
'eidScannerScreen.nfcAuthFailed': string;
|
|
83
|
+
'eidScannerScreen.nfcTagLost': string;
|
|
84
|
+
'eidScannerScreen.nfcTimeout': string;
|
|
73
85
|
'eidScannerScreen.faceImageNotFound': string;
|
|
74
86
|
'eidScannerScreen.documentCode': string;
|
|
75
87
|
'eidScannerScreen.nationality': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../../src/Translation/Resources/en.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../../src/Translation/Resources/en.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAmRE"}
|
|
@@ -48,6 +48,11 @@ declare const _default: {
|
|
|
48
48
|
'diagnosticReport.noticeBody': string;
|
|
49
49
|
'diagnosticReport.continue': string;
|
|
50
50
|
'diagnosticReport.cancel': string;
|
|
51
|
+
'diagnosticReport.shareFailedTitle': string;
|
|
52
|
+
'diagnosticReport.shareFailedBody': string;
|
|
53
|
+
'diagnosticReport.uploadAction': string;
|
|
54
|
+
'diagnosticReport.uploadSuccess': string;
|
|
55
|
+
'diagnosticReport.uploadFailed': string;
|
|
51
56
|
'livenessDetectionScreen.guideHeader': string;
|
|
52
57
|
'livenessDetectionScreen.guideText': string;
|
|
53
58
|
'livenessDetectionScreen.guidePoint1': string;
|
|
@@ -70,6 +75,13 @@ declare const _default: {
|
|
|
70
75
|
'eidScannerScreen.guideHeader': string;
|
|
71
76
|
'eidScannerScreen.guideText': string;
|
|
72
77
|
'eidScannerScreen.invalidMRZFields': string;
|
|
78
|
+
'eidScannerScreen.error': string;
|
|
79
|
+
'eidScannerScreen.errorCode': string;
|
|
80
|
+
'eidScannerScreen.nfcGenericError': string;
|
|
81
|
+
'eidScannerScreen.nfcReadFailed': string;
|
|
82
|
+
'eidScannerScreen.nfcAuthFailed': string;
|
|
83
|
+
'eidScannerScreen.nfcTagLost': string;
|
|
84
|
+
'eidScannerScreen.nfcTimeout': string;
|
|
73
85
|
'eidScannerScreen.faceImageNotFound': string;
|
|
74
86
|
'eidScannerScreen.documentCode': string;
|
|
75
87
|
'eidScannerScreen.nationality': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../../../src/Translation/Resources/tr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../../../src/Translation/Resources/tr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAsRE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.488.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ import { eidReader } from '../EIDReader/eidReader';
|
|
|
11
11
|
import NativeProgressBar from './NativeProgressBar';
|
|
12
12
|
import type { MRZFields } from '../Types/mrzFields';
|
|
13
13
|
import { buildDocumentName } from '../Libs/mrzTransliteration';
|
|
14
|
+
import type { DocumentName } from '../Types/documentReadResult';
|
|
14
15
|
import { normalizeFromMRZInfo } from '../Libs/documentDataNormalizer';
|
|
15
16
|
import { useTranslation } from 'react-i18next';
|
|
16
17
|
import AppContext from '../Contexts/AppContext';
|
|
@@ -55,13 +56,20 @@ const EIDScanner = ({
|
|
|
55
56
|
const [documentMRZInfo, setDocumentMRZInfo] = React.useState<MRZInfo>();
|
|
56
57
|
const [documentFaceImageMimeType, setDocumentFaceImageMimeType] =
|
|
57
58
|
React.useState<string>();
|
|
58
|
-
const [documentName, setDocumentName] = React.useState<
|
|
59
|
+
const [documentName, setDocumentName] = React.useState<DocumentName>();
|
|
59
60
|
const [progress, setProgress] = React.useState(0);
|
|
60
61
|
const [progressStage, setProgressStage] = React.useState<string>('');
|
|
61
62
|
|
|
62
63
|
// Animation for pulse indicator
|
|
63
64
|
const pulseAnim = useRef(new Animated.Value(1)).current;
|
|
64
65
|
|
|
66
|
+
// Strip MRZ filler (`<`) and trim; returns '' for empty/filler-only input so
|
|
67
|
+
// the UI can hide fields the chip didn't actually provide.
|
|
68
|
+
const cleanField = useCallback((value?: string | null): string => {
|
|
69
|
+
if (!value) return '';
|
|
70
|
+
return value.replace(/</g, ' ').replace(/\s+/g, ' ').trim();
|
|
71
|
+
}, []);
|
|
72
|
+
|
|
65
73
|
// Format date from YYMMDD to DD/MM/YYYY (matching Flutter SDK)
|
|
66
74
|
const formatDate = useCallback((dateStr?: string | null) => {
|
|
67
75
|
if (!dateStr) return '';
|
|
@@ -137,20 +145,30 @@ const EIDScanner = ({
|
|
|
137
145
|
const [voiceGuidanceMessage, setVoiceGuidanceMessage] = useState<string>();
|
|
138
146
|
const [attemptNumber, setAttemptNumber] = useState<number>(0);
|
|
139
147
|
|
|
140
|
-
const getFieldsFromMRZ = useCallback(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
const getFieldsFromMRZ = useCallback(
|
|
149
|
+
(mrz: MRZInfo, name?: DocumentName | null) => {
|
|
150
|
+
// Prefer the resolved name (DG11 printed name / transliteration) over the
|
|
151
|
+
// raw DG1 split. Some chips — notably Turkish PACE passports — return a DG1
|
|
152
|
+
// name field with no `<<` separator, so getPrimaryIdentifier() holds the
|
|
153
|
+
// FULL name and getSecondaryIdentifier() is empty ("name as surname"). The
|
|
154
|
+
// resolved name corrects that; fall back to the raw split when absent.
|
|
155
|
+
const firstName = name?.displayFirst || mrz.getSecondaryIdentifier();
|
|
156
|
+
const lastName = name?.displayLast || mrz.getPrimaryIdentifier();
|
|
157
|
+
return {
|
|
158
|
+
documentCode: mrzUtils.normalizeDocumentCode(mrz.getDocumentCode()),
|
|
159
|
+
personalNumber: mrz.getPersonalNumber() || mrz.getOptionalData1(),
|
|
160
|
+
documentNumber: mrz.getDocumentNumber(),
|
|
161
|
+
firstName,
|
|
162
|
+
lastName,
|
|
163
|
+
birthDate: mrz.getDateOfBirth(),
|
|
164
|
+
expirationDate: mrz.getDateOfExpiry(),
|
|
165
|
+
issuingState: mrz.getIssuingState(),
|
|
166
|
+
sex: mrz.getGender().getStrCode(),
|
|
167
|
+
nationality: mrz.getNationality(),
|
|
168
|
+
} satisfies MRZFields;
|
|
169
|
+
},
|
|
170
|
+
[]
|
|
171
|
+
);
|
|
154
172
|
|
|
155
173
|
const readNFC = useCallback(async () => {
|
|
156
174
|
const startTime = Date.now();
|
|
@@ -268,7 +286,7 @@ const EIDScanner = ({
|
|
|
268
286
|
|
|
269
287
|
if (appContext.skipNfcResultScreen && onScanSuccess) {
|
|
270
288
|
onScanSuccess(
|
|
271
|
-
getFieldsFromMRZ(passportData.mrz),
|
|
289
|
+
getFieldsFromMRZ(passportData.mrz, builtName),
|
|
272
290
|
passportData.faceImage,
|
|
273
291
|
passportData.mimeType
|
|
274
292
|
);
|
|
@@ -349,7 +367,42 @@ const EIDScanner = ({
|
|
|
349
367
|
).catch(() => {});
|
|
350
368
|
|
|
351
369
|
console.debug('NFC scan error:', error);
|
|
352
|
-
|
|
370
|
+
|
|
371
|
+
// Surface an accurate message instead of failing silently. eidReader
|
|
372
|
+
// attaches `nfcCategory` + `nfcCode`.
|
|
373
|
+
// - User-correctable failures (wrong doc data, card moved/too slow, NFC
|
|
374
|
+
// off) get a specific, actionable message and NO code — there's a clear
|
|
375
|
+
// action to take, a support code would just be noise.
|
|
376
|
+
// - Everything else is an unexpected/system error: show a generic message
|
|
377
|
+
// plus the reportable code (e.g. NFC-READ-6A82) so the user can quote it.
|
|
378
|
+
// - user_cancelled stays silent (the user dismissed the native NFC sheet).
|
|
379
|
+
const tagged = error as
|
|
380
|
+
| { nfcCategory?: string; nfcCode?: string }
|
|
381
|
+
| undefined;
|
|
382
|
+
const category = tagged?.nfcCategory ?? errorType;
|
|
383
|
+
|
|
384
|
+
// category -> actionable message key for the user-mistake cases.
|
|
385
|
+
const ACTIONABLE: Record<string, string> = {
|
|
386
|
+
auth_failed: 'eidScannerScreen.nfcAuthFailed',
|
|
387
|
+
tag_lost: 'eidScannerScreen.nfcTagLost',
|
|
388
|
+
timeout: 'eidScannerScreen.nfcTimeout',
|
|
389
|
+
not_enabled: 'eidScannerScreen.nfcNotEnabled',
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
if (category !== 'user_cancelled') {
|
|
393
|
+
const actionableKey = ACTIONABLE[category];
|
|
394
|
+
if (actionableKey) {
|
|
395
|
+
// Clear user action available — meaningful message, no support code.
|
|
396
|
+
Alert.alert(t('eidScannerScreen.error'), t(actionableKey));
|
|
397
|
+
} else {
|
|
398
|
+
// Unexpected/system error — generic message + reportable support code.
|
|
399
|
+
const errorCode = tagged?.nfcCode ?? 'NFC-READ';
|
|
400
|
+
const message = `${t('eidScannerScreen.nfcGenericError')}\n\n${t(
|
|
401
|
+
'eidScannerScreen.errorCode'
|
|
402
|
+
)}: ${errorCode}`;
|
|
403
|
+
Alert.alert(t('eidScannerScreen.error'), message);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
353
406
|
} finally {
|
|
354
407
|
setIsScanning(false);
|
|
355
408
|
setProgress(0);
|
|
@@ -567,59 +620,86 @@ const EIDScanner = ({
|
|
|
567
620
|
</View>
|
|
568
621
|
</View>
|
|
569
622
|
|
|
570
|
-
{/* Right column: all fields as grid
|
|
623
|
+
{/* Right column: all fields as grid. Each field renders only
|
|
624
|
+
when the chip actually provided a value — filler-only /
|
|
625
|
+
empty fields are hidden rather than shown blank. */}
|
|
571
626
|
<View style={styles.idCardFields}>
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
label={t('eidScannerScreen.expirationDate')}
|
|
590
|
-
value={formatDate(documentMRZInfo.getDateOfExpiry())}
|
|
591
|
-
/>
|
|
592
|
-
<IDCardField
|
|
593
|
-
label={t('eidScannerScreen.gender')}
|
|
594
|
-
value={formatGender(
|
|
627
|
+
{(() => {
|
|
628
|
+
const surname =
|
|
629
|
+
documentName?.displayLast ??
|
|
630
|
+
cleanField(documentMRZInfo.getPrimaryIdentifier());
|
|
631
|
+
const givenNames =
|
|
632
|
+
documentName?.displayFirst ??
|
|
633
|
+
cleanField(documentMRZInfo.getSecondaryIdentifier());
|
|
634
|
+
const docNumber = cleanField(
|
|
635
|
+
documentMRZInfo.getDocumentNumber()
|
|
636
|
+
);
|
|
637
|
+
const birthDate = formatDate(
|
|
638
|
+
documentMRZInfo.getDateOfBirth()
|
|
639
|
+
);
|
|
640
|
+
const expiry = formatDate(
|
|
641
|
+
documentMRZInfo.getDateOfExpiry()
|
|
642
|
+
);
|
|
643
|
+
const gender = formatGender(
|
|
595
644
|
documentMRZInfo.getGender().getStrCode()
|
|
596
|
-
)
|
|
597
|
-
|
|
598
|
-
<IDCardField
|
|
599
|
-
label={t('eidScannerScreen.nationality')}
|
|
600
|
-
value={formatNationality(
|
|
645
|
+
);
|
|
646
|
+
const nationality = formatNationality(
|
|
601
647
|
documentMRZInfo.getNationality()
|
|
602
|
-
)
|
|
603
|
-
|
|
604
|
-
<IDCardField
|
|
605
|
-
label={t('eidScannerScreen.issuingState')}
|
|
606
|
-
value={formatNationality(
|
|
648
|
+
);
|
|
649
|
+
const issuingState = formatNationality(
|
|
607
650
|
documentMRZInfo.getIssuingState()
|
|
608
|
-
)
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
<
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
651
|
+
);
|
|
652
|
+
const personalNumber = cleanField(
|
|
653
|
+
documentMRZInfo.getPersonalNumber() ||
|
|
654
|
+
documentMRZInfo.getOptionalData1()
|
|
655
|
+
);
|
|
656
|
+
|
|
657
|
+
const fields: Array<{ label: string; value: string }> = [
|
|
658
|
+
{
|
|
659
|
+
label: t('eidScannerScreen.surname'),
|
|
660
|
+
value: surname,
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
label: t('eidScannerScreen.name'),
|
|
664
|
+
value: givenNames,
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
label: t('eidScannerScreen.documentNumber'),
|
|
668
|
+
value: docNumber,
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
label: t('eidScannerScreen.birthDate'),
|
|
672
|
+
value: birthDate,
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
label: t('eidScannerScreen.expirationDate'),
|
|
676
|
+
value: expiry,
|
|
677
|
+
},
|
|
678
|
+
{ label: t('eidScannerScreen.gender'), value: gender },
|
|
679
|
+
{
|
|
680
|
+
label: t('eidScannerScreen.nationality'),
|
|
681
|
+
value: nationality,
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
label: t('eidScannerScreen.issuingState'),
|
|
685
|
+
value: issuingState,
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
label: t('eidScannerScreen.personalNumber'),
|
|
689
|
+
value: personalNumber,
|
|
690
|
+
},
|
|
691
|
+
];
|
|
692
|
+
|
|
693
|
+
return fields
|
|
694
|
+
.filter((f) => f.value && f.value.trim().length > 0)
|
|
695
|
+
.map((f) => (
|
|
696
|
+
<IDCardField
|
|
697
|
+
key={f.label}
|
|
698
|
+
label={f.label}
|
|
699
|
+
value={f.value}
|
|
700
|
+
/>
|
|
701
|
+
));
|
|
702
|
+
})()}
|
|
623
703
|
</View>
|
|
624
704
|
</View>
|
|
625
705
|
</View>
|
|
@@ -637,7 +717,7 @@ const EIDScanner = ({
|
|
|
637
717
|
documentFaceImageMimeType
|
|
638
718
|
) {
|
|
639
719
|
onScanSuccess(
|
|
640
|
-
getFieldsFromMRZ(documentMRZInfo),
|
|
720
|
+
getFieldsFromMRZ(documentMRZInfo, documentName),
|
|
641
721
|
documentFaceImage,
|
|
642
722
|
documentFaceImageMimeType
|
|
643
723
|
);
|
|
@@ -724,7 +804,7 @@ const EIDScanner = ({
|
|
|
724
804
|
documentFaceImageMimeType
|
|
725
805
|
) {
|
|
726
806
|
onScanSuccess(
|
|
727
|
-
getFieldsFromMRZ(documentMRZInfo),
|
|
807
|
+
getFieldsFromMRZ(documentMRZInfo, documentName),
|
|
728
808
|
documentFaceImage,
|
|
729
809
|
documentFaceImageMimeType
|
|
730
810
|
);
|