Running Code
System Requirements
Ubuntu version 20 or higher, WSL (Windows Subsystem for Linux) is also supported.
Node.js 18.17.0 or later.
Make sure the VPN is off
Installing WSL for Windows users
This command will enable the necessary features to run WSL and install the Ubuntu distribution of Linux.
If your Windows version is below Windows 10 2004, please refer to this documentation instead.
Open PowerShell or Windows Command Prompt in administrator mode by right-clicking and selecting "Run as administrator"
Run the command below
wsl --installRestart your machine
Once you have installed WSL, you will need to create a user account and password for your newly installed Linux distribution.
Installing Node.js 18.17.0 via NVM
Installing NVM
nvm allows you to quickly install and use different versions of node via the command line.
Run the command below
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bashRestart your terminal session
Installing Node 18.17.0 and NPM via NVM
nvm install 18.17.0To check whether Node has been installed properly, run the commands below:
node -v
npm -vInstalling Git
sudo apt update
sudo apt install gitTo check whether Node has been installed properly, run the commands below:
git --versionInstalling the SDK
If you want to use our zkpass-client-ts library on your own project / outside the demo application, you can follow this step
Set the npm registry configuration to gdp-labs registry.
npm config set @zkpass:registry=https://us-west1-npm.pkg.dev/gdp-labs/gdplabs-npm-public/Install the zkpass-client library for typescript
npm install @zkpass/dvr-client-tsnext.config.js
const nextConfig = {
...,
experimental: {
...,
esmExternals: "loose", // Enable ESM imports
serverComponentsExternalPackages: ["@zkpass/dvr-client-ts"], // Exclude SDK from bundling, to enable reading binary file
},
};
module.exports = nextConfig;
Running CLI Demo
The demo application will run in a CLI and requires 2 parameters: DVR and user data. Please review zkPass key concepts to have better understanding of the use case.

Cloning Demo
To try our Typescript CLI demo, you can follow these steps
Clone demo repository
git clone https://github.com/gl-zkPass/zkpass-sdk.gitGo to Typescript CLI demo directory (Let's assume this is our root directory for steps below)
cd zkpass-sdk/typescript/Running Demo
Install packages
npm installRun Dewi demo
It will run the demo using predefined user data and DVR for Dewi. The expected query result is "false".
npm run demo-dewiExpected result :
...
...
#### starting zkpass proof verification...
#### verification completed [time=118ms]
the query result is falseRun Ramana demo
It will run the demo using predefined user data and DVR for Ramana. The expected query result is "true".
npm run demo-ramanaExpected result :
...
...
#### starting zkpass proof verification...
#### verification completed [time=60ms]
the query result is trueRun Jane demo
It will run the demo using predefined user data and DVR for Jane. The expected query result is "true".
npm run demo-janeExpected result :
...
...
#### starting zkpass proof verification...
#### verification completed [time=46ms]
the query result is trueRun demo with custom data
You can run the demo using custom data. Examples for user data and DVR can be found in rust/test/data.
Example running demo using custom data :
npm run demo ../rust/test/data/basic-data.json ../rust/test/data/basic-dvr.jsonExpected result :
...
...
#### starting zkpass proof verification...
#### verification completed [time=51ms]
the query result is trueRun demo with multiple user data
You can also run the demo using multiple user data. Examples for multiple user data and DVR can be found in typescript/test/data/multiple.
Example running demo using multiple data:
npm run demo-multiLast updated