zeno

Standalone API Reference

Complete reference for the Zeno Server API.

Endpoints

POST /api/challenge

Request a new PoW challenge. Body:

{
  "site_key": "uuid" 
}

Response:

{
  "challenge_id": "uuid",
  "seed": "hex...",
  "discriminant": "hex...",
  "difficulty": 2000000,
  "graph_bits": 28,
  "issued_at": 1709232000,
  "expires_at": 1709232060
}

POST /api/redeem

Submits a solution for verification and token issuance. Body:

{
  "site_key": "uuid",
  "challenge_id": "uuid",
  "solution": {
      "cycle": [10, 500, ...],
      "y": { "a": "hex...", "b": "hex..." }, 
      "pi": { "a": "hex...", "b": "hex..." }
  }
}

Response:

{
  "token": "uuid",
  "expires_at": 1709235600
}

POST /api/verify

(Server-side) Verify if a token is valid. Body:

{
  "site_key": "uuid",
  "token": "uuid",
  "single": false // Optional: Force burn/single-use
}

Response:

{
  "valid": true,
  "metadata": {} 
}

POST /api/delete

Manually revoke a token (e.g., on logout). Body:

{
  "site_key": "uuid",
  "token": "uuid"
}

Response:

{
  "deleted": true
}