Node.js SDK

Official Node.js and TypeScript SDK for Keymint. Implement hardware-locked node keys and floating sessions in your JavaScript applications.

Installation

To download and install the official Node.js SDK, use one of the package managers:

npm install keymint

TypeScript definitions are included out-of-the-box — no separate @types package is required.

Quick Start

typescript
import { KeyMint } from 'keymint';

const admin = new KeyMint('YOUR_ADMIN_API_KEY');
const client = new KeyMint('YOUR_CLIENT_API_KEY');

// Create a key with allowed hosts (Node-locking)
const newKey = await admin.createKey({
  productId: 'prod_Nx8K2mLpQ4rVtW9sBc',
  allowedHosts: ['machine-a', 'machine-b']
});

// Activate a license
const result = await client.activateKey({
  productId: 'prod_Nx8K2mLpQ4rVtW9sBc',
  licenseKey: 'XXXXX-XXXXX-XXXXX-XXXXX',
  hostId: 'machine-a',
  licensee: { name: 'Jane Doe', email: 'jane@example.com' }
});

console.log(result.message); // "License valid"

Use client keys for activation/deactivation/floating sessions. Use admin keys for create/update/block/unblock/sign and customer management. Use read-only or admin keys for detailed key lookup.

Resources