diff --git a/examples/zkapps/02-private-inputs-and-hash-functions/02output.png b/examples/zkapps/02-private-inputs-and-hash-functions/02output.png new file mode 100644 index 000000000..9e010ede7 Binary files /dev/null and b/examples/zkapps/02-private-inputs-and-hash-functions/02output.png differ diff --git a/examples/zkapps/02-private-inputs-and-hash-functions/README.md b/examples/zkapps/02-private-inputs-and-hash-functions/README.md index fb0eab7e7..4a28021f6 100644 --- a/examples/zkapps/02-private-inputs-and-hash-functions/README.md +++ b/examples/zkapps/02-private-inputs-and-hash-functions/README.md @@ -1,25 +1,49 @@ # Mina zkApp: 02 Private Inputs And Hash Functions -This template uses TypeScript. - -## How to build - -```sh -npm run build -``` - -## How to run tests - -```sh -npm run test -npm run testw # watch mode -``` - -## How to run coverage - -```sh -npm run coverage -``` +This Private Inputs and Hash Functions tutorial helps you to learn about private inputs, hash functions, and adding a second value as an input. + +## Version +- o1js: **0.15.2** + +## Tutorial + +For the step-by-step tutorial, see [Tutorial 2: Private Inputs and Hash Functions](https://docs.minaprotocol.com/zkapps/tutorials/private-inputs-hash-functions). + +## How to install and run this example project + +1. Clone the repository: + ```sh + git clone https://github.com/o1-labs/docs2.git + ``` +2. Change directory to the project location: + ```sh + cd docs2/examples/zkapps/02-private-inputs-and-hash-functions + ``` +3. Install dependencies: + ```sh + npm install + ``` + +4. Build the project: + ```sh + npm run build + ``` + +5. Run the compiled code: + ```sh + node build/src/main.js + ``` + To run and build the compiled code with a single command: + ```sh + npm run build && node build/src/main.js + ``` + +## Expected output +![02output](02output.png) + +## Last audit date + +**20-January-2024** ## License diff --git a/examples/zkapps/02-private-inputs-and-hash-functions/package-lock.json b/examples/zkapps/02-private-inputs-and-hash-functions/package-lock.json index a79779896..9c30454ee 100644 --- a/examples/zkapps/02-private-inputs-and-hash-functions/package-lock.json +++ b/examples/zkapps/02-private-inputs-and-hash-functions/package-lock.json @@ -24,7 +24,7 @@ "typescript": "^4.7.2" }, "peerDependencies": { - "o1js": "0.15.1" + "o1js": "0.15.*" } }, "node_modules/@babel/code-frame": { diff --git a/examples/zkapps/02-private-inputs-and-hash-functions/package.json b/examples/zkapps/02-private-inputs-and-hash-functions/package.json index 6677b12d1..226cf6d68 100644 --- a/examples/zkapps/02-private-inputs-and-hash-functions/package.json +++ b/examples/zkapps/02-private-inputs-and-hash-functions/package.json @@ -43,6 +43,6 @@ "typescript": "^4.7.2" }, "peerDependencies": { - "o1js": "0.15.1" + "o1js": "0.15.*" } }