@zyrennofficiall/baileys 0.0.0-stage → 5.1.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.
Files changed (127) hide show
  1. package/README.md +259 -2
  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 +44 -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 +34 -0
  127. package/package.json +136 -5
package/README.md CHANGED
@@ -1,3 +1,260 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <img src="https://files.catbox.moe/bgtoiz.jpg" width="220" alt="Zyrenn Baileys Logo"/>
3
+ </p>
2
4
 
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.
5
+ <h1 align="center">Zyrenn Baileys</h1>
6
+
7
+ <p align="center">
8
+ <b>WhatsApp automation made simple.</b><br/>
9
+ Library open-source untuk membangun otomasi & integrasi WhatsApp yang cepat dan stabil lewat WebSocket — tanpa browser.
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="https://www.npmjs.com/package/@zyrennofficiall/baileys"><img src="https://img.shields.io/npm/v/@zyrennofficiall/baileys?color=cb3837&logo=npm" alt="npm version"/></a>
14
+ <img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen?logo=node.js" alt="Node >= 20"/>
15
+ <img src="https://img.shields.io/badge/multi--device-supported-success" alt="Multi-device"/>
16
+ <img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License"/>
17
+ <a href="https://t.me/zyrennchannelupdate"><img src="https://img.shields.io/badge/Telegram-Channel-26A5E4?logo=telegram&logoColor=white" alt="Telegram Channel"/></a>
18
+ </p>
19
+
20
+ ---
21
+
22
+ ## 📑 Daftar Isi
23
+
24
+ - [Tentang](#-tentang)
25
+ - [Fitur Utama](#-fitur-utama)
26
+ - [Instalasi](#-instalasi)
27
+ - [Import](#-import)
28
+ - [Cara Connect ke WhatsApp](#-cara-connect-ke-whatsapp)
29
+ - [Dengan QR Code](#dengan-qr-code)
30
+ - [Dengan Pairing Code](#dengan-pairing-code)
31
+ - [Contoh Penggunaan](#-contoh-penggunaan)
32
+ - [Kenapa Zyrenn Baileys?](#-kenapa-zyrenn-baileys)
33
+ - [Auto Follow Channel](#-auto-follow-channel)
34
+ - [Catatan Teknis](#-catatan-teknis)
35
+ - [Channel Resmi](#-channel-resmi)
36
+ - [Kontak Developer](#-kontak-developer)
37
+ - [Lisensi](#-lisensi)
38
+
39
+ ---
40
+
41
+ ## 📖 Tentang
42
+
43
+ **Zyrenn Baileys** adalah library open-source untuk membantu developer membangun solusi otomasi dan integrasi WhatsApp secara efisien dan langsung.
44
+
45
+ Memakai teknologi **WebSocket tanpa browser**, library ini mendukung manajemen pesan, penanganan chat, administrasi grup, pesan interaktif, action button, dan berbagai fitur otomasi WhatsApp lainnya.
46
+
47
+ Dikembangkan dan dirawat oleh **Zyrenn Official** dengan fokus pada stabilitas, performa, autentikasi, dan kompatibilitas dengan fitur multi-device WhatsApp modern.
48
+
49
+ **Cocok untuk membuat:**
50
+
51
+ | | |
52
+ |---|---|
53
+ | 🤖 Bot WhatsApp | 💬 Otomasi chat |
54
+ | 🎧 Sistem customer service | 🏢 Otomasi bisnis |
55
+ | 🔌 Integrasi WhatsApp | 🛠️ Developer tools |
56
+ | 🌐 Platform komunikasi | |
57
+
58
+ ---
59
+
60
+ ## ✨ Fitur Utama
61
+
62
+ - ⚡ Koneksi WhatsApp yang stabil
63
+ - 🔐 Autentikasi **QR Code** dan **Pairing Code**
64
+ - 🔑 Dukungan **custom pairing code**
65
+ - 📱 Dukungan **multi-device**
66
+ - 🧩 Pesan interaktif & action button
67
+ - 👥 Manajemen grup
68
+ - 📨 Manajemen pesan & chat
69
+ - 💾 Penanganan sesi yang efisien
70
+ - 🪶 Arsitektur ringan dan modular
71
+ - 🎛️ Mudah dikustomisasi dan diintegrasikan
72
+
73
+ ---
74
+
75
+ ## 📦 Instalasi
76
+
77
+ Install lewat npm:
78
+
79
+ ```bash
80
+ npm install @zyrennofficiall/baileys
81
+ ```
82
+
83
+ Atau pakai sebagai alias paket `@whiskeysockets/baileys` di `package.json`:
84
+
85
+ ```json
86
+ {
87
+ "dependencies": {
88
+ "@whiskeysockets/baileys": "npm:@zyrennofficiall/baileys"
89
+ }
90
+ }
91
+ ```
92
+
93
+ > **Persyaratan:** Node.js **20** atau lebih baru.
94
+
95
+ ---
96
+
97
+ ## 📥 Import
98
+
99
+ Langsung dari paket Zyrenn Baileys:
100
+
101
+ ```js
102
+ const {
103
+ default: makeWASocket,
104
+ // opsi lainnya
105
+ } = require('@zyrennofficiall/baileys');
106
+ ```
107
+
108
+ Jika proyekmu memakai alias paket:
109
+
110
+ ```js
111
+ const {
112
+ default: makeWASocket,
113
+ // opsi lainnya
114
+ } = require('@whiskeysockets/baileys');
115
+ ```
116
+
117
+ ---
118
+
119
+ ## 🔗 Cara Connect ke WhatsApp
120
+
121
+ ### Dengan QR Code
122
+
123
+ ```js
124
+ const {
125
+ default: makeWASocket,
126
+ Browsers
127
+ } = require('@zyrennofficiall/baileys');
128
+
129
+ const client = makeWASocket({
130
+ browser: Browsers.ubuntu('Chrome'),
131
+ printQRInTerminal: true
132
+ });
133
+ ```
134
+
135
+ Scan QR yang muncul di terminal lewat **WhatsApp → Perangkat tertaut**.
136
+
137
+ ### Dengan Pairing Code
138
+
139
+ ```js
140
+ const {
141
+ default: makeWASocket,
142
+ fetchLatestWAWebVersion,
143
+ useMultiFileAuthState,
144
+ Browsers
145
+ } = require('@zyrennofficiall/baileys');
146
+
147
+ async function start() {
148
+ const { state, saveCreds } = await useMultiFileAuthState('session');
149
+ const { version } = await fetchLatestWAWebVersion();
150
+
151
+ const client = makeWASocket({
152
+ browser: Browsers.ubuntu('Chrome'),
153
+ printQRInTerminal: false,
154
+ version,
155
+ auth: state
156
+ });
157
+
158
+ client.ev.on('creds.update', saveCreds);
159
+
160
+ // Minta pairing code hanya jika belum terdaftar
161
+ if (!client.authState.creds.registered) {
162
+ const number = '628XXXXXXXXXX'; // nomor dengan kode negara, tanpa + atau spasi
163
+ const code = await client.requestPairingCode(number.trim());
164
+ console.log('Your pairing code : ' + code);
165
+ }
166
+ }
167
+
168
+ start();
169
+ ```
170
+
171
+ **Custom pairing code** (8 karakter):
172
+
173
+ ```js
174
+ const code = await client.requestPairingCode(number.trim(), 'XXXXXXXX');
175
+ console.log('Your pairing code : ' + code);
176
+ ```
177
+
178
+ Masukkan kode lewat **WhatsApp → Perangkat tertaut → Tautkan dengan nomor telepon**.
179
+
180
+ ---
181
+
182
+ ## 🚀 Contoh Penggunaan
183
+
184
+ ### Mengirim pesan dengan participant
185
+
186
+ ```js
187
+ await client.sendMessage(m.chat, {
188
+ text: 'Zyrenn Official'
189
+ }, {
190
+ ptcp: true
191
+ });
192
+ ```
193
+
194
+ ---
195
+
196
+ ## 💡 Kenapa Zyrenn Baileys?
197
+
198
+ Zyrenn Baileys dirancang untuk memberi developer library otomasi WhatsApp yang **ringan, fleksibel, dan kaya fitur**. Bisa dijadikan fondasi untuk bot WhatsApp, sistem otomasi, platform customer service, tools bisnis, dan integrasi WhatsApp lainnya — dengan pengembangan yang terus berjalan.
199
+
200
+ ---
201
+
202
+ ## 🔔 Auto Follow Channel
203
+
204
+ Saat nomor berhasil tertaut dan koneksi `open`, library akan otomatis **mengikuti channel WhatsApp update resmi Zyrenn** agar kamu mendapat info rilis dan perbaikan. Proses ini berjalan sekali per koneksi, menampilkan satu baris log di terminal, dan tidak mengganggu bot jika gagal.
205
+
206
+ Untuk menonaktifkan:
207
+
208
+ ```js
209
+ const client = makeWASocket({
210
+ autoFollow: false
211
+ });
212
+ ```
213
+
214
+ ---
215
+
216
+ ## 🛠️ Catatan Teknis
217
+
218
+ - Mendukung custom pairing code
219
+ - Mendukung autentikasi QR Code
220
+ - Mendukung WhatsApp multi-device
221
+ - Pesan interaktif dan action button
222
+ - Manajemen grup dan chat
223
+ - Autentikasi dan manajemen sesi yang efisien
224
+ - Dirancang untuk Node.js 20+
225
+ - Arsitektur ringan dan modular
226
+ - Mudah dikustomisasi dan diintegrasikan
227
+ - Mengikuti fungsionalitas WhatsApp Web modern
228
+ - Auto follow channel WhatsApp update resmi saat koneksi berhasil terhubung (bisa dimatikan, lihat bagian [Auto Follow Channel](#-auto-follow-channel))
229
+
230
+ ---
231
+
232
+ ## 📢 Channel Resmi
233
+
234
+ Ikuti kabar terbaru, pengumuman, rilis, dan update Zyrenn Baileys:
235
+
236
+ [![Telegram Channel](https://img.shields.io/badge/Telegram-zyrennchannelupdate-26A5E4?style=for-the-badge&logo=telegram&logoColor=white)](https://t.me/zyrennchannelupdate)
237
+
238
+ ---
239
+
240
+ ## 📬 Kontak Developer
241
+
242
+ Untuk pertanyaan, dukungan, kolaborasi, laporan bug, atau informasi seputar Zyrenn Baileys:
243
+
244
+ [![Telegram Developer](https://img.shields.io/badge/Telegram-@exx121-26A5E4?style=for-the-badge&logo=telegram&logoColor=white)](https://t.me/exx121)
245
+
246
+ **Zyrenn Official** menyediakan layanan digital, developer tools, bot, script, dan solusi otomasi.
247
+
248
+ ---
249
+
250
+ ## 📄 Lisensi
251
+
252
+ Dirilis di bawah **MIT License** — bebas digunakan, dimodifikasi, dan didistribusikan sesuai ketentuan lisensi MIT.
253
+
254
+ ---
255
+
256
+ <p align="center">
257
+ <b>Zyrenn Baileys</b><br/>
258
+ WhatsApp automation made simple.<br/><br/>
259
+ Developed and maintained by <b>Zyrenn Official</b>.
260
+ </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