Socket
Book a DemoInstallSign in
Socket

@maci-protocol/maci-coordinator

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@maci-protocol/maci-coordinator

Coordinator service for MACI

0.0.0-ci.26f28d6
latest
npmnpm
Version published
Maintainers
3
Created
Source

Coordinator service

Instructions

  • Add .env file (see .env.example).
  • Generate RSA key pair with pnpm run generate-keypair.
  • Download zkey files using pnpm run download-zkeys:{type} (only test type is available for now).
  • Make sure you copied RSA public key to your application. This will be needed for encrypting Authorization header and coordinator private key for proof generation. Also it can be accessed through API method GET v1/proof/publicKey.
  • Run pnpm run start to run the service.
  • All API calls must be called with Authorization header, where the value is encrypted with RSA public key you generated before. Header value contains message signature and message digest created by COORDINATOR_ADDRESSES. The format is publicEncrypt({signature}:{digest}). Make sure you set COORDINATOR_ADDRESSES env variable and sign any message with the addresses from your application (see AccountSignatureGuard).
  • Proofs can be generated with POST v1/proof/generate API method or with Websockets (see dto spec, controller and wsgateway).

Subgraph deployment

It is possible to deploy subgraph using coordinator service.

First, you need to setup subgraph and create a project. Subgraph dashboard.

Then, set env variables:

# Subgraph name
SUBGRAPH_NAME="maci-subgraph"

# Subgraph provider url
SUBGRAPH_PROVIDER_URL=https://api.studio.thegraph.com/deploy/

# Subgraph deploy key
SUBGRAPH_DEPLOY_KEY=*******

# Subgraph project folder
SUBGRAPH_FOLDER=../subgraph

After deployment, subgraph url will be available in studio dashboard and you can use this type of url to get latest deployed version in your application:

https://api.studio.thegraph.com/.../{SUBGRAPH_NAME}/version/latest

FAQs

Package last updated on 01 Apr 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.