Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Crypto-Project-ENSTA/front-end/llms.txt

Use this file to discover all available pages before exploring further.

This admin endpoint closes the active voting phase. Once called, no further ballots can be submitted. The system immediately triggers the ballot decryption pipeline: the counter decrypts all submitted ballots, the commissioner validates N2 hashes, and the final tally is published at GET /results/tally.
POST /voting/end-vote
No request body is required.

Response fields

status
"success" | "error"
Indicates whether the transition succeeded or failed.
message
string
A human-readable description of the outcome.
This endpoint is only available when voting_status === "vote_started". Calls made during registration or after voting has already ended will return an error.
This action is irreversible. All ballots are decrypted and finalised immediately — no more votes can be cast once this request succeeds. Verify that sufficient time has been given for all voters to participate before calling this endpoint.

What happens next

After a successful call:
  1. The counter decrypts all submitted ballots.
  2. The commissioner validates N2 hashes for each ballot.
  3. Results are published and become available at GET /results/tally.
  4. Voters can verify their individual ballots using POST /results/verify-vote.

Example request

curl -X POST "$API_URL/voting/end-vote" \
  -H "Authorization: Bearer $ADMIN_TOKEN"

Example response

{
  "status": "success",
  "message": "Voting has ended. Ballots are being decrypted."
}

Build docs developers (and LLMs) love