@lsqltmux-code/baileys 0.0.0-stage → 8.4.1

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 (127) hide show
  1. package/README.md +405 -2
  2. package/WAProto/GenerateStatics.sh +3 -0
  3. package/WAProto/WAProto.proto +6902 -0
  4. package/WAProto/fix-import.js +29 -0
  5. package/WAProto/fix-imports.js +85 -0
  6. package/WAProto/index.d.ts +79257 -0
  7. package/WAProto/index.js +242946 -0
  8. package/engine-requirements.js +10 -0
  9. package/lib/Defaults/baileys-version.json +3 -0
  10. package/lib/Defaults/index.js +130 -0
  11. package/lib/Defaults/phonenumber-mcc.json +223 -0
  12. package/lib/Signal/Group/ciphertext-message.js +12 -0
  13. package/lib/Signal/Group/group-session-builder.js +30 -0
  14. package/lib/Signal/Group/group_cipher.js +82 -0
  15. package/lib/Signal/Group/index.js +12 -0
  16. package/lib/Signal/Group/keyhelper.js +18 -0
  17. package/lib/Signal/Group/queue-job.js +57 -0
  18. package/lib/Signal/Group/sender-chain-key.js +26 -0
  19. package/lib/Signal/Group/sender-key-distribution-message.js +63 -0
  20. package/lib/Signal/Group/sender-key-message.js +66 -0
  21. package/lib/Signal/Group/sender-key-name.js +48 -0
  22. package/lib/Signal/Group/sender-key-record.js +41 -0
  23. package/lib/Signal/Group/sender-key-state.js +84 -0
  24. package/lib/Signal/Group/sender-message-key.js +26 -0
  25. package/lib/Signal/libsignal.js +431 -0
  26. package/lib/Signal/lid-mapping.js +277 -0
  27. package/lib/Socket/Client/abstract-socket-client.js +13 -0
  28. package/lib/Socket/Client/index.js +3 -0
  29. package/lib/Socket/Client/mobile-socket-client.js +65 -0
  30. package/lib/Socket/Client/types.js +11 -0
  31. package/lib/Socket/Client/web-socket-client.js +62 -0
  32. package/lib/Socket/Client/websocket.js +54 -0
  33. package/lib/Socket/business.js +379 -0
  34. package/lib/Socket/chats.js +1193 -0
  35. package/lib/Socket/communities.js +431 -0
  36. package/lib/Socket/community.js +392 -0
  37. package/lib/Socket/dugong.js +637 -0
  38. package/lib/Socket/groups.js +374 -0
  39. package/lib/Socket/index.js +12 -0
  40. package/lib/Socket/luxu.js +387 -0
  41. package/lib/Socket/messages-recv.js +1916 -0
  42. package/lib/Socket/messages-send.js +1435 -0
  43. package/lib/Socket/mex.js +42 -0
  44. package/lib/Socket/newsletter.js +281 -0
  45. package/lib/Socket/registration.js +167 -0
  46. package/lib/Socket/socket.js +967 -0
  47. package/lib/Socket/usync.js +70 -0
  48. package/lib/Store/index.js +10 -0
  49. package/lib/Store/keyed-db.js +108 -0
  50. package/lib/Store/make-cache-manager-store.js +85 -0
  51. package/lib/Store/make-in-memory-store.js +198 -0
  52. package/lib/Store/make-ordered-dictionary.js +75 -0
  53. package/lib/Store/object-repository.js +32 -0
  54. package/lib/Types/Auth.js +2 -0
  55. package/lib/Types/Bussines.js +2 -0
  56. package/lib/Types/Call.js +2 -0
  57. package/lib/Types/Chat.js +8 -0
  58. package/lib/Types/Contact.js +2 -0
  59. package/lib/Types/Events.js +2 -0
  60. package/lib/Types/GroupMetadata.js +2 -0
  61. package/lib/Types/Label.js +25 -0
  62. package/lib/Types/LabelAssociation.js +7 -0
  63. package/lib/Types/Message.js +11 -0
  64. package/lib/Types/Mex.js +37 -0
  65. package/lib/Types/Newsletter.js +38 -0
  66. package/lib/Types/Product.js +2 -0
  67. package/lib/Types/Signal.js +2 -0
  68. package/lib/Types/Socket.js +3 -0
  69. package/lib/Types/State.js +56 -0
  70. package/lib/Types/USync.js +2 -0
  71. package/lib/Types/index.js +26 -0
  72. package/lib/Utils/auth-utils.js +302 -0
  73. package/lib/Utils/baileys-event-stream.js +63 -0
  74. package/lib/Utils/browser-utils.js +48 -0
  75. package/lib/Utils/business.js +231 -0
  76. package/lib/Utils/chat-utils.js +872 -0
  77. package/lib/Utils/companion-reg-client-utils.js +35 -0
  78. package/lib/Utils/crypto.js +118 -0
  79. package/lib/Utils/decode-wa-message.js +350 -0
  80. package/lib/Utils/event-buffer.js +622 -0
  81. package/lib/Utils/generics.js +403 -0
  82. package/lib/Utils/history.js +134 -0
  83. package/lib/Utils/identity-change-handler.js +50 -0
  84. package/lib/Utils/index.js +23 -0
  85. package/lib/Utils/link-preview.js +85 -0
  86. package/lib/Utils/logger.js +3 -0
  87. package/lib/Utils/lt-hash.js +8 -0
  88. package/lib/Utils/make-mutex.js +33 -0
  89. package/lib/Utils/message-composer.js +273 -0
  90. package/lib/Utils/message-retry-manager.js +265 -0
  91. package/lib/Utils/messages-media.js +788 -0
  92. package/lib/Utils/messages.js +1253 -0
  93. package/lib/Utils/noise-handler.js +201 -0
  94. package/lib/Utils/offline-node-processor.js +40 -0
  95. package/lib/Utils/pre-key-manager.js +106 -0
  96. package/lib/Utils/process-message.js +630 -0
  97. package/lib/Utils/reporting-utils.js +258 -0
  98. package/lib/Utils/signal.js +201 -0
  99. package/lib/Utils/stanza-ack.js +38 -0
  100. package/lib/Utils/sync-action-utils.js +49 -0
  101. package/lib/Utils/tc-token-utils.js +163 -0
  102. package/lib/Utils/use-multi-file-auth-state.js +121 -0
  103. package/lib/Utils/validate-connection.js +203 -0
  104. package/lib/WABinary/constants.js +1301 -0
  105. package/lib/WABinary/decode.js +262 -0
  106. package/lib/WABinary/encode.js +220 -0
  107. package/lib/WABinary/generic-utils.js +204 -0
  108. package/lib/WABinary/index.js +6 -0
  109. package/lib/WABinary/jid-utils.js +98 -0
  110. package/lib/WABinary/types.js +2 -0
  111. package/lib/WAM/BinaryInfo.js +10 -0
  112. package/lib/WAM/constants.js +22853 -0
  113. package/lib/WAM/encode.js +150 -0
  114. package/lib/WAM/index.js +4 -0
  115. package/lib/WAUSync/Protocols/USyncContactProtocol.js +52 -0
  116. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +54 -0
  117. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +27 -0
  118. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +38 -0
  119. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +25 -0
  120. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +51 -0
  121. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +29 -0
  122. package/lib/WAUSync/Protocols/index.js +6 -0
  123. package/lib/WAUSync/USyncQuery.js +98 -0
  124. package/lib/WAUSync/USyncUser.js +31 -0
  125. package/lib/WAUSync/index.js +4 -0
  126. package/lib/index.js +49 -0
  127. package/package.json +135 -5
