@zetagoaurum-socket/wasocket 2.2.2 → 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/LICENSE +1 -1
- package/README.md +84 -67
- package/WAProto/GenerateStatics.sh +4 -0
- package/WAProto/WAProto.proto +3344 -0
- package/WAProto/index.d.ts +37016 -0
- package/WAProto/index.js +79296 -118676
- package/WASignalGroup/GroupProtocol.js +1697 -0
- package/WASignalGroup/ciphertext_message.js +16 -0
- package/WASignalGroup/group_cipher.js +120 -0
- package/WASignalGroup/group_session_builder.js +46 -0
- package/WASignalGroup/index.js +5 -0
- package/WASignalGroup/keyhelper.js +21 -0
- package/WASignalGroup/protobufs.js +3 -0
- package/WASignalGroup/queue_job.js +69 -0
- package/WASignalGroup/sender_chain_key.js +50 -0
- package/WASignalGroup/sender_key_distribution_message.js +78 -0
- package/WASignalGroup/sender_key_message.js +92 -0
- package/WASignalGroup/sender_key_name.js +70 -0
- package/WASignalGroup/sender_key_record.js +56 -0
- package/WASignalGroup/sender_key_state.js +129 -0
- package/{lib/Signal/Group/sender-message-key.js → WASignalGroup/sender_message_key.js} +16 -6
- package/lib/Defaults/baileys-version.json +1 -1
- package/lib/Defaults/index.js +9 -50
- package/lib/Signal/libsignal.js +29 -51
- package/lib/Socket/business.d.ts +2 -3
- package/lib/Socket/chats.d.ts +28 -215
- package/lib/Socket/chats.js +70 -185
- package/lib/Socket/dugong.js +141 -432
- package/lib/Socket/groups.js +23 -20
- package/lib/Socket/index.js +15 -2
- package/lib/Socket/messages-recv.d.ts +55 -56
- package/lib/Socket/messages-recv.js +112 -370
- package/lib/Socket/messages-send.d.ts +2 -3
- package/lib/Socket/messages-send.js +368 -465
- package/lib/Socket/newsletter.js +28 -175
- package/lib/Socket/socket.js +174 -203
- package/lib/Socket/usync.d.ts +3 -3
- package/lib/Types/GroupMetadata.d.ts +0 -1
- package/lib/Types/Newsletter.d.ts +86 -97
- package/lib/Types/Newsletter.js +32 -38
- package/lib/Utils/chat-utils.js +3 -17
- package/lib/Utils/generics.js +31 -68
- package/lib/Utils/history.js +1 -6
- package/lib/Utils/link-preview.js +2 -4
- package/lib/Utils/messages-media.js +57 -145
- package/lib/Utils/messages.js +305 -89
- package/lib/Utils/signal.js +46 -48
- package/lib/Utils/use-multi-file-auth-state.js +6 -45
- package/lib/Utils/validate-connection.js +65 -91
- package/lib/WABinary/constants.d.ts +24 -27
- package/lib/WABinary/encode.js +123 -160
- package/lib/WABinary/generic-utils.d.ts +0 -2
- package/lib/WABinary/generic-utils.js +36 -124
- package/lib/WABinary/jid-utils.js +26 -5
- package/lib/WAUSync/Fall +1 -0
- package/lib/WAUSync/Protocols/Fal +1 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -9
- package/package.json +100 -105
- package/engine-requirements.js +0 -10
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -9
- package/lib/Signal/Group/ciphertext-message.js +0 -15
- package/lib/Signal/Group/group-session-builder.d.ts +0 -14
- package/lib/Signal/Group/group-session-builder.js +0 -64
- package/lib/Signal/Group/group_cipher.d.ts +0 -17
- package/lib/Signal/Group/group_cipher.js +0 -96
- package/lib/Signal/Group/index.d.ts +0 -11
- package/lib/Signal/Group/index.js +0 -57
- package/lib/Signal/Group/keyhelper.d.ts +0 -10
- package/lib/Signal/Group/keyhelper.js +0 -55
- package/lib/Signal/Group/queue-job.d.ts +0 -1
- package/lib/Signal/Group/queue-job.js +0 -57
- package/lib/Signal/Group/sender-chain-key.d.ts +0 -13
- package/lib/Signal/Group/sender-chain-key.js +0 -34
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -16
- package/lib/Signal/Group/sender-key-distribution-message.js +0 -66
- package/lib/Signal/Group/sender-key-message.d.ts +0 -18
- package/lib/Signal/Group/sender-key-message.js +0 -69
- package/lib/Signal/Group/sender-key-name.d.ts +0 -17
- package/lib/Signal/Group/sender-key-name.js +0 -51
- package/lib/Signal/Group/sender-key-record.d.ts +0 -30
- package/lib/Signal/Group/sender-key-record.js +0 -53
- package/lib/Signal/Group/sender-key-state.d.ts +0 -38
- package/lib/Signal/Group/sender-key-state.js +0 -99
- package/lib/Signal/Group/sender-message-key.d.ts +0 -11
- package/lib/Socket/chats.js.bak +0 -981
- package/lib/Socket/dugong.d.ts +0 -254
- package/lib/Types/USync.d.ts +0 -25
- package/lib/Types/USync.js +0 -2
- package/lib/Utils/anti-crash.js +0 -20
- package/lib/Utils/auto-contact.js +0 -74
- package/lib/Utils/generics.js.bak +0 -433
- package/lib/Utils/validate-connection.js.bak +0 -237
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,97 +1,98 @@
|
|
|
1
|
-
#
|
|
1
|
+
# WhatsApp Baileys
|
|
2
2
|
|
|
3
|
-
<
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://files.catbox.moe/1jr5sg.jpg" alt="Thumbnail" />
|
|
5
|
+
</p>
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-

