2. Offline Lease Verification
Once a machine seat is activated, the Seatling SDK stores the server-signed .seatling lease token (seatling-license-v2+jwt) and hardware-sealed keystore locally on disk.
Subsequent launches of your desktop app do not need to make an HTTP request. Calling initialize() (or SeatlingClient::init) verifies the lease purely locally in < 1ms, and subsequent hot-path calls to isAuthorized() read an atomic in-memory snapshot in < 0.01ms (~40–50ns).
Offline Verification Checklist
Section titled “Offline Verification Checklist”When the application boots, the SDK automatically performs:
- Unseal Hardware Keystore: Derives the zero-prompt platform key and unseals the device keypair and monotonic clock high-water mark.
- Verify Cryptographic Signature: Verifies the Ed25519 signature of the
.seatlinglease against your embedded workspace public keys (public_keys). - Verify Bound HWID, Device Key & Host OS: Confirms the local machine’s hardware anchor, Ed25519 device key, and canonical host
os(windows|macos|linux) match the signed token—blocking cross-OS lease copying. - Check Monotonic Grace Expiry: Ensures no clock rollback occurred and the current UTC timestamp is within the bounded offline grace window.
[!TIP] Privacy-Safe UI Display (Art. 32 GDPR): Signed lease claims include
masked_key(e.g.,SEAT-****-****-4444) and a maskedbuyer_emailhint (e.g.,b***@gmail.com). Always use these masked values when rendering “Licensed to…” badges in your UI rather than storing or displaying raw keys and full email addresses.
Code Examples: Pure Offline Check & Entitlements
Section titled “Code Examples: Pure Offline Check & Entitlements”package main
import ( "fmt" "log"
"github.com/seatling/seatling-sdk-go/v2")
func VerifyOffline() { client, err := seatling.New(seatling.Config{ WorkspaceID: "ws_01j8k9m0n1p2q3r4s5t6u7v8w9", ProductID: "prod_studio_pro", PublicKeys: map[string]string{ "prod_key_2026_v1": "6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=", }, AppVersion: "1.0.0", }) if err != nil { log.Fatal(err) } defer client.Close()
// 1. Non-blocking local verification (< 1ms, 0ms network I/O) status, _ := client.Initialize()
// 2. Lock-free atomic hot-path check (~40ns, 0 heap allocations) if !client.IsAuthorized() { fmt.Printf("✗ Machine not authorized offline (status: %s)\n", status) return }
maxWorkers := client.GetEntitlementInt64("max_workers", 8) fmt.Printf("✓ Machine authorized offline! max_workers=%d\n", maxWorkers)}import { SeatlingClient } from '@seatling/node';
const seatling = SeatlingClient.init({ workspaceId: 'ws_01j8k9m0n1p2q3r4s5t6u7v8w9', productId: 'prod_studio_pro', publicKeys: { prod_key_2026_v1: 'u8A_wX09G7V8B3_N8Q4E5F6G7H8I9J0K1L2M3N4O5P6', }, appVersion: '1.0.0',});
// Lock-free atomic read (< 0.01ms, 0 network I/O)if (seatling.isAuthorized()) { const proExport = seatling.getEntitlement('pro_export', false); console.log(`✓ Machine authorized offline! pro_export=${proExport}`);} else { console.log(`✗ Offline lease unavailable or expired: ${seatling.status()}`);}use seatling::{SeatlingClient, SeatlingConfig};use std::collections::HashMap;
fn verify_offline() -> Result<(), Box<dyn std::error::Error>> { let client = SeatlingClient::init(SeatlingConfig { workspace_id: "ws_01j8k9m0n1p2q3r4s5t6u7v8w9".into(), product_id: "prod_studio_pro".into(), public_keys: HashMap::from([( "prod_key_2026_v1".into(), "6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=".into(), )]), app_version: "1.0.0".into(), api_base_url: "https://api.seatling.app".into(), heartbeat_interval_seconds: 14400, storage_dir: None, })?;
if client.is_authorized() { let pro_export = client.get_entitlement_bool("pro_export", false); println!("✓ Machine authorized offline! pro_export={}", pro_export); } else { println!("✗ Offline lease status: {}", client.status().as_str()); } Ok(())}#include <seatling/seatling.hpp>#include <iostream>
void verifyOffline() { seatling::SeatlingConfig cfg; cfg.workspace_id = "ws_01j8k9m0n1p2q3r4s5t6u7v8w9"; cfg.product_id = "prod_studio_pro"; cfg.public_keys["prod_key_2026_v1"] = "u8A_wX09G7V8B3_N8Q4E5F6G7H8I9J0K1L2M3N4O5P6"; cfg.app_version = "1.0.0";
auto client = seatling::SeatlingClient::init(cfg); if (client.is_authorized()) { bool proExport = client.get_entitlement_bool("pro_export", false); std::cout << "✓ Machine authorized offline! pro_export=" << proExport << std::endl; } else { std::cout << "✗ Offline status: " << seatling::status_to_string(client.status()) << std::endl; }}