stratum-rs-overlay 1.0.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,112 +1,140 @@
1
- # ⚡ Stratum Overlay (stratum-rs-overlay)
2
-
3
- > **High-Performance, DLL-Injection Free Game Overlay Library for Electron.** > Powered by **Rust** 🦀 + **N-API**.
4
-
5
- [![npm version](https://img.shields.io/npm/v/stratum-rs-overlay.svg)](https://www.npmjs.com/package/stratum-rs-overlay)
6
- [![Platform](https://img.shields.io/badge/platform-win32-blue.svg)](https://www.npmjs.com/package/stratum-rs-overlay)
7
- [![License](https://img.shields.io/badge/license-Commercial-red.svg)](https://stratum-rs.com)
8
-
9
- **Stratum Overlay** is a specialized library designed to create invisible, click-through overlays for Windows applications using Electron. Unlike traditional methods, it does **not** inject DLLs into game processes, making it safer and more compatible with anti-cheat systems.
10
-
11
- ---
12
-
13
- ## 🚀 Key Features
14
-
15
- - **🛡️ Anti-Cheat Friendly:** Uses external window overlay method. No memory writing or code injection.
16
- - **⚡ Blazing Fast:** Core logic written in **Rust** for minimal overhead and maximum performance.
17
- - **🖱️ Click-Through Support:** Perfectly handles mouse events, passing clicks to the game behind the overlay.
18
- - **🔒 Secure Licensing:** Built-in license verification system powered by Ed25519 cryptography.
19
- - **🪟 Windows Native:** Fully optimized for Windows (x64) using native Win32 APIs.
20
-
21
- ---
22
-
23
- ## 📦 Installation
24
-
25
- ```bash
26
- npm install stratum-rs-overlay
27
- ```
28
-
29
- *Note: This library currently supports **Windows (x64)** only.*
30
-
31
- ---
32
-
33
- ## 🛠️ Usage
34
-
35
- ### 1. Get a License Key
36
- To use this library, you need a valid license key.
37
- 👉 **Get your key at:** [https://stratum-rs.com](https://stratum-rs.com)
38
-
39
- ### 2. Integration in Electron
40
- Add the following code to your Electron **Main Process** (`main.js`):
41
-
42
- ```javascript
43
- const { app, BrowserWindow } = require('electron');
44
- const stratum = require('stratum-rs-overlay');
45
-
46
- // Load environment variables (Recommended)
47
- require('dotenv').config();
48
-
49
- const LICENSE_KEY = process.env.STRATUM_LICENSE_KEY || "YOUR_LICENSE_KEY";
50
-
51
- function createWindow() {
52
- const win = new BrowserWindow({
53
- width: 800,
54
- height: 600,
55
- transparent: true, // Required
56
- frame: false, // Required
57
- alwaysOnTop: true, // Recommended for overlays
58
- webPreferences: {
59
- nodeIntegration: true,
60
- contextIsolation: false,
61
- },
62
- });
63
-
64
- win.loadFile('index.html'); // or loadURL(...)
65
-
66
- // ---------------------------------------------------------
67
- // 🔐 1. Initialize & Verify License
68
- // ---------------------------------------------------------
69
- console.log("🔑 Verifying License...");
70
- const isVerified = stratum.init(LICENSE_KEY);
71
-
72
- if (isVerified) {
73
- console.log("✅ License Verified! Activating Overlay...");
74
-
75
- // -------------------------------------------------------
76
- // 🖱️ 2. Enable Click-Through Mode
77
- // Pass the native window handle (HWND) to Rust
78
- // -------------------------------------------------------
79
- const hwnd = win.getNativeWindowHandle();
80
- stratum.setClickThrough(hwnd);
81
-
82
- console.log("✨ Overlay Mode: ACTIVATED");
83
- } else {
84
- console.error("❌ License Verification Failed.");
85
- console.error(" - Overlay features are disabled.");
86
- // Handle invalid license (e.g., show error dialog or quit)
87
- }
88
- }
89
-
90
- app.whenReady().then(createWindow);
91
- ```
92
-
93
- ---
94
-
95
- ## ⚠️ Requirements
96
-
97
- - **OS:** Windows 10 / 11 (64-bit)
98
- - **Runtime:** Node.js 16+ / Electron
99
- - **Dependencies:** Microsoft Visual C++ Redistributable (usually pre-installed on Windows)
100
-
101
- ---
102
-
103
- ## 📞 Support & License
104
-
105
- This project is a **Commercial Software**.
106
- Usage without a valid license key is strictly prohibited.
107
-
108
- - **Website:** [stratum-rs.com](https://stratum-rs.com)
109
- - **Contact:** [zgh9807@gmail.com](mailto:zgh9807@gmail.com)
110
-
111
- Copyright (c) 2026 JJoGeon <zgh9807@gmail.com>.
112
- All rights reserved.
1
+ # STRATUM-RS Overlay (`stratum-rs-overlay`)
2
+
3
+ [![npm version](https://img.shields.io/npm/v/stratum-rs-overlay.svg)](https://www.npmjs.com/package/stratum-rs-overlay)
4
+ [![Platform](https://img.shields.io/badge/platform-win32-blue.svg)](https://www.npmjs.com/package/stratum-rs-overlay)
5
+ [![License](https://img.shields.io/badge/license-Commercial-red.svg)](https://stratum-rs.com)
6
+
7
+ > Commercial Electron Game Overlay SDK for Windows.
8
+ > Built with Rust + N-API for high-performance, DLL-injection-free overlays.
9
+
10
+ ```text
11
+ _____ _______ _____ _______ _ _ __ __ _____ _____
12
+ / ____|__ __| __ \ /\ |__ __| | | | \/ | | __ \ / ____|
13
+ | (___ | | | |__) | / \ | | | | | | \ / |_____| |__) | (___
14
+ \___ \ | | | _ / / /\ \ | | | | | | |\/| |_____| _ / \___ \
15
+ ____) | | | | | \ \/ ____ \ | | | |__| | | | | | | \ \ ____) |
16
+ |_____/ |_| |_| \_/_/ \_\ |_| \____/|_| |_| |_| \_\_____/
17
+
18
+ 🤖 -> 📦 -> 📦 -> 📦 -> 🏗️
19
+ "Shipping stable overlays, one build at a time."
20
+ ```
21
+
22
+ ## Official Website
23
+ - Purchase license key: **[https://stratum-rs.com](https://stratum-rs.com)**
24
+ - Product updates and contact: **[https://stratum-rs.com](https://stratum-rs.com)**
25
+
26
+ ## What Is STRATUM-RS?
27
+ STRATUM-RS Overlay is a paid, production-focused Electron overlay library for game and real-time desktop applications on Windows.
28
+ It tracks target windows and renders transparent overlays without DLL injection, helping teams build anti-cheat-friendly overlay features with a native-performance core.
29
+
30
+ ## Why Teams Use It
31
+ - No DLL injection into game processes.
32
+ - Rust native core for fast event handling and low overhead.
33
+ - Click-through overlay behavior for seamless in-game UX.
34
+ - Window focus/move/blur tracking for dynamic positioning.
35
+ - Commercial licensing model with built-in license verification.
36
+
37
+ ## Installation
38
+ ```bash
39
+ npm install stratum-rs-overlay
40
+ ```
41
+
42
+ ## License Key (Required)
43
+ This is a commercial library. A valid license key is required.
44
+
45
+ 1. Get your key from [https://stratum-rs.com](https://stratum-rs.com)
46
+ 2. Store it in an environment variable:
47
+
48
+ ```bash
49
+ STRATUM_LICENSE_KEY=your_license_key_here
50
+ ```
51
+
52
+ ## Quick Start (Electron Main Process)
53
+ ```javascript
54
+ const { app, BrowserWindow } = require('electron');
55
+ const stratumOverlay = require('stratum-rs-overlay');
56
+ require('dotenv').config();
57
+
58
+ function toHwnd(win) {
59
+ const hwndBuf = win.getNativeWindowHandle();
60
+ return process.arch === 'x64'
61
+ ? Number(hwndBuf.readBigInt64LE(0))
62
+ : hwndBuf.readInt32LE(0);
63
+ }
64
+
65
+ app.whenReady().then(() => {
66
+ const isLicensed = stratumOverlay.init(process.env.STRATUM_LICENSE_KEY || '');
67
+ if (!isLicensed) {
68
+ throw new Error('Invalid STRATUM-RS license key');
69
+ }
70
+
71
+ const overlayWindow = new BrowserWindow({
72
+ width: 800,
73
+ height: 600,
74
+ frame: false,
75
+ transparent: true,
76
+ alwaysOnTop: true,
77
+ webPreferences: { contextIsolation: true },
78
+ });
79
+
80
+ overlayWindow.setIgnoreMouseEvents(true, { forward: true });
81
+
82
+ stratumOverlay.setOverlayPid(overlayWindow.webContents.getOSProcessId());
83
+ stratumOverlay.setOverlayHwnd(toHwnd(overlayWindow));
84
+
85
+ const targets = [
86
+ { name: 'League of Legends (TM) Client', mode: 'exact' },
87
+ { name: 'PUBG:', mode: 'contains' },
88
+ ];
89
+
90
+ stratumOverlay.startTracking(
91
+ targets,
92
+ (event) => {
93
+ // eventType: focus | move | blur
94
+ // x, y, width, height, targetName
95
+ console.log('[STRATUM-RS]', event);
96
+ },
97
+ {
98
+ cursorPollIntervalMs: 100,
99
+ cursorEmitIntervalMs: 100,
100
+ idlePollIntervalMs: 100,
101
+ }
102
+ );
103
+ });
104
+ ```
105
+
106
+ ## API At A Glance
107
+ - `init(licenseKeyHex: string): boolean`
108
+ - `setOverlayPid(pid: number): void`
109
+ - `setOverlayHwnd(hwnd: number): void`
110
+ - `startTracking(targets, callback, options): void`
111
+ - `focusLastTarget(): boolean`
112
+ - `stopTracking(): boolean`
113
+
114
+ ## Target Matching
115
+ `targets` supports exact and partial title matching.
116
+
117
+ ```javascript
118
+ [
119
+ { name: 'MapleStory', mode: 'exact' },
120
+ { name: 'PUBG:', mode: 'contains' }
121
+ ]
122
+ ```
123
+
124
+ ## Platform / Requirements
125
+ - OS: Windows 10 or Windows 11 (64-bit)
126
+ - Runtime: Node.js + Electron
127
+ - Architecture: x64 (win32)
128
+
129
+ ## Commercial License
130
+ Usage without a valid license key is not permitted.
131
+
132
+ - Website: [https://stratum-rs.com](https://stratum-rs.com)
133
+ - Contact: [zgh9807@gmail.com](mailto:zgh9807@gmail.com)
134
+
135
+ Copyright (c) 2026 JJoGeon.
136
+ All rights reserved.
137
+
138
+ ## Search-Friendly Summary
139
+ STRATUM-RS is a commercial Electron overlay SDK for Windows game overlays.
140
+ Keywords: electron game overlay, anti-cheat friendly overlay, DLL injection free overlay, transparent click-through overlay, Rust N-API native addon, Windows overlay tracking SDK.
package/dist/index.d.ts CHANGED
@@ -19,6 +19,11 @@ export interface OverlayEvent {
19
19
  width: number
20
20
  height: number
21
21
  }
22
+ export interface TrackingOptions {
23
+ cursorPollIntervalMs?: number
24
+ cursorEmitIntervalMs?: number
25
+ idlePollIntervalMs?: number
26
+ }
22
27
  /**
23
28
  * License Key Verification
24
29
  * @param License Key
@@ -28,10 +33,12 @@ export declare function init(licenseKeyHex: string): boolean
28
33
  export declare function setOverlayPid(pid: number): void
29
34
  export declare function setOverlayHwnd(hwnd: number): void
30
35
  export declare function focusLastTarget(): boolean
36
+ export declare function stopTracking(): boolean
31
37
  /**
32
38
  * Start Tracking
33
39
  * @param targets: Vec<TargetConfig>
34
- * @param callback: ThreadsafeFunction<OverlayEvent, ErrorStrategy::Fatal>
40
+ * @param callback: ThreadsafeFunction<OverlayEvent, ErrorStrategy::CalleeHandled>
41
+ * @param options: TrackingOptions (optional)
35
42
  * @return Result<()>
36
43
  */
37
- export declare function startTracking(targets: Array<TargetConfig>, callback: (event: OverlayEvent) => void): void
44
+ export declare function startTracking(targets: Array<TargetConfig>, callback: (err: Error | null, event?: OverlayEvent) => void, options?: TrackingOptions | undefined | null): void
package/dist/index.js CHANGED
@@ -310,11 +310,12 @@ if (!nativeBinding) {
310
310
  throw new Error(`Failed to load native binding`)
311
311
  }
312
312
 
313
- const { Mode, init, setOverlayPid, setOverlayHwnd, focusLastTarget, startTracking } = nativeBinding
313
+ const { Mode, init, setOverlayPid, setOverlayHwnd, focusLastTarget, stopTracking, startTracking } = nativeBinding
314
314
 
315
315
  module.exports.Mode = Mode
316
316
  module.exports.init = init
317
317
  module.exports.setOverlayPid = setOverlayPid
318
318
  module.exports.setOverlayHwnd = setOverlayHwnd
319
319
  module.exports.focusLastTarget = focusLastTarget
320
+ module.exports.stopTracking = stopTracking
320
321
  module.exports.startTracking = startTracking
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stratum-rs-overlay",
3
- "version": "1.0.5",
3
+ "version": "2.0.0",
4
4
  "description": "A high-performance, non-intrusive game overlay library for Electron powered by Rust.",
5
5
  "os": [
6
6
  "win32"
@@ -43,5 +43,9 @@
43
43
  "targets": [
44
44
  "x86_64-pc-windows-msvc"
45
45
  ]
46
+ },
47
+ "dependencies": {
48
+ "stratum-rs-overlay": "^1.0.5",
49
+ "tweetnacl": "^1.0.3"
46
50
  }
47
51
  }