Skip to main content

Crate haima_api

Crate haima_api 

Source
Expand description

HTTP API for Haima — wallet, balance, transactions, payment endpoints.

Endpoints:

  • GET /health — health check (public, no auth)
  • GET /state — get full financial state projection (protected)
  • POST /v1/facilitate — x402 payment facilitation (public)
  • GET /v1/facilitator/stats — facilitator dashboard stats (public)
  • GET /v1/bureau/:agent_id — agent credit bureau report (public)

Auth is controlled via HAIMA_JWT_SECRET or AUTH_SECRET env var. If neither is set, auth is disabled (local dev mode).

Modules§

auth
JWT authentication middleware for Haima.
insurance
Insurance marketplace API endpoints.
outcome
Outcome-based pricing API endpoints.
routes
API route handlers.

Structs§

AppState
Shared application state for the Haima API.

Functions§

router
Build the Haima API router.