@bellaxchuu/flowred 0.8.6

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 (142) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +214 -0
  3. package/WAProto/GenerateStatics.sh +3 -0
  4. package/WAProto/WAProto.proto +6902 -0
  5. package/WAProto/fix-imports.js +85 -0
  6. package/WAProto/index.js +242946 -0
  7. package/engine-requirements.js +10 -0
  8. package/lib/Defaults/index.js +190 -0
  9. package/lib/Defaults/phonenumber-mcc.json +223 -0
  10. package/lib/Signal/Group/ciphertext-message.js +15 -0
  11. package/lib/Signal/Group/group-session-builder.js +92 -0
  12. package/lib/Signal/Group/group_cipher.js +89 -0
  13. package/lib/Signal/Group/index.js +136 -0
  14. package/lib/Signal/Group/keyhelper.js +73 -0
  15. package/lib/Signal/Group/sender-chain-key.js +32 -0
  16. package/lib/Signal/Group/sender-key-distribution-message.js +66 -0
  17. package/lib/Signal/Group/sender-key-message.js +69 -0
  18. package/lib/Signal/Group/sender-key-name.js +50 -0
  19. package/lib/Signal/Group/sender-key-record.js +44 -0
  20. package/lib/Signal/Group/sender-key-state.js +97 -0
  21. package/lib/Signal/Group/sender-message-key.js +30 -0
  22. package/lib/Signal/libsignal.js +490 -0
  23. package/lib/Signal/lid-mapping.js +262 -0
  24. package/lib/Socket/Client/index.js +30 -0
  25. package/lib/Socket/Client/types.js +13 -0
  26. package/lib/Socket/Client/websocket.js +62 -0
  27. package/lib/Socket/aigroups.js +240 -0
  28. package/lib/Socket/business.js +422 -0
  29. package/lib/Socket/chats.js +1816 -0
  30. package/lib/Socket/communities.js +549 -0
  31. package/lib/Socket/graphql.js +656 -0
  32. package/lib/Socket/groups.js +764 -0
  33. package/lib/Socket/index.js +39 -0
  34. package/lib/Socket/interactive-handler.js +522 -0
  35. package/lib/Socket/interop.js +549 -0
  36. package/lib/Socket/luxu.js +387 -0
  37. package/lib/Socket/managed-account.js +183 -0
  38. package/lib/Socket/messages-recv.js +2440 -0
  39. package/lib/Socket/messages-send.js +1853 -0
  40. package/lib/Socket/mex.js +60 -0
  41. package/lib/Socket/newsletter.js +820 -0
  42. package/lib/Socket/privacy.js +449 -0
  43. package/lib/Socket/registration.js +427 -0
  44. package/lib/Socket/socket.js +1092 -0
  45. package/lib/Socket/text-router.js +83 -0
  46. package/lib/Socket/username.js +243 -0
  47. package/lib/Store/index.js +36 -0
  48. package/lib/Store/keyed-db.js +108 -0
  49. package/lib/Store/make-cache-manager-store.js +90 -0
  50. package/lib/Store/make-in-memory-store.js +604 -0
  51. package/lib/Store/make-ordered-dictionary.js +81 -0
  52. package/lib/Store/object-repository.js +29 -0
  53. package/lib/Types/Auth.js +38 -0
  54. package/lib/Types/Bussines.js +2 -0
  55. package/lib/Types/Call.js +2 -0
  56. package/lib/Types/Chat.js +4 -0
  57. package/lib/Types/Contact.js +2 -0
  58. package/lib/Types/Events.js +2 -0
  59. package/lib/Types/GroupMetadata.js +2 -0
  60. package/lib/Types/Label.js +27 -0
  61. package/lib/Types/LabelAssociation.js +9 -0
  62. package/lib/Types/Message.js +95 -0
  63. package/lib/Types/Mex.js +112 -0
  64. package/lib/Types/Newsletter.js +121 -0
  65. package/lib/Types/Product.js +2 -0
  66. package/lib/Types/Signal.js +2 -0
  67. package/lib/Types/Socket.js +2 -0
  68. package/lib/Types/State.js +70 -0
  69. package/lib/Types/USync.js +2 -0
  70. package/lib/Types/index.js +55 -0
  71. package/lib/Utils/auth-utils.js +306 -0
  72. package/lib/Utils/browser-utils.js +114 -0
  73. package/lib/Utils/business.js +247 -0
  74. package/lib/Utils/chat-utils.js +1208 -0
  75. package/lib/Utils/command-loader.js +100 -0
  76. package/lib/Utils/companion-reg-client-utils.js +42 -0
  77. package/lib/Utils/consumer-application.js +107 -0
  78. package/lib/Utils/crypto.js +155 -0
  79. package/lib/Utils/curve25519-js.js +275 -0
  80. package/lib/Utils/decode-wa-message.js +560 -0
  81. package/lib/Utils/event-buffer.js +607 -0
  82. package/lib/Utils/generics.js +563 -0
  83. package/lib/Utils/group-history.js +60 -0
  84. package/lib/Utils/history.js +244 -0
  85. package/lib/Utils/identity-change-handler.js +52 -0
  86. package/lib/Utils/index.js +57 -0
  87. package/lib/Utils/jid-display-normalization.js +218 -0
  88. package/lib/Utils/link-preview.js +143 -0
  89. package/lib/Utils/logger.js +9 -0
  90. package/lib/Utils/lt-hash.js +39 -0
  91. package/lib/Utils/make-mutex.js +36 -0
  92. package/lib/Utils/message-composer.js +479 -0
  93. package/lib/Utils/message-retry-manager.js +270 -0
  94. package/lib/Utils/messages-media.js +896 -0
  95. package/lib/Utils/messages.js +2904 -0
  96. package/lib/Utils/meta-ai-msmsg.js +262 -0
  97. package/lib/Utils/native-bridge.js +82 -0
  98. package/lib/Utils/noise-handler.js +196 -0
  99. package/lib/Utils/offline-node-processor.js +42 -0
  100. package/lib/Utils/pre-key-manager.js +107 -0
  101. package/lib/Utils/process-message.js +1048 -0
  102. package/lib/Utils/reporting-utils.js +262 -0
  103. package/lib/Utils/session-pool.js +94 -0
  104. package/lib/Utils/signal.js +224 -0
  105. package/lib/Utils/stanza-ack.js +40 -0
  106. package/lib/Utils/sticker.js +145 -0
  107. package/lib/Utils/sync-action-utils.js +54 -0
  108. package/lib/Utils/tc-token-utils.js +161 -0
  109. package/lib/Utils/use-multi-file-auth-state.js +121 -0
  110. package/lib/Utils/validate-connection.js +219 -0
  111. package/lib/Utils/view-once-cache.js +79 -0
  112. package/lib/Utils/voip-rekey.js +22 -0
  113. package/lib/WABinary/constants.js +1304 -0
  114. package/lib/WABinary/decode.js +343 -0
  115. package/lib/WABinary/encode.js +228 -0
  116. package/lib/WABinary/generic-utils.js +240 -0
  117. package/lib/WABinary/index.js +33 -0
  118. package/lib/WABinary/jid-utils.js +361 -0
  119. package/lib/WABinary/types.js +2 -0
  120. package/lib/WAM/BinaryInfo.js +13 -0
  121. package/lib/WAM/constants.js +39486 -0
  122. package/lib/WAM/encode.js +142 -0
  123. package/lib/WAM/index.js +31 -0
  124. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +55 -0
  125. package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +43 -0
  126. package/lib/WAUSync/Protocols/USyncContactProtocol.js +54 -0
  127. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
  128. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
  129. package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +59 -0
  130. package/lib/WAUSync/Protocols/USyncLIDProtocol.js +31 -0
  131. package/lib/WAUSync/Protocols/USyncPictureProtocol.js +32 -0
  132. package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +29 -0
  133. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +39 -0
  134. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +38 -0
  135. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +27 -0
  136. package/lib/WAUSync/Protocols/index.js +39 -0
  137. package/lib/WAUSync/USyncQuery.js +133 -0
  138. package/lib/WAUSync/USyncUser.js +50 -0
  139. package/lib/WAUSync/index.js +31 -0
  140. package/lib/antiban.js +4637 -0
  141. package/lib/index.js +45 -0
  142. package/package.json +107 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Baron
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,214 @@
1
+ 🚀 WBails
2
+
3
+ <p align="center">
4
+ <img src="https://files.catbox.moe/8izozc.png" width="160">
5
+ </p><p align="center">
6
+ <b>High Performance WhatsApp Library powered by Rust WASM</b><br>
7
+ Enhanced Baileys fork with Anti-Ban, Meta AI, MEX GraphQL, Interop, and WA-Web Protocol support.
8
+ </p><p align="center">
9
+ <img src="https://img.shields.io/npm/v/@bellaxchuu/wbails?style=for-the-badge">
10
+ <img src="https://img.shields.io/npm/dt/@bellaxchuu/wbails?style=for-the-badge">
11
+ <img src="https://img.shields.io/badge/Node.js-23+-green?style=for-the-badge">
12
+ <img src="https://img.shields.io/badge/License-MIT-blue?style=for-the-badge">
13
+ </p>---
14
+
15
+ 📦 Package Information
16
+
17
+ Property| Value
18
+ 📦 Package| "@bellaxchuu/wbails"
19
+ 🏷️ Version| "1.1.8"
20
+ 💬 Telegram| https://t.me/Xatanicvxii
21
+ ⚡ Runtime| Node.js 23+
22
+ 🦀 Engine| Rust WASM Bridge
23
+ 🔗 Base| Baileys Fork
24
+
25
+ ---
26
+
27
+ 📚 Table of Contents
28
+
29
+ Getting Started
30
+
31
+ - Installation
32
+ - Running on Termux / Android
33
+ - Running on Pterodactyl
34
+
35
+ Authentication
36
+
37
+ - QR Code Login
38
+ - Pairing Code Login
39
+ - Full History Sync
40
+
41
+ Core Features
42
+
43
+ - Socket Configuration
44
+ - Session Management
45
+ - Event Handling
46
+ - Message Routing
47
+
48
+ Anti-Ban Suite
49
+
50
+ - RateLimiter
51
+ - WarmUp
52
+ - HealthMonitor
53
+ - TimelockGuard
54
+ - PresenceChoreographer
55
+ - wrapSocket
56
+
57
+ Messaging
58
+
59
+ - Text Messages
60
+ - Interactive Messages
61
+ - Media Messages
62
+ - Meta AI Messages
63
+ - Status & Stories
64
+
65
+ Advanced Features
66
+
67
+ - Group Management
68
+ - Privacy Controls
69
+ - User Queries
70
+ - Profile Management
71
+ - Chat Modifiers
72
+
73
+ Internal Protocols
74
+
75
+ - MEX GraphQL
76
+ - USync
77
+ - HTTPS GraphQL
78
+ - WA-Web Port
79
+
80
+ Utilities
81
+
82
+ - Sticker Maker
83
+ - View Once Cache
84
+ - Command Loader
85
+ - Multi Session Pool
86
+ - Store Encryption
87
+
88
+ Rust WASM Bridge
89
+
90
+ ---
91
+
92
+ ✨ What's Different?
93
+
94
+ 🦀 Rust WASM Performance
95
+
96
+ Component| Upstream Baileys| WBails
97
+ Binary Decode| JavaScript| Rust WASM
98
+ Noise Handshake| JavaScript| Rust WASM
99
+ AES / HMAC / HKDF| Node Crypto| Rust WASM
100
+ Signal Protocol| libsignal-node| Rust WASM
101
+
102
+ Benefits
103
+
104
+ - ⚡ Faster packet processing
105
+ - ⚡ Reduced CPU usage
106
+ - ⚡ Better memory efficiency
107
+ - ⚡ Consistent performance across platforms
108
+ - ⚡ Works on Termux without Rust toolchain
109
+
110
+ ---
111
+
112
+ 🔥 Feature Highlights
113
+
114
+ Feature| Description
115
+ 🤖 Meta AI| Full Meta AI integration and message handling
116
+ 🔐 MEX GraphQL| Direct access to WhatsApp internal GraphQL APIs
117
+ 🛡️ Anti-Ban Suite| Multiple protection layers for account safety
118
+ 🌐 Interoperability| Facebook & Instagram messaging support
119
+ 📦 Album Messages| Send multiple media in one message
120
+ 🎨 Sticker Packs| Native sticker pack support
121
+ 📢 Newsletters| Newsletter invite & follower messages
122
+ 🏘️ Communities| Community and subgroup management
123
+ 📞 Call Signalling| Advanced call event support
124
+ 🌍 WA-Web Port| Mobile and Web protocol parity
125
+
126
+ ---
127
+
128
+ 📥 Installation
129
+
130
+ npm install npm:@bellaxchuu/wbails
131
+
132
+ Requirements
133
+
134
+ Node.js >= 23
135
+ npm >= 10
136
+
137
+ Optional Dependencies
138
+
139
+ Package| Purpose
140
+ sharp| Image processing
141
+ jimp| Fallback image processing
142
+ audio-decode| Voice metadata extraction
143
+ link-preview-js| Link preview generation
144
+
145
+ npm install sharp jimp audio-decode link-preview-js
146
+
147
+ ---
148
+
149
+ 🦀 Rust WASM Bridge
150
+
151
+ WBails uses whatsapp-rust-bridge compiled to WebAssembly (WASM).
152
+
153
+ Unlike native ".node" addons, WASM runs on:
154
+
155
+ - Android (Termux)
156
+ - Linux
157
+ - Windows
158
+ - macOS
159
+ - ARM Devices
160
+ - x86 Devices
161
+
162
+ No Rust compiler is required for normal installations.
163
+
164
+ The package ships with a prebuilt ".wasm" binary, allowing it to run immediately after installation.
165
+
166
+ ---
167
+
168
+ 🔬 MEX — WhatsApp Internal GraphQL
169
+
170
+ MEX powers many modern WhatsApp features:
171
+
172
+ - Privacy Settings
173
+ - Usernames
174
+ - Passkeys
175
+ - Profiles
176
+ - Integrity Checks
177
+ - Account Management
178
+
179
+ Example:
180
+
181
+ await sock.setPrivacySetting('LAST_SEEN', 'CONTACTS')
182
+
183
+ const user = await sock.findUserByUsername('@Xatanicvxii')
184
+
185
+ const abouts = await sock.getTextStatusList([
186
+ '1@s.whatsapp.net'
187
+ ])
188
+
189
+ 📖 Full documentation: "documentation/MEX.md"
190
+
191
+ ---
192
+
193
+ 📖 Documentation
194
+
195
+ Topic| Documentation
196
+ MEX GraphQL| "documentation/MEX.md"
197
+ USync| "documentation/USYNC.md"
198
+ HTTPS GraphQL| "documentation/GRAPHQL.md"
199
+ Privacy & Profile| "documentation/PRIVACY.md"
200
+ Registration| "documentation/REGISTRATION.md"
201
+ Managed Accounts| "documentation/MANAGED-ACCOUNT.md"
202
+ Communities| "documentation/COMMUNITIES.md"
203
+ Interoperability| "documentation/INTEROP.md"
204
+ Username System| "documentation/USERNAME.md"
205
+ Anti-Ban| "documentation/ANTIBAN.md"
206
+ Ban System| "documentation/BAN-SYSTEM.md"
207
+ Protocol Reference| "documentation/PROTOCOLS.md"
208
+ WA-Web Port| "documentation/WA-WEB-PORT.md"
209
+
210
+ ---
211
+
212
+ <p align="center">
213
+ Made with ❤️ by BellaXxata
214
+ </p>
@@ -0,0 +1,3 @@
1
+ yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify --no-comments -o ./index.js ./WAProto.proto;
2
+ yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify ./WAProto.proto | yarn pbts --no-comments -o ./index.d.ts -;
3
+ node ./fix-imports.js