Setup
Step by step guide to set up the UPA for a zk-app.
Last updated
Was this helpful?
Step by step guide to set up the UPA for a zk-app.
Last updated
Was this helpful?
node.js >= 18
ethers >= 6
snarkjs >= 0.7.1
To add the client package as a dependency to your application:
After adding the client package, you will need a file upa.instance
containing the details of a particular deployment of the UPA contracts.
Get the JSON file for the instance you wish to use from the section.
The UPA client is the main way your app will interact with the UPA. It allows you to easily submit proofs among other things. To initialize it, first load the contents of upa.instance
as json into a variable upaInstanceDescriptor
, and then pass this to the constructor with an ethers.Provider
or ethers.Signer.
NOTE: The examples below are simplified for illustration purposes
where signer
is the account which will execute the transactions underlying the client methods.
Another way to interact with the UPA is through the command line tool. To set it up, run
to enable the upa
command in your current shell. If successful, running the upa
command will give output like:
NOTE: the
upa
tool is intended to be self documenting. Seeupa --help
for the full list of available commands.