Setup Environment
The SDK is written in TypeScript and is available in the form of a set of npm packages. It is available to use within both Node and browser environments.
Installation
Make sure you have Node (>v18) and npm installed on your machine. Then install the SDK packages by adding the following node modules to your package.json
file:
Installing SnarkJs
Node
For node, you can install snarkjs
simply as an npm package and make it a globally available variable:
Set as global variable:
Browser
Including this script automatically makes snarkjs
a globally available variable. Make sure this variable is available before you invoke transaction proof generation.
Alright, setup done!
Last updated