You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
poma ae122a0c8d
improve randomness
3 years ago
js improve randomness 3 years ago
phase2-bn254@23338795bf initial 3 years ago
static initial 3 years ago
.gitignore initial 3 years ago
.gitmodules initial 3 years ago initial 3 years ago
package-lock.json initial 3 years ago
package.json initial 3 years ago
webpack.config.js initial 3 years ago


This demo generates contributions for phase 2 of trusted setup MPC in a browser using WebAssembly

How to install

git clone --recursive
npm install

How to run in debug mode

# Builds the project and opens it in a new browser tab. Auto-reloads when the project changes.
npm start

How to build in release mode

# Builds the project and places it into the `dist` folder.
npm run build

Project structure

  • webpack.config.js config that is used to build .wasm and other project files
  • phase2-bn254/phase2 trusted setup crate, we build .wasm module from it
  • js/index.js main frontend script that calls .wasm to generate the contribution
  • static/index.html empty index file that just includes .js
  • static/params.bin example previous contribution

This example uses static previous contribution file and outputs new contribution to console. On prod this should be handled by the server.