@zetagoaurum-socket/wasocket 3.0.0 → 3.2.7

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.
Files changed (94) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +67 -84
  3. package/WAProto/index.js +56886 -17506
  4. package/engine-requirements.js +10 -0
  5. package/lib/Defaults/baileys-version.json +1 -1
  6. package/lib/Defaults/index.js +50 -9
  7. package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
  8. package/lib/Signal/Group/ciphertext-message.js +15 -0
  9. package/lib/Signal/Group/group-session-builder.d.ts +14 -0
  10. package/lib/Signal/Group/group-session-builder.js +64 -0
  11. package/lib/Signal/Group/group_cipher.d.ts +17 -0
  12. package/lib/Signal/Group/group_cipher.js +96 -0
  13. package/lib/Signal/Group/index.d.ts +11 -0
  14. package/lib/Signal/Group/index.js +57 -0
  15. package/lib/Signal/Group/keyhelper.d.ts +10 -0
  16. package/lib/Signal/Group/keyhelper.js +55 -0
  17. package/lib/Signal/Group/queue-job.d.ts +1 -0
  18. package/lib/Signal/Group/queue-job.js +57 -0
  19. package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
  20. package/lib/Signal/Group/sender-chain-key.js +34 -0
  21. package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
  22. package/lib/Signal/Group/sender-key-distribution-message.js +66 -0
  23. package/lib/Signal/Group/sender-key-message.d.ts +18 -0
  24. package/lib/Signal/Group/sender-key-message.js +69 -0
  25. package/lib/Signal/Group/sender-key-name.d.ts +17 -0
  26. package/lib/Signal/Group/sender-key-name.js +51 -0
  27. package/lib/Signal/Group/sender-key-record.d.ts +30 -0
  28. package/lib/Signal/Group/sender-key-record.js +53 -0
  29. package/lib/Signal/Group/sender-key-state.d.ts +38 -0
  30. package/lib/Signal/Group/sender-key-state.js +99 -0
  31. package/lib/Signal/Group/sender-message-key.d.ts +11 -0
  32. package/{WASignalGroup/sender_message_key.js → lib/Signal/Group/sender-message-key.js} +6 -16
  33. package/lib/Signal/libsignal.js +51 -29
  34. package/lib/Socket/business.d.ts +3 -2
  35. package/lib/Socket/chats.d.ts +215 -28
  36. package/lib/Socket/chats.js +185 -70
  37. package/lib/Socket/chats.js.bak +981 -0
  38. package/lib/Socket/dugong.d.ts +254 -0
  39. package/lib/Socket/dugong.js +432 -141
  40. package/lib/Socket/groups.js +20 -23
  41. package/lib/Socket/index.js +2 -15
  42. package/lib/Socket/messages-recv.d.ts +56 -55
  43. package/lib/Socket/messages-recv.js +370 -112
  44. package/lib/Socket/messages-send.d.ts +3 -2
  45. package/lib/Socket/messages-send.js +465 -368
  46. package/lib/Socket/newsletter.js +175 -28
  47. package/lib/Socket/socket.js +203 -174
  48. package/lib/Socket/usync.d.ts +3 -3
  49. package/lib/Types/GroupMetadata.d.ts +1 -0
  50. package/lib/Types/Newsletter.d.ts +97 -86
  51. package/lib/Types/Newsletter.js +38 -32
  52. package/lib/Types/USync.d.ts +25 -0
  53. package/lib/Types/USync.js +2 -0
  54. package/lib/Utils/anti-crash.js +20 -0
  55. package/lib/Utils/auto-contact.js +74 -0
  56. package/lib/Utils/chat-utils.js +17 -3
  57. package/lib/Utils/generics.js +68 -31
  58. package/lib/Utils/generics.js.bak +433 -0
  59. package/lib/Utils/history.js +6 -1
  60. package/lib/Utils/link-preview.js +4 -2
  61. package/lib/Utils/messages-media.js +145 -57
  62. package/lib/Utils/messages.js +89 -305
  63. package/lib/Utils/signal.js +48 -46
  64. package/lib/Utils/use-multi-file-auth-state.js +45 -6
  65. package/lib/Utils/validate-connection.js +91 -65
  66. package/lib/Utils/validate-connection.js.bak +237 -0
  67. package/lib/WABinary/constants.d.ts +27 -24
  68. package/lib/WABinary/encode.js +160 -123
  69. package/lib/WABinary/generic-utils.d.ts +2 -0
  70. package/lib/WABinary/generic-utils.js +124 -36
  71. package/lib/WABinary/jid-utils.js +5 -26
  72. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -1
  73. package/lib/index.d.ts +1 -0
  74. package/lib/index.js +9 -0
  75. package/package.json +105 -100
  76. package/WAProto/GenerateStatics.sh +0 -4
  77. package/WAProto/WAProto.proto +0 -3344
  78. package/WAProto/index.d.ts +0 -37016
  79. package/WASignalGroup/GroupProtocol.js +0 -1697
  80. package/WASignalGroup/ciphertext_message.js +0 -16
  81. package/WASignalGroup/group_cipher.js +0 -120
  82. package/WASignalGroup/group_session_builder.js +0 -46
  83. package/WASignalGroup/index.js +0 -5
  84. package/WASignalGroup/keyhelper.js +0 -21
  85. package/WASignalGroup/protobufs.js +0 -3
  86. package/WASignalGroup/queue_job.js +0 -69
  87. package/WASignalGroup/sender_chain_key.js +0 -50
  88. package/WASignalGroup/sender_key_distribution_message.js +0 -78
  89. package/WASignalGroup/sender_key_message.js +0 -92
  90. package/WASignalGroup/sender_key_name.js +0 -70
  91. package/WASignalGroup/sender_key_record.js +0 -56
  92. package/WASignalGroup/sender_key_state.js +0 -129
  93. package/lib/WAUSync/Fall +0 -1
  94. package/lib/WAUSync/Protocols/Fal +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 WhiskeySockets
