You need the following software for this book:
We also make use of Jupyter Notebooks in this repository, and use nbconvert to convert notebooks into Markdown.
I've used the Conda installation method for this one, which results in an environment that can be activated as follows:
conda activate sage
sage # launch sageWithin the Sage CLI, you can run files via: load("./path-to-file.sage"); or, within a Jupyter notebook, you can select the Sage kernel.
Alternatively, you may use the SageMath Docker image instead of installing it on your machine! To begin, pull the image:
docker pull --platform linux/amd64 sagemath/sagemathAt the root of this project, you can use the Sage CLI with all the folders mounted with the following command:
docker run -v $PWD:/home/sage/moonmath:ro -it sagemath/sagemathYou can even open a notebook using the Docker image:
docker run -v $PWD:/home/sage/moonmath:ro -p8888:8888 sagemath/sagemath sage-jupyterWe have short-hand scripts for these in Makefile as well!
To install Circom, you need to have Rust installed first:
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | shThen, you can install Circom by cloning its repository and then building its binary file.
git clone https://github.com/iden3/circom.git
cd circom
cargo build --release
cargo install --path circomWe also use SnarkJS together with Circom. SnarkJS is an NPM package, and you can install it as a global binary via:
npm i -g snarkjs