baileys-akiko 1.0.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 (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +383 -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/Function/Download/tiktok.js +19 -0
  9. package/lib/Function/Tools/bypass.js +19 -0
  10. package/lib/Function/index.js +13 -0
  11. package/lib/Signal/Group/ciphertext-message.js +15 -0
  12. package/lib/Signal/Group/group-session-builder.js +64 -0
  13. package/lib/Signal/Group/group_cipher.js +96 -0
  14. package/lib/Signal/Group/index.js +57 -0
  15. package/lib/Signal/Group/keyhelper.js +55 -0
  16. package/lib/Signal/Group/queue-job.js +57 -0
  17. package/lib/Signal/Group/sender-chain-key.js +34 -0
  18. package/lib/Signal/Group/sender-key-distribution-message.js +66 -0
  19. package/lib/Signal/Group/sender-key-message.js +69 -0
  20. package/lib/Signal/Group/sender-key-name.js +51 -0
  21. package/lib/Signal/Group/sender-key-record.js +53 -0
  22. package/lib/Signal/Group/sender-key-state.js +99 -0
  23. package/lib/Signal/Group/sender-message-key.js +29 -0
  24. package/lib/Signal/libsignal.js +174 -0
  25. package/lib/Socket/Client/abstract-socket-client.js +13 -0
  26. package/lib/Socket/Client/index.js +19 -0
  27. package/lib/Socket/Client/mobile-socket-client.js +65 -0
  28. package/lib/Socket/Client/web-socket-client.js +62 -0
  29. package/lib/Socket/akiko.js +640 -0
  30. package/lib/Socket/business.js +260 -0
  31. package/lib/Socket/chats.js +1002 -0
  32. package/lib/Socket/groups.js +317 -0
  33. package/lib/Socket/index.js +11 -0
  34. package/lib/Socket/messages-recv.js +1110 -0
  35. package/lib/Socket/messages-send.js +832 -0
  36. package/lib/Socket/newsletter.js +441 -0
  37. package/lib/Socket/registration.js +166 -0
  38. package/lib/Socket/socket.js +665 -0
  39. package/lib/Socket/usync.js +70 -0
  40. package/lib/Store/index.js +10 -0
  41. package/lib/Store/make-cache-manager-store.js +83 -0
  42. package/lib/Store/make-in-memory-store.js +427 -0
  43. package/lib/Store/make-ordered-dictionary.js +81 -0
  44. package/lib/Store/object-repository.js +27 -0
  45. package/lib/Types/Auth.js +2 -0
  46. package/lib/Types/Call.js +2 -0
  47. package/lib/Types/Chat.js +4 -0
  48. package/lib/Types/Contact.js +2 -0
  49. package/lib/Types/Events.js +2 -0
  50. package/lib/Types/GroupMetadata.js +2 -0
  51. package/lib/Types/Label.js +27 -0
  52. package/lib/Types/LabelAssociation.js +9 -0
  53. package/lib/Types/Message.js +9 -0
  54. package/lib/Types/Newsletter.js +38 -0
  55. package/lib/Types/Product.js +2 -0
  56. package/lib/Types/Signal.js +2 -0
  57. package/lib/Types/Socket.js +2 -0
  58. package/lib/Types/State.js +2 -0
  59. package/lib/Types/USync.js +2 -0
  60. package/lib/Types/index.js +42 -0
  61. package/lib/Utils/auth-utils.js +206 -0
  62. package/lib/Utils/baileys-event-stream.js +63 -0
  63. package/lib/Utils/business.js +234 -0
  64. package/lib/Utils/chat-utils.js +729 -0
  65. package/lib/Utils/crypto.js +151 -0
  66. package/lib/Utils/decode-wa-message.js +198 -0
  67. package/lib/Utils/event-buffer.js +514 -0
  68. package/lib/Utils/generics.js +498 -0
  69. package/lib/Utils/history.js +96 -0
  70. package/lib/Utils/index.js +33 -0
  71. package/lib/Utils/link-preview.js +93 -0
  72. package/lib/Utils/logger.js +7 -0
  73. package/lib/Utils/lt-hash.js +51 -0
  74. package/lib/Utils/make-mutex.js +43 -0
  75. package/lib/Utils/messages-media.js +819 -0
  76. package/lib/Utils/messages.js +787 -0
  77. package/lib/Utils/noise-handler.js +155 -0
  78. package/lib/Utils/process-message.js +321 -0
  79. package/lib/Utils/signal.js +153 -0
  80. package/lib/Utils/use-multi-file-auth-state.js +119 -0
  81. package/lib/Utils/validate-connection.js +229 -0
  82. package/lib/WABinary/constants.js +40 -0
  83. package/lib/WABinary/decode.js +252 -0
  84. package/lib/WABinary/encode.js +265 -0
  85. package/lib/WABinary/generic-utils.js +198 -0
  86. package/lib/WABinary/index.js +21 -0
  87. package/lib/WABinary/jid-utils.js +62 -0
  88. package/lib/WABinary/types.js +2 -0
  89. package/lib/WAM/BinaryInfo.js +13 -0
  90. package/lib/WAM/constants.js +15350 -0
  91. package/lib/WAM/encode.js +155 -0
  92. package/lib/WAM/index.js +19 -0
  93. package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
  94. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
  95. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
  96. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
  97. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -0
  98. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +24 -0
  99. package/lib/WAUSync/Protocols/index.js +20 -0
  100. package/lib/WAUSync/USyncQuery.js +89 -0
  101. package/lib/WAUSync/USyncUser.js +26 -0
  102. package/lib/WAUSync/index.js +19 -0
  103. package/lib/index.js +50 -0
  104. package/package.json +117 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AkikoClarisa
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,383 @@
1
+ # 🌟 Baileys Akiko
2
+
3
+ <p align="center">
4
+ <img src="https://img2.pixhost.to/images/6968/712126951_7822d385c3825bd02ec7112a9c01ffb8.gif" alt="Baileys Akiko Thumbnail" />
5
+ </p>
6
+
7
+ **Baileys Akiko** is a highly optimized, open-source library designed to help developers build automation solutions and integrations with WhatsApp efficiently. 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, interactive messages, and dynamic action buttons.
8
+
9
+ Actively developed and maintained by **AkikoClarisa**, this version of Baileys continuously receives updates to enhance stability, security, and performance. One of the main focuses is to provide a clean, bloatware-free environment with a much more stable pairing and authentication process.
10
+
11
+ This library is highly suitable for building business bots, chat automation systems, customer service solutions, and various other communication applications that require high stability and comprehensive features.
12
+
13
+ ---
14
+
15
+ ### ✨ Main Features and Advantages
16
+
17
+ - **Clean & Secure:** Fully optimized and stripped of unnecessary hidden scripts.
18
+ - **Enhanced Pairing:** Fixes previous pairing issues that often caused failures or disconnections.
19
+ - **Interactive UI:** Supports interactive messages, action buttons, and dynamic native flow menus.
20
+ - **Auto Reconnect:** Efficient automatic session management for reliable 24/7 operation.
21
+ - **Multi-Device Ready:** Compatible with the latest multi-device features from WhatsApp.
22
+ - **Lightweight:** Stable and easy to integrate into various systems and server environments.
23
+
24
+ ---
25
+
26
+ ## 🚀 Getting Started
27
+
28
+ Begin by installing the library via NPM:
29
+
30
+ ```bash
31
+ npm install baileys-akiko
32
+ ```
33
+
34
+ Use session storage and interactive messaging features to build complete, stable solutions tailored to your business or project needs.
35
+
36
+ ---
37
+
38
+ ## 📚 Documentation & Examples
39
+
40
+ ### Label Group
41
+
42
+ Tag/Label Member Group
43
+
44
+ ```javascript
45
+ await sock.setLabelGroup(jid, string)
46
+ ```
47
+
48
+ ---
49
+
50
+ ### Check ID Channel
51
+
52
+ Get ID Channel From Url
53
+
54
+ ```javascript
55
+ await sock.newsletterFromUrl(url)
56
+ ```
57
+
58
+ **Result JSON:**
59
+
60
+ ```json
61
+ {
62
+ "name": "Name Channel",
63
+ "id": "Channel ID",
64
+ "state": "Status Channel",
65
+ "subscribers": "Followers",
66
+ "verification": "UNVERIFIED",
67
+ "creation_time": 1728547155,
68
+ "description": "Description Channel"
69
+ }
70
+ ```
71
+
72
+ ---
73
+
74
+ ### Check Banned Number
75
+
76
+ Check the status of blocked/banned numbers easily:
77
+
78
+ ```javascript
79
+ sock.checkWhatsApp(jid)
80
+ ```
81
+
82
+ ---
83
+
84
+ ## 💬 SendMessage Documentation
85
+
86
+ ### Status Mention Group & Private Message
87
+
88
+ Send Status Mention to Group/Private Chat:
89
+
90
+ ```javascript
91
+ await sock.sendStatusMention(content, jid);
92
+ ```
93
+
94
+ ### Status Group Message V2
95
+
96
+ Send Group Status With Version 2:
97
+
98
+ ```javascript
99
+ await sock.sendMessage(jid, {
100
+ groupStatusMessage: {
101
+ text: "Hello from Akiko!"
102
+ }
103
+ });
104
+ ```
105
+
106
+ ### Album Message (Multiple Images)
107
+
108
+ Send multiple images in a single album message:
109
+
110
+ ```javascript
111
+ await sock.sendMessage(jid, {
112
+ albumMessage: [
113
+ { image: bufferImage, caption: "Foto pertama" },
114
+ { image: { url: "URL IMAGE" }, caption: "Foto kedua" }
115
+ ]
116
+ }, { quoted: m });
117
+ ```
118
+
119
+ ### Event Message
120
+
121
+ Create and send WhatsApp event invitations:
122
+
123
+ ```javascript
124
+ await sock.sendMessage(jid, {
125
+ eventMessage: {
126
+ isCanceled: false,
127
+ name: "Akiko Special Event",
128
+ description: "Join our community event!",
129
+ location: {
130
+ degreesLatitude: 0,
131
+ degreesLongitude: 0,
132
+ name: "Virtual Meetup"
133
+ },
134
+ joinLink: "[https://github.com/AkikoClarisa](https://github.com/AkikoClarisa)",
135
+ startTime: "1763019000",
136
+ endTime: "1763026200",
137
+ extraGuestsAllowed: false
138
+ }
139
+ }, { quoted: m });
140
+ ```
141
+
142
+ ### Poll Result Message
143
+
144
+ Display poll results with vote counts:
145
+
146
+ ```javascript
147
+ await sock.sendMessage(jid, {
148
+ pollResultMessage: {
149
+ name: "Akiko Survey",
150
+ pollVotes: [
151
+ { optionName: "Awesome", optionVoteCount: "112233" },
152
+ { optionName: "Good", optionVoteCount: "1" }
153
+ ]
154
+ }
155
+ }, { quoted: m });
156
+ ```
157
+
158
+ ### Simple Interactive Message
159
+
160
+ Send basic interactive messages with copy button functionality:
161
+
162
+ ```javascript
163
+ await sock.sendMessage(jid, {
164
+ interactiveMessage: {
165
+ header: "Baileys Akiko",
166
+ title: "Welcome to Akiko",
167
+ footer: "Powered by AkikoClarisa",
168
+ buttons: [
169
+ {
170
+ name: "cta_copy",
171
+ buttonParamsJson: JSON.stringify({
172
+ display_text: "Copy Source Code",
173
+ id: "123456789",
174
+ copy_code: "AKIKO-2026"
175
+ })
176
+ }
177
+ ]
178
+ }
179
+ }, { quoted: m });
180
+ ```
181
+
182
+ ### Interactive Message with Native Flow
183
+
184
+ Send interactive messages with buttons, copy actions, and native flow features:
185
+
186
+ ```javascript
187
+ await sock.sendMessage(jid, {
188
+ interactiveMessage: {
189
+ header: "Akiko Store",
190
+ title: "Special Offers",
191
+ footer: "Github: AkikoClarisa",
192
+ image: { url: "[https://example.com/image.jpg](https://example.com/image.jpg)" },
193
+ nativeFlowMessage: {
194
+ messageParamsJson: JSON.stringify({
195
+ limited_time_offer: {
196
+ text: "Limited Promo!",
197
+ url: "[https://github.com/AkikoClarisa](https://github.com/AkikoClarisa)",
198
+ copy_code: "AKIKO-PROMO",
199
+ expiration_time: Date.now() * 999
200
+ },
201
+ bottom_sheet: {
202
+ in_thread_buttons_limit: 2,
203
+ divider_indices: [1, 2, 3, 4, 5, 999],
204
+ list_title: "Menu",
205
+ button_title: "Open Menu"
206
+ },
207
+ tap_target_configuration: {
208
+ title: " X ",
209
+ description: "Close",
210
+ canonical_url: "[https://github.com/AkikoClarisa](https://github.com/AkikoClarisa)",
211
+ domain: "akiko.example.com",
212
+ button_index: 0
213
+ }
214
+ }),
215
+ buttons: [
216
+ {
217
+ name: "single_select",
218
+ buttonParamsJson: JSON.stringify({
219
+ has_multiple_buttons: true
220
+ })
221
+ },
222
+ {
223
+ name: "call_permission_request",
224
+ buttonParamsJson: JSON.stringify({
225
+ has_multiple_buttons: true
226
+ })
227
+ },
228
+ {
229
+ name: "single_select",
230
+ buttonParamsJson: JSON.stringify({
231
+ title: "Select Option",
232
+ sections: [
233
+ {
234
+ title: "Main Menu",
235
+ highlight_label: "Hot",
236
+ rows: [
237
+ {
238
+ title: "Profile",
239
+ description: "View Akiko Profile",
240
+ id: "row_1"
241
+ }
242
+ ]
243
+ }
244
+ ],
245
+ has_multiple_buttons: true
246
+ })
247
+ }
248
+ ]
249
+ }
250
+ }
251
+ }, { quoted: m });
252
+ ```
253
+
254
+ ### Product Message
255
+
256
+ Send product catalog messages with buttons and merchant information:
257
+
258
+ ```javascript
259
+ await sock.sendMessage(jid, {
260
+ productMessage: {
261
+ title: "Akiko Script Premium",
262
+ description: "High-performance bot script",
263
+ thumbnail: { url: "[https://example.com/image.jpg](https://example.com/image.jpg)" },
264
+ productId: "PROD-AKIKO-01",
265
+ retailerId: "RETAIL-01",
266
+ url: "[https://github.com/AkikoClarisa](https://github.com/AkikoClarisa)",
267
+ body: "Product Details",
268
+ footer: "Special Price",
269
+ priceAmount1000: 50000,
270
+ currencyCode: "IDR",
271
+ buttons: [
272
+ {
273
+ name: "cta_url",
274
+ buttonParamsJson: JSON.stringify({
275
+ display_text: "Buy Now",
276
+ url: "[https://github.com/AkikoClarisa](https://github.com/AkikoClarisa)"
277
+ })
278
+ }
279
+ ]
280
+ }
281
+ }, { quoted: m });
282
+ ```
283
+
284
+ ### Interactive Message with Document Buffer
285
+
286
+ Send interactive messages with document from buffer (file system):
287
+
288
+ ```javascript
289
+ await sock.sendMessage(jid, {
290
+ interactiveMessage: {
291
+ header: "Akiko Docs",
292
+ title: "Library Documentation",
293
+ footer: "Github: AkikoClarisa",
294
+ document: fs.readFileSync("./package.json"),
295
+ mimetype: "application/pdf",
296
+ fileName: "akiko_docs.pdf",
297
+ jpegThumbnail: fs.readFileSync("./document.jpeg"),
298
+ contextInfo: {
299
+ mentionedJid: [jid],
300
+ forwardingScore: 777,
301
+ isForwarded: true
302
+ },
303
+ externalAdReply: {
304
+ title: "Akiko Bot System",
305
+ body: "The best WA library",
306
+ mediaType: 3,
307
+ thumbnailUrl: "[https://example.com/image.jpg](https://example.com/image.jpg)",
308
+ mediaUrl: " X ",
309
+ sourceUrl: "[https://github.com/AkikoClarisa](https://github.com/AkikoClarisa)",
310
+ showAdAttribution: true,
311
+ renderLargerThumbnail: false
312
+ },
313
+ buttons: [
314
+ {
315
+ name: "cta_url",
316
+ buttonParamsJson: JSON.stringify({
317
+ display_text: "Visit GitHub",
318
+ url: "[https://github.com/AkikoClarisa](https://github.com/AkikoClarisa)",
319
+ merchant_url: "[https://github.com/AkikoClarisa](https://github.com/AkikoClarisa)"
320
+ })
321
+ }
322
+ ]
323
+ }
324
+ }, { quoted: m });
325
+ ```
326
+
327
+ ### Request Payment Message
328
+
329
+ Send payment request messages with custom background and sticker:
330
+
331
+ ```javascript
332
+ let quotedType = m.quoted?.mtype || '';
333
+ let quotedContent = JSON.stringify({ [quotedType]: m.quoted }, null, 2);
334
+
335
+ await sock.sendMessage(jid, {
336
+ requestPaymentMessage: {
337
+ currency: "IDR",
338
+ amount: 50000000,
339
+ from: m.sender,
340
+ sticker: JSON.parse(quotedContent),
341
+ background: {
342
+ id: "100",
343
+ fileLength: "0",
344
+ width: 1000,
345
+ height: 1000,
346
+ mimetype: "image/webp",
347
+ placeholderArgb: 0xFF00FFFF,
348
+ textArgb: 0xFFFFFFFF,
349
+ subtextArgb: 0xFFAA00FF
350
+ }
351
+ }
352
+ }, { quoted: m });
353
+ ```
354
+
355
+ ---
356
+
357
+ ## 💎 Why Choose Baileys Akiko?
358
+
359
+ Because this library offers high stability, comprehensive features, and an actively improved pairing process. It is the perfect choice for developers aiming to create professional and secure WhatsApp automation solutions. Support for the latest WhatsApp UI ensures compatibility with platform updates.
360
+
361
+ ---
362
+
363
+ ### Contact Developer
364
+
365
+ For questions, support, or collaboration, feel free to visit my GitHub:
366
+
367
+ - **GitHub**: [AkikoClarisa](https://github.com/AkikoClarisa)
368
+
369
+ ### 🙌 Main Contributor
370
+
371
+ <table>
372
+ <tr>
373
+ <td align="center">
374
+ <a href="https://github.com/AkikoClarisa">
375
+ <img src="https://github.com/AkikoClarisa.png?size=100" width="80px;" style="border-radius:50%;" alt="AkikoClarisa"/>
376
+ <br />
377
+ <sub><b>AkikoClarisa</b></sub>
378
+ </a>
379
+ </td>
380
+ </tr>
381
+ </table>
382
+
383
+ **Thank you for choosing Baileys Akiko as your WhatsApp automation solution!**