WaffleAuth Documentation

Getting Started

WaffleAuth is a license authentication system that provides functionality for generating and validating license keys.

WaffleAuth.dll Library File
WaffleHWID.exe HWID Generator
Important: Before using WaffleAuth, you need to configure your own Firebase/Firestore credentials and endpoints.

Initial Setup

Initialize WaffleAuth with the following configuration methods:

Required Configuration Methods

WaffleAuthFuncs.SetURL("YOUR_FIRESTORE_URL"); WaffleAuthFuncs.SetAPIKey("YOUR_API_KEY"); WaffleAuthFuncs.SetEndPoint("YOUR_ENDPOINT_URL"); WaffleAuthFuncs.SetDuration(1); WaffleAuthFuncs.SetInitials("LA"); WaffleAuthFuncs.MessageBoxes(true);
Method Description Parameter Type
SetURL() Sets the Firestore database URL string
SetAPIKey() Sets the API key for authentication string
SetEndPoint() Sets the endpoint URL for queries string
SetDuration() Sets the duration value in hours int
SetInitials() Sets the initials for key generation string
MessageBoxes() Enables/disables message boxes bool
Initialize() Loads saved keys and validates them bool

Initialize and Load Saved Keys

After setting up the configuration, initialize WaffleAuth to load and validate any saved keys:

bool isValid = await WaffleAuthFuncs.Initialize(); if (isValid) { // Load main application window // Start program features // Navigate to main menu } else { return; }

Returns:

  • bool: True if saved keys are valid, false otherwise

Firebase Configuration

Step 1: Create Firebase Project

1. Go to the Firebase Console and create a new project

2. In the project settings, create a new Web App to get your API key and project configuration

3. Enable Firestore Database from the Firebase Console

Step 2: Get Required URLs and Keys

After creating your Firebase project and enabling Firestore, you'll need:

License Key Format & Premium Keys

Standard Key Format

Each license key in the Firestore database follows this structure:

{ "createdAt": "December 20, 2024 at 4:42:23 PM UTC+1", // timestamp "expiresAt": "December 20, 2024 at 5:42:23 PM UTC+1", // timestamp "hwid": "751466F8F0542C9A", // string "key": "LA-48a7ebadbda84b67" // string }

Creating Premium Keys

To create premium keys with custom durations or properties:

  1. Have the user download and run WaffleHWID.exe to generate their HWID
  2. Get the HWID from the user that was generated by WaffleHWID.exe
  3. Go to your Firestore database console
  4. Manually add a new document to the 'licenses' collection
  5. Set up the document with the format shown above
  6. Use the HWID provided by the user in the 'hwid' field of the document
Note: When creating premium keys, ensure you maintain the exact document structure. Premium keys require the user's HWID which can only be generated using WaffleHWID.exe to maintain security and prevent key sharing.

Key Functions

Generate License Key

To generate a new license key:

string generatedKey = await WaffleAuthFuncs.GenerateKeyAsync();

Validate License Key

To check if a license key is valid:

bool isKeyValid = await WaffleAuthFuncs.CheckKey(keyString);

Generate Earning/Adlink Key

To generate a new license key with an associated earning URL (e.g., ad links):

string generatedKey = await WaffleAuthFuncs.GenerateEarningKeyAsync("https://youtube.com", 1);

Parameters:

  • url (string): The URL that users need to visit to earn the key
  • duration (int): Required time in hours that the user must stay on the URL page to earn their key

Example Implementation

using WaffleAuth; public partial class Form1 : Form { public Form1() { // Initialize WaffleAuth with your credentials WaffleAuthFuncs.SetURL("YOUR_FIRESTORE_URL"); WaffleAuthFuncs.SetAPIKey("YOUR_API_KEY"); WaffleAuthFuncs.SetEndPoint("YOUR_ENDPOINT_URL"); WaffleAuthFuncs.SetDuration(1); WaffleAuthFuncs.SetInitials("LA"); WaffleAuthFuncs.MessageBoxes(true); bool isValid = await WaffleAuthFuncs.Initialize(); if (!isValid) { Application.Exit(); } InitializeComponent(); } private async void GenerateKey_Click(object sender, EventArgs e) { string generatedKey = await WaffleAuthFuncs.GenerateKeyAsync(); // Display or use the generated key } private async void ValidateKey_Click(object sender, EventArgs e) { bool isKeyValid = await WaffleAuthFuncs.CheckKey(licenseKey); if (!isKeyValid) { Application.Exit(); } } private async void GenerateEarningKey_Click(object sender, EventArgs e) { string earningKey = await WaffleAuthFuncs.GenerateEarningKeyAsync("https://youtube.com", 1); // Display or use the generated earning key } }

Security Note

Always keep your API keys and credentials secure and never expose them in client-side code or public repositories.