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 🙏

© 2024 – Pkg Stats / Ryan Hefner

luauth

v1.2.4

Published

An API wrapper made for the Lua authentication system Luauth. https://luauth.xyz

Downloads

157

Readme

Luauth API Wrapper

IMPORTANT!!!!!!

You have to whitelist the IP Address of your server under the 'profile' page!

Info

This project is an API Wrapper for Luauth.


Table of contents:

  • Setup Process
  • Functions
    • getApiKeyDetails
    • whitelistIdentifier
    • unwhitelistIdentifier
    • unbanIp
    • getDetails
    • getIdentifiers
    • createScript
    • updateScript
    • deleteScript
    • getLoader
    • getApiActionLogs
    • getScriptActionLogs

Setup

npm install luauth

Import the package

const Luauth = require('luauth');

Connect with API Key

// Using Classes
const luauth = new Luauth("api_key"); // Your Luauth API Key comes here

// Using connect function
const luauth = Luauth.login("api_key"); // Your Luauth API Key comes here

Functions

luauth.getApiKeyDetails()

luauth.getApiKeyDetails().then((res) => {
    console.log(res.data) // Will log the details about the API key in the console.
    // error status 401: invalid API key
})

luauth.whitelistIdentifier(script_id, identifier, auth_expire, note)

luauth.whitelistIdentifier("YOUR SCRIPT ID", "IDENTIFIER OF USER (IPV4, IPV6, HWID)", 1662910175, "CUSTOM NOTE FOR CLIENT. THIS MIGHT MAKE IT EASIER TO IDENTIFY THE USER.").then((res) => {
    console.log(res.data) // Will log the status of the action to the console. ({ "success": true, "message": "User has been whitelisted!" })
    // error status 400: { "success": false, "message": "Invalid script ID" }
})

luauth.unwhitelistIdentifier(script_id, identifier)

luauth.unwhitelistIdentifier("YOUR SCRIPT ID", "IDENTIFIER OF USER (IPV4, IPV6, HWID)").then((res) => {
    console.log(res.data) // Will log the status of the action to the console. (status: 200)
    // error status 400: { "success": false, "message": "Identifier not whitelisted" }
})

luauth.unbanIp(script_id, identifier)

luauth.unbanIp("YOUR SCRIPT ID", "IDENTIFIER OF USER (IPV4, IPV6, HWID)").then((res) => {
    console.log(res.data) // Will log the status of the action to the console. (User has been unbanned)
})

luauth.getDetails(script_id, identifier)

luauth.getDetails("YOUR SCRIPT ID", "IDENTIFIER OF USER (IPV4, IPV6, HWID)").then((res) => {
    console.log(res.data) // Will log details about users to the console
    // error status 400: Invalid Script ID or Identifier
})

luauth.getIdentifiers(script_id)

luauth.getIdentifiers("YOUR SCRIPT ID").then((res) => {
    console.log(res.data) // Will log every whitelisted user to the console
    // error status 400: Invalid Script ID
})

luauth.createScript(script_name, platform, script, logs_webhook, alerts_webhook, ffa, silent)

luauth.createScript(
    "My Super Cool Script", // Enter a name you want the script to have
    "roblox", // Enter the platform for the script (roblox, fivem, csgo)
    "print('troll')", // Enter the actual script
    "https://discordwebhookblahblah", // Enter the webhook where you want logs to be sent to
    "https://discordwebhookblahblah", // Enter the webhook where you want alerts to be sent to
    true, // Define if free for all or not (free for all means the script is accessible for everyone and no one has to be whitelisted)
    true, // If true Luauth wont print debug messages to the console    
).then((res) => {
    console.log(res.data) // Will log the status of the action to the console.
    // error status 400: Missing parameters
    // error status 500: Something went wrong while obfuscating, syntax error?
})

luauth.updateScript(script_id, platform, script, logs_webhook, alerts_webhook, ffa, silent)

luauth.updateScript(
    "YOUR SCRIPT ID" // Enter the ID Of your script here
    "roblox", // Enter the platform for the script (roblox, fivem, csgo)
    "print('troll')", // Enter the actual script
    "https://discordwebhookblahblah", // Enter the webhook where you want logs to be sent to
    "https://discordwebhookblahblah", // Enter the webhook where you want alerts to be sent to
    true, // Define if free for all or not (free for all means the script is accessible for everyone and no one has to be whitelisted)
    true, // If true Luauth wont print debug messages to the console    
).then((res) => {
    console.log(res.data) // Will log the status of the action to the console.
    // error status 400: Missing parameters
    // error status 500: Something went wrong while obfuscating, syntax error?
})

luauth.deleteScript(script_id)

luauth.deleteScript("YOUR SCRIPT ID").then((res) => {
    console.log(res.data) // Will log the status of the action to the console.
    // error status 400: Invalid Script ID
})

luauth.getLoader(script_id)

luauth.getLoader("YOUR SCRIPT ID").then((res) => {
    console.log(res.data) // Will log the script loader to the console.
    // error status 400: Invalid Script ID
})

luauth.getApiActionLogs()

luauth.getApiActionLogs().then((res) => {
    console.log(res.data) // Will log the api action logs to the console.
})

luauth.getScriptActionLogs()

luauth.getScriptActionLogs("YOUR SCRIPT ID").then((res) => {
    console.log(res.data) // Will log the script action logs to the console.
})

Authors