@superorange/zka-js-sdk 1.0.54 → 1.0.55

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/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Overview
2
2
 
3
- The PADO MPC-TLS SDK is designed to provide developers with tools to directly implement MPC-TLS capabilities and provide the **zkAttestation** solutions in dApps without requiring backend development in cryptographic algorithms and attestation workflows.
3
+ The PADO MPC-TLS SDK provides developers with tools to directly implement **the zkAttestation solution** in dApps without the need for backend cryptography or attestation workflow development.
4
4
 
5
- If you want to attest a user’s web data, create proofs, and implement verification mechanisms for your applications, try this [SDK](/mpc-tls/mpc-tls-sdk/quickstart) along with a set of MPC-TLS APIs.
5
+ To attest a user’s web data, create proofs, and implement verification mechanisms, use this [SDK](/mpc-tls/mpc-tls-sdk/quickstart) along with a set of MPC-TLS APIs.
6
6
 
7
7
  **Some application examples include:**
8
8
  - Verifying the number of followers on a user’s X account to determine if they are a KOL or a newcomer.
@@ -10,16 +10,16 @@ If you want to attest a user’s web data, create proofs, and implement verifica
10
10
  - Verifying the ownership of a user’s social media account, such as TikTok or X, to provide basic PoH capability.
11
11
  - And many more based on your needs...
12
12
 
13
- In this initial version, the attestable data source, attestation content, and supported blockchains are pre-designated. We will provide a developer platform in the future to allow developers to customize the data source and attestation content.
13
+ In this initial version, the attestable data source, attestation content, and supported blockchains are pre-set. **A future developer platform will allow customization.**
14
14
 
15
15
 
16
16
  ## Workflows
17
17
 
18
18
  The basic workflows are as follows:
19
19
 
20
- ![avatar](./assets/mpctls-sdk.png)
20
+ ![avatar](./../../pics/extensionSDK/mpctls-sdk.png)
21
21
 
22
- Integrating the PADO Extension is essential to complete the MPC-TLS process on the data source page that needs to be attested. When using the PADO MPC-TLS SDK, prompt users in your dApp to install the latest version (above 0.3.12) of the PADO Extension, as it is mandatory.
22
+ **The PADO Extension is required to complete the MPC-TLS process on the data source page. When using the PADO MPC-TLS SDK, prompt users in your dApp to install the latest version (above 0.3.13) of the PADO Extension, as it is required.**
23
23
 
24
24
  **1. User Onboarding:** The user onboards to your dApp, connects their Wallet, and follows your instructions to initiate the data attestation process.
25
25
 
@@ -31,13 +31,13 @@ Integrating the PADO Extension is essential to complete the MPC-TLS process on t
31
31
 
32
32
  **5. Initiate zkAttestation Process:** The user needs to click the start button on the PADO Extension pop-up window to generate a zkAttestation process.
33
33
 
34
- **6. Execute MPC-TLS Protocol:** After the zkAttestation process is initiated, the MPC-TLS protocol will be executed between the data source page, the PADO extension, and the PADO server to complete a privacy-preserving and verifiable data attestation process.
34
+ **6. Execute MPC-TLS Protocol:** Once the zkAttestation process begins, the MPC-TLS protocol runs between the data source page, the PADO extension, and the PADO server to complete a privacy-preserving attestation process.
35
35
 
