# How It Works

The Extension JS-SDK serves as a bridge connecting your DApp to the TransGate extension, enabling seamless zk verification capabilities for DApp. The diagram below illustrates the workflow of the verification process and the role/function of the JS-SDK in the entire process.

<figure><img src="https://2216484837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2Jh1oquOpJPfwzD3x9L%2Fuploads%2FHthOhDPqyPmIENItJFAM%2FUntitled-2023-12-10-2202.png?alt=media&#x26;token=1addcfc3-eb06-42bf-a387-b85a83f1337b" alt=""><figcaption></figcaption></figure>

1. **User Prepares Verification:**
   * The user begins by visiting the DApp and prepares the required verification based on a specified schema.
2. **DApp Initiates SDK:**
   * The DApp activates the SDK, initiating the verification process using the provided schema data.
3. **SDK Connects to Allocator Node:**
   * The SDK connects to the allocator node using the appid and schemaId to retrieve task information. The allocator node validates the parameters and returns the relevant task details.
4. **SDK Communicates with TransGate Extension:**
   * The SDK transfers the task information to the zkPass TransGate extension. After confirming the parameters, the extension opens the designated data source website mentioned in the schema.
5. **User Login to Data Source:**
   * The user logs in to the data source website using their username and password.
6. **Verification Process Initiates:**
   * When the extension detects API requests as defined in the schema, the user starts the verification process.
7. **Establishment of 3P-TLS:**
   * The extension, validator node, and data source server establish a secure 3P-TLS connection.
8. **Generation of zk-Proof:**
   * After receiving the response from the data source, the extension generates a zk-proof and sends it to the validator node.
9. **Validator Node Verification:**
   * The validator node verifies the zk-proof and returns the final verification result.
10. **Result Sent to Extension:**
    * The extension receives the result and sends it back to the DApp through the SDK.
11. **DApp Validation:**
    * Finally, the DApp validates the result and proceeds with the next steps based on its specific requirements.

