The official TypeScript/Node.js SDK for AuthVaultix β Secure License & Authentication API
authvaultix.ts is a lightweight, easy-to-integrate TypeScript SDK that connects your Node.js applications to the AuthVaultix authentication and license management API. It provides secure user authentication with Hardware ID (HWID) binding, making license abuse and account sharing virtually impossible.
| Feature | Description |
|---|---|
| π License Login | Authenticate using just a license key |
| π€ Username & Password Login | Standard credential-based login with HWID lock |
| π User Registration | Register new users with a valid license key |
| π₯οΈ HWID Binding | Automatic hardware fingerprinting via Windows SID |
| π Subscription Details | View expiry dates and remaining subscription time |
| β‘ Fast & Minimal | Zero bloat β only axios as a dependency |
authvaultix-ts/
βββ src/
β βββ authvaultix.ts # Core SDK class
β βββ main.ts # Example CLI integration
βββ package.json
βββ tsconfig.json
βββ README.md
- Node.js v18 or higher
- npm v8 or higher
- Windows OS (required for HWID fingerprinting via PowerShell)
- An active AuthVaultix account with an application created
git clone https://github.com/AuthVaultix-typescript-Example.git
cd AuthVaultix-typescript-Examplenpm installOpen src/main.ts and fill in your AuthVaultix application details:
const AuthVaultixApp = new AuthVaultix(
"YourAppName", // Application name from AuthVaultix dashboard
"YOUR_OWNER_ID", // Your Owner ID
"YOUR_SECRET", // Your application secret
"1.0" // Your application version
);
β οΈ Never hardcode secrets in production. Use environment variables (e.g.,process.env.AUTHVAULTIX_SECRET).
# Compile TypeScript
npm run build
# Run the application
npm startimport { AuthVaultix } from "./authvaultix.ts";
const auth = new AuthVaultix(
"MyApp",
"xxxxxxxx",
"xxxxxxxxxxxxxxxx",
"1.0"
);
// Must be called first before any other method
await auth.Init();Authenticate an existing user. HWID is automatically captured and verified.
await auth.Login("john_doe", "securepassword123");Console Output:
β
Logged in!
=== User Data ===
Username: john_doe
IP: 103.xx.xx.xx
HWID: S-1-5-21-XXXXXXXXX
=== Subscriptions ===
Subscriptions : Premium
Expiry : 5/1/2025, 12:00:00 AM
Time Left : 27d 4h 30m
Register a new user with a valid license key. HWID is bound at registration.
await auth.Register("new_user", "mypassword", "XXXXX-XXXXX-XXXXX-XXXXX");Authenticate using only a license key β no username/password required.
await auth.License("XXXXX-XXXXX-XXXXX-XXXXX");The included main.ts provides a ready-to-use command-line interface:
[1] Login
[2] Register
[3] License Login
[4] Exit
Choose option: _
| Parameter | Type | Description |
|---|---|---|
appName |
string |
Application name (from AuthVaultix dashboard) |
ownerId |
string |
Your unique Owner ID |
secret |
string |
Application secret key |
version |
string |
Application version string |
| Method | Signature | Description |
|---|---|---|
Init() |
async Init(): Promise<boolean> |
Initialize session with AuthVaultix API |
Login() |
async Login(username, password): Promise<boolean> |
Login with credentials + HWID |
Register() |
async Register(username, password, license, email?): Promise<boolean> |
Register new user |
LicenseLogin() / License() |
async LicenseLogin(licenseKey): Promise<boolean> |
License-key only authentication |
Logout() |
async Logout(): Promise<void> |
Terminate session |
| Method | Signature | Description |
|---|---|---|
Check() |
async Check(): Promise<boolean> |
Validates active session |
Upgrade() |
async Upgrade(username, licenseKey): Promise<boolean> |
Upgrade user account |
ForgotPassword() |
async ForgotPassword(username, email): Promise<boolean> |
Trigger password reset |
ChangeUsername() |
async ChangeUsername(newUsername): Promise<void> |
Change username |
| Method | Signature | Description |
|---|---|---|
GetVar() |
async GetVar(varName): Promise<string | null> |
Fetch user variable |
SetVar() |
async SetVar(varName, value): Promise<boolean> |
Set user variable |
GetGlobalVar() |
async GetGlobalVar(varKey): Promise<string | null> |
Fetch global variable |
Download() |
async Download(fileId): Promise<{success, message, fileBytes}> |
Securely download file |
| Method | Signature | Description |
|---|---|---|
Log() |
async Log(message): Promise<{success, message}> |
Send log to dashboard |
FetchOnline() |
async FetchOnline(): Promise<{success, message, users}> |
Get online clients |
Ban() |
async Ban(reason?): Promise<{success, message}> |
Ban current user |
CheckBlacklist() |
async CheckBlacklist(): Promise<{success, message}> |
Check HWID blacklist |
ChatSend() |
async ChatSend(message, channel): Promise<{success, message}> |
Send chat message |
ChatFetch() |
async ChatFetch(channel): Promise<any[] | null> |
Retrieve chat history |
CurrentUser: Object containing user info, HWID, IP, subscriptions, etc.SessionId: Active session token.Initialized: Boolean indicating if SDK is initialized.
- HWID Locking β Each license/account is locked to the user's Windows SID, preventing account sharing.
- Session-Based API β Each
Init()call generates a unique session ID for secure request signing. - Credential Safety β Store your
ownerid,secret, and appnamein environment variables, never in source code.
// β
Recommended: use environment variables
const auth = new AuthVaultix(
process.env.APP_NAME!,
process.env.OWNER_ID!,
process.env.APP_SECRET!,
"1.0"
);# Install dependencies
npm install
# Compile TypeScript
npm run build
# Run compiled output
npm starttsconfig.json is pre-configured for ESM module output targeting Node.js.
| Package | Version | Purpose |
|---|---|---|
axios |
^1.7.7 |
HTTP requests to AuthVaultix API |
typescript |
^5.7.2 |
TypeScript compiler (dev) |
@types/node |
^22.9.0 |
Node.js type definitions (dev) |
Contributions, issues, and feature requests are welcome!
- Fork the repository
- Create your feature branch:
git checkout -b feature/AmazingFeature - Commit your changes:
git commit -m 'Add some AmazingFeature' - Push to the branch:
git push origin feature/AmazingFeature - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
- π Website: authvaultix.com
- π§ Support: Open an Issue
- π API Docs: authvaultix.com/docs
Made with β€οΈ for the AuthVaultix ecosystem
β Star this repo if it helped you! β