-
Notifications
You must be signed in to change notification settings - Fork 3
/
dev.http
56 lines (40 loc) · 1.25 KB
/
dev.http
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
POST http://127.0.0.1:3000/election/
Content-Type: application/json
{
"sign_up_duratiosn": 10,
"voting_duration": 20
}
POST http://127.0.0.1:3000/election/sign_up
Content-Type: application/json
{
"election_id": "",
"public_key": ""
}
//1. Create whitelist
POST http://127.0.0.1:3000/election/whitelist
Content-Type: application/json
{
"accounts": [
"aleo1y90yg3yzs4g7q25f9nn8khuu00m8ysynxmcw8aca2d0phdx8dgpq4vw348"
]
}
//2. Send Vote
POST http://127.0.0.1:3000/election/msg
Content-Type: application/json
{
"aleo_transaction_id": "at19jm84srxajprzemqkweer83vmh44lhat6p9vd8sv6q9d7tj06yrqx366yz"
}
//3. Do Tally
POST http://127.0.0.1:3000/election/tally/start
//aleo accounts
aleo1y90yg3yzs4g7q25f9nn8khuu00m8ysynxmcw8aca2d0phdx8dgpq4vw348
//votes transactions ids
at1cf6aaeq0xzyajupxvp6tvn0v2yzud5y39nukx93cf5vhwrnnnvqqsy5t37
at1nzcdpeqlkzgasa0slr9vypa2ck70xf8qq3lvvnd2lyq3588nxuxqejpuqn
at1l4zsvy00qnc5ztmxewl2c7x2sv28q7nasf55zcah20l5hg66usrqztr8zf
at1xxgt6a69vug2vfelz6p39pvl4dng5emzjtwvpqvmy5t900t9wsxsxlretj
at19jm84srxajprzemqkweer83vmh44lhat6p9vd8sv6q9d7tj06yrqx366yz
//get endpoints
GET http://127.0.0.1:3000/election/votes
GET http://127.0.0.1:3000/election/whitelist
GET http://127.0.0.1:3000/election/tally/results