Node.js & Electron (@seatling/node)
For Electron and Node.js desktop software, @seatling/node provides native N-API bindings to the Seatling Rust core engine, handling zero-prompt hardware sealing, offline grace evaluation, and lock-free entitlement queries (< 0.01ms).
Installation
Section titled “Installation”npm install @seatling/nodeComplete Integration Example
Section titled “Complete Integration Example”import { SeatlingClient, SeatlingConfig } from '@seatling/node';
const config: SeatlingConfig = { workspaceId: 'ws_01j8k9m0n1p2q3r4s5t6u7v8w9', productId: 'prod_creative_suite', publicKeys: { // Dedicated workspace Ed25519 public keys indexed by kid from Creator Dashboard prod_creative_suite_2026_v1: 'u8A_wX09G7V8B3_N8Q4E5F6G7H8I9J0K1L2M3N4O5P6', }, appVersion: '2.4.1',};
// 1. Initialize client synchronously on startup (< 1ms, 0ms network I/O)const seatling = SeatlingClient.init(config);
export async function ensureLicensed(licenseKey: string) { // 2. Check local hardware-sealed lease first (< 0.01ms atomic read) if (seatling.isAuthorized()) { const hasProDSP = seatling.getEntitlement('pro_dsp', false); const maxExportRes = seatling.getEntitlement('max_export_res', 1080); console.log(`✓ Booted offline! Pro DSP: ${hasProDSP}, Max Res: ${maxExportRes}p`); return; }
// 3. Fall back to online activation signed by the hardware-sealed keystore const result = await seatling.activate(licenseKey); if (!result.success) { if ( (result.status === 'SEATS_EXHAUSTED' || result.status === 'REQUIRES_PORTAL_DEACTIVATION') && result.portalUrl ) { window.open(result.portalUrl, '_blank'); throw new Error(`Seat limit reached. Manage active devices at ${result.portalUrl}`); } throw new Error(`Activation failed (${result.status}): ${result.message}`); }
console.log(`✓ Activated seat ${result.seatId}!`);}
// 4. Optional: Release seat or stop background worker on app quitexport async function onAppShutdown(releaseSeat = false) { if (releaseSeat) { await seatling.deactivate(); } seatling.shutdown();}Privacy & GDPR Best Practices
Section titled “Privacy & GDPR Best Practices”- Built-In Data Minimization (
Art. 5(1)(c)&Art. 25(2)):@seatling/nodenever collects OS hostnames, OS usernames, or MAC addresses—only coarseos,os_version,app_version, and domain-scoped, license-keyedHKDF-SHA256pseudonymized hardware hashes (Art. 4(5)GDPR). - Zero-PII Logging (
Art. 32): Never log rawlicenseKeyvalues or full buyer emails in application logs or crash reporters; log only opaqueseatIdvalues and displaymasked_key/ maskedbuyer_emailin UI dialogs. - End-User Disclosures (
Art. 13): Review Privacy & GDPR Compliance for accurate Privacy Policy wording and in-app deactivation (seatling.deactivate()) guidance.