dula-baileys 2.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.
- package/README.md +188 -0
- package/WAProto/index.js +169661 -0
- package/engine-requirements.js +10 -0
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/index.d.ts +53 -0
- package/lib/Defaults/index.js +147 -0
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
- package/lib/Signal/Group/ciphertext-message.js +15 -0
- package/lib/Signal/Group/group-session-builder.d.ts +14 -0
- package/lib/Signal/Group/group-session-builder.js +64 -0
- package/lib/Signal/Group/group_cipher.d.ts +17 -0
- package/lib/Signal/Group/group_cipher.js +96 -0
- package/lib/Signal/Group/index.d.ts +11 -0
- package/lib/Signal/Group/index.js +57 -0
- package/lib/Signal/Group/keyhelper.d.ts +10 -0
- package/lib/Signal/Group/keyhelper.js +55 -0
- package/lib/Signal/Group/queue-job.d.ts +1 -0
- package/lib/Signal/Group/queue-job.js +57 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
- package/lib/Signal/Group/sender-chain-key.js +34 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +66 -0
- package/lib/Signal/Group/sender-key-message.d.ts +18 -0
- package/lib/Signal/Group/sender-key-message.js +69 -0
- package/lib/Signal/Group/sender-key-name.d.ts +17 -0
- package/lib/Signal/Group/sender-key-name.js +51 -0
- package/lib/Signal/Group/sender-key-record.d.ts +30 -0
- package/lib/Signal/Group/sender-key-record.js +53 -0
- package/lib/Signal/Group/sender-key-state.d.ts +38 -0
- package/lib/Signal/Group/sender-key-state.js +99 -0
- package/lib/Signal/Group/sender-message-key.d.ts +11 -0
- package/lib/Signal/Group/sender-message-key.js +29 -0
- package/lib/Signal/libsignal.d.ts +3 -0
- package/lib/Signal/libsignal.js +174 -0
- package/lib/Socket/Client/abstract-socket-client.d.ts +17 -0
- package/lib/Socket/Client/abstract-socket-client.js +13 -0
- package/lib/Socket/Client/index.d.ts +3 -0
- package/lib/Socket/Client/index.js +19 -0
- package/lib/Socket/Client/mobile-socket-client.d.ts +13 -0
- package/lib/Socket/Client/mobile-socket-client.js +65 -0
- package/lib/Socket/Client/web-socket-client.d.ts +12 -0
- package/lib/Socket/Client/web-socket-client.js +62 -0
- package/lib/Socket/business.d.ts +171 -0
- package/lib/Socket/business.js +260 -0
- package/lib/Socket/chats.d.ts +267 -0
- package/lib/Socket/chats.js +983 -0
- package/lib/Socket/dugong.d.ts +254 -0
- package/lib/Socket/dugong.js +484 -0
- package/lib/Socket/groups.d.ts +115 -0
- package/lib/Socket/groups.js +317 -0
- package/lib/Socket/index.d.ts +173 -0
- package/lib/Socket/index.js +11 -0
- package/lib/Socket/messages-recv.d.ts +161 -0
- package/lib/Socket/messages-recv.js +1110 -0
- package/lib/Socket/messages-send.d.ts +149 -0
- package/lib/Socket/messages-send.js +909 -0
- package/lib/Socket/newsletter.d.ts +134 -0
- package/lib/Socket/newsletter.js +203 -0
- package/lib/Socket/registration.d.ts +267 -0
- package/lib/Socket/registration.js +166 -0
- package/lib/Socket/socket.d.ts +43 -0
- package/lib/Socket/socket.js +665 -0
- package/lib/Socket/usync.d.ts +36 -0
- package/lib/Socket/usync.js +70 -0
- package/lib/Store/index.d.ts +3 -0
- package/lib/Store/index.js +10 -0
- package/lib/Store/make-cache-manager-store.d.ts +13 -0
- package/lib/Store/make-cache-manager-store.js +83 -0
- package/lib/Store/make-in-memory-store.d.ts +118 -0
- package/lib/Store/make-in-memory-store.js +427 -0
- package/lib/Store/make-ordered-dictionary.d.ts +13 -0
- package/lib/Store/make-ordered-dictionary.js +81 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Store/object-repository.js +27 -0
- package/lib/Types/Auth.d.ts +110 -0
- package/lib/Types/Auth.js +2 -0
- package/lib/Types/Call.d.ts +13 -0
- package/lib/Types/Call.js +2 -0
- package/lib/Types/Chat.d.ts +102 -0
- package/lib/Types/Chat.js +4 -0
- package/lib/Types/Contact.d.ts +19 -0
- package/lib/Types/Contact.js +2 -0
- package/lib/Types/Events.d.ts +157 -0
- package/lib/Types/Events.js +2 -0
- package/lib/Types/GroupMetadata.d.ts +55 -0
- package/lib/Types/GroupMetadata.js +2 -0
- package/lib/Types/Label.d.ts +35 -0
- package/lib/Types/Label.js +27 -0
- package/lib/Types/LabelAssociation.d.ts +29 -0
- package/lib/Types/LabelAssociation.js +9 -0
- package/lib/Types/Message.d.ts +273 -0
- package/lib/Types/Message.js +9 -0
- package/lib/Types/Newsletter.d.ts +103 -0
- package/lib/Types/Newsletter.js +38 -0
- package/lib/Types/Product.d.ts +78 -0
- package/lib/Types/Product.js +2 -0
- package/lib/Types/Signal.d.ts +57 -0
- package/lib/Types/Signal.js +2 -0
- package/lib/Types/Socket.d.ts +111 -0
- package/lib/Types/Socket.js +2 -0
- package/lib/Types/State.d.ts +27 -0
- package/lib/Types/State.js +2 -0
- package/lib/Types/USync.d.ts +25 -0
- package/lib/Types/USync.js +2 -0
- package/lib/Types/index.d.ts +57 -0
- package/lib/Types/index.js +42 -0
- package/lib/Utils/auth-utils.d.ts +18 -0
- package/lib/Utils/auth-utils.js +206 -0
- package/lib/Utils/baileys-event-stream.d.ts +16 -0
- package/lib/Utils/baileys-event-stream.js +63 -0
- package/lib/Utils/business.d.ts +22 -0
- package/lib/Utils/business.js +234 -0
- package/lib/Utils/chat-utils.d.ts +71 -0
- package/lib/Utils/chat-utils.js +729 -0
- package/lib/Utils/crypto.d.ts +41 -0
- package/lib/Utils/crypto.js +151 -0
- package/lib/Utils/decode-wa-message.d.ts +19 -0
- package/lib/Utils/decode-wa-message.js +198 -0
- package/lib/Utils/event-buffer.d.ts +35 -0
- package/lib/Utils/event-buffer.js +514 -0
- package/lib/Utils/generics.d.ts +92 -0
- package/lib/Utils/generics.js +423 -0
- package/lib/Utils/history.d.ts +15 -0
- package/lib/Utils/history.js +96 -0
- package/lib/Utils/index.d.ts +17 -0
- package/lib/Utils/index.js +33 -0
- package/lib/Utils/link-preview.d.ts +21 -0
- package/lib/Utils/link-preview.js +93 -0
- package/lib/Utils/logger.d.ts +4 -0
- package/lib/Utils/logger.js +7 -0
- package/lib/Utils/lt-hash.d.ts +12 -0
- package/lib/Utils/lt-hash.js +51 -0
- package/lib/Utils/make-mutex.d.ts +7 -0
- package/lib/Utils/make-mutex.js +43 -0
- package/lib/Utils/messages-media.d.ts +116 -0
- package/lib/Utils/messages-media.js +819 -0
- package/lib/Utils/messages.d.ts +77 -0
- package/lib/Utils/messages.js +784 -0
- package/lib/Utils/noise-handler.d.ts +21 -0
- package/lib/Utils/noise-handler.js +155 -0
- package/lib/Utils/process-message.d.ts +41 -0
- package/lib/Utils/process-message.js +321 -0
- package/lib/Utils/signal.d.ts +32 -0
- package/lib/Utils/signal.js +153 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +13 -0
- package/lib/Utils/use-multi-file-auth-state.js +119 -0
- package/lib/Utils/validate-connection.d.ts +11 -0
- package/lib/Utils/validate-connection.js +229 -0
- package/lib/WABinary/constants.d.ts +30 -0
- package/lib/WABinary/constants.js +40 -0
- package/lib/WABinary/decode.d.ts +7 -0
- package/lib/WABinary/decode.js +252 -0
- package/lib/WABinary/encode.d.ts +3 -0
- package/lib/WABinary/encode.js +265 -0
- package/lib/WABinary/generic-utils.d.ts +17 -0
- package/lib/WABinary/generic-utils.js +198 -0
- package/lib/WABinary/index.d.ts +5 -0
- package/lib/WABinary/index.js +21 -0
- package/lib/WABinary/jid-utils.d.ts +31 -0
- package/lib/WABinary/jid-utils.js +62 -0
- package/lib/WABinary/types.d.ts +18 -0
- package/lib/WABinary/types.js +2 -0
- package/lib/WAM/BinaryInfo.d.ts +17 -0
- package/lib/WAM/BinaryInfo.js +13 -0
- package/lib/WAM/constants.d.ts +38 -0
- package/lib/WAM/constants.js +15350 -0
- package/lib/WAM/encode.d.ts +3 -0
- package/lib/WAM/encode.js +155 -0
- package/lib/WAM/index.d.ts +3 -0
- package/lib/WAM/index.js +19 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +25 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +8 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +24 -0
- package/lib/WAUSync/Protocols/index.d.ts +4 -0
- package/lib/WAUSync/Protocols/index.js +20 -0
- package/lib/WAUSync/USyncQuery.d.ts +28 -0
- package/lib/WAUSync/USyncQuery.js +89 -0
- package/lib/WAUSync/USyncUser.d.ts +12 -0
- package/lib/WAUSync/USyncUser.js +26 -0
- package/lib/WAUSync/index.d.ts +3 -0
- package/lib/WAUSync/index.js +19 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +43 -0
- package/package.json +110 -0
package/README.md
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<!-- TOP BANNER IMAGE -->
|
|
4
|
+
|
|
5
|
+
<img src="https://files.catbox.moe/vvbmii.jpg" width="100%" style="border-radius: 12px;" />
|
|
6
|
+
|
|
7
|
+
<br>
|
|
8
|
+
|
|
9
|
+
<div style="background: linear-gradient(90deg, #EF4444, #DC2626, #7F1D1D); padding: 10px; border-radius: 12px; margin: 18px 0;">
|
|
10
|
+
<span style="font-size: 18px; font-weight: bold; color: white;">
|
|
11
|
+
🔥 Ultimate WhatsApp Web API for Bots
|
|
12
|
+
</span>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<!-- BADGES -->
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+

