Host and login endpoints
API reference
Host applications create a one-time challenge and submit a proof result. The hosted login also exposes enrollment, witness, session, and health endpoints.
POST /api/challenges
Creates 32 random bytes, stores only their digest, binds the record to trusted origin and gate, and expires it after five minutes.
{"gateId":"premium-holder"}POST /api/verify
Validates and atomically consumes the challenge and login nullifier. A successful response contains only the documented VerifiedLogin fields.
{"ok":true,"privateAppId":"vp_appA_72f1","gateId":"premium-holder","epoch":20391,"origin":"https://app.example","expiresAt":"2026-08-02T09:00:00.000Z"}POST /api/session
Creates or clears the opaque, Secure, HttpOnly cookie-session adapter after a successful server verification. It must not receive a wallet address.
POST /api/credentials/witness
Refreshes the signed credential's Merkle witness against the active contract root. It is part of the hosted-login service, not an endpoint a host dApp needs to call directly.
POST /api/enrollment/challenge and POST /api/enrollment/issue
Create the Freighter signing challenge, check the configured Testnet asset rule, issue the local credential, and publish the updated root through the owner-controlled service flow.
GET /api/health
Returns 200 only when origin, database URL, contract, gate, asset, and required signing configuration are structurally valid. It returns issue codes only, never configuration values or secrets.
POST /api/proof/simulate
A clearly non-production compatibility fixture for controlled UI demonstrations. Production requests are rejected and the real verifier never accepts its output.