36
- **7.Return zkAttestation Result:** Once the zkAttestation process is completed, whether it succeeded or failed, the PADO Extension will acquire the result and return it to the PADO MPC-TLS SDK. For the failed tasks, we provide several [error codes](mpc-tls/mpc-tls-sdk/quickstart#errorCodes) to help you better identify and troubleshoot issues.
36
+ **7.Return zkAttestation Result:** After the zkAttestation process is complete, whether successful or not, the PADO Extension retrieves the result and sends it to the MPC-TLS SDK. For the failed tasks, we provide several [error codes](mpc-tls/mpc-tls-sdk/quickstart#errorCodes) to help you better identify and troubleshoot issues.
37
37
 
38
38
  **8. Get and Verify the zkAttestation Result:** Your dApp will retrieve the zkAttestation result from the SDK and verify PADO's signature to confirm whether the result is trustworthy.
39
39
 
40
- **9. Business Logic:** Your dApp will execute business logic based on the proof that users obtain from the SDK. Your dApp will determine how to use the proof, whether to submit it on-chain, and how to use the proof.
40
+ **9. Business Logic:** Your dApp will execute business logic based on the proof that users obtain from the SDK. Your dApp will determine how to use the proof, whether to submit it on-chain, and how to use it.
41
41
 
42
42
 
43
43
  ## zkAttestation Capabilities
@@ -71,8 +71,6 @@ For the attestation contract, we currently deployed EAS and Verax attestation sc
71
71
 
72
72
  If you have further needs for other blockchains, please contact us through our [community](https://discord.com/invite/pdrNxRrApX) for support.
73
73
 
74
-
75
-
76
74
  ## Basic Tutorials
77
75
 
78
76
  ### Step 1. Install MPC-TLS SDK
@@ -88,7 +86,7 @@ yarn add --save @padolabs/mpctls-js-sdk
88
86
  ```
89
87
 
90
88
  :::note
91
- _For better tech support, please contact the PADO team through our [community](https://discord.com/invite/pdrNxRrApX) after installing the MPC-TLS SDK. We need to register your dApps' domain to maintain the whitelist and provide you with a testing environment and the associated testing version of the PADO Extension._
89
+ _**For better tech support, please contact the PADO team through our [community](https://discord.com/invite/pdrNxRrApX) after installing the MPC-TLS SDK. We need to register your dApps' domain to maintain the whitelist and provide you with a testing environment and the associated testing version of the PADO Extension.**_
92
90
  :::
93
91
  ### <a id="step2"></a>
94
92
 
@@ -96,7 +94,7 @@ _For better tech support, please contact the PADO team through our [community](h
96
94
 
97
95
  You must set up a **dAppSymbol (string)** of your dApp, this will be displayed on the PADO Extension - zkAttestation page as a mark of the proof that was completed by your dApp.
98
96
 
99
- ![avatar](./assets/initialsdk.png)
97
+ ![avatar](./../../pics/extensionSDK/initialsdk.png)
100
98
 
101
99
  **Example:**
102
100
 
@@ -429,12 +427,12 @@ We have defined some error codes in the SDK. When an error occurs during the zkA
429
427
  | ---------- | ----------------------------------------------------------------------------- |
430
428
  | 00001 | The MPC-TLS algorithm has not been initialized. Please restart the process. |
431
429
  | 00002 | The process did not respond within 5 minutes. |
432
- | 00003 | An attestation process is currently being generated. Please try again later. |
430
+ | 00003 | A zkAttestation process is currently being generated. Please try again later. |
433
431
  | 00004 | The user closes or cancels the attestation process. |
434
432
  | 00005 | Wrong parameters! |
435
- | 00006 | No PADO extension version 0.3.12 or above was detected as installed. |
433
+ | 00006 | No PADO extension version 0.3.13 or above was detected as installed. |
436
434
  | 00007 | Insufficient wallet balance. |
437
- | 00008 | Failed to submit the proof on-chain. Or other errors in the MetaMask operations |
435
+ | 00008 | Failed to submit the proof on-chain. Or other errors in the Wallet operations. |
438
436
  | 00009 | Your dApp is not registered. Please contact the PADO team. |
439
437
  | 99999 | Undefined error. Contact the PADO team for further support |
440
438
 
package/dist/error.js CHANGED
@@ -4,14 +4,14 @@ exports.ZkAttestationError = exports.ErrorCodeMAP = void 0;
4
4
  exports.ErrorCodeMAP = {
5
5
  '00001': 'The MPC-TLS algorithm has not been initialized. Please restart the process.',
6
6
  '00002': 'The process did not respond within 5 minutes.',
7
- '00003': 'An attestation process is currently being generated. Please try again later.',
7
+ '00003': 'A zkAttestation process is currently being generated. Please try again later.',
8
8
  '00004': 'The user closes or cancels the attestation process.',
9
9
  '00005': 'Wrong parameters!',
10
- '00006': 'No PADO extension version 0.3.12 or above was detected as installed.',
10
+ '00006': 'No PADO extension version 0.3.13 or above was detected as installed.',
11
11
  '00007': 'Insufficient wallet balance.',
12
- '00008': 'Failed to submit the proof on-chain. Please try again later.',
13
- '00009': 'Your Dapp is not registered. Please contact the PADO team.',
14
- '99999': 'Undefined error. Contact the PADO team for further support.',
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 PADO team.',
14
+ '99999': 'Undefined error. Contact the PADO team for further support',
15
15
  '00102': 'Insufficient assets balance in your Binance Spot Account.',
16
16
  '00104': 'Your attestation request did not meet the necessary requirements.',
17
17
  '10001': 'The internet condition is not stable enough to complete the zkAttestation flow. Please try again later.',
package/dist/error.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";;;AAea,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,6EAA6E;IACtF,OAAO,EAAC,+CAA+C;IACvD,OAAO,EAAC,8EAA8E;IACtF,OAAO,EAAC,qDAAqD;IAC7D,OAAO,EAAC,mBAAmB;IAC3B,OAAO,EAAC,sEAAsE;IAC9E,OAAO,EAAC,8BAA8B;IACtC,OAAO,EAAC,8DAA8D;IACtE,OAAO,EAAC,4DAA4D;IACpE,OAAO,EAAC,6DAA6D;IACrE,OAAO,EAAC,2D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CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superorange/zka-js-sdk",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "author": "",
5
5
  "description": "",
6
6
  "main": "./dist/index.js",