API
Public reads are JSON with open CORS. Writes need a wallet session (Sign-In-With-Solana style: a message, never a transaction). The index itself is a static file: /data/wrecks.v2.bin, described by /data/index.json.
| Method | Path | What | Access |
|---|---|---|---|
| POST | /api/wrecks | Dive at an address: { address, save? } → the mapping (SHA-256 → index row), the wreck (Wikidata, NOAA depth) and its extras (Wikipedia summary, Commons photo, sea name, seabed patch). Saving needs a session for that wallet. | 30/min per IP |
| GET | /api/index/{row} | One row of the pinned index (0-based) with its extras. | public, CORS, 60/min |
| GET | /api/wrecks?limit=&before= | Saved wrecks, newest first. | public, CORS |
| GET | /api/wrecks/{n} | One saved wreck. | public, CORS |
| GET | /api/wallet/{address} | The wreck a wallet saved, if any. | public, CORS |
| GET | /api/fleet | Every saved wreck on the chart, and how much of the index holders have found. | public, CORS |
| PUT | /api/wrecks/{n}/card | Save the log: { style: log|plaque|chart, label }. Owner only. | session |
| POST | /api/auth/nonce | Start sign-in: { address } → a message to sign. | 20/min per IP |
| POST | /api/auth/verify | Finish sign-in: { address, message, signature } → session cookie. | 20/min per IP |
| GET | /api/me | Your session, phase and saved wreck. | session |
| POST | /api/auth/logout | End the session. | session |
| POST | /api/admin/cron | Run the background job now (idempotent). | admin token |
Try /api/fleet or /api/index/1.