Skip to main content

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.

N1 is the first one-time nonce sent to the voter’s credential email. Before you can submit a ballot you must validate N1 with this endpoint. The commissioner service checks whether the code is known and, if it is, the server stores it in the caller’s session automatically — you do not need to include N1 again when you call submit_vote. The session window is 10 minutes.
You must call this endpoint successfully before calling /voters/submit_vote. If the session expires before you submit your vote, call /voters/check_n1 again to refresh it. Attempting to submit a vote without a valid session N1 will return a 403.

Request

POST /voters/check_n1

Body

n1
string
required
The N1 nonce from the voter’s credential email. This value is checked against the commissioner’s records.

Response

is_N1_exist
boolean
required
true if the N1 code was recognised by the commissioner and has been stored in the session for the upcoming vote submission. false if the code is unknown or invalid.

HTTP status codes

CodeMeaning
200Check completed. Inspect is_N1_exist to determine whether the code was accepted.
500Unexpected error communicating with the commissioner service.

Example

curl -X POST https://your-api/voters/check_n1 \
  -H "Content-Type: application/json" \
  -c cookies.txt -b cookies.txt \
  -d '{"n1": "a1b2c3d4e5f6..."}'
{
  "is_N1_exist": true
}

Build docs developers (and LLMs) love