A tiny CLI that verifies whether a Private State Token key‑commitment (issuer directory) endpoint is implemented correctly.
It checks:
- URL uses HTTPS
- HTTP status = 200
Content-Type: application/pst-issuer-directory(params allowed)- JSON body against a strict JSON Schema (uint32
idandbatchsizeas numbers; keys 1..6; base64Y; uint64‑stringexpiry) - Section key equals its inner
protocol_version
Note: This tool currently validates the directory (key‑commitment) endpoint only at the moment. It will be extended to cover other parts of the spec as well.
- Node.js 18+
- npm (or pnpm/yarn)
- Internet access from the machine running the CLI
# in the project directory
npm installThe project is configured to run via ts-node in ESM mode.
npm run start <URL>Example:
npm run start https://issuer.example/.well-known/private-state-token/key-commitmentUsing a public demo endpoint:
npm run start https://privatetokens.dev/tt/k/Output:
✅ Success: key-commitment endpoint is valid.
If the endpoint uses a wrong protocol and responds with the wrong content type and a malformed body:
❌ Validation failed:
- Endpoint must be HTTPS, got: http:
- Content-Type must be "application/pst-issuer-directory" (params allowed). Got "application/json; charset=utf-8"
- /PrivateStateTokenV1VOPRF/id: must be integer
(Your exact errors will reflect what’s wrong with the endpoint.)