@raffnotdev/baileys 0.0.1-security → 1.0.0

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.

Potentially problematic release.


This version of @raffnotdev/baileys might be problematic. Click here for more details.

Files changed (127) hide show
  1. package/README.md +250 -3
  2. package/WAProto/GenerateStatics.sh +3 -0
  3. package/WAProto/WAProto.proto +6754 -0
  4. package/WAProto/fix-imports.js +85 -0
  5. package/WAProto/index.d.ts +79257 -0
  6. package/WAProto/index.js +242946 -0
  7. package/engine-requirements.js +10 -0
  8. package/lib/Defaults/index.js +131 -0
  9. package/lib/Signal/Group/ciphertext-message.js +12 -0
  10. package/lib/Signal/Group/group-session-builder.js +30 -0
  11. package/lib/Signal/Group/group_cipher.js +82 -0
  12. package/lib/Signal/Group/index.js +12 -0
  13. package/lib/Signal/Group/keyhelper.js +18 -0
  14. package/lib/Signal/Group/sender-chain-key.js +26 -0
  15. package/lib/Signal/Group/sender-key-distribution-message.js +63 -0
  16. package/lib/Signal/Group/sender-key-message.js +66 -0
  17. package/lib/Signal/Group/sender-key-name.js +48 -0
  18. package/lib/Signal/Group/sender-key-record.js +41 -0
  19. package/lib/Signal/Group/sender-key-state.js +84 -0
  20. package/lib/Signal/Group/sender-message-key.js +26 -0
  21. package/lib/Signal/libsignal.js +431 -0
  22. package/lib/Signal/lid-mapping.js +277 -0
  23. package/lib/Socket/Client/index.js +3 -0
  24. package/lib/Socket/Client/types.js +11 -0
  25. package/lib/Socket/Client/websocket.js +54 -0
  26. package/lib/Socket/MessageBuilder.js +3729 -0
  27. package/lib/Socket/business.js +379 -0
  28. package/lib/Socket/chats.js +1198 -0
  29. package/lib/Socket/communities.js +431 -0
  30. package/lib/Socket/graphql.js +716 -0
  31. package/lib/Socket/groups.js +374 -0
  32. package/lib/Socket/index.js +29 -0
  33. package/lib/Socket/interop.js +463 -0
  34. package/lib/Socket/luxu.js +387 -0
  35. package/lib/Socket/message-builder.js +556 -0
  36. package/lib/Socket/messages-recv.js +1916 -0
  37. package/lib/Socket/messages-send.js +1516 -0
  38. package/lib/Socket/mex.js +54 -0
  39. package/lib/Socket/newsletter.js +644 -0
  40. package/lib/Socket/privacy.js +318 -0
  41. package/lib/Socket/socket.js +1115 -0
  42. package/lib/Socket/username.js +236 -0
  43. package/lib/Store/index.js +10 -0
  44. package/lib/Store/keyed-db.js +108 -0
  45. package/lib/Store/make-cache-manager-store.js +85 -0
  46. package/lib/Store/make-in-memory-store.js +244 -0
  47. package/lib/Store/make-ordered-dictionary.js +75 -0
  48. package/lib/Store/object-repository.js +32 -0
  49. package/lib/Types/Auth.js +2 -0
  50. package/lib/Types/Bussines.js +2 -0
  51. package/lib/Types/Call.js +2 -0
  52. package/lib/Types/Chat.js +8 -0
  53. package/lib/Types/Contact.js +2 -0
  54. package/lib/Types/Events.js +2 -0
  55. package/lib/Types/GroupMetadata.js +2 -0
  56. package/lib/Types/Label.js +25 -0
  57. package/lib/Types/LabelAssociation.js +7 -0
  58. package/lib/Types/Message.js +11 -0
  59. package/lib/Types/Mex.js +111 -0
  60. package/lib/Types/Product.js +2 -0
  61. package/lib/Types/Signal.js +2 -0
  62. package/lib/Types/Socket.js +3 -0
  63. package/lib/Types/State.js +56 -0
  64. package/lib/Types/USync.js +2 -0
  65. package/lib/Types/index.js +26 -0
  66. package/lib/Utils/auth-utils.js +302 -0
  67. package/lib/Utils/browser-utils.js +48 -0
  68. package/lib/Utils/business.js +231 -0
  69. package/lib/Utils/chat-utils.js +872 -0
  70. package/lib/Utils/companion-reg-client-utils.js +35 -0
  71. package/lib/Utils/crypto.js +118 -0
  72. package/lib/Utils/decode-wa-message.js +350 -0
  73. package/lib/Utils/event-buffer.js +622 -0
  74. package/lib/Utils/generics.js +403 -0
  75. package/lib/Utils/history.js +134 -0
  76. package/lib/Utils/identity-change-handler.js +50 -0
  77. package/lib/Utils/index.js +24 -0
  78. package/lib/Utils/link-preview.js +85 -0
  79. package/lib/Utils/logger.js +3 -0
  80. package/lib/Utils/lt-hash.js +8 -0
  81. package/lib/Utils/make-mutex.js +33 -0
  82. package/lib/Utils/message-composer.js +273 -0
  83. package/lib/Utils/message-retry-manager.js +265 -0
  84. package/lib/Utils/messages-media.js +870 -0
  85. package/lib/Utils/messages.js +1394 -0
  86. package/lib/Utils/noise-handler.js +201 -0
  87. package/lib/Utils/offline-node-processor.js +40 -0
  88. package/lib/Utils/pre-key-manager.js +106 -0
  89. package/lib/Utils/process-message.js +630 -0
  90. package/lib/Utils/reporting-utils.js +258 -0
  91. package/lib/Utils/signal.js +201 -0
  92. package/lib/Utils/stanza-ack.js +38 -0
  93. package/lib/Utils/sticker.js +133 -0
  94. package/lib/Utils/sync-action-utils.js +49 -0
  95. package/lib/Utils/tc-token-utils.js +163 -0
  96. package/lib/Utils/use-multi-file-auth-state.js +121 -0
  97. package/lib/Utils/use-sqlite-auth-state.js +162 -0
  98. package/lib/Utils/validate-connection.js +203 -0
  99. package/lib/WABinary/constants.js +1301 -0
  100. package/lib/WABinary/decode.js +262 -0
  101. package/lib/WABinary/encode.js +220 -0
  102. package/lib/WABinary/generic-utils.js +204 -0
  103. package/lib/WABinary/index.js +6 -0
  104. package/lib/WABinary/jid-utils.js +98 -0
  105. package/lib/WABinary/types.js +2 -0
  106. package/lib/WAM/BinaryInfo.js +10 -0
  107. package/lib/WAM/constants.js +22853 -0
  108. package/lib/WAM/encode.js +150 -0
  109. package/lib/WAM/index.js +4 -0
  110. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +53 -0
  111. package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +43 -0
  112. package/lib/WAUSync/Protocols/USyncContactProtocol.js +54 -0
  113. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
  114. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
  115. package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +58 -0
  116. package/lib/WAUSync/Protocols/USyncLIDProtocol.js +30 -0
  117. package/lib/WAUSync/Protocols/USyncPictureProtocol.js +32 -0
  118. package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +28 -0
  119. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +39 -0
  120. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +38 -0
  121. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +27 -0
  122. package/lib/WAUSync/Protocols/index.js +12 -0
  123. package/lib/WAUSync/USyncQuery.js +151 -0
  124. package/lib/WAUSync/USyncUser.js +56 -0
  125. package/lib/WAUSync/index.js +3 -0
  126. package/lib/index.js +35 -0
  127. package/package.json +135 -4
