@superorange/zka-js-sdk 1.0.95 → 1.0.97

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.
@@ -5,7 +5,7 @@ exports.PADOEXTENSIONID = "oeiomhmbaapihbilkfkhmlajkeegnjhe";
5
5
  exports.ONESECOND = 1000;
6
6
  exports.ONEMINUTE = 60 * exports.ONESECOND;
7
7
  exports.ATTESTATIONPOLLINGTIME = 1 * exports.ONESECOND;
8
- exports.ATTESTATIONPOLLINGTIMEOUT = 5 * exports.ONEMINUTE;
8
+ exports.ATTESTATIONPOLLINGTIMEOUT = 2 * exports.ONEMINUTE;
9
9
  exports.PADOADDRESSMAP = {
10
10
  development: '0xe02bd7a6c8aa401189aebb5bad755c2610940a73',
11
11
  production: '0xDB736B13E2f522dBE18B2015d0291E4b193D8eF6',
package/dist/error.d.ts CHANGED
@@ -7,44 +7,32 @@ export declare const ErrorCodeMAP: {
7
7
  '00003': string;
8
8
  '00004': string;
9
9
  '00005': string;
10
- '00006': string;
11
- '00007': string;
12
- '00008': string;
13
- '00009': string;
14
- '00010': string;
15
- '00011': string;
16
- '99999': string;
17
- '00102': string;
10
+ '00012': string;
18
11
  '00104': string;
19
12
  '10001': string;
20
13
  '10002': string;
21
14
  '10003': string;
22
15
  '10004': string;
16
+ '20001': string;
17
+ '20003': string;
23
18
  '20005': string;
24
19
  '30001': string;
25
20
  '30002': string;
26
- '30003': string;
27
21
  '30004': string;
28
- '50007': string;
29
- '50008': string;
30
- '50009': string;
31
- '50010': string;
32
- '50011': string;
33
- "00101": string;
34
- "00103": string;
35
- '20001': string;
36
- '20002': string;
37
- '20003': string;
38
- '20004': string;
39
- '40001': string;
40
22
  '40002': string;
41
23
  '50001': string;
42
- '50002': string;
43
24
  '50003': string;
44
25
  '50004': string;
45
- '50005': string;
46
26
  '50006': string;
27
+ '50007': string;
28
+ '50008': string;
29
+ '50009': string;
30
+ '50010': string;
31
+ '50011': string;
32
+ '99999': string;
47
33
  '-1200010': string;
34
+ '-1002001': string;
35
+ '-1002002': string;
48
36
  };
49
37
  export declare class ZkAttestationError {
50
38
  code: ErrorCode;
package/dist/error.js CHANGED
@@ -2,49 +2,52 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ZkAttestationError = exports.ErrorCodeMAP = void 0;
4
4
  exports.ErrorCodeMAP = {
5
- '00001': 'The MPC-TLS algorithm has not been initialized. Please restart the process.',
6
- '00002': 'The process did not respond within 5 minutes.',
7
- '00003': 'A zkAttestation process is currently being generated. Please try again later.',
8
- '00004': 'The user closes or cancels the attestation process.',
9
- '00005': 'Wrong parameters!',
10
- '00006': 'No Primus extension version 0.3.15 or above was detected as installed.',
11
- '00007': 'Insufficient wallet balance.',
12
- '00008': 'Failed to submit the proof on-chain. Or other errors in the Wallet operations.',
13
- '00009': 'Your dApp is not registered. Please contact the Primus team.',
14
- '00010': 'Verification failed. Please try again later.',
15
- '00011': 'Launch failed: unstable connection.',
16
- '99999': 'Undefined error. Contact the Primus team for further support',
17
- '00102': 'Attestation requirements not met. Insufficient assets balance in Binance Spot Account.',
18
- '00104': 'Attestation requirements not met.',
19
- '10001': 'The internet condition is not stable enough to complete the zkAttestation flow. Please try again later.',
20
- '10002': 'The attestation process has been interrupted due to some unknown network error. Please try again later.',
21
- '10003': "Can't connect attestation server due to unstable internet condition. Please try again later.",
22
- '10004': "Can't connect data source server due to unstable internet condition. Please try again later.",
5
+ '00001': 'The zkTLS algorithm has not been initialized. Please restart the process.',
6
+ '00002': 'The verification process timed out.',
7
+ '00003': 'A verification process is in progress. Please try again later.',
8
+ '00004': 'The user closes or cancels the verification process.',
9
+ '00005': 'Wrong SDK parameters.',
10
+ // '00006':'No Primus extension version 0.3.15 or above was detected as installed.',
11
+ // '00007':'Insufficient wallet balance.',
12
+ // '00008':'Failed to submit the proof on-chain. Or other errors in the Wallet operations.',
13
+ // '00009':'Your dApp is not registered. Please contact the Primus team.',
14
+ // '00010':'Verification failed. Please try again later.',
15
+ // '00011':'Launch failed: unstable connection.',
16
+ '00012': 'Invalid Template ID.',
17
+ // "00101":'Insufficient assets in your Trading Account. Please confirm and try again later.',
18
+ // '00102':'Attestation requirements not met. Insufficient assets balance in Binance Spot Account.',
19
+ // "00103": 'This account may have already been bound to a wallet address, or your wallet address may already have a zkAttestation with another Binance account.',
20
+ '00104': 'Not met the verification requirements.',
21
+ '10001': 'Unstable internet connection. Please try again.',
22
+ '10002': 'Unstable internet connection. Please try again.',
23
+ '10003': "Unstable internet connection. Please try again.",
24
+ '10004': "Unstable internet connection. Please try again.",
25
+ '20001': "An internal error occurred.",
26
+ // '20002':"Something went wrong. Please try again later.",
27
+ '20003': "Invalid algorithm parameters.",
28
+ // '20004': "Something went wrong. Please try again later.",
23
29
  '20005': "Can't complete the attestation due to some workflow error. Please try again later.",
24
- '30001': "Can't complete the attestation flow due to response error. Please try again later.",
25
- '30002': "Can't complete the attestation flow due to response error. Please try again later.",
26
- '30003': "Can't complete the attestation flow due to response error. Please try again later.",
27
- '30004': "Can't complete the attestation flow due to response error. Please try again later.",
28
- '50007': "Can't complete the attestation due to algorithm execution issues.",
29
- '50008': "Can't complete the attestation due to abnormal execution results.",
30
- '50009': 'The algorithm service did not respond within 5 minutes.',
31
- '50010': "Can't complete the attestation due to some compatibility issues.",
32
- '50011': "Can't complete the attestation due to algorithm version issues.",
33
- "00101": 'Insufficient assets in your Trading Account. Please confirm and try again later.',
34
- "00103": 'This account may have already been bound to a wallet address, or your wallet address may already have a zkAttestation with another Binance account.',
35
- '20001': "Something went wrong. Please try again later.",
36
- '20002': "Something went wrong. Please try again later.",
37
- '20003': "Something went wrong. Please try again later.",
38
- '20004': "Something went wrong. Please try again later.",
39
- '40001': "Something went wrong. Please try again later.",
40
- '40002': "Something went wrong. Please try again later.",
41
- '50001': "Something went wrong. Please try again later.",
42
- '50002': "Something went wrong. Please try again later.",
43
- '50003': "Something went wrong. Please try again later.",
44
- '50004': "Something went wrong. Please try again later.",
45
- '50005': "Something went wrong. Please try again later.",
46
- '50006': "Something went wrong. Please try again later.",
47
- '-1200010': "Invalid message."
30
+ '30001': "Response error. Please try again.",
31
+ '30002': "Response check error.",
32
+ // '30003': "Can't complete the attestation flow due to response error. Please try again later.",
33
+ '30004': "Response parse error.",
34
+ // '40001':"Something went wrong. Please try again later.",
35
+ '40002': "SSLCertificateError",
36
+ '50001': "An internal error occurred.",
37
+ // '50002': "Something went wrong. Please try again later.",
38
+ '50003': "The client encountered an unexpected error.",
39
+ '50004': "The client not started. Please try again.",
40
+ // '50005':"Something went wrong. Please try again later.",
41
+ '50006': "The algorithm server not started. Please try again.",
42
+ '50007': "Algorithm execution issues.",
43
+ '50008': "Abnormal execution results.",
44
+ '50009': 'Algorithm service timed out.',
45
+ '50010': "Compatibility issues during algorithm execution.",
46
+ '50011': "Unsupported TLS version.",
47
+ '99999': 'Undefined error.',
48
+ '-1200010': "Invalid message.",
49
+ '-1002001': "Invalid App ID.",
50
+ '-1002002': "Invalid App Secret.",
48
51
  };
49
52
  class ZkAttestationError {
50
53
  code;
package/dist/error.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";;;AAgBa,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,6EAA6E;IACtF,OAAO,EAAC,+CAA+C;IACvD,OAAO,EAAC,+EAA+E;IACvF,OAAO,EAAC,qDAAqD;IAC7D,OAAO,EAAC,mBAAmB;IAC3B,OAAO,EAAC,wEAAwE;IAChF,OAAO,EAAC,8BAA8B;IACtC,OAAO,EAAC,gFAAgF;IACxF,OAAO,EAAC,8DAA8D;IACtE,OAAO,EAAC,8CAA8C;IACtD,OAAO,EAAC,qCAAqC;IAC7C,OAAO,EAAC,8DAA8D;IACtE,OAAO,EAAC,wFAAwF;IAChG,OAAO,EAAE,mCAAmC;IAC5C,OAAO,EAAC,yGAAyG;IACjH,OAAO,EAAC,yGAAyG;IACjH,OAAO,EAAC,8FAA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.0.97",
4
4
  "author": "",
5
5
  "description": "",
6
6
  "main": "./dist/index.js",