diff --git a/docs/zkapps/tutorials/05-common-types-and-functions.mdx b/docs/zkapps/tutorials/05-common-types-and-functions.mdx index 59cd9cc94..b7f27f55a 100644 --- a/docs/zkapps/tutorials/05-common-types-and-functions.mdx +++ b/docs/zkapps/tutorials/05-common-types-and-functions.mdx @@ -41,7 +41,7 @@ The [example project](https://github.com/o1-labs/docs2/tree/main/examples/zkapps ## Prerequisites -This tutorial has been verified with [Mina zkApp CLI](https://github.com/o1-labs/zkapp-cli) version `0.11.0` and [SnarkyJS](https://www.npmjs.com/package/snarkyjs) `0.12.1`. +This tutorial has been tested with [zkApp CLI](https://github.com/o1-labs/zkapp-cli) version `0.16.0` and [o1js](https://www.npmjs.com/package/o1js) version `0.15.2`. Ensure your environment meets the [Prerequisites](/zkapps/tutorials#prerequisites) for zkApp Developer Tutorials. diff --git a/examples/zkapps/05-common-types-and-functions/05output.png b/examples/zkapps/05-common-types-and-functions/05output.png new file mode 100644 index 000000000..0b79be111 Binary files /dev/null and b/examples/zkapps/05-common-types-and-functions/05output.png differ diff --git a/examples/zkapps/05-common-types-and-functions/README.md b/examples/zkapps/05-common-types-and-functions/README.md index 587721dda..390e5b2fe 100644 --- a/examples/zkapps/05-common-types-and-functions/README.md +++ b/examples/zkapps/05-common-types-and-functions/README.md @@ -1,25 +1,49 @@ # Mina zkApp: 05 Common Types And 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 tutorial helps you learn about types you can use when building with o1js. Earlier tutorials mostly use the Field type. o1js provides other higher-order types built from Fields that are useful for zkApp development and expand the possibilities for more applications. + +## Version +- o1js: **0.15.2** + +## Tutorial + +For the step-by-step tutorial, see [Tutorial 5: Common Types And Functions](https://docs.minaprotocol.com/zkapps/tutorials/common-types-and-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/05-common-types-and-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 +![05output](05output.png) + +## Last audit date + +**22-January-2024** ## License diff --git a/examples/zkapps/05-common-types-and-functions/package-lock.json b/examples/zkapps/05-common-types-and-functions/package-lock.json index 23044e403..32921616d 100644 --- a/examples/zkapps/05-common-types-and-functions/package-lock.json +++ b/examples/zkapps/05-common-types-and-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/05-common-types-and-functions/package.json b/examples/zkapps/05-common-types-and-functions/package.json index 5d38942a6..727be53bf 100644 --- a/examples/zkapps/05-common-types-and-functions/package.json +++ b/examples/zkapps/05-common-types-and-functions/package.json @@ -43,6 +43,6 @@ "typescript": "^4.7.2" }, "peerDependencies": { - "o1js": "0.15.1" + "o1js": "0.15.*" } }