@prototypevip/baileys 0.0.7 → 0.0.8
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/lib/Socket/index.js +2 -52
- package/lib/index.js +0 -2
- package/package.json +3 -7
- package/lib/AntiBan/antiban.js +0 -922
- package/lib/AntiBan/banRecoveryOrchestrator.js +0 -284
- package/lib/AntiBan/contactGraph.js +0 -236
- package/lib/AntiBan/contentVariator.js +0 -150
- package/lib/AntiBan/credsSnapshot.js +0 -121
- package/lib/AntiBan/deliveryTracker.js +0 -107
- package/lib/AntiBan/deviceFingerprint.js +0 -106
- package/lib/AntiBan/fleetEventStore.js +0 -157
- package/lib/AntiBan/groupOperationGuard.js +0 -116
- package/lib/AntiBan/health.js +0 -207
- package/lib/AntiBan/humanEntropy.js +0 -337
- package/lib/AntiBan/index.js +0 -77
- package/lib/AntiBan/instanceCoordinator.js +0 -175
- package/lib/AntiBan/jidCanonicalizer.js +0 -256
- package/lib/AntiBan/jidCircuitBreaker.js +0 -186
- package/lib/AntiBan/legitimacySignalInjector.js +0 -231
- package/lib/AntiBan/lidFirstResolver.js +0 -174
- package/lib/AntiBan/lidResolver.js +0 -324
- package/lib/AntiBan/messageQueue.js +0 -187
- package/lib/AntiBan/messageRecovery.js +0 -283
- package/lib/AntiBan/messageTypeRegistry.js +0 -369
- package/lib/AntiBan/observability.js +0 -145
- package/lib/AntiBan/patch.js +0 -302
- package/lib/AntiBan/persist.js +0 -87
- package/lib/AntiBan/presenceChoreographer.js +0 -430
- package/lib/AntiBan/presets.js +0 -105
- package/lib/AntiBan/profiles.js +0 -31
- package/lib/AntiBan/proxyRotator.js +0 -306
- package/lib/AntiBan/rateLimiter.js +0 -261
- package/lib/AntiBan/readReceiptVariance.js +0 -88
- package/lib/AntiBan/reconnectThrottle.js +0 -180
- package/lib/AntiBan/replyRatio.js +0 -161
- package/lib/AntiBan/reputationVoucher.js +0 -373
- package/lib/AntiBan/retryReason.js +0 -91
- package/lib/AntiBan/retryTracker.js +0 -172
- package/lib/AntiBan/scheduler.js +0 -111
- package/lib/AntiBan/sessionFingerprint.js +0 -248
- package/lib/AntiBan/sessionStability.js +0 -330
- package/lib/AntiBan/stateAdapter.js +0 -73
- package/lib/AntiBan/stateExport.js +0 -152
- package/lib/AntiBan/stealthConnect.js +0 -130
- package/lib/AntiBan/timelockGuard.js +0 -181
- package/lib/AntiBan/topologyThrottler.js +0 -339
- package/lib/AntiBan/warmup.js +0 -140
- package/lib/AntiBan/webhooks.js +0 -80
- package/lib/AntiBan/wrapper.js +0 -456
package/lib/Socket/index.js
CHANGED
|
@@ -1,46 +1,11 @@
|
|
|
1
1
|
import { DEFAULT_CONNECTION_CONFIG } from "../Defaults/index.js";
|
|
2
2
|
import { makeCommunitiesSocket } from "./communities.js";
|
|
3
|
-
import { wrapSocket, wrapSocketWithFingerprint } from "../AntiBan/wrapper.js";
|
|
4
|
-
import { resolveConfig, PRESETS } from "../AntiBan/presets.js";
|
|
5
3
|
|
|
6
4
|
/**
|
|
7
|
-
* Create a WhatsApp socket.
|
|
8
|
-
*
|
|
9
|
-
* Optional anti-ban protection (integrated from baileys-antiban) can be enabled via config.antiBan:
|
|
10
|
-
*
|
|
11
|
-
* // Disabled (default) — normal Baileys behavior
|
|
12
|
-
* makeWASocket({ auth, ... })
|
|
13
|
-
*
|
|
14
|
-
* // Enable with safe defaults (conservative preset)
|
|
15
|
-
* makeWASocket({ auth, antiBan: true })
|
|
16
|
-
*
|
|
17
|
-
* // Enable with a named preset: 'conservative' | 'moderate' | 'aggressive' | 'high-volume'
|
|
18
|
-
* makeWASocket({ auth, antiBan: 'moderate' })
|
|
19
|
-
*
|
|
20
|
-
* // Enable with full custom config (see baileys-antiban README)
|
|
21
|
-
* makeWASocket({
|
|
22
|
-
* auth,
|
|
23
|
-
* antiBan: {
|
|
24
|
-
* maxPerMinute: 8,
|
|
25
|
-
* maxPerHour: 200,
|
|
26
|
-
* warmUp: { enabled: true },
|
|
27
|
-
* // ... or nested style still accepted with deprecation warning
|
|
28
|
-
* }
|
|
29
|
-
* })
|
|
30
|
-
*
|
|
31
|
-
* When enabled, the returned socket has the same API plus:
|
|
32
|
-
* sock.antiban — AntiBan instance
|
|
33
|
-
* sock.antiban.getStats() — current rate / health / risk stats
|
|
34
|
-
*
|
|
35
|
-
* Extra advanced options (optional):
|
|
36
|
-
* antiBanWarmUpState — restore previous warm-up state
|
|
37
|
-
* antiBanWrapOptions — extra wrap options (groupOpGuard, legitimacySignals, etc.)
|
|
38
|
-
*
|
|
39
|
-
* You can also use the low-level helpers directly:
|
|
40
|
-
* import { wrapSocket, wrapSocketWithFingerprint, PRESETS } from '@prototypevip/baileys'
|
|
5
|
+
* Create a WhatsApp socket (clean — no anti-ban wrapper).
|
|
41
6
|
*/
|
|
42
7
|
const makeWASocket = (config = {}) => {
|
|
43
|
-
//
|
|
8
|
+
// strip antiBan options if present so they don't leak into internal config
|
|
44
9
|
const {
|
|
45
10
|
antiBan,
|
|
46
11
|
antiBanWarmUpState,
|
|
@@ -58,22 +23,7 @@ const makeWASocket = (config = {}) => {
|
|
|
58
23
|
};
|
|
59
24
|
|
|
60
25
|
sock = makeCommunitiesSocket(newConfig);
|
|
61
|
-
|
|
62
|
-
// Optional anti-ban wrapping
|
|
63
|
-
if (antiBan) {
|
|
64
|
-
let antibanConfig;
|
|
65
|
-
if (antiBan === true) {
|
|
66
|
-
antibanConfig = resolveConfig(undefined); // conservative defaults
|
|
67
|
-
} else if (typeof antiBan === "string") {
|
|
68
|
-
antibanConfig = resolveConfig(antiBan);
|
|
69
|
-
} else {
|
|
70
|
-
antibanConfig = antiBan; // user object (supports both flat & nested)
|
|
71
|
-
}
|
|
72
|
-
sock = wrapSocket(sock, antibanConfig, antiBanWarmUpState, antiBanWrapOptions);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
26
|
return sock;
|
|
76
27
|
};
|
|
77
28
|
|
|
78
29
|
export default makeWASocket;
|
|
79
|
-
export { wrapSocket, wrapSocketWithFingerprint, PRESETS };
|
package/lib/index.js
CHANGED
|
@@ -9,8 +9,6 @@ export * from "./WAM/index.js";
|
|
|
9
9
|
export * from "./WAUSync/index.js";
|
|
10
10
|
export * from "./Store/cache-factory.js";
|
|
11
11
|
|
|
12
|
-
// Anti-ban toolkit (optional, integrated from baileys-antiban)
|
|
13
|
-
export * from "./AntiBan/index.js";
|
|
14
12
|
export { wrapSocket, wrapSocketWithFingerprint } from "./Socket/index.js";
|
|
15
13
|
|
|
16
14
|
export { makeWASocket };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prototypevip/baileys",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Baileys fork
|
|
3
|
+
"version": "0.0.8",
|
|
4
|
+
"description": "Baileys fork (@prototypevip/baileys) — clean, without anti-ban",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
@@ -34,11 +34,7 @@
|
|
|
34
34
|
"whatsapp-bot",
|
|
35
35
|
"whatsapp-chat",
|
|
36
36
|
"whatsapp-group",
|
|
37
|
-
"whatsapp-web"
|
|
38
|
-
"anti-ban",
|
|
39
|
-
"rate-limit",
|
|
40
|
-
"warmup",
|
|
41
|
-
"baileys-antiban"
|
|
37
|
+
"whatsapp-web"
|
|
42
38
|
],
|
|
43
39
|
"homepage": "https://github.com/GSK-F/baileys",
|
|
44
40
|
"author": "The Prototype",
|