Every election moves through three states in order:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Crypto-Project-ENSTA/back-end/llms.txt
Use this file to discover all available pages before exploring further.
register, vote_started, and vote_ended. During register you add voters and configure the ballot. When you start the vote, credential emails go out immediately and voting opens. When you end the vote, all ballots are decrypted, verified, and tallied. Each transition is one-way — there is no rollback.
Check current status
Before taking any action, confirm which phase the election is in.| Status | Meaning |
|---|---|
register | Voters can be registered. Voting has not started. |
vote_started | Credential emails have been sent. Voters can cast ballots. |
vote_ended | Voting is closed. Results have been tallied. |
Update election configuration
Before starting the vote, set the ballot question and candidate choices usingPATCH /config/voting-system-config. Only the fields you include are updated.
Start the election
POST /voting/start-vote transitions the election from register to vote_started and immediately sends a credential email to every registered voter.
404:
End the election and tally results
POST /voting/end-vote closes voting and triggers the full counting pipeline: all encrypted ballots are retrieved from the anonymizer, decrypted with the counter’s private key, their signatures and N2 hashes are verified, and a tally is computed.
GET /results/tally and individual voters can verify their ballots at POST /results/verify-vote.