TypeScript client
@mintid/verifier-client: a transport-only client for Node backends — zero runtime dependencies, no cryptography, no policy.
Quickstart
@mintid/verifier-client is a transport-only client for Node backends (Node ≥ 20, ESM + types, zero runtime dependencies). It talks to the verifier service your agency deploys; it carries no cryptography, no chain access, no nonce store and no policy. If a change to this package ever looks like a verification feature, it belongs to the service instead.
The flow is three calls: create a challenge (you pass policy only — the 10-second expiry is always set server-side), forward it to the holder, validate the holder's response and branch on the decision. Reference documentation and typed examples ship with the package.
Node-only, on purpose. Challenges are bound to your registered verifier identity and signed with your request keys; the decision gates your business logic. That is server-side material — a browser build will not be provided.
Error semantics (the part people get wrong)
A rejection is a resolved decision, not an exception. The client throws only for transport-level events: a body the service cannot parse at all (a programming error on the caller's side), the service failing closed because proven chain state was unavailable (retry later; never bypass), and genuine transport failures (treat as an outage).
Everything else — replayed nonces, expired presentations, unbound proofs, suspended issuers — arrives as a decision with a reason code from the closed vocabulary. Branch on data, not on exceptions.
Types
Wire types mirror the frozen contract 1:1, and the reason-code vocabulary is exported as a closed union type, test-locked against the shared conformance suite: a reason code cannot be added, renamed or dropped anywhere in the system without every language shipping the change together.
Conformance
npm test replays the entire cross-language vector suite through this client over real HTTP against the reference service and asserts byte-equal decisions. A client release declares the suite version it passed — that declaration is its compatibility contract.
Framework bridges
Express/Nest adapters are deliberately not in this package; they will ship as separate optional packages so the core client stays dependency-free and auditable at a glance. PHP (Composer, PSR-18) is the next client in the committed order.