npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pandaauth/api

v1.0.1

Published

Panda Pelican Development LLC API Wrapper

Readme

@pandaauth/api

A TypeScript/JavaScript SDK for integrating PandaAuth into your applications. This package serves as an API wrapper for Panda Pelican Development's authentication and licensing system, providing a simple and type-safe way to interact with the PandaAuth services.

Table of Contents

Installation

# using npm
npm install @pandaauth/api

# using yarn
yarn add @pandaauth/api

# using pnpm
pnpm add @pandaauth/api

Getting Started

Prerequisites

Before you begin, ensure you have:

  • Node.js version 12 or higher
  • An API key from Panda Pelican Development
  • npm, yarn, or pnpm package manager

Authentication

  1. Obtain your API key from the Panda Pelican Development dashboard.
  2. Keep your API key secure and never expose it in client-side code.
  3. Use environment variables or secure configuration management for API key storage.

Basic Usage

import { PandaAuth } from "@pandaauth/api";

// Initialize client
const client = new PandaAuth({
  apiKey: process.env.PANDA_AUTH_API_KEY, // Recommended: Use environment variables
});

// Example: Get revenue mode
async function getRevenueMode() {
  try {
    const response = await client.getRevenueMode({ service: "your-service" });
    console.log(response);
  } catch (error) {
    console.error("Error fetching revenue mode:", error);
  }
}

getRevenueMode();

API Reference

PandaAuth Class

The PandaAuth class is the main entry point for interacting with the PandaAuth API.

getRevenueMode

Retrieves the revenue mode for a specific service.

  • Parameters:
    • service (string, required): The name of the service.
  • Returns: Promise<GetRevenueModeResponse>

Example:

const response = await client.getRevenueMode({ service: "your-service" });
console.log(response);

Response:

{
  "revenueMode": "enabled"
}

checkIdentifier

Validates an identifier against the PandaAuth system.

  • Parameters:
    • identifier (string, required): The identifier to validate.
  • Returns: Promise<IdentifierCheckResponse>

Example:

const response = await client.checkIdentifier({
  identifier: "user-identifier",
});
console.log(response);

Response:

{
  "message": "Identifier is valid.",
  "service": "your-service"
}

resetHwid

Resets the Hardware ID (HWID) for a given key.

  • Parameters:
    • service (string, required): The service name.
    • key (string, required): The key for which to reset the HWID.
  • Returns: Promise<ResetHwidResponse>

Example:

const response = await client.resetHwid({
  service: "your-service",
  key: "user-key",
});
console.log(response);

Response:

{
  "message": "HWID reset successfully."
}

generateKeyGet

Generates a new key using the GET method.

  • Parameters:
    • count (number, required): The number of keys to generate.
    • isPremium (boolean, required): Whether the key is for premium access.
    • Other optional parameters as defined in GenerateKeyQuery.
  • Returns: Promise<GenerateKeyGetResponse>

Example:

const response = await client.generateKeyGet({ count: 1, isPremium: true });
console.log(response);

Response:

{
  "message": "Keys generated successfully.",
  "generatedKeys": [
    {
      "value": "PREMIUM-KEY-123",
      "expiresAt": "2025-12-31T23:59:59.000Z",
      "note": "Generated for testing",
      "isPremium": true,
      "expiresByDaysKey": false,
      "daysKey": 0,
      "noHwidValidation": false
    }
  ]
}

generateKeyPost

Generates a new key using the POST method.

  • Parameters:
    • count (number, required): The number of keys to generate.
    • isPremium (boolean, required): Whether the key is for premium access.
    • Other optional parameters as defined in GenerateKeyQuery.
  • Returns: Promise<GenerateKeyGetResponse>

Example:

const response = await client.generateKeyPost({ count: 1, isPremium: false });
console.log(response);

Response:

{
  "message": "Keys generated successfully.",
  "generatedKeys": [
    {
      "value": "STANDARD-KEY-456",
      "expiresAt": "2025-12-31T23:59:59.000Z",
      "note": "Generated for testing",
      "isPremium": false,
      "expiresByDaysKey": false,
      "daysKey": 0,
      "noHwidValidation": false
    }
  ]
}

