# POLLA > POLLA (Permissionless Open Lightning Lottery Audit) is a public, verifiable, open-source lottery paid over > Lightning. The winner is decided by a Bitcoin block; the list of participants, the anchor and the result are > Nostr events signed by the lottery key (the auditor), stamped with OpenTimestamps. The auditor signs the money > and the events: that is part of the design and is not up for change. Source code: MIT licence, to be published on GitHub in January 2027, once the first operator's testing phase is over. The goal is for POLLA to run as multiple instances by different operators; this site is the first one. Production is Bitcoin **mainnet** whenever `testMode` is false in `GET /api/health`. Real sats. ## When to use it - Find out which draws exist and which can be bought **right now**: `GET /api/draws` (field `onSale`). - Verify a result: download the signed JSON (results, anchor, commitment), check the lottery key's signatures and follow docs/VERIFY-DRAW.md. Do not parse the website's HTML. - Buy a ticket by paying a BOLT11 invoice created with `POST /api/invoice` (only for a draw with `onSale: true`). - Understand a prize claim (`POST /api/claim`): the winner signs with the purchase's secret code. ## When not to - Do not administer anything, pay prizes or treat `/admin/` as an API. Do not index `/admin/`. - Never ask for, paste or log a Nostr `nsec`, an NWC connection string or a claim code (`POLLA-…` / `LOTTO-…`): only its hash is ever published. - «Announced» is not «on sale»: do not infer sales from the dates or from `enabledDraws`; read `onSale`. - `config.json` is not a contract for agents. ## Public API (read) - [Health](https://polla21.org/api/health): `testMode`, `payouts` (false on purpose: prizes are paid by hand) - [Draws and sales state](https://polla21.org/api/draws): `status` onSale | announced | paused | closed | drawn - [Pause](https://polla21.org/api/pause) - [Results index](https://polla21.org/api/results/index), `GET /api/results/` and the signed result `GET /api/results//proof` (404 = no result published yet, not a routing error) - `GET /api/commitment/` (signed list of participants + OpenTimestamps), `GET /api/anchor/` (signed block anchor) - Own Nostr relay: `wss://polla21.org/relay` (copies are also published to third-party relays) - Everything to verify one draw in one answer: `GET /api/proof/` (404 = no signed result yet) - [OpenAPI description](https://polla21.org/openapi.json): every public route, request and error - [Buying, verifying and claiming without a browser](https://polla21.org/docs/AGENT-BUY.md) ## Buy (mainnet: real sats) `GET /api/draws` → only a draw with `onSale: true` → `POST /api/invoice` with `requestId` (idempotent) → check that the amount is the one you computed → pay the BOLT11 before it expires → poll `GET /api/invoice/`. The purchase's secret code stays with the buyer; only its hash is sent. Full walkthrough: docs/AGENT-BUY.md. ## Claim `POST /api/claim` with an event signed by the key derived from the secret code. It is stored for human review and paid by hand (`payouts: false`): it never pays by itself. ## Verify - [How to verify a draw](https://polla21.org/docs/VERIFY-DRAW.md): `node scripts/verify-draw.mjs --server https://polla21.org/api --draw ` - [Pre-draw commitment](https://polla21.org/docs/PRE-DRAW-COMMITMENT.md) ## Docs - [README](https://polla21.org/README.md) · [README (español)](https://polla21.org/README.es.md) - [FAQ (Markdown)](https://polla21.org/faq.md) · [FAQ (español)](https://polla21.org/faq.es.md) - [What is POLLA?](https://polla21.org/what-is-polla.html) - [What is POLLA? · For agents](https://polla21.org/what-is-polla.html#for-agents): what an agent can do, and the same rules as a person - [Security](https://polla21.org/SECURITY.md) ## En español POLLA es una lotería Lightning pública y verificable. Qué está a la venta: `GET /api/draws` (`onSale`); anunciado no es lo mismo que a la venta. Verificar: los JSON firmados y docs/VERIFY-DRAW.md, nunca el HTML. No uses `/admin/`, no pidas ni registres nsec, NWC ni códigos de reclamo. Producción es mainnet cuando `testMode` es false. El código (MIT) se publicará en GitHub en enero de 2027, superada la fase de pruebas del primer operador; el objetivo es que POLLA se ejecute en múltiples instancias por distintos operadores.