Skip to content

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).


When the application boots, the SDK automatically performs:

  1. Unseal Hardware Keystore: Derives the zero-prompt platform key and unseals the device keypair and monotonic clock high-water mark.
  2. Verify Cryptographic Signature: Verifies the Ed25519 signature of the .seatling lease against your embedded workspace public keys (public_keys).
  3. 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.
  4. 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 masked buyer_email hint (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)
}