@@ -26,11 +26,38 @@ <h1>Anonymous On-Chain Voting</h1>
2626 < p > Create polls where every vote is backed by a ZK proof. No one sees how you voted. Everyone can verify the result is correct. Deploy to any EVM chain.</ p >
2727 < div class ="hero-buttons ">
2828 < a class ="btn-primary " href ="/poll "> Create a Poll</ a >
29- < a class ="btn-secondary " href ="#how-it-works " > How It Works </ a >
29+ < a class ="btn-secondary " href ="#quick-start " > Quick Start </ a >
3030 </ div >
3131 </ div >
3232 </ section >
3333
34+ < section class ="section " id ="quick-start ">
35+ < h2 > Quick Start</ h2 >
36+ < p class ="section-sub "> Three API calls. Create a poll, cast a ZK-proven vote, read the results.</ p >
37+ < div class ="quickstart ">
38+ < div class ="quickstart-label "> Create a poll</ div >
39+ < pre > < span class ="flag "> curl</ span > < span class ="flag "> -X POST</ span > https://api.bitwrap.io/api/polls < span class ="flag "> \
40+ -H</ span > < span class ="string "> "Content-Type: application/json"</ span > < span class ="flag "> \
41+ -d</ span > < span class ="string "> '{"title":"Board Vote","choices":["Approve","Reject","Abstain"],"duration":"24h"}'</ span >
42+
43+ < span class ="comment "> # → {"id":"p_8f3a...","status":"active","choices":3}</ span > </ pre >
44+ </ div >
45+ < div class ="quickstart " style ="margin-top: 20px; ">
46+ < div class ="quickstart-label "> Cast a vote with ZK proof</ div >
47+ < pre > < span class ="flag "> curl</ span > < span class ="flag "> -X POST</ span > https://api.bitwrap.io/api/polls/p_8f3a.../vote < span class ="flag "> \
48+ -H</ span > < span class ="string "> "Content-Type: application/json"</ span > < span class ="flag "> \
49+ -d</ span > < span class ="string "> '{"choice":0,"secret":"voter-entropy","nullifier":"unique-id"}'</ span >
50+
51+ < span class ="comment "> # → {"nullifier":"0x4b2c...","proof":{"a":...,"b":...,"c":...},"verified":true}</ span > </ pre >
52+ </ div >
53+ < div class ="quickstart " style ="margin-top: 20px; ">
54+ < div class ="quickstart-label "> Get results</ div >
55+ < pre > < span class ="flag "> curl</ span > https://api.bitwrap.io/api/polls/p_8f3a.../results
56+
57+ < span class ="comment "> # → {"tally":[12,7,3],"total":22,"choices":["Approve","Reject","Abstain"]}</ span > </ pre >
58+ </ div >
59+ </ section >
60+
3461 < section class ="section " id ="how-it-works ">
3562 < h2 > Vote → Prove → Tally</ h2 >
3663 < p class ="section-sub "> Voter privacy and result integrity in one protocol.</ p >
0 commit comments