EYMINT
DocumentationAPI Reference
BlogDashboard
EYMINT
SectionsDocumentationAPI Reference
Go to Dashboard

For AI agents: the documentation index is at /llms.txt. Every docs page is also available as markdown by adding .md to its URL.

Getting Started

  • Keymint Documentation
  • Introduction
  • Getting Started
  • License Keys
  • Changelog

SDK References

  • Software Development Kits (SDKs)
  • Node.js SDK
  • Go SDK
  • Python SDK
  • C# SDK

Integration Guides

  • Integration Guides
  • Customer Portal for Vendors
  • Roles & Permissions
  • Radar Alert Destinations
  • Payment Provider Integrations
  • Stripe Subscription Licensing
  • Import Existing License Keys
  • Email Delivery
  • API Key Management
  • Webhook Deliveries
  • Analytics and Retention
  • Dashboard Workflows
  • Electron Licensing
  • PyQt Licensing
  • Tauri Licensing
  • Next.js SaaS Licensing

Licensing Guides

  • Licensing Concepts
  • Node-Locking & Machine Identifiers
  • Floating Licenses
  • Offline Verification
  • License Radar
  • Public Key Management and Rotation
  • Feature Flags
  • Webhooks & Events

Templates

  • Starter Templates
  • Electron License Starter
  • PyQt License Starter
  • Tauri License Starter
  • Next.js SaaS License Starter

Security & Trust

  • Security & Trust

Support

  • Frequently Asked Questions
  • Customer Portal
  • Using the Customer Portal
  • Workspace Settings and Roles

Legal

  • Privacy Policy
  • Subprocessors
  • Data Processing Agreement
  • Security Overview
  • Terms of Service
  • Service Level Agreement (SLA)
  • GDPR Compliance

Offline Verification

Verify licenses locally in air-gapped or high-security offline environments using asymmetric cryptography.

Keymint signs offline licenses with Ed25519. Your app verifies the .lic file locally against your public key, with no network call. One signing key covers every product in your workspace, so always check the product ID as well as the machine code.

Verify with an SDK

Each SDK verifies the file and checks the signature, product, machine and expiry. Copy your public key PEM from Developer → Public keys; it is safe to ship in your app. Bundle every trusted key (Copy all trusted keys) so a key rotation never breaks your app.

import { readFileSync } from 'fs';
import { KeyMint, verifyOfflineLicense } from 'keymint';

const license = verifyOfflineLicense(readFileSync('license.lic', 'utf8'), {
  publicKeys: [PUBLIC_KEY_PEM],
  productId: 'prod_123',
  machineCode: KeyMint.getOrCreateInstallationId(),
});

An invalid file raises an offline license error whose code says why: expired, wrong_product, wrong_machine, bad_signature, unknown_key, unsupported_algorithm, wrong_type or malformed. Requires Node 1.7.0, Python 2.7.0, Go v1.8.0 or C# 1.7.0.

Issue the Offline License

Offline signing is available on every plan, including Free. It needs a signing key: create one under Developer → Public keys first.

Generate a signed license file from the Keymint Dashboard:

  1. Go to Licenses and click the license key to open its page.
  2. Under Devices, choose the Create offline license tab.
  3. Enter the target device's machine code (the hostId the app reports, for example the SDK's installation ID) and, optionally, a TTL (time to live). The TTL is required when the license itself never expires.
  4. Download the generated .lic file.

Or sign from your own backend with POST /key/sign (SDK: signKey / sign_key / SignKey). It needs an admin API key or a key with the license:sign grant, so never call it from the shipped app. Pass the machine code as hostId and an optional ttl in seconds (60 seconds to 10 years). See Sign License.

Every offline license expires. The expiry is the requested TTL, or the license's own expiry when no TTL is given; it never goes past the license's expiry, the product's maximum offline lifetime (if set), or 10 years. Signing uses one of the license's device activations, and that device keeps its slot until the file expires. Blocking the key online doesn't revoke a file already issued, so keep TTLs short when that matters. While your Keymint workspace is in its billing continuity period or restricted, signing returns 402.

The downloaded file is JSON. Its signedKey field is the Ed25519-signed JWT, and keyId/publicKeyFingerprint identify the trusted public key to use for verification:

json
{
  "signedDate": "2026-06-21T12:00:00.000Z",
  "signedKey": "eyJhbGciOiJFZERTQSIsImtpZCI6IkFiQzEyM1h5WiJ9...",
  "keyId": "AbC123XyZ",
  "publicKeyFingerprint": "AbC123XyZ"
}

Without an SDK

Verify the token yourself with any Ed25519 JWT library. This example uses jose.

mermaid
Rendering diagram...

Step 1: Bundle Trusted Public Keys

Map trusted key IDs to their public keys within your application.

typescript
import { importSPKI } from 'jose';

const trustedKeys = new Map<string, string>([
  ['AbC123XyZ', '-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAr7Z8s2Z...\n-----END PUBLIC KEY-----']
]);

Step 2: Parse and Verify the License

Extract the Key ID from the token header, retrieve the matching public key, and verify the signature and claims using jose.

typescript
import { importSPKI, jwtVerify, decodeProtectedHeader } from 'jose';
import * as fs from 'fs';

export async function verifyLicense(licensePath: string, productId: string, machineCode: string) {
  const { signedKey } = JSON.parse(fs.readFileSync(licensePath, 'utf8'));

  // 1. Extract Key ID from the JWT header
  const { kid } = decodeProtectedHeader(signedKey);
  if (!kid) throw new Error('Invalid token header: missing kid');

  // 2. Fetch the corresponding public key
  const pem = trustedKeys.get(kid);
  if (!pem) throw new Error('Untrusted signature key ID');
  const publicKey = await importSPKI(pem, 'EdDSA');

  // 3. Verify signature and standard claims
  const { payload } = await jwtVerify(signedKey, publicKey, {
    algorithms: ['EdDSA']
  });

  // 4. Validate license type, product and hardware bounds. One signing key
  // covers every product in your workspace, so the product check is required.
  if (payload.type !== 'offline') throw new Error('Not an offline license');
  if (payload.productId !== productId) throw new Error('Product mismatch');
  if (payload.machineCode !== machineCode) throw new Error('Hardware mismatch');

  return payload;
}

Security Best Practices

  • Embed Every Trusted Key: Bundle the signing key and any pending key so a staged rotation never breaks verification.
  • Check the Machine and Product: Every file is bound to one machine code and one product. Always compare both, along with the expiry.
  • Pin the Algorithm: Accept only EdDSA (Ed25519) signatures; reject any other alg, such as HS256 or none.
  • Guard Against Clock Rollback: An offline app can't tell if the clock was set back. Store the latest time you trusted and verify against the later of that and the system clock (the SDKs take a now option).

On this page

  • Verify with an SDK
  • Issue the Offline License
  • Without an SDK
  • Step 1: Bundle Trusted Public Keys
  • Step 2: Parse and Verify the License
  • Security Best Practices