|
|
19
|
+

|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## ⚡ Baileys-Dula – Supercharged WhatsApp API
|
|
27
|
+
|
|
28
|
+
> **Baileys-Dula** is a powerful WhatsApp Web API
|
|
29
|
+
> built for **WhatsApp bots, automation systems, and AI messaging**.
|
|
30
|
+
|
|
31
|
+
🚀 Fast • 🔒 Secure • 🤖 Bot-Friendly • 🔥 Red Cyber Theme
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## ❓ WHY BAILEYS-DULA?
|
|
36
|
+
|
|
37
|
+
| Feature | Description |
|
|
38
|
+
| ---------------- | --------------------------------- |
|
|
39
|
+
| ⚡ Lightning Fast | Optimized socket & event handling |
|
|
40
|
+
| 🛡️ Secure | Updated auth & pairing logic |
|
|
41
|
+
| 🤖 Bot Ready | Made for WhatsApp bot devs |
|
|
42
|
+
| 🎛️ Interactive | Buttons, lists & rich media |
|
|
43
|
+
| 🔄 Active | Regular updates & fixes |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 📌 IMPORTANT NOTE
|
|
48
|
+
|
|
49
|
+
⚠️ This project is based on
|
|
50
|
+
**WhiskeySockets / Baileys**
|
|
51
|
+
|
|
52
|
+
Baileys-Dula adds:
|
|
53
|
+
|
|
54
|
+
* Custom pairing codes
|
|
55
|
+
* AI message icons
|
|
56
|
+
* Cleaner logs
|
|
57
|
+
* Better bot compatibility
|
|
58
|
+
|
|
59
|
+
Original repo:
|
|
60
|
+
👉 [https://github.com/WhiskeySockets/Baileys](https://github.com/WhiskeySockets/Baileys)
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 💫 INSTALLATION
|
|
65
|
+
|
|
66
|
+
### 📦 package.json
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"baileys-dula": "*"
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### ⚙️ npm
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npm install baileys-dula
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 🔌 IMPORT
|
|
83
|
+
|
|
84
|
+
### ESM
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
import makeWASocket from 'baileys-dula'
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### CommonJS
|
|
91
|
+
|
|
92
|
+
```js
|
|
93
|
+
const { default: makeWASocket } = require('baileys-dula')
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 🔗 CONNECT TO WHATSAPP
|
|
99
|
+
|
|
100
|
+
### 📱 QR Code Login
|
|
101
|
+
|
|
102
|
+
```js
|
|
103
|
+
const makeWASocket = require('baileys-dula').default
|
|
104
|
+
|
|
105
|
+
const sock = makeWASocket({
|
|
106
|
+
browser: ['Ubuntu', 'Chrome', '20.0.1'],
|
|
107
|
+
printQRInTerminal: true
|
|
108
|
+
})
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### 📞 Pair With Number
|
|
114
|
+
|
|
115
|
+
```js
|
|
116
|
+
const {
|
|
117
|
+
default: makeWASocket,
|
|
118
|
+
fetchLatestWAWebVersion
|
|
119
|
+
} = require('baileys-dula')
|
|
120
|
+
|
|
121
|
+
const sock = makeWASocket({
|
|
122
|
+
printQRInTerminal: false,
|
|
123
|
+
version: fetchLatestWAWebVersion()
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
const code = await sock.requestPairingCode("94XXXXXXXXX")
|
|
127
|
+
console.log("Pairing Code:", code)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 🎛️ INTERACTIVE BUTTONS
|
|
133
|
+
|
|
134
|
+
```js
|
|
135
|
+
await sock.sendMessage(id, {
|
|
136
|
+
text: "Choose an option",
|
|
137
|
+
footer: "Baileys-Dula",
|
|
138
|
+
buttons: [
|
|
139
|
+
{ buttonId: "menu", buttonText: { displayText: "Menu" }, type: 1 },
|
|
140
|
+
{ buttonId: "owner", buttonText: { displayText: "Owner" }, type: 1 }
|
|
141
|
+
],
|
|
142
|
+
headerType: 1
|
|
143
|
+
})
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 🤖 AI MESSAGE ICON
|
|
149
|
+
|
|
150
|
+
```js
|
|
151
|
+
await sock.sendMessage(id, {
|
|
152
|
+
text: "Hello! I'm an AI response",
|
|
153
|
+
ai: true
|
|
154
|
+
})
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 🔐 CUSTOM PAIRING CODE
|
|
160
|
+
|
|
161
|
+
```js
|
|
162
|
+
const code = await sock.requestPairingCode(
|
|
163
|
+
phoneNumber,
|
|
164
|
+
"DULABOT1" // 8 characters
|
|
165
|
+
)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 🛠️ QUICK START
|
|
171
|
+
|
|
172
|
+
1️⃣ Install
|
|
173
|
+
2️⃣ Import
|
|
174
|
+
3️⃣ Connect WhatsApp
|
|
175
|
+
4️⃣ Build your bot
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 🐛 ISSUES & SUPPORT
|
|
180
|
+
|
|
181
|
+
Found a bug or want a feature?
|
|
182
|
+
Open an issue or contribute 💙
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
<p align="center"><i>Powered by Dula • Built for WhatsApp Bot Developers</i></p>
|
|
187
|
+
|
|
188
|
+
<img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&height=120§ion=footer" width="100%"/>
|