@superorange/zka-js-sdk 1.0.169 → 1.0.170
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/dist/error.d.ts +7 -44
- package/dist/error.js +53 -55
- package/dist/error.js.map +1 -1
- package/dist/generated/packageMeta.d.ts +1 -1
- package/dist/generated/packageMeta.js +1 -1
- package/package.json +1 -1
package/dist/error.d.ts
CHANGED
|
@@ -1,48 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* SDK-facing messages (same strings as `minwensdk.json`), excluding network-only codes:
|
|
3
|
+
* `00015`, `-500`, `-10101` … `-10111`.
|
|
4
|
+
*/
|
|
5
|
+
export type AttestationErrorCode = '00000' | '00001' | '00002' | '00003' | '00004' | '00005' | '00006' | '00009' | '00010' | '00101' | '00102' | '00103' | '00104' | '01000' | '10001' | '10002' | '10003' | '10004' | '20001' | '20002' | '20003' | '20004' | '20005' | '30001' | '30002' | '30003' | '30004' | '30005' | '30006' | '40001' | '40002' | '50000' | '50002' | '50003' | '50004' | '50005' | '50006' | '50009' | '50011' | '99999' | '-1002001' | '-1002002' | '-1002003' | '-1002004' | '-1002005' | '-210001';
|
|
6
|
+
export type OnChainErrorCode = '00007' | '00008';
|
|
3
7
|
export type ErrorCode = AttestationErrorCode | OnChainErrorCode;
|
|
4
|
-
export declare const ErrorCodeMAP:
|
|
5
|
-
'00000': string;
|
|
6
|
-
'00001': string;
|
|
7
|
-
'00002': string;
|
|
8
|
-
'00003': string;
|
|
9
|
-
'00004': string;
|
|
10
|
-
'00005': string;
|
|
11
|
-
'00006': string;
|
|
12
|
-
'00012': string;
|
|
13
|
-
'00013': string;
|
|
14
|
-
'00014': string;
|
|
15
|
-
'00104': string;
|
|
16
|
-
'01000': string;
|
|
17
|
-
'10001': string;
|
|
18
|
-
'10002': string;
|
|
19
|
-
'10003': string;
|
|
20
|
-
'10004': string;
|
|
21
|
-
'20001': string;
|
|
22
|
-
'20003': string;
|
|
23
|
-
'20005': string;
|
|
24
|
-
'30001': string;
|
|
25
|
-
'30002': string;
|
|
26
|
-
'30004': string;
|
|
27
|
-
'40002': string;
|
|
28
|
-
'50001': string;
|
|
29
|
-
'50003': string;
|
|
30
|
-
'50004': string;
|
|
31
|
-
'50006': string;
|
|
32
|
-
'50007': string;
|
|
33
|
-
'50008': string;
|
|
34
|
-
'50009': string;
|
|
35
|
-
'50010': string;
|
|
36
|
-
'50011': string;
|
|
37
|
-
'99999': string;
|
|
38
|
-
'-1200010': string;
|
|
39
|
-
'-1002001': string;
|
|
40
|
-
'-1002002': string;
|
|
41
|
-
'-1002003': string;
|
|
42
|
-
'-1002004': string;
|
|
43
|
-
'-1002005': string;
|
|
44
|
-
'-210001': string;
|
|
45
|
-
};
|
|
8
|
+
export declare const ErrorCodeMAP: Record<string, string>;
|
|
46
9
|
/**
|
|
47
10
|
* Merge extension `errorData.data` with optional top-level `errorData.details`
|
|
48
11
|
* so {@link ZkAttestationError} can resolve `code:subCode` messages.
|
package/dist/error.js
CHANGED
|
@@ -1,59 +1,57 @@
|
|
|
1
1
|
export const ErrorCodeMAP = {
|
|
2
|
-
'00000': '
|
|
3
|
-
'00001': '
|
|
4
|
-
'00002': '
|
|
5
|
-
'00003': '
|
|
6
|
-
'00004': '
|
|
7
|
-
'00005': '
|
|
8
|
-
'00006': '
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
|
|
29
|
-
'
|
|
30
|
-
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
|
|
35
|
-
'
|
|
36
|
-
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'-
|
|
51
|
-
'-
|
|
52
|
-
'-
|
|
53
|
-
'-
|
|
54
|
-
'-
|
|
55
|
-
'-1002005': "Quota exhausted.",
|
|
56
|
-
'-210001': 'Address has pending proof for identityPropertyId.' // bnbidsdk
|
|
2
|
+
'00000': 'Too many requests. Please try again later.',
|
|
3
|
+
'00001': 'Failed to start the algorithm.',
|
|
4
|
+
'00002': 'Verification timed out.',
|
|
5
|
+
'00003': 'Verification is in progress. Please try again later.',
|
|
6
|
+
'00004': 'Verification cancelled by user.',
|
|
7
|
+
'00005': 'Invalid SDK parameters.',
|
|
8
|
+
'00006': 'Extension not detected. Please install and enable Primus Extension from the Chrome Web Store (https://chromewebstore.google.com/detail/primus/oeiomhmbaapihbilkfkhmlajkeegnjhe), then try again.',
|
|
9
|
+
'00012': 'Invalid template ID.',
|
|
10
|
+
'00104': 'Verification requirements not met.',
|
|
11
|
+
'00013': 'No verifiable data detected. Please confirm login status and account details.',
|
|
12
|
+
'00014': 'Verification timed out due to a connection interruption.',
|
|
13
|
+
'01000': 'Attestation timed out.',
|
|
14
|
+
'10001': 'Unstable internet connection.',
|
|
15
|
+
'10002': 'Network connection interrupted during attestation.',
|
|
16
|
+
'10003': 'Connection to the attestation server was interrupted during processing.',
|
|
17
|
+
'10004': 'Connection to the data source server was interrupted during processing.',
|
|
18
|
+
'20001': 'Internal runtime error: LengthException. Contact Primus Team for assistance.',
|
|
19
|
+
'20002': 'Internal runtime error: OutOfRangeException. Contact Primus Team for assistance.',
|
|
20
|
+
'20003': 'Invalid algorithm parameters.',
|
|
21
|
+
'20004': 'Internal runtime error: LogicError. Contact Primus Team for assistance.',
|
|
22
|
+
'20005': 'Runtime error: NotDefined. Contact Primus Team for assistance.',
|
|
23
|
+
'30001': 'Response error.',
|
|
24
|
+
'30001:301': 'Request URL not detected. Contact Primus Team for assistance.',
|
|
25
|
+
'30001:302': 'Response error. Please try again later.',
|
|
26
|
+
'30001:401': 'Session expired. Please log in again.',
|
|
27
|
+
'30001:403': "Access blocked due to data source server's risk control. Please try again later.",
|
|
28
|
+
'30001:404': 'Request URL not detected. Contact Primus Team for assistance.',
|
|
29
|
+
'30001:429': 'Rate limited by the data source server due to excessive requests from this user. Please try again later.',
|
|
30
|
+
'30002': 'Response validation error.',
|
|
31
|
+
'30003': 'Response parsing error. Please try again later.',
|
|
32
|
+
'30004': 'JSON parsing error. Contact Primus Team for assistance.',
|
|
33
|
+
'30005': 'HTML parsing error. Contact Primus Team for assistance.',
|
|
34
|
+
'30006': 'Preset path key not found in the response. Contact Primus Team for assistance.',
|
|
35
|
+
'40001': 'Internal error: FileNotExistException. Contact Primus Team for assistance.',
|
|
36
|
+
'40002': 'SSL certificate error. Contact Primus Team for assistance.',
|
|
37
|
+
'50000:501': 'Internal algorithm error. Contact Primus Team for assistance.',
|
|
38
|
+
'50000:502': 'Internal algorithm error. Contact Primus Team for assistance.',
|
|
39
|
+
'50003': 'The client encountered an unexpected error. Please try again later.',
|
|
40
|
+
'50004': 'The client did not start correctly. Please try again.',
|
|
41
|
+
'50000:505': 'Internal algorithm error. Contact Primus Team for assistance.',
|
|
42
|
+
'50006': 'Algorithm server not started. Please try again later.',
|
|
43
|
+
'50000:507': 'Internal algorithm error. Contact Primus Team for assistance.',
|
|
44
|
+
'50000:508': 'Internal algorithm error. Contact Primus team for assistance.',
|
|
45
|
+
'50009': 'Algorithm service timed out. Please try again later.',
|
|
46
|
+
'50000:510': 'Internal algorithm error. Contact Primus Team for assistance.',
|
|
47
|
+
'50011': 'Unsupported TLS version. Contact Primus Team for assistance.',
|
|
48
|
+
'99999': 'Undefined error. Please try again later.',
|
|
49
|
+
'-1002001': 'Invalid app ID.',
|
|
50
|
+
'-1002002': 'Invalid app secret.',
|
|
51
|
+
'-1002003': 'Trial quota exhausted.',
|
|
52
|
+
'-1002004': 'Subscription expired.',
|
|
53
|
+
'-1002005': 'Quota exhausted.',
|
|
54
|
+
'-210001': 'Address has pending proof for identityPropertyId.',
|
|
57
55
|
};
|
|
58
56
|
const errorCodeLookup = ErrorCodeMAP;
|
|
59
57
|
function readDetailsSubCode(data) {
|
package/dist/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAwDA,MAAM,CAAC,MAAM,YAAY,GAA2B;IAClD,OAAO,EAAE,4CAA4C;IACrD,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,yBAAyB;IAClC,OAAO,EAAE,sDAAsD;IAC/D,OAAO,EAAE,iCAAiC;IAC1C,OAAO,EAAE,yBAAyB;IAClC,OAAO,EACL,kMAAkM;IACpM,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,oCAAoC;IAC7C,OAAO,EACL,+EAA+E;IACjF,OAAO,EAAE,0DAA0D;IACnE,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,oDAAoD;IAC7D,OAAO,EAAE,yEAAyE;IAClF,OAAO,EAAE,yEAAyE;IAClF,OAAO,EAAE,8EAA8E;IACvF,OAAO,EAAE,kFAAkF;IAC3F,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,yEAAyE;IAClF,OAAO,EAAE,gEAAgE;IACzE,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,+DAA+D;IAC5E,WAAW,EAAE,yCAAyC;IACtD,WAAW,EAAE,uCAAuC;IACpD,WAAW,EACT,kFAAkF;IACpF,WAAW,EAAE,+DAA+D;IAC5E,WAAW,EACT,0GAA0G;IAC5G,OAAO,EAAE,4B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AC,IAAI,EAAE,CAAC;QAC3E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "1.0.
|
|
1
|
+
export declare const PACKAGE_VERSION = "1.0.170";
|
|
2
2
|
export declare const PACKAGE_NAME = "@superorange/zka-js-sdk";
|