fetchKey

Fetches details for a specific key.

  • Parameters:
    • fetch (string, required): The key to fetch.
  • Returns: Promise<FetchKeyResponse>

Example:

const response = await client.fetchKey({ fetch: "user-key" });
console.log(response);

Response:

{
  "key": {
    "id": "key-id-123",
    "value": "user-key",
    "note": "User's primary key",
    "isPremium": true,
    "expiresAt": "2025-12-31T23:59:59.000Z",
    "hwid": "user-hwid-123",
    "noHwidValidation": false
  }
}

keyEdit

Edits an existing key.

  • Parameters:
    • keyValue (string, required): The value of the key to edit.
    • Other optional parameters as defined in KeyEditBody.
  • Returns: Promise<KeyEditResponse>

Example:

const response = await client.keyEdit({
  keyValue: "user-key",
  note: "Updated note",
});
console.log(response);

Response:

{
  "message": "Key updated successfully.",
  "key": {
    "id": "key-id-123",
    "value": "user-key",
    "note": "Updated note",
    "isPremium": true,
    "expiresAt": "2025-12-31T23:59:59.000Z",
    "hwid": "user-hwid-123",
    "noHwidValidation": false
  }
}

keyDelete

Deletes a key.

  • Parameters:
    • keyValue (string, required): The value of the key to delete.
  • Returns: Promise<KeyDeleteResponse>

Example:

const response = await client.keyDelete({ keyValue: "user-key" });
console.log(response);

Response:

{
  "message": "Key deleted successfully."
}

generatedKeyEdit

Edits a generated key.

  • Parameters:
    • keyValue (string, required): The value of the generated key to edit.
  • Returns: Promise<KeyEditResponse>

Example:

const response = await client.generatedKeyEdit({
  keyValue: "generated-key-123",
  note: "New note for generated key",
});
console.log(response);

Response:

{
  "message": "Key updated successfully.",
  "key": {
    "id": "gen-key-id-456",
    "value": "generated-key-123",
    "note": "New note for generated key",
    "isPremium": false,
    "expiresAt": "2025-12-31T23:59:59.000Z",
    "hwid": null,
    "noHwidValidation": true
  }
}

generatedKeyDelete

Deletes a generated key.

  • Parameters:
    • keyValue (string, required): The value of the generated key to delete.
  • Returns: Promise<KeyDeleteResponse>

Example:

const response = await client.generatedKeyDelete({
  keyValue: "generated-key-123",
});
console.log(response);

Response:

{
  "message": "Key deleted successfully."
}

executionFetch

Fetches execution details.

  • Returns: Promise<FetchExecutionResponse>

Example:

const response = await client.executionFetch();
console.log(response);

Response:

{
  "executionCount": 125
}

executionPush

Pushes execution data.

  • Returns: Promise<ExecutionPushResponse>

Example:

const response = await client.executionPush();
console.log(response);

Response:

{
  "success": true,
  "message": "Execution data pushed successfully."
}

V2Validation Class

The V2Validation class provides an enhanced security validation system.

validate

Validates a key using the V2 validation system.

  • Parameters:
    • key (string, required): The key to validate.
    • hwid (string, required): The Hardware ID to validate against.
  • Returns: Promise<V2_ValidationResponse>

Example:

const validation = new V2Validation({ service: "your-service" });
const response = await validation.validate({
  key: "user-key",
  hwid: "user-hwid",
});
console.log(response);

Response:

{
  "status": true,
  "message": "Validation successful."
}

TypeScript Support

This package is written in TypeScript and includes type definitions. You'll get full IntelliSense and type-checking out of the box when using TypeScript.

Error Handling

The package includes proper error handling and will throw appropriate errors for:

  • Invalid API keys
  • Network issues
  • Invalid parameters
  • Server errors

Example:

try {
  const response = await client.generateKeyGet({
    count: 1,
    isPremium: false,
  });
} catch (error) {
  // Handle error appropriately
  console.error(error);
}

License

This project is licensed under the MIT License.