This page maps the public contract surface to concrete client-side usage patterns.
The example client snippets assume these environment variables:
N1HUB_BASE_URLBase URL of the validator service, for examplehttps://example.n1hub.devN1HUB_TOKENBearer token for the validator HTTP surface
If you are starting cold and do not yet know which snippet family to open first, inspect ../examples/client/recipe-index.json.
That file is the machine-readable map for this directory. It groups every non-Markdown client artifact by runtime and consumption path, and it also provides task-oriented entrypoints such as:
- live validator calls for
validate,batch,fix,gates, andstats - source-level request and response readers
- raw-schema Ajv validation and structural rejection checks
- compact-reference and OpenAPI discovery
- installed-package runtime and TypeScript entrypoints
- public
G16integrity proof flows
The groups[*].recommended_start field gives the shortest human-safe file to open for each runtime lane. The task_entrypoints[*] section then maps common intents to one recommended file, cross-runtime alternatives, and the supporting docs that explain the surrounding contract.
If you need the navigator itself as a bounded machine-readable contract instead of trusting prose or ad hoc object assumptions, pair ../examples/client/recipe-index.json with ../schemas/client-recipe-index.schema.json, ../examples/client/zod-parse-client-recipe-index.ts, ../examples/client/ajv-validate-client-recipe-index.mjs, ../examples/client/cjs-package-ajv-validate-client-recipe-index.cjs, ../examples/client/esm-package-ajv-validate-client-recipe-index.mjs, or ../examples/client/ts-package-ajv-validate-client-recipe-index.ts.
If you want the quickest path instead of reading the whole directory:
- Send one capsule to the live validator:
start with
curl-validate-single.sh, then usenode-validate-single.mjs,python-validate-single.py, orts-live-validator-client.tsif you need a different runtime - Send a batch or fix payload:
start with
curl-validate-batch.shorcurl-validate-fix.sh, then move to the Node, Python, or TypeScript alternatives listed inrecipe-index.json - Call the support routes:
start with
curl-get-gates.shandcurl-get-stats.shfor the shortest live route proof, including the boundedlimitquery path onstats - Read the published client-recipe navigator from source-level TypeScript or Zod:
start with
ts-client-recipe-index.tsorzod-parse-client-recipe-index.ts, then move to the request, response, route, or OpenAPI recipes they point toward - Read published request families from source-level projections:
start with
ts-parse-validate-requests.tsor the Zod request parsers - Read published response, error, and support families from source-level projections:
start with
ts-parse-validate-responses.ts, then inspectts-parse-error-responses.tsandts-parse-support-responses.ts - Validate or reject assets directly against raw schemas:
start with
ajv-validate-capsule.mjsfor capsule validation,ajv-validate-client-recipe-index.mjsorcjs-package-ajv-validate-client-recipe-index.cjsfor navigator validation, andajv-reject-invalid-capsules.mjsorts-package-ajv-reject-invalid-client-recipe-index.tsfor structural rejection - Read compact references and OpenAPI before writing a client:
start with
ts-envelope-family-reference.ts,ts-route-behavior-reference.ts, andts-openapi-route-summary.ts - Use installed-package consumers instead of repo-relative imports:
start with
cjs-package-client-recipe-index.cjsif you want the packaged navigator first, then move tocjs-package-live-validator-client.cjs,esm-package-live-validator-client.mjs, orts-package-live-validator-client.ts - Use Python as the main cross-language bridge:
start with
python-client-recipe-index.pyif you want the Python navigator first, then move topython-live-validator-client.pyand the request, response, and contract-reference helpers - Recompute the public integrity seal:
start with
recompute-integrity-seal.mjsorpython-recompute-integrity-seal.py
If you already know your runtime, the shortest entry files are:
- shell:
curl-validate-single.sh - Node:
node-validate-single.mjs - source-level TypeScript/Zod:
ts-client-recipe-index.tsandzod-parse-client-recipe-index.ts - source-level archive typing/parsing:
ts-parse-archive-bundle.tsandzod-parse-archive-bundle.ts - raw-schema Ajv:
ajv-validate-capsule.mjs - integrity proof:
recompute-integrity-seal.mjs - Python:
python-live-validator-client.py - Python navigator:
python-client-recipe-index.py - Python archive parsing:
python-parse-archive-bundle.py - installed-package CommonJS/ESM:
cjs-package-live-validator-client.cjs - installed-package CommonJS/ESM navigator:
cjs-package-client-recipe-index.cjsandesm-package-client-recipe-index.mjs - installed-package TypeScript:
ts-package-live-validator-client.tsandts-package-client-recipe-index.ts - installed-package archive typing/parsing:
ts-package-parse-archive-bundle.ts
Ready-to-read examples live under ../examples/client/:
curl-validate-single.shcurl-validate-batch.shcurl-validate-fix.shcurl-get-gates.shcurl-get-stats.sh
These scripts show the request method, route, auth header, and when applicable the local payload file to send.
Minimal Node fetch-based examples also live under ../examples/client/:
node-validate-single.mjsnode-validate-batch.mjsnode-validate-fix.mjsnode-get-gates.mjsnode-get-stats.mjs
They are intentionally small and avoid framework assumptions while covering all published validator routes.
Source-level consumer examples also live under ../examples/client/:
ts-client-recipe-index.tszod-parse-client-recipe-index.tsts-parse-archive-bundle.tsts-capsule-summary.tszod-parse-archive-bundle.tszod-parse-capsule.tsts-openapi-route-summary.tsopenapi-generate-validator-types.mjsts-envelope-family-reference.tsts-route-behavior-reference.tsts-build-validate-request.tsts-build-validate-batch-request.tsts-build-validate-fix-request.tsts-live-validator-client.tsts-parse-validate-requests.tszod-parse-validate-request.tszod-parse-validate-batch-request.tszod-parse-validate-fix-request.tsts-parse-validate-responses.tsts-parse-error-responses.tsts-parse-support-responses.tszod-parse-validate-response.tszod-parse-validate-fail-response.tszod-parse-validate-batch-response.tszod-parse-validate-fix-response.tszod-parse-error-responses.tszod-parse-support-responses.ts
These recipes demonstrate how to consume the published projection layer under ../projections/ when you want typed interfaces or Zod parsing in addition to raw JSON Schema, and how to inspect or generate from the strongest published OpenAPI route surface directly when compact summaries are too lossy. Together they cover the published client-recipe navigator as typed contract data, single, batch, and fix validate request families, source-level TypeScript builders plus source-level typed reading of the published request samples, a direct OpenAPI route-summary path, a repo-local OpenAPI code-generation path through openapi-typescript, a typed live-client bridge for all published validator routes backed by the shared route projection and the bounded stats query path, a typed validator envelope-family discovery path backed by the shared envelope-family projection, a typed validator route-behavior discovery path backed by the shared route projection and compact route pack, typed/parsing paths for the published pass, fail, batch, and fix response families, the published gates / stats support responses, and the bounded shared generic, unauthorized, forbidden, conflict, and rate-limit error envelopes.
They also now cover repo-relative TypeScript and Zod parsing for the published archive-bundle portability contract.
If you want direct structural validation against the published schemas, inspect:
../examples/client/ajv-validate-capsule.mjs../examples/client/ajv-validate-client-recipe-index.mjs../examples/client/ajv-validate-validator-envelope.mjs../examples/client/ajv-validate-archive-bundle.mjs../examples/client/ajv-validate-schema-bundles.mjs../examples/client/ajv-reject-invalid-archive-bundles.mjs../examples/client/ajv-reject-invalid-client-recipe-index.mjs../examples/client/ajv-reject-invalid-capsules.mjs../examples/client/ajv-reject-invalid-validator-envelopes.mjsschema-bundles.mdschema-validation-recipes.mdarchive-validation-recipes.mdinvalid-archive-bundle-examples.mdinvalid-client-recipe-index-examples.mdinvalid-capsule-examples.mdinvalid-api-envelope-examples.md
These recipes demonstrate how to validate public examples against the raw JSON Schema layer with Ajv, how to validate the client-recipe navigator against its bounded schema contract, how to validate the archive-bundle portability sample against its published export/replay contract, how to consume the same contracts as single-file schema bundles, and how to confirm that intentionally invalid archive, client-recipe navigator, capsule, and validator-envelope fixtures are rejected for the documented structural reasons, without relying on the projection layer or live validator API calls.
If you need the public G16 sealing rule instead of only schema shape, inspect:
../examples/client/recompute-integrity-seal.mjs../examples/client/esm-package-recompute-integrity-seal.mjsintegrity-recipes.md
These recipes demonstrate how to recompute integrity_sha3_512 over the published four-root payload, verify that the positive examples are sealed correctly, and repair the intentional G16 teaching example without depending on private runtime helpers.
If you need a cross-language raw-asset consumption path outside the Node runtime, inspect:
../examples/client/python-contract-reference.py../examples/client/python-client-recipe-index.py../examples/client/python-parse-archive-bundle.py../examples/client/python-openapi-reference.py../examples/client/python-live-validator-client.py../examples/client/python-recompute-integrity-seal.py../examples/client/python-validate-single.py../examples/client/python-validate-batch.py../examples/client/python-validate-fix.py../examples/client/python-get-gates.py../examples/client/python-get-stats.py../examples/client/python-parse-validate-responses.py../examples/client/python-parse-error-responses.py../examples/client/python-parse-support-responses.pypython-consumption.md
These recipes demonstrate how Python consumers can read the published client-recipe navigator and archive-bundle sample, read compact contract-reference JSON files, read the strongest published OpenAPI surface directly, use the published route pack as one reusable full-route live-client bridge, inspect curated raw capsule assets, prepare validator-envelope request flows for validate, batch, and fix, call the published gates and stats support routes including the bounded stats query path, parse published validator response families plus bounded shared and route-specific error envelopes, and recompute integrity_sha3_512 directly from the published four-root payload, both from a repo checkout and from an extracted packed artifact.
If you want package-style consumption instead of file-relative source imports, also inspect:
../examples/client/cjs-package-capsule-summary.cjs../examples/client/cjs-package-client-recipe-index.cjs../examples/client/cjs-package-contract-reference.cjs../examples/client/cjs-package-openapi-codegen.cjs../examples/client/cjs-package-openapi-reference.cjs../examples/client/cjs-package-error-responses.cjs../examples/client/cjs-package-live-validator-client.cjs../examples/client/cjs-package-validate-request.cjs../examples/client/cjs-package-support-responses.cjs../examples/client/cjs-package-validate-response.cjs../examples/client/esm-package-capsule-summary.mjs../examples/client/esm-package-client-recipe-index.mjs../examples/client/esm-package-contract-reference.mjs../examples/client/esm-package-openapi-codegen.mjs../examples/client/esm-package-openapi-reference.mjs../examples/client/esm-package-error-responses.mjs../examples/client/esm-package-live-validator-client.mjs../examples/client/esm-package-validate-request.mjs../examples/client/esm-package-support-responses.mjs../examples/client/cjs-package-ajv-validate-client-recipe-index.cjs../examples/client/cjs-package-ajv-reject-invalid-client-recipe-index.cjs../examples/client/cjs-package-ajv-validate-contracts.cjs../examples/client/cjs-package-ajv-validate-archive-bundle.cjs../examples/client/cjs-package-ajv-validate-schema-bundles.cjs../examples/client/cjs-package-ajv-reject-invalid-archive-bundles.cjs../examples/client/cjs-package-ajv-reject-invalid-validator-envelopes.cjs../examples/client/cjs-package-ajv-reject-invalid-capsules.cjs../examples/client/esm-package-ajv-validate-contracts.mjs../examples/client/esm-package-ajv-validate-archive-bundle.mjs../examples/client/esm-package-ajv-validate-client-recipe-index.mjs../examples/client/esm-package-ajv-validate-schema-bundles.mjs../examples/client/esm-package-ajv-reject-invalid-archive-bundles.mjs../examples/client/esm-package-ajv-reject-invalid-client-recipe-index.mjs../examples/client/esm-package-ajv-reject-invalid-capsules.mjs../examples/client/esm-package-ajv-reject-invalid-validator-envelopes.mjs../examples/client/esm-package-validate-response.mjs../examples/client/ts-package-contract-reference.ts../examples/client/ts-package-client-recipe-index.ts../examples/client/ts-package-parse-archive-bundle.ts../examples/client/ts-package-openapi-codegen.ts../examples/client/ts-package-openapi-reference.ts../examples/client/ts-package-error-responses.ts../examples/client/ts-package-live-validator-client.ts../examples/client/ts-package-support-responses.ts../examples/client/ts-package-validate-responses.ts../examples/client/ts-package-ajv-validate-client-recipe-index.ts../examples/client/ts-package-ajv-reject-invalid-client-recipe-index.ts../examples/client/ts-package-ajv-validate-contracts.ts../examples/client/ts-package-ajv-validate-archive-bundle.ts../examples/client/ts-package-ajv-validate-schema-bundles.ts../examples/client/ts-package-ajv-reject-invalid-archive-bundles.ts../examples/client/ts-package-ajv-reject-invalid-validator-envelopes.ts../examples/client/ts-package-ajv-reject-invalid-capsules.ts../examples/client/ts-package-validate-request.ts../examples/client/ts-package-parse-validate-requests.ts../examples/client/ts-package-validate-batch-request.ts../examples/client/ts-package-validate-fix-request.tsnpm-consumption.md
These recipes demonstrate the repo-owned package-export layer for CommonJS, ESM, and TypeScript consumers after npm run build:projections or from a locally packed artifact, including installed-package direct consumption of the machine-readable client-recipe navigator, installed-package direct OpenAPI reading plus installed-package OpenAPI type generation through openapi-typescript across CommonJS, ESM, and TypeScript consumer styles, installed-package runtime parsing plus installed-package TypeScript typed construction and typed reading for the published single, batch, and fix validator request families, installed-package CommonJS, ESM, and TypeScript live-client bridges for all published validator routes backed by the shared route projection and the bounded stats query path, installed-package typed discovery of the published validator envelope-family map, installed-package parsing and typing for the published pass, fail, batch, and fix validator response families, the compact reference-pack JSON exports, installed-package parsing of gates and stats support responses, installed-package parsing and typing for the bounded shared generic, unauthorized, forbidden, conflict, rate-limit, and route-specific stats-computation error envelopes, positive raw-schema Ajv consumption, archive-bundle schema validation, client-recipe navigator schema validation and rejection across CommonJS, ESM, and TypeScript package-consumer styles, bundled single-file schema consumption, package-level rejection of intentionally invalid archive, client-recipe navigator, capsule, and validator-envelope fixtures through package subpaths, and package-level recomputation of integrity seals for G16-sensitive flows. If you need the same public JSON artifacts from Python instead of Node imports, use the extracted-artifact path documented in python-consumption.md.
curl-validate-single.shandnode-validate-single.mjsUsePOST /api/validatecurl-validate-batch.shandnode-validate-batch.mjsUsePOST /api/validate/batchcurl-validate-fix.shandnode-validate-fix.mjsUsePOST /api/validate/fixcurl-get-gates.sh,node-get-gates.mjs, andpython-get-gates.pyUseGET /api/validate/gatescurl-get-stats.sh,node-get-stats.mjs, andpython-get-stats.pyUseGET /api/validate/stats, including the optional boundedlimitquery parameterpython-validate-single.py,python-validate-batch.py, andpython-validate-fix.pyMirror the three published POST validator routes from a cross-language raw-JSON pathpython-parse-validate-responses.py,python-parse-error-responses.py, andpython-parse-support-responses.pyInspect the published validate, bounded error-envelope, and support response families without requiring live credentialspython-live-validator-client.pyBridges the full published validator route family from one reusable Python client backed by the shared route pack and bounded stats query metadata
The JSON request and response examples show contract shape. The client recipes show how a consumer actually sends or reads those payloads across every published validator route. Together they reduce the gap between “the contract is documented” and “an external integrator can use it quickly.”