The tools are located in ~/zkpass-sdk/rust/bin directory.
For the purposes of this guide, the zkpass-sdk
repository is cloned into the home directory of the current user, retaining its default name. This places the zkpass-sdk
repository at ~/zkpass-sdk
. As a result, the root directory for the zkPass SDK is set to ~/zkpass-sdk/rust
.
Should you choose to clone the zkpass-sdk
repository into a different location, ensure that you adjust any referenced paths in the instructions to match your chosen directory structure.
The zkpass-query-tool is a powerful utility designed for crafting and refining zkPass JSON queries in a local environment. This tool enables you to test your JSON query scripts directly against the user data they reference, all without the need to connect to the main zkPass Service. Ideal for learning and experimentation, the tool offers a safe, isolated setting where you can develop and fine-tune zkPass query scripts using test data.
Operating this tool is straightforward. It requires two primary inputs: your user data and the corresponding query, both formatted in JSON. Once you provide these, the tool runs your query through the local zkPass query engine. This process closely simulates the actual workings of the zkPass Service but within the confines of your local setup. Following the query execution, the tool generates a zkPass proof, akin to what the zkPass Service would produce. It then proceeds to verify this proof and displays the query results directly on your console. To help you get started and understand how the system works, the toolkit includes several sample JSON files for both queries and user data located in ~/didPass-demo/zkpass-sdk/rust/zkpass/test/data
. These examples serve as practical references to guide your initial steps in mastering zkPass queries.
Example
To simulate the query and user data used in the Employee Onboarding use case, run the following:
The output should look like the following: