@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 +13 -15
- package/dist/error.js +5 -5
- package/dist/error.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Overview
|
|
2
2
|
|
|
3
|
-
The PADO MPC-TLS SDK
|
|
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
|
-
|
|
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-
|
|
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
|
-

|
|
21
21
|
|
|
22
|
-
|
|
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:**
|
|
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:**
|
|
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
|
|
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
|
-
|
|
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
|
-

|
|
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 |
|
|
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.
|
|
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
|
|
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': '
|
|
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.
|
|
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.
|
|
13
|
-
'00009': 'Your
|
|
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
|
|
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,+EAA+E;IACvF,OAAO,EAAC,qDAAqD;IAC7D,OAAO,EAAC,mBAAmB;IAC3B,OAAO,EAAC,sEAAsE;IAC9E,OAAO,EAAC,8BAA8B;IACtC,OAAO,EAAC,gFAAgF;IACxF,OAAO,EAAC,4DAA4D;IACpE,OAAO,EAAC,4DAA4D;IACpE,OAAO,EAAC,2DAA2D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