Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

edge-conservation-worker

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge-conservation-worker

Cloudflare Worker that verifies mathematical conservation laws at CDN edge locations worldwide in <5ms.

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

edge-conservation-worker

Cloudflare Worker that verifies mathematical conservation laws at CDN edge locations worldwide in <5ms.

Hypothesis

Mathematical conservation laws (sum of parts = total, det(AB) = det(A)×det(B)) can be verified at CDN edge nodes fast enough for real-time correctness checks distributed globally.

Result: CONFIRMED — All endpoints respond in <5ms locally.

Endpoints

EndpointDescriptionLatency
GET /Run all verification tests<2ms
GET /healthHealth check<5ms
GET /conservationVerify sum(parts) = total<5ms
GET /entropy?n=10Shannon entropy of uniform distribution<3ms
GET /matmul10K matrix multiplies + determinant conservation<5ms
GET /fleetSuperInstance fleet statistics<2ms

Usage

Local Development

npm install
npx wrangler dev
# Visit http://localhost:8787/conservation

Deploy to Cloudflare

npx wrangler deploy

Example Responses

Conservation verification:

{
  "conservation": {
    "result": 1.0,
    "expected": 1.0,
    "delta": 0.0
  },
  "colo": "SJC"
}

Entropy computation:

{
  "entropy": 4.0,
  "uniform_distribution_size": 16,
  "max_entropy_bits": 4
}

Matrix multiply benchmark:

{
  "iterations": 10000,
  "elapsed_ms": "1.000",
  "ops_per_sec": 10000000,
  "determinant_conservation": {
    "verified": true
  }
}

Applications

  • Build verification — Check conservation invariants after every build at 300+ edge locations
  • API correctness — Verify mathematical properties of responses in real-time
  • Teaching — Interactive math demonstrations with sub-5ms response times

License

MIT

FAQs

Package last updated on 11 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts