JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 119
  • Score
    100M100P100Q70991F
  • License MIT

UVRN engine core — deterministic protocol infrastructure

Package Exports

  • @uvrn/core
  • @uvrn/core/dist/index.js
  • @uvrn/core/package.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@uvrn/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@uvrn/core

UVRN Delta Engine core — deterministic multi-source comparison and verification. Runs the Delta formula on bundles, produces canonical receipts with SHA-256 hashes, and validates or verifies bundles and receipts.

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 risk. Have fun.

Install

npm install @uvrn/core

Or with pnpm:

pnpm add @uvrn/core

Usage

  1. Define a bundle: a claim, a threshold, and at least two data specs with metrics.
  2. Call runDeltaEngine(bundle) to get a receipt (outcome, delta, hash).
  3. Use validateBundle and verifyReceipt for validation and integrity checks.
import { runDeltaEngine, validateBundle, verifyReceipt } from '@uvrn/core';

const bundle = {
  bundleId: 'example-001',
  claim: 'Metrics from source-a and source-b should agree within 10%.',
  thresholdPct: 0.10,
  dataSpecs: [
    {
      id: 'source-a',
      label: 'Source A',
      sourceKind: 'report',
      originDocIds: ['doc-a-1'],
      metrics: [{ key: 'count', value: 100 }],
    },
    {
      id: 'source-b',
      label: 'Source B',
      sourceKind: 'report',
      originDocIds: ['doc-b-1'],
      metrics: [{ key: 'count', value: 105 }],
    },
  ],
};

const receipt = runDeltaEngine(bundle);
console.log(receipt.outcome);   // 'consensus' | 'indeterminate'
console.log(receipt.deltaFinal); // max delta across metrics
console.log(receipt.hash);      // SHA-256 of canonical receipt

Use cases

  • Compare two or more data sources — Run the Delta formula on metrics (e.g. report A vs report B) and get a deterministic consensus or indeterminate outcome. Note: consensus means the sources agree with each other within the threshold — not that either source is correct.
  • Produce verifiable receipts — Every receipt has a canonical hash; use verifyReceipt(receipt) to recompute and check integrity.
  • Validate before running — Use validateBundle(bundle) to check structure and threshold without executing the engine.
  • Integrate into pipelines — Use as a library in CI, ETL, or any service that needs deterministic comparison and proof.

Open source: Source code and issues: GitHub (uvrn-packages). Project landing: UVRN.

  • Repository — monorepo (this package: uvrn-core)
  • @uvrn/sdk — programmatic client (CLI/HTTP/local) built on this core
  • @uvrn/cli — run the engine from the command line