open-index/open-npm huggingface dataset:
npm package: @licensephobia/web
Description: First, run the development server:
Latest version: 0.1.0

## Getting Started

First, run the development server:

```bash
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

To create [API routes](https://nextjs.org/docs/app/building-your-application/routing/router-handlers) add an `api/` directory to the `app/` directory with a `route.ts` file. For individual endpoints, create a subfolder in the `api` directory, like `api/hello/route.ts` would map to [http://localhost:3000/api/hello](http://localhost:3000/api/hello).

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
npm package: @licenso/client
Description: TypeScript client for verifying Licenso tokens (Ed25519).
Latest version: 1.2.0

# @licenso/client

TypeScript client for verifying Licenso tokens (Ed25519).

## Install

```bash
pnpm add @licenso/client
```

## Usage

```ts
import { verifyLicense, base64urlDecode } from '@licenso/client';

const PUBLIC_KEY_B64URL = process.env.LICENSE_PUBLIC_KEY_B64URL!; // store in env
const publicKeyBytes = base64urlDecode(PUBLIC_KEY_B64URL);

const result = await verifyLicense(token, publicKeyBytes, /* optional */ expectedDeviceId);
if (!result.valid) throw new Error(`Invalid license: ${result.reason}`);

// Use the payload
const { cfg } = result.payload!;
console.log(cfg.deviceIdentifier, cfg.modules, cfg.usageLimits);
```

## API

- `verifyLicense(token, publicKeyBytes, expectedDeviceIdentifier?)` → `{ valid, reason?, payload?, header? }`
  - Verifies prefix, structure, signature, expiration.
  - If `expectedDeviceIdentifier` is provided (including empty string), it must exactly match `payload.cfg.deviceIdentifier`.
- `base64urlDecode(input)` → `Uint8Array`

## Types

```ts
type UsageLimits = Record<string, number | undefined>;
type Modules = Record<string, boolean>;

type LicenseConfig = {
  deviceIdentifier: string;
  usageLimits?: UsageLimits;
  modules: Modules;
};

type LicensePayload = {
  cfg: LicenseConfig;
  iat: number; // issued at
  exp: number; // expires at
};
```

## Build & test

```bash
pnpm nx build @licenso/client
pnpm nx test @licenso/client
```
npm package: @licenso/core
Description: Shared types for Licenso.
Latest version: 1.2.0

# @licenso/core

Shared types for Licenso.

## Types

```ts
export type UsageLimits = Record<string, number | undefined>;
export type Modules = Record<string, boolean>;

export type LicenseConfig = {
  deviceIdentifier: string;
  usageLimits?: UsageLimits;
  modules: Modules;
};

export type LicensePayload = {
  cfg: LicenseConfig;
  iat: number; // issued at (unix seconds)
  exp: number; // expiry (unix seconds)
};

export type LicenseHeader = {
  v: 1;
  alg: 'Ed25519';
};
```

## Development

```bash
pnpm nx build @licenso/core
pnpm nx test @licenso/core
```
npm package: @licenso/manager
Description: License issuer (creates signed tokens) using Ed25519.
Latest version: 1.2.0

# @licenso/manager

License issuer (creates signed tokens) using Ed25519.

## Install

```bash
pnpm add @licenso/manager
```

## Usage

```ts
import { createLicense } from '@licenso/manager';

const token = await createLicense(
  {
    deviceIdentifier: 'device-uuid',
    usageLimits: { users: 25, resources: 1000 },
    modules: { sso: true, billing: false },
  },
  {
    privateKeyBytes, // Uint8Array (32 bytes) Ed25519 private key
    lifetimeSeconds: 60 * 60 * 24 * 30, // 30 days
  }
);
```

## API

```ts
export type CreateLicenseOptions = {
  privateKeyBytes: Uint8Array;
  lifetimeSeconds: number;
};

export async function createLicense(config: LicenseConfig, options: CreateLicenseOptions): Promise<string>;
```

See `@licenso/core` for `LicenseConfig` types.

## Build & test

```bash
pnpm nx build @licenso/manager
pnpm nx test @licenso/manager
```