This project is an Express-based API server that provides various endpoints for handling data operations. It includes endpoints to generate the proof for the zk-ecdsa signature scheme and also to verify it. It uses maci sdk for the zk-ecdsa signature scheme.
Install dependencies:
npm install
To start the server, run:
npm run dev
To generate a proof, send a POST request to the /api/generate-proof
endpoint with the following JSON body:
{
"address": "0x1234567890123456789012345678901234567890",
"amount": 10
}
To verify a proof, send a POST request to the /api/verify-proof
endpoint with the following JSON body:
{
"inputCommitments": ["0x1234567890123456789012345678901234567890"],
"outputCommitments": ["0x1234567890123456789012345678901234567890"],
"encodedProof": "0x1234567890123456789012345678901234567890"
}
The server can be configured using environment variables. Create a .env
file in the root directory and set the following variables:
PORT=3001
MaciSdkContractAddress=0x1234567890123456789012345678901234567890
We welcome contributions to this project. Please read our contributing guidelines for more details.
This project is licensed under the MIT License. See the LICENSE file for more details.