Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@maci-protocol/coordinator

Package Overview
Dependencies
Maintainers
4
Versions
322
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@maci-protocol/coordinator

Coordinator service for MACI

npmnpm
Version
0.0.0-ci.8bb6ea8
Version published
Weekly downloads
215
-71.41%
Maintainers
4
Weekly downloads
 
Created
Source

Coordinator service

Please refer to Offchain relayer service documentation for more information.

Requirements

  • Node.js version 20.0.0.
  • pnpm package manager.
  • rapidsnark program.
  • (Optional) Redis database if you want to use the scheduler module.
  • Please note that the build process might fail in a Windows environment. If you are using Windows, it is recommended to use Windows Subsystem for Linux (WSL) or a virtual machine with a Linux distribution.

Install and build it from source

  • Install dependencies and build the project
pnpm install
pnpm run build
  • Install Redis database (if the scheduler module is going to be used) using the official guide

  • Download the zkeys

pnpm run download-zkeys:test
# for production zkeys
# pnpm run download-zkeys:ceremony
  • Move to the coordinator service directory
cd apps/coordinator
  • Generate the RSA key pair to encrypt values throughout the communication workflow
pnpm run generate-keypair
  • Setup .env file (see .env.example for reference)
cp .env.example .env
  • Run the NestJS application
pnpm run start
# or
pnpm run start:prod

Docker

Remember to run it from the monorepo root directory.

# Build docker
docker compose -f apps/coordinator/docker-compose.yml build

# Run container detached
docker compose -f apps/coordinator/docker-compose.yml up -d

# Enter the container
docker compose -f apps/coordinator/docker-compose.yml exec coordinator-service /bin/sh

# Stop container
docker compose -f apps/coordinator/docker-compose.yml down

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 10 Oct 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