@uvrn/api
v1.5.3
Published
UVRN REST API — HTTP access to bundle processing
Maintainers
Readme
@uvrn/api
UVRN REST API — HTTP server for Delta Engine bundle processing. Exposes run, validate, and verify over HTTP so any client (browser, script, or service) can call the engine without installing the core or SDK. Release: 1.5.2.
Disclaimer: UVRN is in Alpha testing. The engine measures whether your sources agree with each other — not whether they’re correct. Final trust of output rests with the user. Use at your own discretion. Have fun.
UVRN makes no claims to "truth", the "verification" is the output of math — it is up to any user to decide if claim is actually "true" — Research and testing are absolutely recommended per use case and individual system!!
Install
npm install @uvrn/apiOr with pnpm:
pnpm add @uvrn/apiUsage
- Start the server (default port 3000):
npx @uvrn/apiOr from your app:
import { startServer, createServer } from '@uvrn/api';
// Default: start with default config (port 3000)
await startServer();
// Or create server with custom config, then listen
const server = await createServer({ port: 4000 });
await server.listen({ port: 4000, host: '0.0.0.0' });- Send a bundle (e.g. POST to
/api/v1/delta/run) and get a receipt in the response. Use/api/v1/delta/validateand/api/v1/delta/verifyfor validation and verification.
Example with curl:
curl -X POST http://localhost:3000/api/v1/delta/run \
-H "Content-Type: application/json" \
-d '{"bundleId":"example-001","claim":"Compare sources","thresholdPct":0.1,"dataSpecs":[...]}'Logging
Logging uses Pino (via Fastify). Behavior depends on NODE_ENV:
- Production (
NODE_ENV=production): JSON logs to stdout; no transport. - Development (
NODE_ENV=developmentor unset): If the optional dependencypino-prettyis installed (e.g. as a devDependency), logs are pretty-printed for readability. Ifpino-prettyis not available, the server falls back to standard Pino output and does not crash —createServer()always succeeds with default config.
To get pretty logs in development, install pino-pretty in your project (e.g. pnpm add -D pino-pretty). It is optional; the API never requires it to start.
Use cases
- Expose the engine over HTTP — Let frontends, scripts, or other services run the Delta Engine without a local Node dependency.
- Centralized verification service — Run one API instance and have many clients submit bundles and get receipts.
- CI or automation — Call the API from pipelines to run comparisons and verify receipts.
Links
Open source: Source code and issues: GitHub (uvrn-packages). Project landing: UVRN.
- Repository — monorepo (this package:
uvrn-api) - @uvrn/core — Delta Engine core used by this server
- @uvrn/cli — run the engine from the command line instead of HTTP
