forked from dknopik/towers-of-pau
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.txt
26 lines (23 loc) · 927 Bytes
/
api.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
POST /participation
TODO protect against DOS
Registers the participation of a participant
Returns:
{
"start": 123123123, // unix timestamp when the participant shall fetch the ceremony
"deadline": 123123133, // unix timestamp of latest possible submission time
"ticket": "asdasdasd" // ticket that is to be submitted along with the updated ceremony
}
GET /participation/{ticket}
Get the info for a participant
Returns:
{
"start": 123123123, // unix timestamp when the participant shall fetch the ceremony
"deadline": 123123133, // unix timestamp of latest possible submission time
"ceremony": null // null if it is not yet this participants turn, otherwise the ceremony
}
POST /ceremony/{ticket}
Submit the updated ceremony in the body
Returns
- HTTP 200 if the ceremony has been successfully verified
- HTTP 400 if the ceremony was not updated correctly
- HTTP 403 if the provided ticket is invalid