KEYHOLE

API

Public reads are JSON with open CORS. Writes need a wallet session (Sign-In-With-Solana style; a message, never a transaction).

MethodPathWhatAccess
GET/api/fields?limit=&before=The ledger: saved fields, newest first.public, CORS
GET/api/fields/{n}One field with its First light plates and recent queue slots.public, CORS
GET/api/wallet/{address}The field saved by a wallet, if any.public, CORS
GET/api/skyEvery saved field's aim and the HEALPix coverage of the sky (nside 16).public, CORS
GET/api/queueTonight's draw per site: drand round, plan hash, slots.public, CORS
GET/api/firstlightFirst light plates, newest first.public, CORS
POST/api/looksLook at an address: { address, save?, deep? }. Saving needs a session for that wallet.rate-limited
PUT/api/fields/{n}/compositionSave the plate's composition: { band, ap, fv, title }. Owner only.session
POST/api/auth/nonceStart sign-in: { address } → a message to sign.rate-limited
POST/api/auth/verifyFinish sign-in: { address, message, signature } → session cookie.rate-limited
GET/api/meYour session, holder status and field.session
POST/api/auth/logoutEnd the session.session
POST/api/admin/slots/{id}Record a slot: { status: exposed|clouded|skipped, image_url, fits_url }.admin token
POST/api/admin/drawRun the nightly draw now (idempotent); { force: true } redraws planned slots.admin token

Example: /api/queue · /api/sky · /api/fields