|
|
7
|
+
/*
|
|
8
|
+
©2025 FallZx Infinity. All Rights Reserved.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
Type: Lily-Baileys WhatsApp Bot
|
|
11
|
+
Creator: FallZx Infinity
|
|
12
|
+
YouTube: fallzx-features
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
PROHIBITED:
|
|
15
|
+
- Copying any part of this code without explicit permission.
|
|
16
|
+
- Selling, redistributing, or modifying the code without the author's approval.
|
|
17
|
+
- Claiming this project as your own.
|
|
18
|
+
|
|
19
|
+
WARNING:
|
|
20
|
+
Any act of plagiarism, data theft, or illegal redistribution of this project
|
|
21
|
+
will be subject to legal action under applicable intellectual property laws.
|
|
22
|
+
|
|
23
|
+
This project is NOT open-source. Unauthorized use of the code is strictly forbidden.
|
|
24
|
+
|
|
25
|
+
For collaboration or usage permissions, please contact via YouTube: fallzx-features
|
|
26
|
+
*/
|
|
13
27
|
|
|
14
|
-
</div>
|
|
15
28
|
|
|
16
29
|
---
|
|
17
30
|
|
|
18
|
-
|
|
31
|
+
### 🚀 Key Features & Benefits
|
|
19
32
|
|
|
20
|
-
|
|
33
|
+
- 🔐 Flexible Pairing Options
|
|
34
|
+
Supports both automatic and custom pairing methods for seamless connectivity.
|
|
21
35
|
|
|
22
|
-
|
|
36
|
+
- 🛠️ Improved Stability
|
|
37
|
+
Resolves previous pairing issues that caused connection failures or unexpected disconnections.
|
|
23
38
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* **Persistent Auto-Follow**: Built-in script that keeps your bot subscribed to developer channels (Credits support).
|
|
27
|
-
* **Stylish TUI**: Beautiful colored console output with ASCII art and clear error logs (`ANTI-KILL`).
|
|
28
|
-
* **Auto-Update**: Checks for the latest version on startup.
|
|
39
|
+
- 💬 Rich Interactive Messaging
|
|
40
|
+
Enables interactive messages, action buttons, and dynamic menus for engaging user experiences.
|
|
29
41
|
|
|
30
|
-
|
|
42
|
+
- 🔄 Smart Session Management
|
|
43
|
+
Automatically manages sessions efficiently to ensure consistent and reliable performance.
|
|
31
44
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
* **Traffic Jitter**: Implemented randomized timing for "keep-alive" pings (1-6s jitter) to disrupt robotic traffic pattern analysis.
|
|
35
|
-
* **Human Latency**: Increased default timeouts (`connectTimeoutMs: 60s`) to mimic human network behavior.
|
|
36
|
-
* **Trust Score**: Enabled `syncFullHistory` and `generateHighQualityLinkPreview` to behave more like a legitimate "Companion" device.
|
|
45
|
+
- 📱 Multi-Device Compatibility
|
|
46
|
+
Fully compatible with the latest WhatsApp multi-device capabilities.
|
|
37
47
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* **Flexibility**: Works seamlessly with any pairing number or custom key format.
|
|
48
|
+
- ⚙️ Lightweight & Easy Integration
|
|
49
|
+
Designed to be lightweight, stable, and easy to embed into a wide range of systems.
|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* **Clean Fingerprint**: Removed all legacy tracking codes and "bot" markers.
|
|
51
|
+
- 🤖 Ideal for Bots & Automation
|
|
52
|
+
Perfect for building chatbots, customer service automation, and full-scale communication solutions.
|
|
45
53
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
* **High Stability**: Optimized for long-running sessions with automatic reconnection logic.
|
|
54
|
+
- 📘 Developer-Friendly Resources
|
|
55
|
+
# ZetaGo-Aurum - WASOCKET (Legacy Baileys Fork)
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
> **Premium WhatsApp Web API Library**
|
|
58
|
+
> Maintained by **ZetaGo-Aurum** | Based on `FallEzz/baileys-bussines` & `WhiskeySockets/Baileys`
|
|
51
59
|
|
|
52
|
-
|
|
60
|
+

