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
| Feature | What it does |
|---|---|
| Key generation | Creates keys with the OLIMP-[client base64]-[expiry]-[HMAC signature] format |
| Validation | Verifies HMAC signature and expiry date |
| Custom secret | Supports a custom LICENSE_SECRET for maximum security |
| 5-segment format | Keys with OLIMP-[client b64]-[issued]-[expiry]-[signature] format and included issue date |
| Issue date | Includes the issue date in the key and in the CLI output |
| CLI | Command-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-31HMAC secret
The HMAC secret can be set in two ways:
1. Default (development / test)
The default hardcoded secret is:
0l1mp1c0-l1v3-2k26-1lc-s3cr3tThis secret is shared with the backend as a fallback, so generated keys are valid even without configuring anything.
2. Production (recommended)
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 testProduction best practices
- Isolated machine: keep
zerolatency-live-player-keygenon an offline machine or with restricted access - Unique secret: generate a strong HMAC secret and set it via
LICENSE_SECRET - Same identity: the secret must be IDENTICAL in
zerolatency-live-player-keygenandzerolatency-live-player-api - Do not commit the secret: do not put
LICENSE_SECRETin 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