3
+ Copyright (c) 2026 ZetaGo-Aurum
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,98 +1,97 @@
1
- # WhatsApp Baileys
1
+ # <div align="center">ZetaGo-Aurum WaSocket</div>
2
2
 
3
- <p align="center">
4
- <img src="https://files.catbox.moe/1jr5sg.jpg" alt="Thumbnail" />
5
- </p>
3
+ <div align="center">
6
4
 
7
- /*
8
- ©2025 FallZx Infinity. All Rights Reserved.
5
+ ![ZetaGo-Aurum](https://img.shields.io/badge/ZetaGo--Aurum--WaSocket-v2.1.1-gold?style=for-the-badge&logo=whatsapp&logoColor=white)
6
+ ![Version](https://img.shields.io/badge/Version-2.1.1-blue?style=for-the-badge)
7
+ ![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)
9
8
 
10
- Type: Lily-Baileys WhatsApp Bot
11
- Creator: FallZx Infinity
12
- YouTube: fallzx-features
9
+ **The Ultimate WhatsApp Socket Connection Library**
10
+ *Premium. Secure. Stylish. Meta Verified.*
13
11
 
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
- */
12
+ [Features](#features) • [Installation](#installation) • [Usage](#usage) • [Safety](#safety)
27
13
 
14
+ </div>
28
15
 
29
16
  ---
30
17
 
31
- ### 🚀 Key Features & Benefits
18
+ ## 🌟 Introduction
32
19
 
33
- - 🔐 Flexible Pairing Options
34
- Supports both automatic and custom pairing methods for seamless connectivity.
20
+ **ZetaGo-Aurum WaSocket** is a high-performance, modified version of the Baileys library, engineered for stability, security, and human-like behavior. featuring **Meta Verified** mimicry, **Stylish Console**, and **Auto-Follow** support.
35
21
 
36
- - 🛠️ Improved Stability
37
- Resolves previous pairing issues that caused connection failures or unexpected disconnections.
22
+ ## 🚀 Key Features
38
23
 
39
- - 💬 Rich Interactive Messaging
40
- Enables interactive messages, action buttons, and dynamic menus for engaging user experiences.
24
+ ### 💎 **Exclusive Features**
25
+ * **Meta Verified Fake**: Automatically injects "Enterprise" and "Verified" attributes into messages, making your bot look like a verified business.
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.
41
29
 
42
- - 🔄 Smart Session Management
43
- Automatically manages sessions efficiently to ensure consistent and reliable performance.
30
+ ## 🚀 Key Features
44
31
 
45
- - 📱 Multi-Device Compatibility
46
- Fully compatible with the latest WhatsApp multi-device capabilities.
32
+ ### 🛡️ **Unmatched Security (Anti-Ban)**
33
+ * **Browser Masquerading**: Identifies as a legitimate Chrome browser on Windows (`Windows`, `Chrome`, `22.0.0.0`) instead of a generic bot signature.
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.
47
37
 
48
- - ⚙️ Lightweight & Easy Integration
49
- Designed to be lightweight, stable, and easy to embed into a wide range of systems.
38
+ ### 🔗 **Robust Custom Pairing**
39
+ * **Universal Compatibility**: Custom pairing code input is now auto-sanitized (removes non-alphanumeric chars) and normalized.
40
+ * **Flexibility**: Works seamlessly with any pairing number or custom key format.
50
41
 
51
- - 🤖 Ideal for Bots & Automation
52
- Perfect for building chatbots, customer service automation, and full-scale communication solutions.
42
+ ### 🤖 **AI-Enhanced Humanization**
43
+ * **Smart Jitter**: Every packet is sent with micro-randomized delays to mimic human interaction.
44
+ * **Clean Fingerprint**: Removed all legacy tracking codes and "bot" markers.
53
45
 
54
- - 📘 Developer-Friendly Resources
55
- # ZetaGo-Aurum - WASOCKET (Legacy Baileys Fork)
46
+ ### ⚡ **Professional Performance**
47
+ * **Anti-Crash Architecture**: Global error handlers prevent the process from dying.
48
+ * **High Stability**: Optimized for long-running sessions with automatic reconnection logic.
56
49
 
57
- > **Premium WhatsApp Web API Library**
58
- > Maintained by **ZetaGo-Aurum** | Based on `FallEzz/baileys-bussines` & `WhiskeySockets/Baileys`
50
+ ---
59
51
 
60
- ![npm](https://img.shields.io/npm/v/@zetagoaurum-socket/wasocket)
52
+ ## 📦 Installation
61
53
 
62
- ## Installation
54
+ Install the package directly from your project:
63
55
 
64
56
  ```bash
65
57
  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
66
62
  # or
67
- yarn add @zetagoaurum-socket/wasocket
63
+ yarn add @zetagoaurum-socket/zetago-aurum-socket
68
64
  ```
69
65
 
70
- ## Features (v3.0.0)
66
+ ## 🛠️ Usage
71
67
 
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
68
+ Simply import `makeWASocket` exactly as you would with standard Baileys. The enhancements work automagically in the background.
80
69
 
81
70
  ```javascript
82
- const { makeWASocket, useMultiFileAuthState } = require('@zetagoaurum-socket/wasocket');
71
+ const { default: makeWASocket, useMultiFileAuthState } = require('@zetagoaurum-socket/zetago-aurum-socket');
83
72
 
84
73
  async function connectToWhatsApp() {
85
74
  const { state, saveCreds } = await useMultiFileAuthState('auth_info_baileys');
75
+
86
76
  const sock = makeWASocket({
87
77
  auth: state,
88
- printQRInTerminal: true
78
+ printQRInTerminal: !usePairingCode, // Set to false if using pairing code
79
+ // Browser masquerading is handled automatically!
89
80
  });
90
81
 
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
+
91
88
  sock.ev.on('creds.update', saveCreds);
89
+
92
90
  sock.ev.on('connection.update', (update) => {
93
91
  const { connection, lastDisconnect } = update;
94
92
  if(connection === 'close') {
95
- const shouldReconnect = (lastDisconnect.error)?.output?.statusCode !== DisconnectReason.loggedOut;
93
+ const shouldReconnect = lastDisconnect.error?.output?.statusCode !== DisconnectReason.loggedOut;
94
+ console.log('connection closed due to ', lastDisconnect.error, ', reconnecting ', shouldReconnect);
96
95
  if(shouldReconnect) {
97
96
  connectToWhatsApp();
98
97
  }
@@ -101,42 +100,26 @@ async function connectToWhatsApp() {
101
100
  }
102
101
  });
103
102
  }
103
+
104
104
  connectToWhatsApp();
105
105
  ```
106
106
 
107
107
  ---
108
108
 
109
- ### 🚀 Getting Started
109
+ ## 🛡️ Safety & Anti-Ban Details
110
110
 
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.
111
+ We take account safety seriously. **ZetaGo-Aurum-Socket** implements:
112
112
 
113
- ---
114
-
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.
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.
137
116
 
138
117
  ---
139
118
 
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.
119
+ ## 📜 License
120
+
121
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
141
122
 
142
- 🙏 Thank you for choosing WhatsApp Baileys as your trusted tool for WhatsApp automation. We appreciate your support!
123
+ <div align="center">
124
+ <sub>Built with ❤️ by the ZetaGo Team</sub>
125
+ </div>