syntax = "v1" info ( title: "Lottery API" desc: "User-facing lottery endpoints for HIF-3 Stage 1" author: "hifast" version: "0.1.0" ) import "../types.api" @server ( prefix: v1/lottery group: public/lottery middleware: AuthMiddleware,DeviceMiddleware ) service ppanel { @doc "Get lottery activity config + user status" @handler QueryLotteryConfig get /config (GetLotteryConfigRequest) returns (GetLotteryConfigResponse) @doc "Draw once (nonce idempotent, rate limited 1/sec)" @handler DrawLottery post /draw (DrawLotteryRequest) returns (DrawLotteryResponse) @doc "List my draws" @handler QueryLotteryRecords get /records (GetLotteryRecordsRequest) returns (GetLotteryRecordsResponse) @doc "Claim a prize (Stage 1 returns 100010 not_claimable)" @handler ClaimLotteryPrize post /claim (ClaimLotteryPrizeRequest) returns (ClaimLotteryPrizeResponse) }