Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jeeiii/mpc-phase2-suite-cli

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jeeiii/mpc-phase2-suite-cli

MPC Phase 2 CLI

  • 0.1.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

MPC Phase2 Suite CLI

All-in-one command-line for interfacing with zkSNARK Phase 2 Trusted Setup ceremonies

Linter eslint Code style prettier Repository top language

👥 Contributing (WIP)   |   🤝 Code of conduct (WIP)   |   🗣️ Chat & Support (WIP)

Commands

  • phase2cli: CLI entry point.
  • phase2cli auth: Starts the Device Flow authentication workflow for Github OAuth 2.0.
  • phase2cli contribute: Allow a user to participate by computing a contribution for each circuit of a selected ceremony (from those currently running).
  • phase2cli ceremony setup: Allow the coordinator to setup a new ceremony for a particular set/variants of circuits.
  • phase2cli ceremony observe: Allow the coordinator to monitor in real-time who is currently contributing for a circuit of a ceremony.

Getting Started

Prerequisities

You need to have the following installed:

git >= 2.25.1 node >= 16.14.0 npm >= 8.9.0 yarn >= 1.22.18

Configuration

Clone the repository and install the packages:

https://github.com/quadratic-funding/mpc-phase2-suite
cd mpc-phase2-suite
yarn

Navigate to the cli/ folder and make a copy of the .env.json.default file and rename it .env.json. The new file will contain the following data:

{
    "firebase": {
        "FIREBASE_FIRESTORE_DATABASE_URL": "your-firebase-firestore-database-url",
        "FIREBASE_API_KEY": "your-firebase-api-key",
        "FIREBASE_AUTH_DOMAIN": "your-firebase-auth-domain",
        "FIREBASE_PROJECT_ID": "your-firebase-project-id",
        "FIREBASE_STORAGE_BUCKET": "your-firebase-storage-bucket",
        "FIREBASE_MESSAGING_SENDER_ID": "your-firebase-messaging-sender-id",
        "FIREBASE_APP_ID": "your-firebase-app-id"
    },
    "github": {
        "GITHUB_CLIENT_ID": "your-github-oauth-app-client-id"
    },
    "localPaths": {
        "LOCAL_PATH_DIR_CIRCUITS_R1CS": "./circuits/r1cs",
        "LOCAL_PATH_DIR_CIRCUITS_METADATA": "./circuits/metadata",
        "LOCAL_PATH_DIR_ZKEYS": "./zkeys",
        "LOCAL_PATH_DIR_PTAU": "./circuits/ptau"
    }
}
  • The firebase object contains your Firebase Application configuration.
  • The github object contains your Github OAuth Application client identifier.
  • The localPaths object contains the paths that are going to be used for storing circuit-related files.

Usage

Local Development

Build the project

yarn build

Authenticate using Github OAuth (auth command).

yarn auth

Setup a new ceremony (setup command).

yarn ceremony:setup

Contribute to a ceremony (contribute command).

yarn ceremony:contribute

Observe contributions for a ceremony (observe command).

yarn ceremony:observe
NPM Package

You could locally install the CLI as NPM package

npm i -g

Then, you could have access to phase2cli commands (as described above).

⚠️ 🛠 The project is a WIP, so it is not yet to be considered production ready. Handle with care 😴

Please, follow the project boards to stay up-to-date!

Keywords

FAQs

Package last updated on 12 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc