Overview
Overview
The Primus zkTLS SDK provides developers with tools to directly implement a data verification solution in dApps, without requiring backend cryptography or attestation workflow development.
To attest a user’s web data, create proofs, and implement verification mechanisms, use this SDK along with a set of zkTLS APIs.
Some application examples include:
- Verifying the number of followers on a user’s X account to determine if they are a KOL or a newcomer.
- Enabling assets verification using the user’s off-chain exchange asset, transaction volume, or token status.
- Verifying the ownership of a user’s social media account, such as TikTok or X, to provide basic PoH capability.
- And many more based on your needs...
In this initial version, the attestable data source, attestation content, and supported blockchains are pre-set. A future developer platform will allow customization.
Primus provides zkTLS techniques designed for seamless use by end-users and developers. The upcoming proxy-model solution will be integrated into the SDK, offering enhanced performance for both communication size and targeted data payload.
Workflows
The basic workflows are as follows:
The Primus Extension is required to complete the zkTLS process on the data source page. When using the zkTLS SDK, prompt users in your dApp to install the latest version (above 0.3.15) of the Extension, as it is required.
1. User Onboarding: The user onboards to your dApp, connects their Wallet, and follows your instructions to initiate the data attestation process.
2. Configure Data Verification Parameters: Before starting the attestation process, ensure that all parameters required by the SDK for this attestation workflow are properly configured.
3. Initiate Data Verification Workflow: Your dApp activates the zkTLS SDK, requesting the data and attestation content configured in the SDK.
4. Redirect to the Data Source Page: Your dApp redirects the user to the data source page. After the user logs in to their account on that website, the Extension pop-up window will appear in the right corner of the data source page.
5. Start Data Verification Process: The user needs to click the start button on the Extension pop-up window to generate an attestation process. If the data source page requires a login, the user must complete the login before clicking ‘start’ button.
6. Execute zkTLS Protocol: Once the data verification process begins, the zkTLS protocol runs between the data source page, the extension, and the attestor to complete a privacy-preserving attestation process.
7.Return Attestation Result: After the zkTLS attestation process is complete, whether successful or not, the Extension retrieves the result and sends it to the zkTLS SDK. For the failed tasks, we provide several error codes to help you better identify and troubleshoot issues.
8. Get and Verify the Attestation Result: Your dApp will retrieve the attestation result from the SDK and verify Primus' signature to confirm whether the result is trustworthy.
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.
Data Verification Capabilities
In this initial version, the attestable data source, attestation content, and supported blockchains are pre-designated.
1. Attestable Details
(1) Internet Data
Data Sources | Attestation Content | Input Value | Attestation Result |
---|---|---|---|
https://www.binance.com | Asset balance in the Spot account | USD value, numeric, minimum value of 0.000001, restricted to a 6-decimal-place number | if the "attestation content" is greater than "input value" |
Token holding in the Spot account | Token name, alphabet | if the "input value" is equivalent to more than USD 0.1 | |
Spot 30-day trade volume | USD value, numeric, minimum value of 0.000001, restricted to a 6-decimal-place number | if the "attestation content" is greater than "input value" | |
KYC Status | N/A | if the "attestation content" passed basic KYC verification | |
Account ownership | N/A | if the "attestation content" owns the associated account | |
https://www.okx.com | Total asset balance | USD value, numeric, minimum value of 0.000001, restricted to a 6-decimal-place number | if the "attestation content" is greater than "input value" |
Token holding | Token name, alphabet | if the "input value" is equivalent to more than USD 0.1 | |
Spot 30-day trade volume | USD value, numeric, minimum value of 0.000001, restricted to a 6-decimal-place number | if the "attestation content" is greater than "input value" | |
KYC Status | N/A | if the "attestation content" passed basic KYC verification | |
https://www.tiktok.com | Account ownership | N/A | if the "attestation content" owns the associated account |
https://www.x.com | Account ownership | N/A | if the "attestation content" owns the associated account |
Social connections | Followers number, numeric, minimum value of 0 | if the "attestation content" is greater than "input value" |
(2) Web3 Data
Integrate the Brevis' SDK to enable on-chain transaction proof, allowing verification of whether a user has had on-chain transactions on the BNB Chain since July 2024.
2.Supported Blockchains
For the attestation contract, we currently deployed EAS and Verax attestation schemas to the following blockchains:
- Linea
- BNB Chain
- opBNB
- Arbitrum
- Scroll
If you have further needs for other blockchains, please contact us through our community for support.