@epinkenedy/siiu 2.0.3

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 (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +448 -0
  3. package/WAProto/index.js +169661 -0
  4. package/engine-requirements.js +10 -0
  5. package/lib/Defaults/baileys-version.json +3 -0
  6. package/lib/Defaults/index.js +147 -0
  7. package/lib/Defaults/phonenumber-mcc.json +223 -0
  8. package/lib/Signal/Group/ciphertext-message.js +15 -0
  9. package/lib/Signal/Group/group-session-builder.js +64 -0
  10. package/lib/Signal/Group/group_cipher.js +96 -0
  11. package/lib/Signal/Group/index.js +57 -0
  12. package/lib/Signal/Group/keyhelper.js +55 -0
  13. package/lib/Signal/Group/queue-job.js +57 -0
  14. package/lib/Signal/Group/sender-chain-key.js +34 -0
  15. package/lib/Signal/Group/sender-key-distribution-message.js +66 -0
  16. package/lib/Signal/Group/sender-key-message.js +69 -0
  17. package/lib/Signal/Group/sender-key-name.js +51 -0
  18. package/lib/Signal/Group/sender-key-record.js +53 -0
  19. package/lib/Signal/Group/sender-key-state.js +99 -0
  20. package/lib/Signal/Group/sender-message-key.js +29 -0
  21. package/lib/Signal/libsignal.js +174 -0
  22. package/lib/Socket/Client/abstract-socket-client.js +13 -0
  23. package/lib/Socket/Client/index.js +19 -0
  24. package/lib/Socket/Client/mobile-socket-client.js +65 -0
  25. package/lib/Socket/Client/web-socket-client.js +62 -0
  26. package/lib/Socket/business.js +260 -0
  27. package/lib/Socket/chats.js +1002 -0
  28. package/lib/Socket/groups.js +317 -0
  29. package/lib/Socket/handel.js +637 -0
  30. package/lib/Socket/index.js +11 -0
  31. package/lib/Socket/messages-recv.js +1110 -0
  32. package/lib/Socket/messages-send.js +831 -0
  33. package/lib/Socket/newsletter.js +431 -0
  34. package/lib/Socket/registration.js +166 -0
  35. package/lib/Socket/socket.js +665 -0
  36. package/lib/Socket/usync.js +70 -0
  37. package/lib/Store/index.js +10 -0
  38. package/lib/Store/make-cache-manager-store.js +83 -0
  39. package/lib/Store/make-in-memory-store.js +427 -0
  40. package/lib/Store/make-ordered-dictionary.js +81 -0
  41. package/lib/Store/object-repository.js +27 -0
  42. package/lib/Types/Auth.js +2 -0
  43. package/lib/Types/Call.js +2 -0
  44. package/lib/Types/Chat.js +4 -0
  45. package/lib/Types/Contact.js +2 -0
  46. package/lib/Types/Events.js +2 -0
  47. package/lib/Types/GroupMetadata.js +2 -0
  48. package/lib/Types/Label.js +27 -0
  49. package/lib/Types/LabelAssociation.js +9 -0
  50. package/lib/Types/Message.js +9 -0
  51. package/lib/Types/Newsletter.js +38 -0
  52. package/lib/Types/Product.js +2 -0
  53. package/lib/Types/Signal.js +2 -0
  54. package/lib/Types/Socket.js +2 -0
  55. package/lib/Types/State.js +2 -0
  56. package/lib/Types/USync.js +2 -0
  57. package/lib/Types/index.js +42 -0
  58. package/lib/Utils/auth-utils.js +206 -0
  59. package/lib/Utils/baileys-event-stream.js +63 -0
  60. package/lib/Utils/business.js +234 -0
  61. package/lib/Utils/chat-utils.js +729 -0
  62. package/lib/Utils/crypto.js +151 -0
  63. package/lib/Utils/decode-wa-message.js +198 -0
  64. package/lib/Utils/event-buffer.js +514 -0
  65. package/lib/Utils/generics.js +498 -0
  66. package/lib/Utils/history.js +96 -0
  67. package/lib/Utils/index.js +33 -0
  68. package/lib/Utils/link-preview.js +93 -0
  69. package/lib/Utils/logger.js +7 -0
  70. package/lib/Utils/lt-hash.js +51 -0
  71. package/lib/Utils/make-mutex.js +43 -0
  72. package/lib/Utils/messages-media.js +819 -0
  73. package/lib/Utils/messages.js +819 -0
  74. package/lib/Utils/noise-handler.js +155 -0
  75. package/lib/Utils/process-message.js +321 -0
  76. package/lib/Utils/signal.js +153 -0
  77. package/lib/Utils/use-multi-file-auth-state.js +119 -0
  78. package/lib/Utils/validate-connection.js +229 -0
  79. package/lib/WABinary/constants.js +40 -0
  80. package/lib/WABinary/decode.js +252 -0
  81. package/lib/WABinary/encode.js +265 -0
  82. package/lib/WABinary/generic-utils.js +198 -0
  83. package/lib/WABinary/index.js +21 -0
  84. package/lib/WABinary/jid-utils.js +62 -0
  85. package/lib/WABinary/types.js +2 -0
  86. package/lib/WAM/BinaryInfo.js +13 -0
  87. package/lib/WAM/constants.js +15350 -0
  88. package/lib/WAM/encode.js +155 -0
  89. package/lib/WAM/index.js +19 -0
  90. package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
  91. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
  92. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
  93. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
  94. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -0
  95. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +24 -0
  96. package/lib/WAUSync/Protocols/index.js +20 -0
  97. package/lib/WAUSync/USyncQuery.js +89 -0
  98. package/lib/WAUSync/USyncUser.js +26 -0
  99. package/lib/WAUSync/index.js +19 -0
  100. package/lib/index.js +49 -0
  101. package/package.json +109 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 z4phdev
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,448 @@
1
+ # WhatsApp Baileys
2
+
3
+ <p align="center">
4
+ <img src="https://raw.githubusercontent.com/IkyyExecutive/IkyyBokep/main/uploads/1770205734777_31697_1770205733762_file_821.jpg" alt="Thumbnail" />
5
+ </p>
6
+
7
+
8
+ The latest updated Baileys WhatsApp supports following channels, and doesn't exit easily when using WhatsApp or Telegram bots. This Baileys is equipped with the latest buttons and has updated the jid to lid, suitable for those of you who have a project. Please use this Baileys.
9
+
10
+ WhatsApp Baileys updates the jid to lid, payment/interactiveMessage/viewOnceMessage buttons and others, suitable for those of you who have a script project that you want
11
+
12
+ ---
13
+
14
+ ### Features improved by the owner
15
+
16
+ - Already supports custom pairing code
17
+ - Fixing damage to Pairing
18
+ - Supports Paymess, Interactive, and button
19
+ - Support button in WhatsApp business
20
+ - And this feature is complete
21
+
22
+ ## Add Function ( Simple code )
23
+
24
+ ### Label Group
25
+ Tag/Label Member Grop
26
+
27
+ ```javascript
28
+ await sock.setLabelGroup(jid, string)
29
+ ```
30
+ ---
31
+ ### Check ID Channel
32
+ Get ID Channel From Url
33
+
34
+ ```javascript
35
+ await sock.newsletterFromUrl(url)
36
+ ```
37
+ Result JSON
38
+ ```json
39
+ {
40
+ "name": "Name Channel",
41
+ "id": "Channel ID",
42
+ "state": "Status Channel",
43
+ "subscribers": "Followers",
44
+ "verification": "UNVERIFIED",
45
+ "creation_time": 1728547155,
46
+ "description": "Description Channel"
47
+ }
48
+ ```
49
+ ---
50
+ ### Check banned number
51
+ You can see the status of blocked numbers here
52
+
53
+ ```javascript
54
+ sock.checkWhatsApp(jid)
55
+ ```
56
+ ---
57
+
58
+ ## SendMessage Documentation
59
+
60
+ ### Status Mention Group & Private Message
61
+ Send Status Mention Group/Private Chat
62
+
63
+ ```javascript
64
+ await sock.sendStatusMention(content, jid);
65
+ ```
66
+
67
+ ### Status Group Message V2
68
+ Send Group Status With Version 2
69
+
70
+ ```javascript
71
+ await sock.sendMessage(jid, {
72
+ groupStatusMessage: {
73
+ text: "Hello World"
74
+ }
75
+ });
76
+ ```
77
+
78
+ ### Album Message (Multiple Images)
79
+ Send multiple images in a single album message:
80
+
81
+ ```javascript
82
+ await sock.sendMessage(jid, {
83
+ albumMessage: [
84
+ { image: cihuy, caption: "Foto pertama" },
85
+ { image: { url: "URL IMAGE" }, caption: "Foto kedua" }
86
+ ]
87
+ }, { quoted: m });
88
+ ```
89
+
90
+ ### Event Message
91
+ Create and send WhatsApp event invitations:
92
+
93
+ ```javascript
94
+ await sock.sendMessage(jid, {
95
+ eventMessage: {
96
+ isCanceled: false,
97
+ name: "Hello World",
98
+ description: "z4phdev",
99
+ location: {
100
+ degreesLatitude: 0,
101
+ degreesLongitude: 0,
102
+ name: "rowrrrr"
103
+ },
104
+ joinLink: "https://call.whatsapp.com/video/saweitt",
105
+ startTime: "1763019000",
106
+ endTime: "1763026200",
107
+ extraGuestsAllowed: false
108
+ }
109
+ }, { quoted: m });
110
+ ```
111
+
112
+ ### Poll Result Message
113
+ Display poll results with vote counts:
114
+
115
+ ```javascript
116
+ await sock.sendMessage(jid, {
117
+ pollResultMessage: {
118
+ name: "Hello World",
119
+ pollVotes: [
120
+ {
121
+ optionName: "TEST 1",
122
+ optionVoteCount: "112233"
123
+ },
124
+ {
125
+ optionName: "TEST 2",
126
+ optionVoteCount: "1"
127
+ }
128
+ ]
129
+ }
130
+ }, { quoted: m });
131
+ ```
132
+
133
+ ### Simple Interactive Message
134
+ Send basic interactive messages with copy button functionality:
135
+
136
+ ```javascript
137
+ await sock.sendMessage(jid, {
138
+ interactiveMessage: {
139
+ header: "Hello World",
140
+ title: "Hello World",
141
+ footer: "telegram: @saweitt ",
142
+ buttons: [
143
+ {
144
+ name: "cta_copy",
145
+ buttonParamsJson: JSON.stringify({
146
+ display_text: "copy code",
147
+ id: "123456789",
148
+ copy_code: "ABC123XYZ"
149
+ })
150
+ }
151
+ ]
152
+ }
153
+ }, { quoted: m });
154
+ ```
155
+
156
+ ### Interactive Message with Native Flow
157
+ Send interactive messages with buttons, copy actions, and native flow features:
158
+
159
+ ```javascript
160
+ await sock.sendMessage(jid, {
161
+ interactiveMessage: {
162
+ header: "Hello World",
163
+ title: "Hello World",
164
+ footer: "telegram: @epineek2",
165
+ image: { url: "https://example.com/image.jpg" },
166
+ nativeFlowMessage: {
167
+ messageParamsJson: JSON.stringify({
168
+ limited_time_offer: {
169
+ text: "idk hummmm?",
170
+ url: "https://t.me/saweitt",
171
+ copy_code: "z4phdev",
172
+ expiration_time: Date.now() * 999
173
+ },
174
+ bottom_sheet: {
175
+ in_thread_buttons_limit: 2,
176
+ divider_indices: [1, 2, 3, 4, 5, 999],
177
+ list_title: "z4phdev",
178
+ button_title: "z4phdev"
179
+ },
180
+ tap_target_configuration: {
181
+ title: " X ",
182
+ description: "bomboclard",
183
+ canonical_url: "https://t.me/saweitt",
184
+ domain: "shop.example.com",
185
+ button_index: 0
186
+ }
187
+ }),
188
+ buttons: [
189
+ {
190
+ name: "single_select",
191
+ buttonParamsJson: JSON.stringify({
192
+ has_multiple_buttons: true
193
+ })
194
+ },
195
+ {
196
+ name: "call_permission_request",
197
+ buttonParamsJson: JSON.stringify({
198
+ has_multiple_buttons: true
199
+ })
200
+ },
201
+ {
202
+ name: "single_select",
203
+ buttonParamsJson: JSON.stringify({
204
+ title: "Hello World",
205
+ sections: [
206
+ {
207
+ title: "title",
208
+ highlight_label: "label",
209
+ rows: [
210
+ {
211
+ title: "@saweitt",
212
+ description: "love you",
213
+ id: "row_2"
214
+ }
215
+ ]
216
+ }
217
+ ],
218
+ has_multiple_buttons: true
219
+ })
220
+ },
221
+ {
222
+ name: "cta_copy",
223
+ buttonParamsJson: JSON.stringify({
224
+ display_text: "copy code",
225
+ id: "123456789",
226
+ copy_code: "ABC123XYZ"
227
+ })
228
+ }
229
+ ]
230
+ }
231
+ }
232
+ }, { quoted: m });
233
+ ```
234
+
235
+ ### Interactive Message with Thumbnail
236
+ Send interactive messages with thumbnail image and copy button:
237
+
238
+ ```javascript
239
+ await sock.sendMessage(jid, {
240
+ interactiveMessage: {
241
+ header: "Hello World",
242
+ title: "Hello World",
243
+ footer: "telegram: @epineek2",
244
+ image: { url: "https://example.com/image.jpg" },
245
+ buttons: [
246
+ {
247
+ name: "cta_copy",
248
+ buttonParamsJson: JSON.stringify({
249
+ display_text: "copy code",
250
+ id: "123456789",
251
+ copy_code: "ABC123XYZ"
252
+ })
253
+ }
254
+ ]
255
+ }
256
+ }, { quoted: m });
257
+ ```
258
+
259
+ ### Product Message
260
+ Send product catalog messages with buttons and merchant information:
261
+
262
+ ```javascript
263
+ await sock.sendMessage(jid, {
264
+ productMessage: {
265
+ title: "Produk Contoh",
266
+ description: "Ini adalah deskripsi produk",
267
+ thumbnail: { url: "https://example.com/image.jpg" },
268
+ productId: "PROD001",
269
+ retailerId: "RETAIL001",
270
+ url: "https://example.com/product",
271
+ body: "Detail produk",
272
+ footer: "Harga spesial",
273
+ priceAmount1000: 50000,
274
+ currencyCode: "USD",
275
+ buttons: [
276
+ {
277
+ name: "cta_url",
278
+ buttonParamsJson: JSON.stringify({
279
+ display_text: "Beli Sekarang",
280
+ url: "https://example.com/buy"
281
+ })
282
+ }
283
+ ]
284
+ }
285
+ }, { quoted: m });
286
+ ```
287
+
288
+ ### Interactive Message with Document Buffer
289
+ Send interactive messages with document from buffer (file system) - **Note: Documents only support buffer**:
290
+
291
+ ```javascript
292
+ await sock.sendMessage(jid, {
293
+ interactiveMessage: {
294
+ header: "Hello World",
295
+ title: "Hello World",
296
+ footer: "telegram: @epineek2",
297
+ document: fs.readFileSync("./package.json"),
298
+ mimetype: "application/pdf",
299
+ fileName: "epineek2.pdf",
300
+ jpegThumbnail: fs.readFileSync("./document.jpeg"),
301
+ contextInfo: {
302
+ mentionedJid: [jid],
303
+ forwardingScore: 777,
304
+ isForwarded: false
305
+ },
306
+ externalAdReply: {
307
+ title: "Pined Bot",
308
+ body: "anu team",
309
+ mediaType: 3,
310
+ thumbnailUrl: "https://example.com/image.jpg",
311
+ mediaUrl: " X ",
312
+ sourceUrl: "https://t.me/epineek2",
313
+ showAdAttribution: true,
314
+ renderLargerThumbnail: false
315
+ },
316
+ buttons: [
317
+ {
318
+ name: "cta_url",
319
+ buttonParamsJson: JSON.stringify({
320
+ display_text: "Telegram",
321
+ url: "https://t.me/epineek2",
322
+ merchant_url: "https://t.me/epineek2"
323
+ })
324
+ }
325
+ ]
326
+ }
327
+ }, { quoted: m });
328
+ ```
329
+
330
+ ### Interactive Message with Document Buffer (Simple)
331
+ Send interactive messages with document from buffer (file system) without contextInfo and externalAdReply - **Note: Documents only support buffer**:
332
+
333
+ ```javascript
334
+ await sock.sendMessage(jid, {
335
+ interactiveMessage: {
336
+ header: "Hello World",
337
+ title: "Hello World",
338
+ footer: "telegram: @epineek2",
339
+ document: fs.readFileSync("./package.json"),
340
+ mimetype: "application/pdf",
341
+ fileName: "saweitt.pdf",
342
+ jpegThumbnail: fs.readFileSync("./document.jpeg"),
343
+ buttons: [
344
+ {
345
+ name: "cta_url",
346
+ buttonParamsJson: JSON.stringify({
347
+ display_text: "Telegram",
348
+ url: "https://t.me/epineek2",
349
+ merchant_url: "https://t.me/epineek2"
350
+ })
351
+ }
352
+ ]
353
+ }
354
+ }, { quoted: m });
355
+ ```
356
+
357
+ ### Request Payment Message
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(jid, {
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 Baileys?
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
+ - Has 1 newsletter follow, only the developer's WhatsApp channel: [WhatsApp Channel](https://whatsapp.com/channel/0029Vb7d9KxKWEKynNYTMy1m)
402
+
403
+ ---
404
+
405
+ 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.
406
+
407
+ **Thank you for choosing WhatsApp Baileys as your WhatsApp automation solution!**
408
+
409
+
410
+ ---
411
+
412
+
413
+ ### Contact the Original Owner
414
+
415
+ For questions, support, or collaboration, feel free to contact the developer:
416
+
417
+ - **Telegram**: [Telegram Contact](https://t.me/epineek2)
418
+ - **Channel WhatsApp**: [Channel WhatsApp](https://whatsapp.com/channel/0029Vb7d9KxKWEKynNYTMy1m)
419
+
420
+ ### 🙌 Contributors outside the Baileys code
421
+
422
+ Thanks to the following awesome contributors who help improve this project 💖
423
+
424
+ <table>
425
+ <tr>
426
+ <td align="center">
427
+ <a href="https://github.com/epinkenedy">
428
+ <img src="https://github.com/epinkenedy.png" width="80px;" style="border-radius:50%;" alt="Developer"/>
429
+ <br />
430
+ <sub><b>z4phdev</b></sub>
431
+ </a>
432
+ </td>
433
+ <td align="center">
434
+ <a href="https://github.com/epinkenedy">
435
+ <img src="https://github.com/epinkenedy.png" width="80px;" style="border-radius:50%;" alt="Contributor"/>
436
+ <br />
437
+ <sub><b>KyuuRzy</b></sub>
438
+ </a>
439
+ </td>
440
+ <td align="center">
441
+ <a href="https://github.com/epinkenedy">
442
+ <img src="https://raw.githubusercontent.com/IkyyExecutive/IkyyBokep/main/uploads/1770205734777_31697_1770205733762_file_821.jpg" width="80px;" style="border-radius:50%;" alt="Contributor"/>
443
+ <br />
444
+ <sub><b>Nted3xec</b></sub>
445
+ </a>
446
+ </td>
447
+ </tr>
448
+ </table>