@persona-claims/http
v0.2.0
Published
Reference REST transport schemas for the Claims protocol.
Readme
@persona-claims/http
Reference REST transport schemas for the Claims protocol.
This package exists only to back the reference HTTP adapters in apps/*. It is not a replacement for the role SDKs (@persona-claims/issuer, verifier, wallet, witness, gatekeeper) — those are the right dependency for embedding protocol roles into your own systems.
What it owns
zodschemas for every REST request/response shapecontentTypesnamespace with the three protocol-specific MIME types- a small
postJsonhelper for naïve clients
Content types
import { contentTypes } from "@persona-claims/http";
contentTypes.claims; // "application/persona+claims"
contentTypes.request; // "application/persona+request"
contentTypes.response; // "application/persona+response"Schemas
Each REST endpoint has a request and response schema. The naming is short and consistent: IssueRequestSchema / IssueResponseSchema, VerifyRequestSchema / VerifyResponseSchema, ReissueRequestSchema / ReissueResponseSchema, RevocationRequestSchema / RevocationResponseSchema, and so on.
All schemas are plain zod objects, parse to fully typed values, and can be reused by clients to validate replies.
Intended consumers
apps/issuerapps/verifierapps/witnessapps/gatekeeper
Boundaries
- No issuer / verifier / wallet / witness / gatekeeper logic
- No persistence, no DNS, no signature verification
- For an embedded role, depend on the corresponding
@persona-claims/<role>package
