<html>
<head>
    <meta charset="utf-8">
    <title>WaffleAuth Documentation</title>
    <style>
        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            color: #2c3e50;
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            line-height: 1.8;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        .container {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
            transition: transform 0.3s ease;
            padding: 30px;
        }
        .container:hover {
            transform: translateY(-5px);
        }
        #nav-menu {
            position: fixed;
            top: 20px;
            left: 20px;
            width: 250px;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
            transition: all 0.3s ease;
            padding: 20px;
        }
        #nav-menu ul {
            list-style: none;
            padding: 0;
        }
        #nav-menu li {
            margin: 8px 0;
        }
        #nav-menu a {
            position: relative;
            overflow: hidden;
            z-index: 1;
            color: #2c3e50;
            text-decoration: none;
            padding: 8px 12px;
            display: block;
            border-radius: 4px;
        }
        #nav-menu a:before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(120deg, transparent, rgba(52, 152, 219, 0.2), transparent);
            transition: all 0.5s ease;
        }
        #nav-menu a:hover:before {
            left: 100%;
        }
        .main-content {
            margin-left: 290px;
        }
        h1 {
            background: linear-gradient(120deg, #2c3e50, #3498db);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            font-size: 2.5em;
            text-align: center;
            margin-bottom: 40px;
            border-bottom: none;
            position: relative;
        }
        h1:after {
            content: '';
            display: block;
            width: 100px;
            height: 4px;
            background: linear-gradient(to right, #3498db, #2c3e50);
            margin: 20px auto;
            border-radius: 2px;
        }
        h2 {
            color: #2980b9;
            margin-top: 40px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }
        .function {
            border: none;
            background: rgba(248, 249, 250, 0.9);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            border-radius: 12px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            padding: 25px;
            margin: 25px 0;
        }
        .function:before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 4px;
            background: linear-gradient(to bottom, #3498db, #2980b9);
            border-radius: 4px 0 0 4px;
        }
        .function:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        }
        pre {
            background: rgba(248, 249, 250, 0.95);
            border: 1px solid rgba(225, 228, 232, 0.5);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
            border-radius: 12px;
            padding: 20px;
            overflow-x: auto;
        }
        code {
            background: #edf2f7;
            padding: 2px 6px;
            border-radius: 4px;
            font-family: 'Consolas', monospace;
            color: #e74c3c;
        }
        .note {
            background: linear-gradient(135deg, rgba(255, 243, 205, 0.95), rgba(255, 248, 227, 0.95));
            border: none;
            box-shadow: 0 4px 15px rgba(255, 193, 7, 0.1);
            border-radius: 12px;
            position: relative;
            overflow: hidden;
            padding: 20px;
            margin: 20px 0;
        }
        .note:before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 4px;
            background: linear-gradient(to bottom, #ffc107, #ffdb4d);
            border-radius: 4px 0 0 4px;
        }
        .setup {
            background: linear-gradient(135deg, rgba(212, 237, 218, 0.95), rgba(227, 245, 231, 0.95));
            border: none;
            box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
            border-radius: 12px;
            position: relative;
            padding: 20px;
            margin: 20px 0;
        }
        .setup:before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 4px;
            background: linear-gradient(to bottom, #28a745, #34ce57);
            border-radius: 4px 0 0 4px;
        }
        .premium-btn {
            display: none;
        }
        .section {
            display: none;
            scroll-margin-top: 20px;
        }
        .section.active {
            display: block;
        }

        pre code.hljs {
          padding: 0;
          background: transparent;
        }

        .hljs {
          background: #f8f9fa !important;
          color: #2c3e50 !important;
        }
        .hljs-keyword {
            color: #0000ff !important; /* Bright blue for keywords */
        }

        .hljs-string {
            color: #a31515 !important; /* Dark red for strings */
        }

        .hljs-comment {
            color: #008000 !important; /* Green for comments */
        }

        .hljs-title {
            color: #795E26 !important; /* Brown for class/method names */
        }

        .hljs-type {
            color: #267f99 !important; /* Blue-green for types */
        } 

        .hljs-literal {
            color: #0000ff !important; /* Blue for true/false/null */
        }

        .hljs-built_in {
            color: #267f99 !important; /* Blue-green for built-in types */
        }

        pre code.hljs {
            color: #000000 !important; /* Black for normal code text */
            font-weight: 400;
        }
    </style>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/vs.min.css">
</head>
<body>
    <nav id="nav-menu">
        <h3>Quick Navigation</h3>
        <ul>
            <li><a href="#getting-started">Getting Started</a></li>
            <li><a href="#requirements">Requirements</a></li>
            <li><a href="#configuration">Configuration</a></li>
            <li><a href="#key-management">Key Management</a></li>
            <li><a href="#implementation">Implementation</a></li>
            <li><a href="#addons">Addons</a></li>
            <li><a href="#creating-addons">Creating Custom Addons</a></li>
            <li><a href="#account-management">Account Management</a></li>
            <li><a href="#mixed-accounts">Mixed Accounts</a></li>
            <li><a href="#checkpoints">Checkpoints</a></li>
            <li><a href="#banning">Banning</a></li>
            <li><a href="#troubleshooting">Troubleshooting</a></li>
        </ul>
    </nav>

    <div class="main-content">
        <div class="container">
            <h1>WaffleAuth Documentation</h1>
            
            <section id="getting-started" class="section active">
                <div class="setup">
                    <h2>Getting Started</h2>
                    <p>WaffleAuth is a powerful license key system for C# applications, specifically designed for XAML and WinForms projects. It provides robust license management with HWID binding and Discord Rich Presence integration.</p>
                    <h3>Installation Steps:</h3>
                    <ol>
                        <li>Add WaffleAuth.dll as a reference in your project</li>
                        <li>Add the following using statement:</li>
                        <pre><code class="language-csharp">using WaffleAuth;</code></pre>
                        <li>Configure your Firebase/Firestore database</li>
                        <li>Set up your API endpoints</li>
                    </ol>
                </div>
            </section>

            <section id="requirements" class="section">
                <h2>Requirements</h2>
                <div class="setup">
                    <h3>Required NuGet Packages</h3>
                    <p>WaffleAuth requires the following NuGet packages to be installed in your project:</p>
                    <ul>
                        <li>Discord Rich Presence</li>
                        <li>Newtonsoft.Json</li>
                    </ul>

                    <h3>Installing NuGet Packages</h3>
                    <p>You can install these packages using either:</p>
                    
                    <h4>Visual Studio NuGet Package Manager:</h4>
                    <ol>
                        <li>Right-click your project in Solution Explorer</li>
                        <li>Select &quot;Manage NuGet Packages...&quot;</li>
                        <li>Search for each required package</li>
                        <li>Click &quot;Install&quot; for each package</li>
                    </ol>

                    <h4>Package Manager Console:</h4>
                    <pre><code class="language-csharp">Install-Package DiscordRichPresence
Install-Package Newtonsoft.Json</code></pre>
                    
                    <div class="note">
                        <p><strong>Note:</strong> Make sure to install these packages before trying to use WaffleAuth functionality.</p>
                    </div>
                </div>
            </section>

            <section id="configuration" class="section">
                <h2>Configuration Functions</h2>
                
                <div class="function">
                    <h3>Initial Configuration</h3>
                    <p>Configure WaffleAuth at the start of your application:</p>
                    <pre><code class="language-csharp">// Required configuration
WaffleAuthFuncs.SetInitials(&quot;APP&quot;);
WaffleAuthFuncs.SetURL(&quot;https://firestore.googleapis.com/v1/projects/your-project-name/databases/(default)/documents&quot;);
WaffleAuthFuncs.SetEndPoint(&quot;https://firestore.googleapis.com/v1/projects/your-project-name/databases/(default)/documents:runQuery?key=&quot;);
WaffleAuthFuncs.SetAPIKey(&quot;YOUR-API-KEY&quot;);
WaffleAuthFuncs.SetActivationKey(&quot;KEY-HERE&quot;); // Required activation key
WaffleAuthFuncs.Mode = &quot;key&quot;; // Set authentication mode
WaffleAuthFuncs.MsgBoxes(true);
</code></pre>
                </div>

                <div class="function">
                    <h3>Firebase Collections Setup</h3>
                    <p>WaffleAuth requires four collections in your Firebase Firestore database:</p>
                    <ul>
                        <li><strong>licenses</strong> - Collection for storing license key data</li> 
                        <li><strong>accounts</strong> - Collection for storing user account data when using account mode</li>
                        <li><strong>bans</strong> - Collection for managing banned users</li>
                        <li><strong>mixed</strong> - Collection for the merged account and key system feature</li>
                    </ul>
                    <div class="note">
                        <p><strong>Important:</strong> All collections must be created in your Firestore database before using WaffleAuth. The system will not automatically create these collections.</p>
                    </div>
                </div>

                <div class="function">
                    <h3>SetInitials(string userInitials)</h3>
                    <p>Sets the prefix for generated license keys. This will appear before the hyphen in all generated keys.</p>
                    <pre><code class="language-csharp">WaffleAuthFuncs.SetInitials(&quot;APP&quot;);</code></pre>
                    <p>Result format: APP-XXXXXXXXXXXXX</p>
                </div>

                <div class="function">
                    <h3>SetURL(string userURL)</h3>
                    <p>Sets the Firestore database URL where license information will be stored. The URL should be in this format:</p>
                    <pre><code class="language-csharp">https://firestore.googleapis.com/v1/projects/your-project-name/databases/(default)/documents</code></pre>
                    <pre><code class="language-csharp">WaffleAuthFuncs.SetURL(&quot;https://firestore.googleapis.com/v1/projects/your-project-name/databases/(default)/documents&quot;);</code></pre>
                </div>

                <div class="function">
                    <h3>SetEndPoint(string endpointuser)</h3>
                    <p>Sets the API endpoint used for license validation and queries.</p>
                    <pre><code class="language-csharp">WaffleAuthFuncs.SetEndPoint(&quot;https://firestore.googleapis.com/v1/projects/your-project-name/databases/(default)/documents:runQuery?key=&quot;);</code></pre>
                </div>

                <div class="function">
                    <h3>SetAPIKey(string userapikey)</h3>
                    <p>Sets the Firebase API key for authentication and database access.</p>
                    <pre><code class="language-csharp">WaffleAuthFuncs.SetAPIKey(&quot;YOUR-API-KEY&quot;);</code></pre>
                </div>

                <div class="function">
                    <h3>SetActivationKey(string activationKey)</h3>
                    <p>Sets the activation key required for the system to function. This must be set before using any other functionality.</p>
                    <pre><code class="language-csharp">WaffleAuthFuncs.SetActivationKey(&quot;KEY-HERE&quot;);</code></pre>
                </div>

                <div class="function">
                    <h3>Mode(string mode)</h3>
                    <p>Sets the authentication mode - either &quot;keys&quot; for license key system or &quot;accounts&quot; for username/password authentication, or &quot;mixed&quot; for mixed account and key system.</p>
                    <pre><code class="language-csharp">WaffleAuthFuncs.Mode = &quot;keys&quot;;     // Use license key system
WaffleAuthFuncs.Mode = &quot;accounts&quot;; // Use account system
WaffleAuthFuncs.Mode = &quot;mixed&quot;;    // Use mixed account and key system</code></pre>
                </div>

                <div class="function">
                    <h3>MsgBoxes(bool showMsgBoxes)</h3>
                    <p>Controls whether the system shows message box notifications for various events.</p>
                    <pre><code class="language-csharp">WaffleAuthFuncs.MsgBoxes(true);  // Enable notifications
WaffleAuthFuncs.MsgBoxes(false); // Disable notifications</code></pre>
                </div>

                <div class="function">
                    <h3>Discord Rich Presence Configuration (Optional)</h3>
                    <p>Set up Discord Rich Presence integration if desired:</p>
                    <pre><code class="language-csharp">
// Configure Discord RPC (Optional)
WaffleAuthFuncs.SetRPCAppID(&quot;1320047337518928004&quot;); // Your Discord App ID

// Initialize Rich Presence
WaffleAuthFuncs.InitializeDiscordRP(
    &quot;Your Subtitle&quot;,      // Subtitle text
    &quot;Your Description&quot;,   // Description text
    &quot;large_image&quot;,        // Large image asset name
    &quot;Large Image Text&quot;,   // Large image hover text 
    &quot;small_image&quot;,        // Small image asset name
    &quot;Small Image Text&quot;    // Small image hover text
);</code></pre>
                </div>
            </section>

            <section id="key-management" class="section">
                <h2>Key Management Functions</h2>

                <div class="function">
                    <h3>GenerateEarningKey(string keyType, string websiteUrl, int timeInSeconds, int customDurationInHours)</h3>
                    <p>Generates a license key after the user visits a specified website for a set duration.</p>
                    <pre><code class="language-csharp">string key = await WaffleAuthFuncs.GenerateEarningKey(
    &quot;free&quot;,                // Key type  
    &quot;https://example.com&quot;, // Website to visit
    30,                    // Wait time in seconds
    24                     // License duration in hours
);</code></pre>
                </div>

                <div class="function">
                    <h3>GenerateKey(string keyType, int customDurationInHours)</h3>
                    <p>Generates a license key immediately with specified duration.</p>
                    <pre><code class="language-csharp">string key = await WaffleAuthFuncs.GenerateKey(
    &quot;premium&quot;,            // Key type
    24                    // License duration in hours
);</code></pre>
                </div>

                <div class="function">
                    <h3>CheckKey(string licenseKey)</h3>
                    <p>Validates a license key independently. Use this for manual key validation.</p>
                    <pre><code class="language-csharp">bool isValid = await WaffleAuthFuncs.CheckKey(&quot;APP-XXXXXXXXXXXXX&quot;);</code></pre>
                </div>

                <div class="function">
                    <h3>Initialize()</h3>
                    <p>Checks for any existing valid licenses on the current machine. Useful for automatic login.</p>
                    <pre><code class="language-csharp">private void Init()
{
    bool hasExistingLicense = await WaffleAuthFuncs.Initialize();
    {
        if (hasExistingLicense)
        {
            // Your code here for valid license
        }
    }
}</code></pre>
                    <div class="note">
                        <p>Call this method when your application starts to check for existing valid licenses.</p>
                    </div>
                </div>

                <div class="function">
                    <h3>Key Information Functions</h3>
                    <p>Access current key details:</p>
                    <pre><code class="language-csharp">
// Get the current key type
string keyType = await WaffleAuthFuncs.GetType();

// Get the current key string
string currentKey = WaffleAuthFuncs.CurrentLogin;
// Can be used like: label1.Text = WaffleAuthFuncs.CurrentLogin;</code></pre>
                </div>
            </section>

            <section id="implementation" class="section">
                <h2>Implementation Example</h2>
                <div class="function">
                    <h3>Basic Form Implementation</h3>
                    <p>Here&apos;s a complete example of implementing WaffleAuth in a Windows Forms application:</p>
                    <pre><code class="language-csharp">using WaffleAuth;

namespace Le_Login_Tester
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            WaffleAuthFuncs.Mode = &quot;accounts&quot;;
            WaffleAuthFuncs.SetActivationKey(&quot;KEY-HERE&quot;);
            WaffleAuthFuncs.SetURL(&quot;https://firestore.googleapis.com/v1/projects/your-project-name/databases/(default)/documents&quot;);
            WaffleAuthFuncs.SetEndPoint(&quot;https://firestore.googleapis.com/v1/projects/your-project-name/databases/(default)/documents:runQuery?key=&quot;);
            WaffleAuthFuncs.SetAPIKey(&quot;YOUR-API-KEY&quot;);
            WaffleAuthFuncs.MsgBoxes(true);
            WaffleAuthFuncs.Initialize();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            bool success = await WaffleAuthFuncs.CreateAccount(&quot;free&quot;, UsernameCreate.Text, PasswordCreate.Text);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            bool isValid = await WaffleAuthFuncs.CheckAccount(UsernameLogin.Text, PasswordLogin.Text);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            CurrentLabel.Text = WaffleAuthFuncs.CurrentLogin;
        }

        private async void button4_Click(object sender, EventArgs e)
        {
            TypeLabel.Text = await WaffleAuthFuncs.GetType();
        }

        private async void button6_Click(object sender, EventArgs e)
        {
            string key = await WaffleAuthFuncs.GenerateKey(&quot;free&quot;, 10);
            textBox2.Text = key;
        }

        private void button5_Click(object sender, EventArgs e)
        {
            bool isValid = await WaffleAuthFuncs.CheckKey(keybox.Text);
        }
    }
}</code></pre>
                </div>

                <div class="note">
                    <h3>Important Implementation Notes</h3>
                    <ul>
                        <li>Always configure WaffleAuth in your form&apos;s constructor before InitializeComponent()</li>
                        <li>Handle key validation failures appropriately for your application</li>
                        <li>Store sensitive information like API keys securely</li>
                        <li>Consider implementing a loading indicator during operations</li>
                    </ul>
                </div>
            </section>

            <section id="account-management" class="section">
                <h2>Account Management Functions</h2>

                <div class="function">
                    <h3>CreateAccount(string accountType, string username, string password)</h3>
                    <p>Creates a new user account with the specified type and credentials.</p>
                    <pre><code class="language-csharp">bool success = await WaffleAuthFuncs.CreateAccount(
    &quot;free&quot;,             // Account type
    &quot;username&quot;,         // Username 
    &quot;password&quot;          // Password
);</code></pre>
                </div>

                <div class="function">
                    <h3>CheckAccount(string username, string password)</h3>
                    <p>Validates user account credentials.</p>
                    <pre><code class="language-csharp">bool isValid = await WaffleAuthFuncs.CheckAccount(
    &quot;username&quot;,         // Username
    &quot;password&quot;          // Password
);</code></pre>
                </div>

                <div class="function">
                    <h3>Account Information Functions</h3>
                    <p>Access current account details:</p>
                    <pre><code class="language-csharp">// Get the current account type
string accountType = await WaffleAuthFuncs.GetType();

// Get the current logged in username 
string currentUser = WaffleAuthFuncs.CurrentLogin;</code></pre>
                </div>
            </section>

            <section id="mixed-accounts" class="section">
                <h2>Mixed Accounts</h2>
                <div class="function">
                    <h3>Mixed Account System</h3>
                    <p>The Mixed Account system combines the functionality of both account-based and key-based authentication into a single unified system. This allows you to require both account credentials and a license key for authentication.</p>

                    <h3>CreateMixedAccount(string accountType, string username, string password)</h3>
                    <p>Creates a new mixed account and returns a license key for that account.</p>
                    <pre><code class="language-csharp">string key = await WaffleAuthFuncs.CreateMixedAccount(
    &quot;free&quot;,             // Account type
    &quot;username&quot;,         // Username
    &quot;password&quot;          // Password
);</code></pre>

                    <h3>CheckMixedAccount(string username, string password, string licenseKey)</h3>
                    <p>Validates a mixed account using both account credentials and a license key.</p>
                    <pre><code class="language-csharp">bool isValid = await WaffleAuthFuncs.CheckMixedAccount(
    &quot;username&quot;,         // Username
    &quot;password&quot;,         // Password
    &quot;LICENSE-KEY&quot;       // License key
);</code></pre>

                    <h3>Account Information Functions</h3>
                    <p>Access current mixed account details:</p>
                    <pre><code class="language-csharp">// Get the current account type
string accountType = await WaffleAuthFuncs.GetType();

// Get the current logged in username 
string currentUser = WaffleAuthFuncs.CurrentLogin;</code></pre>

                    <div class="note">
                        <p><strong>Note:</strong> Mixed accounts provide an additional layer of security by requiring both account credentials and a valid license key for authentication.</p>
                    </div>
                </div>
            </section>

            <section id="addons" class="section">
                <h2>Addons</h2>
                <div class="function">
                    <h3>Loading Addons</h3>
                    <p>WaffleAuth supports loading external addons via DLL files. Place addon DLLs in the automatically created &quot;Addons&quot; folder.</p>
                    
                    <h4>Running Addon Methods</h4>
                    <p>Use the AddonManager to execute methods from loaded addons:</p>
                    <pre><code class="language-csharp">// Basic method call
AddonManager.RunAddonMethod(&quot;MyAddon.dll&quot;, &quot;MethodName&quot;);

// With parameters
AddonManager.RunAddonMethod(&quot;MyAddon.dll&quot;, &quot;MethodName&quot;, &quot;param1&quot;, true, 42);</code></pre>

                    <div class="note">
                        <p><strong>Note:</strong> Parameters after the method name are optional and should match the method signature in the addon DLL.</p>
                    </div>
                </div>
            </section>

            <section id="creating-addons" class="section">
                <h2>Creating Custom Addons</h2>
                <div class="function">
                    <h3>Creating Custom Addons</h3>
                    <p>Here&apos;s a basic template for creating your own WaffleAuth addon:</p>
                    <pre><code class="language-csharp">using System;
using System.Windows.Forms;

namespace ExampleAddon
{
    public class MainClass
    {
        public static void PrintMessage(string message)
        {
            MessageBox.Show(&#x24;&quot;Test: {message}&quot;);
        }
    }
}</code></pre>
                    
                    <div class="note">
                        <p><strong>Note:</strong> Make sure to compile your addon as a DLL and place it in the Addons folder.</p>
                    </div>
                </div>
            </section>

            <section id="checkpoints" class="section">
                <h2>Checkpoints</h2>
                <div class="function">
                    <h3>Setting Up Checkpoints</h3>
                    <p>The Checkpoint system allows you to create a sequence of URLs that users must visit before receiving their key or account. This is commonly used with ad-link services to monetize key generation.</p>

                    <h4>Configuring Checkpoint URLs</h4>
                    <pre><code class="language-csharp">// Set up checkpoint URLs - can add unlimited checkpoints
WaffleAuthFuncs.SetCheckpointUrls(
    1, "https://rekonise.com/checkpoint-1-pus4u",
    2, "https://link-hub.net/1286237/checkpoint-2",
    3, "https://link-target.net/1286237/tester"
);</code></pre>

                    <h4>Setting Checkpoint Preferences</h4>
                    <p>Before starting checkpoints, configure the output preferences based on your mode:</p>

                    <p>For Mixed Mode:</p>
                    <pre><code class="language-csharp">// Configure mixed account preferences
// You can use textbox values here, e.g.: UsernameTextBox.Text, PasswordTextBox.Text
WaffleAuthFuncs.CheckpointMixedPrefs(
    &quot;free&quot;,                 // Account type
    UsernameTextBox.Text,   // Username (can use textbox or string)
    PasswordTextBox.Text    // Password (can use textbox or string)
);</code></pre>

                    <p>For Keys Mode:</p>
                    <pre><code class="language-csharp">// Configure key preferences
WaffleAuthFuncs.CheckpointKeyPrefs(
    &quot;free&quot;,             // Key type
    24                  // Key duration in hours
);</code></pre>

                    <h4>Starting the Checkpoint System</h4>
                    <pre><code class="language-csharp">// Start the checkpoint system
WaffleAuthFuncs.StartCheckpoints();</code></pre>

                    <div class="note">
                        <h4>Important Configuration Notes:</h4>
                        <p>When setting up your ad-link redirects, use these local endpoints:</p>
                        <ul>
                            <li>Checkpoint 1: <code>http://localhost:2579/waffleauth/1</code></li>
                            <li>Checkpoint 2: <code>http://localhost:2579/waffleauth/2</code></li>
                            <li>And so on for additional checkpoints...</li>
                            <li>Final Checkpoint: <code>http://localhost:2579/waffleauth/complete</code></li>
                        </ul>
                        <p><strong>Note:</strong> The final checkpoint must always redirect to the "complete" endpoint.</p>
                    </div>

                    <div class="setup">
                        <h4>Implementation Example</h4>
                        <pre><code class="language-csharp">public Form1()
{
    InitializeComponent();
    
    // Set up checkpoint URLs on startup
    WaffleAuthFuncs.SetCheckpointUrls(
        1, "https://linkvertise.com/checkpoint1",
        2, "https://linkvertise.com/checkpoint2",
        3, "https://linkvertise.com/checkpoint3"
    );
}

private async void button1_Click(object sender, EventArgs e)
{
    // Configure preferences based on your selected mode
    WaffleAuthFuncs.CheckpointMixedPrefs("free", "username", "password");
    // OR
    WaffleAuthFuncs.CheckpointKeyPrefs("free", 24);

    // Start the checkpoint system
    WaffleAuthFuncs.StartCheckpoints();
}</code></pre>
                        <div class="note">
                            <p><strong>Important:</strong> While SetCheckpointUrls should be called at startup, the CheckpointPrefs and StartCheckpoints methods should be called when a user initiates the process (e.g., clicking a button).</p>
                        </div>
                    </div>
                </div>
            </section>

            <section id="banning" class="section">
                <h2>Banning</h2>
                <div class="function">
                    <h3>User Ban Management</h3>
                    <p>WaffleAuth provides functions to manage user bans through HWID (Hardware ID):</p>
                    
                    <h4>Banning a User</h4>
                    <pre><code class="language-csharp">// Ban a user by their HWID
await WaffleAuthFuncs.BanUser("HWID-TO-BAN");</code></pre>
                    
                    <h4>Unbanning a User</h4>
                    <pre><code class="language-csharp">// Remove a ban for a specific HWID
await WaffleAuthFuncs.UnBan("HWID-TO-UNBAN");</code></pre>

                    <div class="note">
                        <p><strong>Note:</strong> Bans are enforced at the HWID level, making them effective across different accounts or keys used on the same machine.</p>
                    </div>
                </div>
            </section>

            <section id="troubleshooting" class="section">
                <h2>Troubleshooting</h2>
                <div class="note">
                    <h3>Common Issues</h3>
                    <ul>
                        <li><strong>Invalid API Key:</strong> Ensure your Firebase API key is correctly set and has necessary permissions</li>
                        <li><strong>Database Connection:</strong> Verify your Firestore URL and endpoint configurations</li>
                        <li><strong>HWID Mismatch:</strong> Keys are bound to specific machines and cannot be transferred</li>
                        <li><strong>Expired Keys:</strong> Check the duration set during key generation</li>
                    </ul>
                </div>
            </section>
        </div>
    </div>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/languages/csharp.min.js"></script>
    <script>document.querySelectorAll('.section').forEach(section => {
  section.style.transition = 'opacity 0.3s ease';
  section.style.opacity = '0';
});
document.querySelectorAll('#nav-menu a').forEach(anchor => {
  anchor.addEventListener('click', function (e) {
    e.preventDefault();
    document.querySelectorAll('.section').forEach(section => {
      section.style.opacity = '0';
      setTimeout(() => {
        section.classList.remove('active');
      }, 300);
    });
    const targetId = this.getAttribute('href').substring(1);
    const targetElement = document.getElementById(targetId);
    setTimeout(() => {
      targetElement.classList.add('active');
      targetElement.style.opacity = '1';
    }, 300);
    targetElement.scrollIntoView({
      behavior: 'smooth'
    });
  });
});
document.addEventListener('DOMContentLoaded', () => {
  document.querySelectorAll('.section, .new-section').forEach(section => {
    section.classList.remove('active');
    section.style.opacity = '0';
  });
  const startingSection = document.getElementById('getting-started');
  startingSection.classList.add('active');
  setTimeout(() => {
    startingSection.style.opacity = '1';
  }, 300);
  hljs.highlightAll();
});</script>

</body>
</html>