Commercial Licensing & Node.js SDK
The PlyQR Commercial Suite (plyqr/commercial) is designed for enterprise deployments requiring air-gapped offline verification, license lifecycle control, and tamper-resistant cryptographic attestation.
1. Enterprise Architecture
Section titled “1. Enterprise Architecture”+--------------------------------------------------------------+| PlyQR Commercial Suite || || +-----------------------+ +------------------------+ || | Issuer CLI / Tool | | Node.js SDK | || | - Ed25519 Authority | ==> | - WASM Verifier Core | || | - Ledger Manifests | | - Clock-Drift Guard | || | - Customer Scopes | | - Local Storage Sync | || +-----------------------+ +------------------------+ |+--------------------------------------------------------------+Key Pillars
Section titled “Key Pillars”- Air-Gapped Offline Operation: Client runtimes verify licenses and decrypt QR payloads without connecting to external license servers.
- Clock-Drift Protection: Defends against local clock rollback attacks on air-gapped machines through monotonic state recording and strict bounded drift allowances.
- Cryptographic Trust Bundle: Root keys sign customer entitlements, expiration dates, and authorized hardware fingerprints.
2. Node.js SDK Usage
Section titled “2. Node.js SDK Usage”Install the SDK in your Node.js project:
npm install @plyqr/sdk-jsInitializing the Offline Verifier
Section titled “Initializing the Offline Verifier”import { PlyQrClient } from '@plyqr/sdk-js';
// Load the public trust bundle issued by your authorityconst trustBundle = JSON.parse( await fs.readFile('./trust-bundle.json', 'utf8'));
const client = new PlyQrClient({ trustBundle, clockStatePath: './.plyqr-clock.json', maxClockDriftSeconds: 300, // 5 minutes maximum allowable drift});
// Decrypt and verify a dual-channel QR codeconst result = await client.verifySymbol({ imageBuffer: qrImageBuffer, expectedCustomerId: 'CUST-88190',});
console.log('Public Data:', result.publicContent);console.log('Private Data:', result.privateContent);console.log('License Expiry:', result.licenseValidUntil);