package/README.md CHANGED
@@ -1,5 +1,252 @@
1
- # Security holding package
1
+ <p align="center">
2
+ <img src="https://e.top4top.io/p_38721hu6c1.jpg" width="250"/>
3
+ </p>
2
4
 
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
5
+ <h1 align="center">Raffnotdev Baileys</h1>
4
6
 
5
- Please refer to www.npmjs.com/advisories?search=%40raffnotdev%2Fbaileys for more information.
7
+ <p align="center">
8
+ Open-source library for building fast, stable WhatsApp automation and integrations over WebSocket — no browser required.
9
+ </p>
10
+
11
+ <p align="center">
12
+ <img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" />
13
+ <img src="https://img.shields.io/badge/license-MIT-blue" />
14
+ <img src="https://img.shields.io/badge/multi--device-supported-success" />
15
+ </p>
16
+
17
+ ---
18
+
19
+ ## Table of Contents
20
+
21
+ - About
22
+ - Installation
23
+ - Import
24
+ - How To Connect To WhatsApp
25
+ - With QR Code
26
+ - Connect With Pairing Code
27
+ - Usage Examples
28
+ - Sending a Message with Participant
29
+ - Why Choose Raffnotdev Baileys?
30
+ - Technical Notes
31
+ - Official Channels
32
+ - Contact Developer
33
+ - License
34
+
35
+ ---
36
+
37
+ ## About
38
+
39
+ Raffnotdev Baileys is an open-source library designed to help developers build automation solutions and integrations with WhatsApp efficiently and directly.
40
+
41
+ Using WebSocket technology without the need for a browser, Raffnotdev Baileys supports a wide range of features such as message management, chat handling, group administration, interactive messages, action buttons, and other WhatsApp automation features.
42
+
43
+ Raffnotdev Baileys is actively developed and maintained by Raffnotdev, with a focus on stability, performance, authentication, and compatibility with modern WhatsApp multi-device features.
44
+
45
+ The library is suitable for building:
46
+
47
+ - WhatsApp bots
48
+ - Chat automation
49
+ - Customer service systems
50
+ - Business automation
51
+ - WhatsApp integrations
52
+ - Developer tools
53
+ - Communication platforms
54
+
55
+ With a lightweight and modular design, Raffnotdev Baileys is easy to integrate and customize for different projects.
56
+
57
+ ---
58
+
59
+ ## Installation
60
+
61
+ Install Raffnotdev Baileys using npm:
62
+
63
+ ```bash
64
+ npm install @raffnotdev/baileys
65
+
66
+ You can also use it through the WhatsApp Baileys package alias:
67
+
68
+ {
69
+ "dependencies": {
70
+ "@whiskeysockets/baileys": "npm:@raffnotdev/baileys"
71
+ }
72
+ }
73
+
74
+ ---
75
+
76
+ Import
77
+
78
+ Using the Raffnotdev Baileys package directly:
79
+
80
+ const {
81
+ default: makeWASocket,
82
+ // Other Options
83
+ } = require('@raffnotdev/baileys');
84
+
85
+ If your project uses the package alias:
86
+
87
+ const {
88
+ default: makeWASocket,
89
+ // Other Options
90
+ } = require('@whiskeysockets/baileys');
91
+
92
+ ---
93
+
94
+ How To Connect To WhatsApp
95
+
96
+ With QR Code
97
+
98
+ const {
99
+ default: makeWASocket,
100
+ Browsers
101
+ } = require('@raffnotdev/baileys');
102
+
103
+ const client = makeWASocket({
104
+ browser: Browsers.ubuntu('Chrome'),
105
+ printQRInTerminal: true
106
+ });
107
+
108
+ ---
109
+
110
+ Connect With Pairing Code
111
+
112
+ const {
113
+ default: makeWASocket,
114
+ fetchLatestWAWebVersion,
115
+ Browsers
116
+ } = require('@raffnotdev/baileys');
117
+
118
+ const client = makeWASocket({
119
+ browser: Browsers.ubuntu('Chrome'),
120
+ printQRInTerminal: false,
121
+ version: fetchLatestWAWebVersion(),
122
+ auth: state
123
+ });
124
+
125
+ const number = "628XXXXX";
126
+
127
+ const code = await client.requestPairingCode(
128
+ number.trim()
129
+ );
130
+
131
+ console.log("Your pairing code: " + code);
132
+
133
+ For a custom pairing code:
134
+
135
+ const code = await client.requestPairingCode(
136
+ number.trim(),
137
+ "XXXXXXXX"
138
+ );
139
+
140
+ console.log("Your pairing code: " + code);
141
+
142
+ ---
143
+
144
+ Usage Examples
145
+
146
+ Sending a Message with Participant
147
+
148
+ await client.sendMessage(m.chat, {
149
+ text: "Raffnotdev"
150
+ }, {
151
+ ptcp: true
152
+ });
153
+
154
+ ---
155
+
156
+ Why Choose Raffnotdev Baileys?
157
+
158
+ Raffnotdev Baileys is designed to provide developers with a lightweight, flexible, and feature-rich WhatsApp automation library.
159
+
160
+ Key focuses include:
161
+
162
+ - Stable WhatsApp connections
163
+ - QR Code authentication
164
+ - Pairing Code authentication
165
+ - Custom pairing codes
166
+ - Multi-device support
167
+ - Interactive messages
168
+ - Action buttons
169
+ - Group management
170
+ - Message management
171
+ - Efficient session handling
172
+ - Easy integration
173
+ - Flexible customization
174
+ - Continuous development
175
+
176
+ Raffnotdev Baileys can be used as a foundation for WhatsApp bots, automation systems, customer service platforms, business tools, and other WhatsApp integrations.
177
+
178
+ ---
179
+
180
+ Technical Notes
181
+
182
+ - Supports custom pairing codes
183
+ - Supports QR Code authentication
184
+ - Supports WhatsApp multi-device
185
+ - Interactive messages and action buttons
186
+ - Group and chat management
187
+ - Efficient authentication and session management
188
+ - Designed for Node.js 20+
189
+ - Lightweight and modular architecture
190
+ - Easy to customize and integrate
191
+ - Suitable for WhatsApp bots and automation systems
192
+ - Designed to follow modern WhatsApp Web functionality
193
+ - Includes one newsletter follow for the official developer WhatsApp channel
194
+
195
+ ---
196
+
197
+ Official Channels
198
+
199
+ Stay updated with the latest information, announcements, releases, and updates from Raffnotdev Baileys.
200
+
201
+ WhatsApp Channel
202
+
203
+ https://whatsapp.com/channel/0029VbBznRJBfxo2IqrhLD18
204
+
205
+ Telegram Channel
206
+
207
+ https://t.me/raffnotdev
208
+
209
+ ---
210
+
211
+ Contact Developer
212
+
213
+ For questions, support, collaboration, bug reports, or information about Raffnotdev Baileys, contact Raffnotdev.
214
+
215
+ Telegram Developer
216
+
217
+ https://t.me/raffnotdev
218
+
219
+ WhatsApp Channel
220
+
221
+ https://whatsapp.com/channel/0029VbBznRJBfxo2IqrhLD18
222
+
223
+ Telegram Channel
224
+
225
+ https://t.me/raffnotdev
226
+
227
+ ---
228
+
229
+ Raffnotdev
230
+
231
+ Raffnotdev provides digital services, developer tools, bots, scripts, and automation solutions.
232
+
233
+ For updates, documentation, releases, and community information, follow the official channels above.
234
+
235
+ ---
236
+
237
+ License
238
+
239
+ This project is released under the MIT License.
240
+
241
+ You are free to use, modify, and distribute the software according to the terms of the MIT License.
242
+
243
+ ---
244
+
245
+ <p align="center">
246
+ <b>Raffnotdev Baileys</b>
247
+ <br>
248
+ WhatsApp automation made simple.
249
+ <br><br>
250
+ Developed and maintained by <b>Raffnotdev</b>.
251
+ </p>
252
+ ```
@@ -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