package/README.md CHANGED
@@ -1,3 +1,406 @@
1
- # Temporary Holding Version
1
+ # WhatsApp Lsqltmux-Bailz Lsqltmux-Code
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <p align="center">
4
+ <img src="https://files.catbox.moe/8x2ano.jpg" alt="Thumbnail" />
5
+ </p>
6
+
7
+ WhatsApp Lsqltmux-Bailz is an open-source library designed to help developers build automation solutions and integrations with WhatsApp efficiently and directly. Using websocket technology without the need for a browser, this library supports a wide range of features such as message management, chat handling, group administration, as well as interactive messages and action buttons for a more dynamic user experience.
8
+
9
+ Actively developed and maintained, baileys continuously receives updates to enhance stability and performance. One of the main focuses is to improve the pairing and authentication processes to be more stable and secure. Pairing features can be customized with your own codes, making the process more reliable and less prone to interruptions.
10
+
11
+ This library is highly suitable for building business bots, chat automation systems, customer service solutions, and various other communication automation applications that require high stability and comprehensive features. With a lightweight and modular design, baileys is easy to integrate into different systems and platforms.
12
+
13
+ ---
14
+
15
+ Main Features and Advantages
16
+
17
+ · Supports automatic and custom pairing processes
18
+ · Fixes previous pairing issues that often caused failures or disconnections
19
+ · Supports interactive messages, action buttons, and dynamic menus
20
+ · Efficient automatic session management for reliable operation
21
+ · Compatible with the latest multi-device features from WhatsApp
22
+ · Lightweight, stable, and easy to integrate into various systems
23
+ · Suitable for developing bots, automation, and complete communication solutions
24
+ · Comprehensive documentation and example codes to facilitate development
25
+
26
+ ---
27
+
28
+ Getting Started
29
+
30
+ 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 business or project needs.
31
+
32
+ ---
33
+
34
+ Add Function ( Simple code )
35
+
36
+ Check ID Channel
37
+
38
+ Get ID channel
39
+
40
+ ```javascript
41
+ await sock.newsletterId(url)
42
+ ```
43
+
44
+ Check banned number
45
+
46
+ You can see the status of blocked numbers here
47
+
48
+ ```javascript
49
+ await sock.checkWhatsApp(target)
50
+ ```
51
+
52
+ ---
53
+
54
+ SendMessage Documentation
55
+
56
+ Status Group Message V2
57
+
58
+ Send group status with version 2
59
+
60
+ ```javascript
61
+ await sock.sendMessage(target, {
62
+ groupStatusMessage: {
63
+ text: "#LSQLTMUX-CODE"
64
+ }
65
+ });
66
+ ```
67
+
68
+ Album Message (Multiple Images)
69
+
70
+ Send multiple images in a single album message:
71
+
72
+ ```javascript
73
+ await sock.sendMessage(target, {
74
+ albumMessage: [
75
+ { image: cihuy, caption: "#LSQLTMUX-CODE" },
76
+ { image: { url: "URL IMAGE" }, caption: "#LSQLTMUX-CODE" }
77
+ ]
78
+ }, { quoted: m });
79
+ ```
80
+
81
+ Event Message
82
+
83
+ Create and send WhatsApp event invitations:
84
+
85
+ ```javascript
86
+ await sock.sendMessage(target, {
87
+ eventMessage: {
88
+ isCanceled: false,
89
+ name: "#LSQLTMUX-CODE",
90
+ description: "#LSQLTMUX-CODE",
91
+ location: {
92
+ degreesLatitude: 0,
93
+ degreesLongitude: 0,
94
+ name: "#LSQLTMUX-CODE"
95
+ },
96
+ joinLink: "https://call.whatsapp.com/video/lsqltmux",
97
+ startTime: "1763019000",
98
+ endTime: "1763026200",
99
+ extraGuestsAllowed: false
100
+ }
101
+ }, { quoted: m });
102
+ ```
103
+
104
+ Poll Result Message
105
+
106
+ Display poll results with vote counts:
107
+
108
+ ```javascript
109
+ await sock.sendMessage(target, {
110
+ pollResultMessage: {
111
+ name: "#LSQLTMUX-CODE",
112
+ pollVotes: [
113
+ {
114
+ optionName: "#LSQLTMUX-CODE",
115
+ optionVoteCount: "112233"
116
+ },
117
+ {
118
+ optionName: "#LSQLTMUX-CODE",
119
+ optionVoteCount: "1"
120
+ }
121
+ ]
122
+ }
123
+ }, { quoted: m });
124
+ ```
125
+
126
+ Simple Interactive Message
127
+
128
+ Send basic interactive messages with copy button functionality:
129
+
130
+ ```javascript
131
+ await sock.sendMessage(target, {
132
+ interactiveMessage: {
133
+ header: "#LSQLTMUX-CODE",
134
+ title: "#LSQLTMUX-CODE",
135
+ footer: "telegram: @Lsqltmux ",
136
+ buttons: [
137
+ {
138
+ name: "cta_copy",
139
+ buttonParamsJson: JSON.stringify({
140
+ display_text: "#LSQLTMUX-CODE",
141
+ id: "123456789",
142
+ copy_code: "ABC123XYZ"
143
+ })
144
+ }
145
+ ]
146
+ }
147
+ }, { quoted: m });
148
+ ```
149
+
150
+ Interactive Message with Native Flow
151
+
152
+ Send interactive messages with buttons, copy actions, and native flow features:
153
+
154
+ ```javascript
155
+ await sock.sendMessage(target, {
156
+ interactiveMessage: {
157
+ header: "#LSQLTMUX-CODE",
158
+ title: "#LSQLTMUX-CODE",
159
+ footer: "telegram: @Lsqltmux",
160
+ image: { url: "https://example.com/image.jpg" },
161
+ nativeFlowMessage: {
162
+ messageParamsJson: JSON.stringify({
163
+ limited_time_offer: {
164
+ text: "idk hummmm?",
165
+ url: "https://t.me/Lsqltmux",
166
+ copy_code: "#LSQLTMUX-CODE",
167
+ expiration_time: Date.now() * 999
168
+ },
169
+ bottom_sheet: {
170
+ in_thread_buttons_limit: 2,
171
+ divider_indices: [1, 2, 3, 4, 5, 999],
172
+ list_title: "#LSQLTMUX-CODE",
173
+ button_title: "#LSQLTMUX-CODE"
174
+ },
175
+ tap_target_configuration: {
176
+ title: " X ",
177
+ description: "bomboclard",
178
+ canonical_url: "https://t.me/Lsqltmux",
179
+ domain: "shop.example.com",
180
+ button_index: 0
181
+ }
182
+ }),
183
+ buttons: [
184
+ {
185
+ name: "single_select",
186
+ buttonParamsJson: JSON.stringify({
187
+ has_multiple_buttons: true
188
+ })
189
+ },
190
+ {
191
+ name: "call_permission_request",
192
+ buttonParamsJson: JSON.stringify({
193
+ has_multiple_buttons: true
194
+ })
195
+ },
196
+ {
197
+ name: "single_select",
198
+ buttonParamsJson: JSON.stringify({
199
+ title: "#LSQLTMUX-CODE",
200
+ sections: [
201
+ {
202
+ title: "title",
203
+ highlight_label: "label",
204
+ rows: [
205
+ {
206
+ title: "@Lsqltmux",
207
+ description: "love you",
208
+ id: "row_2"
209
+ }
210
+ ]
211
+ }
212
+ ],
213
+ has_multiple_buttons: true
214
+ })
215
+ },
216
+ {
217
+ name: "cta_copy",
218
+ buttonParamsJson: JSON.stringify({
219
+ display_text: "copy code",
220
+ id: "123456789",
221
+ copy_code: "ABC123XYZ"
222
+ })
223
+ }
224
+ ]
225
+ }
226
+ }
227
+ }, { quoted: m });
228
+ ```
229
+
230
+ Interactive Message with Thumbnail
231
+
232
+ Send interactive messages with thumbnail image and copy button:
233
+
234
+ ```javascript
235
+ await sock.sendMessage(target, {
236
+ interactiveMessage: {
237
+ header: "#LSQLTMUX-CODE",
238
+ title: "#LSQLTMUX-CODE",
239
+ footer: "telegram: @Lsqltmux",
240
+ image: { url: "https://example.com/image.jpg" },
241
+ buttons: [
242
+ {
243
+ name: "cta_copy",
244
+ buttonParamsJson: JSON.stringify({
245
+ display_text: "copy code",
246
+ id: "123456789",
247
+ copy_code: "ABC123XYZ"
248
+ })
249
+ }
250
+ ]
251
+ }
252
+ }, { quoted: m });
253
+ ```
254
+
255
+ Product Message
256
+
257
+ Send product catalog messages with buttons and merchant information:
258
+
259
+ ```javascript
260
+ await sock.sendMessage(target, {
261
+ productMessage: {
262
+ title: "Produk Contoh",
263
+ description: "Ini adalah deskripsi produk",
264
+ thumbnail: { url: "https://example.com/image.jpg" },
265
+ productId: "PROD001",
266
+ retailerId: "RETAIL001",
267
+ url: "https://example.com/product",
268
+ body: "Detail produk",
269
+ footer: "Harga spesial",
270
+ priceAmount1000: 50000,
271
+ currencyCode: "USD",
272
+ buttons: [
273
+ {
274
+ name: "cta_url",
275
+ buttonParamsJson: JSON.stringify({
276
+ display_text: "Beli Sekarang",
277
+ url: "https://example.com/buy"
278
+ })
279
+ }
280
+ ]
281
+ }
282
+ }, { quoted: m });
283
+ ```
284
+
285
+ Interactive Message with Document Buffer
286
+
287
+ Send interactive messages with document from buffer (file system) - Note: Documents only support buffer:
288
+
289
+ ```javascript
290
+ await sock.sendMessage(target, {
291
+ interactiveMessage: {
292
+ header: "#LSQLTMUX-CODE",
293
+ title: "#LSQLTMUX-CODE",
294
+ footer: "telegram: @Lsqltmux",
295
+ document: fs.readFileSync("./package.json"),
296
+ mimetype: "application/pdf",
297
+ fileName: "lsqltmux.pdf",
298
+ jpegThumbnail: fs.readFileSync("./document.jpeg"),
299
+ contextInfo: {
300
+ mentionedJid: [target],
301
+ forwardingScore: 777,
302
+ isForwarded: false
303
+ },
304
+ externalAdReply: {
305
+ title: "#LSQLTMUX-CODE",
306
+ body: "#LSQLTMUX-CODE",
307
+ mediaType: 3,
308
+ thumbnailUrl: "https://example.com/image.jpg",
309
+ mediaUrl: " X ",
310
+ sourceUrl: "https://t.me/Lsqltmux",
311
+ showAdAttribution: true,
312
+ renderLargerThumbnail: false
313
+ },
314
+ buttons: [
315
+ {
316
+ name: "cta_url",
317
+ buttonParamsJson: JSON.stringify({
318
+ display_text: "Telegram",
319
+ url: "https://t.me/Lsqltmux",
320
+ merchant_url: "https://t.me/Lsqltmux"
321
+ })
322
+ }
323
+ ]
324
+ }
325
+ }, { quoted: m });
326
+ ```
327
+
328
+ Interactive Message with Document Buffer (Simple)
329
+
330
+ Send interactive messages with document from buffer (file system) without contextInfo and externalAdReply - Note: Documents only support buffer:
331
+
332
+ ```javascript
333
+ await sock.sendMessage(target, {
334
+ interactiveMessage: {
335
+ header: "#LSQLTMUX-CODE",
336
+ title: "#LSQLTMUX-CODE",
337
+ footer: "telegram: @Lsqltmux",
338
+ document: fs.readFileSync("./package.json"),
339
+ mimetype: "application/pdf",
340
+ fileName: "lsqltmux.pdf",
341
+ jpegThumbnail: fs.readFileSync("./document.jpeg"),
342
+ buttons: [
343
+ {
344
+ name: "cta_url",
345
+ buttonParamsJson: JSON.stringify({
346
+ display_text: "Telegram",
347
+ url: "https://t.me/Lsqltmux",
348
+ merchant_url: "https://t.me/Lsqltmux"
349
+ })
350
+ }
351
+ ]
352
+ }
353
+ }, { quoted: m });
354
+ ```
355
+
356
+ Request Payment Message
357
+
358
+ Send payment request messages with custom background and sticker:
359
+
360
+ ```javascript
361
+ let quotedType = m.quoted?.mtype || '';
362
+ let quotedContent = JSON.stringify({ [quotedType]: m.quoted }, null, 2);
363
+
364
+ await sock.sendMessage(target, {
365
+ requestPaymentMessage: {
366
+ currency: "IDR",
367
+ amount: 10000000,
368
+ from: m.sender,
369
+ sticker: JSON.parse(quotedContent),
370
+ background: {
371
+ id: "100",
372
+ fileLength: "0",
373
+ width: 1000,
374
+ height: 1000,
375
+ mimetype: "image/webp",
376
+ placeholderArgb: 0xFF00FFFF,
377
+ textArgb: 0xFFFFFFFF,
378
+ subtextArgb: 0xFFAA00FF
379
+ }
380
+ }
381
+ }, { quoted: m });
382
+ ```
383
+
384
+ ---
385
+
386
+ Why Choose WhatsApp Lsqltmux-Bailz Lsqltmux-Code?
387
+
388
+ Because this library offers high stability, full features, and an actively improved pairing process. It is ideal for developers aiming to create professional and secure WhatsApp automation solutions. Support for the latest WhatsApp features ensures compatibility with platform updates.
389
+
390
+ ---
391
+
392
+ Technical Notes
393
+
394
+ · Supports custom pairing codes that are stable and secure
395
+ · Fixes previous issues related to pairing and authentication
396
+ · Features interactive messages and action buttons for dynamic menu creation
397
+ · Automatic and efficient session management for long-term stability
398
+ · Compatible with the latest multi-device features from WhatsApp
399
+ · Easy to integrate and customize based on your needs
400
+ · Perfect for developing bots, customer service automation, and other communication applications
401
+
402
+ ---
403
+
404
+ For complete documentation, installation guides, and implementation examples, please visit the official repository and community forums. We continually update and improve this library to meet the needs of developers and users of modern WhatsApp automation solutions.
405
+
406
+ Thank you for choosing WhatsApp Lsqltmux-Bailz Lsqltmux-Code as your WhatsApp automation solution!
@@ -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