|
|
53
61
|
|
|
54
|
-
|
|
62
|
+
## Installation
|
|
55
63
|
|
|
56
64
|
```bash
|
|
57
65
|
npm install @zetagoaurum-socket/wasocket
|
|
58
|
-
# or install directly from GitHub (Recommended if NPM fails)
|
|
59
|
-
npm install github:ZetaGo-Aurum/baileys-V1
|
|
60
|
-
# or
|
|
61
|
-
yarn add github:ZetaGo-Aurum/baileys-V1
|
|
62
66
|
# or
|
|
63
|
-
yarn add @zetagoaurum-socket/
|
|
67
|
+
yarn add @zetagoaurum-socket/wasocket
|
|
64
68
|
```
|
|
65
69
|
|
|
66
|
-
##
|
|
70
|
+
## Features (v3.0.0)
|
|
67
71
|
|
|
68
|
-
|
|
72
|
+
- **Robust Message Handling**: Optimized for high-throughput and reliability.
|
|
73
|
+
- **Hybrid AI Badging**: Smartly switches between `biz_bot` (Private) and `supportPayload` (Group) to prevent drops.
|
|
74
|
+
- **Interactive Messages**: Full support for Buttons, Lists, Payment, Product, Album, Event, and Polls via `dugong.js` integration.
|
|
75
|
+
- **Bad MAC Auto-Retry**: Automatically recovers from decryption errors by forcing session resets.
|
|
76
|
+
- **Anti-Crash**: Built-in protections against common runtime errors (Axios 400, etc.).
|
|
77
|
+
- **Stylish Console**: New startup banner and colored logs.
|
|
78
|
+
|
|
79
|
+
## Usage
|
|
69
80
|
|
|
70
81
|
```javascript
|
|
71
|
-
const {
|
|
82
|
+
const { makeWASocket, useMultiFileAuthState } = require('@zetagoaurum-socket/wasocket');
|
|
72
83
|
|
|
73
84
|
async function connectToWhatsApp() {
|
|
74
85
|
const { state, saveCreds } = await useMultiFileAuthState('auth_info_baileys');
|
|
75
|
-
|
|
76
86
|
const sock = makeWASocket({
|
|
77
87
|
auth: state,
|
|
78
|
-
printQRInTerminal:
|
|
79
|
-
// Browser masquerading is handled automatically!
|
|
88
|
+
printQRInTerminal: true
|
|
80
89
|
});
|
|
81
90
|
|
|
82
|
-
if (usePairingCode && !sock.authState.creds.registered) {
|
|
83
|
-
// Pairing code is now robust and handles formatting automatically!
|
|
84
|
-
const code = await sock.requestPairingCode('6281234567890');
|
|
85
|
-
console.log(`Pairing code: ${code}`);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
91
|
sock.ev.on('creds.update', saveCreds);
|
|
89
|
-
|
|
90
92
|
sock.ev.on('connection.update', (update) => {
|
|
91
93
|
const { connection, lastDisconnect } = update;
|
|
92
94
|
if(connection === 'close') {
|
|
93
|
-
const shouldReconnect = lastDisconnect.error?.output?.statusCode !== DisconnectReason.loggedOut;
|
|
94
|
-
console.log('connection closed due to ', lastDisconnect.error, ', reconnecting ', shouldReconnect);
|
|
95
|
+
const shouldReconnect = (lastDisconnect.error)?.output?.statusCode !== DisconnectReason.loggedOut;
|
|
95
96
|
if(shouldReconnect) {
|
|
96
97
|
connectToWhatsApp();
|
|
97
98
|
}
|
|
@@ -100,26 +101,42 @@ async function connectToWhatsApp() {
|
|
|
100
101
|
}
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
|
-
|
|
104
104
|
connectToWhatsApp();
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
---
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
### 🚀 Getting Started
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
1. **Packet Inspection Prevention**: Headers are normalized to look like official clients.
|
|
114
|
-
2. **Rate Limiting**: Built-in delays prevent you from sending messages too fast (the #1 cause of bans).
|
|
115
|
-
3. **Clean Dependencies**: We removed all dubious "peer dependencies" that were present in previous forks.
|
|
111
|
+
Begin by installing the library via your preferred package manager, then follow the provided configuration guide. You can also utilize the ready-made example codes to understand how the features work. Use session storage and interactive messaging features to build complete, stable solutions tailored to your project's or business's specific needs.
|
|
116
112
|
|
|
117
113
|
---
|
|
118
114
|
|
|
119
|
-
##
|
|
115
|
+
## ✨ Fitur Unggulan
|
|
116
|
+
|
|
117
|
+
• ✅ Supports custom pairing codes that are stable and secure
|
|
118
|
+
Mendukung kode pairing kustom yang stabil dan aman untuk koneksi WhatsApp.
|
|
119
|
+
|
|
120
|
+
• 🛠️ Fixes previous issues related to pairing and authentication
|
|
121
|
+
Telah diperbaiki dari berbagai masalah sebelumnya terkait pairing dan otentikasi.
|
|
122
|
+
|
|
123
|
+
• 💬 Features interactive messages and action buttons for dynamic menu creation
|
|
124
|
+
Menyediakan fitur pesan interaktif dan tombol aksi untuk membuat menu dinamis dengan mudah.
|
|
125
|
+
|
|
126
|
+
• 🔄 Automatic and efficient session management for long-term stability
|
|
127
|
+
Manajemen sesi otomatis dan efisien untuk kestabilan penggunaan jangka panjang.
|
|
128
|
+
|
|
129
|
+
• 📱 Compatible with the latest multi-device features from WhatsApp
|
|
130
|
+
Kompatibel dengan fitur multi-perangkat terbaru dari WhatsApp.
|
|
131
|
+
|
|
132
|
+
• ⚙️ Easy to integrate and customize based on your needs
|
|
133
|
+
Mudah diintegrasikan dan dikustomisasi sesuai kebutuhan pengembanganmu.
|
|
134
|
+
|
|
135
|
+
• 🤖 Perfect for developing bots, customer service automation, and other communication applications
|
|
136
|
+
Cocok untuk membuat bot, otomatisasi layanan pelanggan, atau aplikasi komunikasi lainnya.
|
|
137
|
+
|
|
138
|
+
---
|
|
120
139
|
|
|
121
|
-
This project is
|
|
140
|
+
📚 For full documentation, installation instructions, and usage examples, please refer to the official GitHub repository and join the community discussions. This project is actively maintained and continuously improved to support developers building modern WhatsApp automation solutions.
|
|
122
141
|
|
|
123
|
-
|
|
124
|
-
<sub>Built with ❤️ by the ZetaGo Team</sub>
|
|
125
|
-
</div>
|
|
142
|
+
🙏 Thank you for choosing WhatsApp Baileys as your trusted tool for WhatsApp automation. We appreciate your support!
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
yarn pbjs -t static-module -w commonjs -o ./WAProto/index.js ./WAProto/WAProto.proto;
|
|
2
|
+
yarn pbts -o ./WAProto/index.d.ts ./WAProto/index.js;
|
|
3
|
+
|
|
4
|
+
#protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=env=node,useOptionals=true,forceLong=long --ts_proto_out=. ./src/Binary/WAMessage.proto;
|