@polycyphers/license
v1.1.0
Published
Runtime license verification for @polycyphers/* commercial packages — Ed25519 signed tokens, offline verify, revocation list, watermark injection
Maintainers
Readme
@polycyphers/license
Runtime license verification for Polycyphers commercial packages.
Ed25519-signed tokens, 100% offline verification, cryptographic forgery resistance, and a single setLicense() call for your whole app.
Free and MIT-licensed — this package itself costs nothing. It's the verification layer that reads your paid license keys and tells the @polycyphers/* packages whether to watermark.
Install
npm install @polycyphers/licenseUsage
One call at app bootstrap covers every @polycyphers/* package you use:
// main.tsx / main.ts
import { setLicense } from "@polycyphers/license";
setLicense(import.meta.env.VITE_POLYCYPHERS_LICENSE);That's it. Every @polycyphers/* package reads from the shared state automatically. If the token is valid, everything renders normally. If invalid/expired/revoked, a watermark appears and a console warning explains what went wrong.
Getting a license
- Trial — 30 days, free, email-gated. Sign up at packages.polycyphers.com/trial.
- Commercial — per-application license. Pricing at packages.polycyphers.com/pricing.
How it works
- Ed25519 signed tokens. Your license is a base64url-encoded JSON payload + a 64-byte Ed25519 signature. Only our private signing key can produce valid tokens.
- Offline verification. The public keys are baked into this package's bundle. Verification is a cryptographic operation, not a network call. Works in air-gapped environments.
- Hybrid revocation (coming soon). A signed revocation list on our CDN catches leaked/abused keys. Checked in background, cached locally, soft-fails on network errors.
API
setLicense(token: string): void
Register a license token. Call once at app bootstrap.
getLicenseState(): LicenseState
Returns current state: { status, payload, reason }.
isLicensed(): boolean
Quick readiness check used by packages internally.
subscribe(listener: () => void): () => void
Subscribe to state changes. Returns an unsubscribe function.
License
MIT — this verification runtime is free. The @polycyphers/* packages that use it are commercial.
