From dace35815de67f27f75a03415ecb9e54070269b5 Mon Sep 17 00:00:00 2001 From: 0xmad <0xmad@users.noreply.github.com> Date: Mon, 27 May 2024 11:00:22 -0500 Subject: [PATCH] docs(coordinator): update readme section --- circuits/ts/__tests__/PrivToPubKey.test.ts | 2 +- coordinator/README.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/circuits/ts/__tests__/PrivToPubKey.test.ts b/circuits/ts/__tests__/PrivToPubKey.test.ts index 45e876d422..955212d8fe 100644 --- a/circuits/ts/__tests__/PrivToPubKey.test.ts +++ b/circuits/ts/__tests__/PrivToPubKey.test.ts @@ -7,7 +7,7 @@ import { Keypair, PrivKey, PubKey } from "maci-domainobjs"; import { L } from "./utils/constants"; import { circomkitInstance, getSignal } from "./utils/utils"; -describe.only("Public key derivation circuit", function test() { +describe("Public key derivation circuit", function test() { this.timeout(900000); let circuit: WitnessTester<["privKey"], ["pubKey"]>; diff --git a/coordinator/README.md b/coordinator/README.md index 2a103cf212..2f8ed0973c 100644 --- a/coordinator/README.md +++ b/coordinator/README.md @@ -5,8 +5,9 @@ 1. Add `.env` file (see `.env.example`). 2. Generate RSA key pair with `pnpm run generate-keypair`. 3. Download zkey files using `pnpm run download-zkeys:{type}` (only test type is available for now). -4. 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. +4. 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`. 5. Run `pnpm run start` to run the service. 6. 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_ADDRESS`. The format is `publicEncrypt({signature}:{digest})`. Make sure you set `COORDINATOR_ADDRESS` env variable and sign any message with this address from your application (see [AccountSignatureGuard](./ts/auth/AccountSignatureGuard.service.ts)). 7. Proofs can be generated with `POST v1/proof/generate` API method (see [dto spec](./ts/proof/dto.ts) and [controller](./ts/app.controller.ts)). +8. [Swagger documentation for API methods](https://maci-coordinator.pse.dev/api)