Skip to main content
This part will help you understand the fundamental steps to integrate NexaID Network-JS-SDK and complete a basic data verification process through your application.

Prerequisites

Before you begin, ensure you have the following:

Key Features

1. SDK Initialization

Connect to specified blockchain networks. Function Name: init
Parameter Description:

2. Task Submission

Submit tasks to require an attestation from the network. Function Name: submitTask
Parameter Description:

3. Attestation Execution

Execute the zkTLS protocol with the network attestor node, and return an attestation issued by the attestor node. Function Name: attest
Parameter Description:

4. Verify & Poll Task Result

Verify and poll task results. The function is additionally provided for any use case that requires to double check the validity of a created attestation through NexaID contracts. Function Name: verifyAndPollTaskResult
Parameter Description:

5. Balance Withdrawal

Retrieve the fees for unsettled tasks. Function Name: withdrawBalance
Parameter Description:

6. List of Supported Chains

Property Name:supportedChainIds Currently supports HashKey Chain Testnet, additional chains will be added in upcoming releases.

Using Attestations in zkVM

To retrieve a proof validated using hashed verification logic, you may use getAllJsonResponse to collect the associated HTTP response payloads. These two components — the attestation (hashed data) and the HTTP responses (raw data) — can then be jointly submitted to the zkVM for further computation and verification. For more details about hashed and condition-based logic, see zkTLS Operations.

Complete Example

Understanding the Attestation Structure

When a successful data verification process is completed, you will receive an zkTLS attestation (proof) from the attestor. For more information about the attestation structure, see the section .

Error Codes

We have defined several error codes in the SDK. If an error occurs during the data verification process, you can refer to the error code list for troubleshooting.