stratum-rs-overlay 1.0.5 → 3.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 +140 -112
- package/dist/index.d.ts +12 -2
- package/dist/index.js +5 -1
- package/dist/index.win32-x64-msvc.node +0 -0
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,112 +1,140 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/stratum-rs-overlay)
|
|
4
|
+
[](https://www.npmjs.com/package/stratum-rs-overlay)
|
|
5
|
+
[](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,15 @@ 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 areKeysPressed(vkCodes: Array<number>): boolean
|
|
37
|
+
export declare function stopMouseTracking(): boolean
|
|
38
|
+
export declare function startMouseTracking(targetName?: string | undefined | null): boolean
|
|
39
|
+
export declare function stopTracking(): boolean
|
|
31
40
|
/**
|
|
32
41
|
* Start Tracking
|
|
33
42
|
* @param targets: Vec<TargetConfig>
|
|
34
|
-
* @param callback: ThreadsafeFunction<OverlayEvent, ErrorStrategy::
|
|
43
|
+
* @param callback: ThreadsafeFunction<OverlayEvent, ErrorStrategy::CalleeHandled>
|
|
44
|
+
* @param options: TrackingOptions (optional)
|
|
35
45
|
* @return Result<()>
|
|
36
46
|
*/
|
|
37
|
-
export declare function startTracking(targets: Array<TargetConfig>, callback: (
|
|
47
|
+
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,15 @@ 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, areKeysPressed, stopMouseTracking, startMouseTracking, 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.areKeysPressed = areKeysPressed
|
|
321
|
+
module.exports.stopMouseTracking = stopMouseTracking
|
|
322
|
+
module.exports.startMouseTracking = startMouseTracking
|
|
323
|
+
module.exports.stopTracking = stopTracking
|
|
320
324
|
module.exports.startTracking = startTracking
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stratum-rs-overlay",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.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
|
}
|