rsembilaneks-baileyss 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.
- package/README.md +192 -0
- package/WAProto/index.js +97650 -0
- package/engine-requirements.js +11 -0
- package/lib/Defaults/baileys-version.json +1 -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 +970 -0
- package/lib/Socket/damnn.d.ts +278 -0
- package/lib/Socket/damnn.js +620 -0
- package/lib/Socket/groups.d.ts +115 -0
- package/lib/Socket/groups.js +319 -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 +986 -0
- package/lib/Socket/newsletter.d.ts +134 -0
- package/lib/Socket/newsletter.js +348 -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 +662 -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 +816 -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/.gitkeep +1 -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 +44 -0
- package/package.json +103 -0
package/README.md
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
๐ Baileys Modified
|
|
2
|
+
|
|
3
|
+
ยซHigh performance WhatsApp Web API library for Node.js
|
|
4
|
+
Modified version with stability improvements and additional optimizations.ยป
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
๐ About
|
|
9
|
+
|
|
10
|
+
Baileys Modified is a customized version of the well-known WhatsApp Web API library used to build WhatsApp bots and automation systems.
|
|
11
|
+
|
|
12
|
+
This version focuses on:
|
|
13
|
+
|
|
14
|
+
- improving connection stability
|
|
15
|
+
- reducing unexpected logout
|
|
16
|
+
- optimizing pairing code
|
|
17
|
+
- ensuring compatibility with modern Node.js environments
|
|
18
|
+
|
|
19
|
+
It is designed to make development of WhatsApp bots easier, faster, and more reliable.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
โจ Key Features
|
|
24
|
+
|
|
25
|
+
- ๐ Stable Pairing Code System
|
|
26
|
+
- ๐ซ Reduced Connection Closed Errors
|
|
27
|
+
- ๐ Improved Session Handling
|
|
28
|
+
- ๐ก Multi Device Compatible
|
|
29
|
+
- โก Optimized Performance
|
|
30
|
+
- ๐ง Better Error Handling
|
|
31
|
+
- ๐งฉ Easy Integration for Bots
|
|
32
|
+
- ๐ง Clean Code Structure
|
|
33
|
+
- ๐ฆ GitHub Installable Package
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
๐งฐ Technology Stack
|
|
38
|
+
|
|
39
|
+
This project uses several core technologies:
|
|
40
|
+
|
|
41
|
+
- Node.js
|
|
42
|
+
- WebSocket
|
|
43
|
+
- Protocol Buffers
|
|
44
|
+
- Signal Protocol Encryption
|
|
45
|
+
|
|
46
|
+
Libraries used:
|
|
47
|
+
|
|
48
|
+
- protobufjs
|
|
49
|
+
- ws
|
|
50
|
+
- pino
|
|
51
|
+
- axios
|
|
52
|
+
- lodash
|
|
53
|
+
- libsignal
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
๐ฆ Installation
|
|
58
|
+
|
|
59
|
+
Install directly from GitHub repository.
|
|
60
|
+
|
|
61
|
+
npm install github:rsembilaneks-xyz/Baileys
|
|
62
|
+
|
|
63
|
+
or using yarn
|
|
64
|
+
|
|
65
|
+
yarn add github:rsembilaneks-xyz/Baileys
|
|
66
|
+
|
|
67
|
+
You can also add it manually in your package.json
|
|
68
|
+
|
|
69
|
+
"@whiskeysockets/baileys": "github:rsembilaneks-xyz/Baileys"
|
|
70
|
+
|
|
71
|
+
Then run
|
|
72
|
+
|
|
73
|
+
npm install
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
๐ Basic Example
|
|
78
|
+
|
|
79
|
+
Below is a minimal example to create a WhatsApp connection.
|
|
80
|
+
|
|
81
|
+
const { default: makeWASocket } = require("@whiskeysockets/baileys")
|
|
82
|
+
|
|
83
|
+
async function startBot() {
|
|
84
|
+
const sock = makeWASocket({
|
|
85
|
+
printQRInTerminal: true
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
sock.ev.on("messages.upsert", async ({ messages }) => {
|
|
89
|
+
const m = messages[0]
|
|
90
|
+
if (!m.message) return
|
|
91
|
+
|
|
92
|
+
console.log("New message:", m)
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
startBot()
|
|
97
|
+
|
|
98
|
+
๐ง Development
|
|
99
|
+
|
|
100
|
+
Clone repository
|
|
101
|
+
|
|
102
|
+
git clone https://github.com/rsembilaneks-xyz/baileys
|
|
103
|
+
|
|
104
|
+
Install dependencies
|
|
105
|
+
|
|
106
|
+
npm install
|
|
107
|
+
|
|
108
|
+
Build project
|
|
109
|
+
|
|
110
|
+
npm run build
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
โ๏ธ Requirements
|
|
115
|
+
|
|
116
|
+
Minimum requirements:
|
|
117
|
+
|
|
118
|
+
- Node.js 20+
|
|
119
|
+
- npm / yarn
|
|
120
|
+
- Internet connection
|
|
121
|
+
- WhatsApp account with multi-device enabled
|
|
122
|
+
|
|
123
|
+
Recommended environment:
|
|
124
|
+
|
|
125
|
+
- Linux VPS
|
|
126
|
+
- Node.js LTS
|
|
127
|
+
- PM2 for process management
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
๐งช Testing
|
|
132
|
+
|
|
133
|
+
Run test environment:
|
|
134
|
+
|
|
135
|
+
npm test
|
|
136
|
+
|
|
137
|
+
Lint code:
|
|
138
|
+
|
|
139
|
+
npm run lint
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
โ ๏ธ Disclaimer
|
|
144
|
+
|
|
145
|
+
This project is not affiliated with WhatsApp, Meta, or any official WhatsApp services.
|
|
146
|
+
|
|
147
|
+
Using unofficial APIs may violate WhatsApp Terms of Service.
|
|
148
|
+
Use this project at your own risk.
|
|
149
|
+
|
|
150
|
+
The author is not responsible for any account bans or misuse.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
๐ค Contributing
|
|
155
|
+
|
|
156
|
+
Contributions are welcome.
|
|
157
|
+
|
|
158
|
+
Steps:
|
|
159
|
+
|
|
160
|
+
1. Fork repository
|
|
161
|
+
2. Create feature branch
|
|
162
|
+
3. Commit changes
|
|
163
|
+
4. Submit pull request
|
|
164
|
+
|
|
165
|
+
Please follow coding standards and provide clear commit messages.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
๐ License
|
|
170
|
+
|
|
171
|
+
This project is licensed under the MIT License.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
๐ค Author
|
|
176
|
+
|
|
177
|
+
DitciiX7
|
|
178
|
+
|
|
179
|
+
GitHub
|
|
180
|
+
https://github.com/rsembilaneks-xyz
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
โญ Support
|
|
185
|
+
|
|
186
|
+
If you like this project:
|
|
187
|
+
|
|
188
|
+
- Give this repository a star
|
|
189
|
+
- Share it with other developers
|
|
190
|
+
- Contribute improvements
|
|
191
|
+
|
|
192
|
+
Your support helps this project grow.
|