Building OZKi

Building OZKi consists of two main steps: building the ozki-toolkit package and installing the dependencies for ozki-oracle and ozki-bot.

Building Circom Proof Function (optional)

You can skip this section on building the proof function. This is needed only if you plan to add your own proof functions.

The ozki-toolkit comes with three circom proof functions:

  • ProveGoogleAuthMain

  • ProvePayPalSubscriptionMain

  • GetAnswerHashMain

These three proof functions have been built to generate the corresponding zkp component files which have been included in the ozki-toolkit npm package. Run the "ozki-toolkit.sh list" to see the default zkp component files as shown below.

If you have other proof functions to be built and included in the package, you can use the ozki-toolkit CLI to do so.

Building ozki-toolkit Package

To build the ozki-toolkit, follow the instructions below. The example below assumes you are using 'ozki' as the parent directory of the ozki-toolkit. You may use a different directory instead.

$ cd ~/ozki/ozki-toolkit
$ npm install
$ npm run build-pkg

This will create the local ozki-toolkit npm package at the top of ozki-toolkit repo. The npm package name is ozki-toolkit-<version>.tgz. This package is referenced and used by both the ozki-oracle and the ozki-bot.

Installing Dependencies for ozki-oracle and ozki-bot

Next, install the dependencies for the ozki-oracle and the ozki-bot.

# install the npm packages for ozki-oracle
$ cd ~/ozki/ozki-oracle
$ npm run install-deps
# install the npm packages for ozki-bot
$ cd ~/ozki/ozki-bot
$ npm run install-deps

There is no need to explicitly build the oracle and the bot as the web services will auto-build when they start.

Last updated