Skip to content

Standalone project to generate license keys for ZeroLatency Live Player. Run it on an isolated, secure machine, not on the production backend.

The backend (zerolatency-live-player-api) only handles key validation, never generation.

Features

FeatureWhat it does
Key generationCreates keys with the OLIMP-[client base64]-[expiry]-[HMAC signature] format
ValidationVerifies HMAC signature and expiry date
Custom secretSupports a custom LICENSE_SECRET for maximum security
5-segment formatKeys with OLIMP-[client b64]-[issued]-[expiry]-[signature] format and included issue date
Issue dateIncludes the issue date in the key and in the CLI output
CLICommand-line interface: npx tsx src/generate-license.ts "Client" YYYY-MM-DD

Quick usage

bash
# Install dependencies
cd zerolatency-live-player-keygen
npm install

# Generate a license key
npx tsx src/generate-license.ts "Stadio Olimpico" 2027-12-31

HMAC secret

The HMAC secret can be set in two ways:

1. Default (development / test)

The default hardcoded secret is:

0l1mp1c0-l1v3-2k26-1lc-s3cr3t

This secret is shared with the backend as a fallback, so generated keys are valid even without configuring anything.

Set the LICENSE_SECRET environment variable both here and on the backend:

bash
# On zerolatency-live-player-keygen (generation)
LICENSE_SECRET="my-super-secret-key" npx tsx src/generate-license.ts "Stadio Olimpico" 2027-12-31

# On zerolatency-live-player-api/ (validation — in .env)
LICENSE_SECRET=my-super-secret-key

⚠️ The secret MUST be identical between generator and backend, otherwise validation fails.

Test

bash
npm test

Production best practices

  1. Isolated machine: keep zerolatency-live-player-keygen on an offline machine or with restricted access
  2. Unique secret: generate a strong HMAC secret and set it via LICENSE_SECRET
  3. Same identity: the secret must be IDENTICAL in zerolatency-live-player-keygen and zerolatency-live-player-api
  4. Do not commit the secret: do not put LICENSE_SECRET in committed files

Structure

zerolatency-live-player-keygen/
├── src/
│   ├── license.ts            # Core module (generation + validation)
│   └── generate-license.ts   # CLI entrypoint
├── package.json
├── tsconfig.json
├── README.md
└── .gitignore

© 2026 Zerolatency — All Rights Reserved