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.
User Prepares Verification:
The user begins by visiting the DApp and prepares the required verification based on a specified schema.
DApp Initiates SDK:
The DApp activates the SDK, initiating the verification process using the provided schema data.
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.
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.
User Login to Data Source:
The user logs in to the data source website using their username and password.
Verification Process Initiates:
When the extension detects API requests as defined in the schema, the user starts the verification process.
Establishment of 3P-TLS:
The extension, validator node, and data source server establish a secure 3P-TLS connection.
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.
Validator Node Verification:
The validator node verifies the zk-proof and returns the final verification result.
Result Sent to Extension:
The extension receives the result and sends it back to the DApp through the SDK.
DApp Validation:
Finally, the DApp validates the result and proceeds with the next steps based on its specific requirements.
Last updated