Get the results
Changed onThe draw data (entrant root, TON block beacon, revealed seeds), the winners with their delivery state and transactions, unused slots, any reversals of unused value, and what the proof page verifies (conditions hash and format, anti-bot policy, recheck coverage, frozen attestation counts). Delivery states are in_progress, delivered, failed and manual_review. A reversal of unused value (unused slots and prizes that could not be delivered) is released after review, to the address the funding payment came from, and reported by giveaway.reversal_resolved.
Verifying a draw (algorithm_version: pf-2). Every input is published before the outcome could be known, so you can recompute the draw yourself. Hex values are lowercase; hashes are SHA-256.
- Commitment. draw.server_seed (published at the draw) is 32 bytes in hex. commit_hash, published when the giveaway opened and before any entry, must equal hex(SHA-256(server_seed bytes)).
- Entrant list. Once the set is frozen at the close, it is served as plain text at /api/v1/public/giveaways/{public_id}/entrants on the host of proof_url (409 until then). The results carry no public_id: take it from GET /v1/giveaways/{id}, or from the /d/{public_id} segment of proof_url. One line per eligible entrant, SEQ:LEAF, in ascending seq order, joined by a single line feed with no trailing newline; filtered and withdrawn entrants are not in it. LEAF is hex(SHA-256(utf8("TELEGRAM_ID:SALT"))) with a random salt per entrant that only the entrant is shown, so the list names nobody. draw.entrants_root must equal the SHA-256 of the list's exact bytes, and the line count must equal draw.eligible.
- Beacon. draw.beacon is the first masterchain block (workchain -1) of the TON blockchain generated at or after second floor(closed_at) + min_delay_sec (block times are whole seconds). entrants_root is always fixed before that second, so the block did not exist yet: when a close's entrant list is fixed later than its own close time allows, closed_at is the moment the list was fixed. Check that beacon.at is not earlier than that second, and that block seqno - 1 was generated BEFORE it: two blocks of one second are still ordered by seqno, so only the first of them qualifies. A beacon generated before 2027-01-01T00:00:00Z (by its time on chain) was chosen to the second, not to the block: when its seqno - 1 shares its second, the public verifier reports that check as unchecked, neither a pass nor a failure. From that time on, a same-second seqno - 1 fails, and an earlier qualifying second fails at any date. Look the blocks up by seqno in a TON explorer: beacon.root_hash is its root hash in hex (explorers often show it in base64).
- Final seed. final_seed = hex(SHA-256(server_seed ‖ root_hash ‖ entrants_root)), the three values concatenated as raw bytes (32 bytes each, decoded from hex), not as hex text.
- Winners. Let pool be the list's entrants in seq order. For i = 0, 1, … up to min(winner_count, len(pool)) − 1: with n = len(pool), compute HMAC-SHA256(key = final_seed bytes, message = utf8("winner:i")) (i in decimal) and read it as a 256-bit big-endian integer r. If r ≥ floor(2^256 / n) × n, repeat with the messages winner:i:retry:1, winner:i:retry:2, … until it is not (this removes modulo bias). Winner i is pool[r mod n]; remove it from pool before the next i. The selected seqs are the seqs of winners (compare them as a set). With fewer eligible entrants than winner_count everyone eligible wins and the unused slots are reversed.
- Conditions. conditions_hash is written once, when the giveaway opens, together with commit_hash: the SHA-256 (hex) of the canonical text of its participation conditions, in the form conditions_format names (v2 when an attestation condition is part of it). A giveaway with no conditions carries the digest of an empty set; it is null until the giveaway opens. The proof page publishes the conditions as they were frozen and recomputes the digest from them.
The proof page at proof_url publishes the same inputs and formula, and lets an entrant find their own leaf in the list.
Request
- Base URLhttps://api.mystars.tg
- AuthAPI key in header X-Api-Key
Path parameters
The giveaway id (UUID).
Response
The results.
Changes
- info
endpoint added
- info