@eduh_dev021/baileys 1.0.0 → 1.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 (526) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +1526 -178
  3. package/WAProto/index.d.ts +1 -1
  4. package/WAProto/index.js +1 -1
  5. package/cjs/WAProto/index.d.ts +1 -1
  6. package/cjs/WAProto/index.js +0 -0
  7. package/cjs/engine-requirements.js +0 -0
  8. package/cjs/lib/Addon/cache.js +179 -0
  9. package/cjs/lib/Addon/crc32.js +41 -0
  10. package/cjs/lib/Addon/file-type.js +217 -0
  11. package/cjs/lib/Addon/get-file.js +99 -0
  12. package/cjs/lib/Addon/http-error.d.ts +0 -0
  13. package/cjs/lib/Addon/http-error.js +0 -0
  14. package/cjs/lib/Addon/index.d.ts +93 -0
  15. package/cjs/lib/Addon/index.js +18 -10
  16. package/cjs/lib/Addon/keyed-db.d.ts +0 -0
  17. package/cjs/lib/Addon/keyed-db.js +0 -0
  18. package/cjs/lib/Addon/link-preview.d.ts +0 -0
  19. package/cjs/lib/Addon/link-preview.js +0 -0
  20. package/cjs/lib/Addon/media-info.js +98 -0
  21. package/cjs/lib/Addon/mutex.js +78 -0
  22. package/cjs/lib/Addon/qr.js +464 -0
  23. package/cjs/lib/Addon/queue.js +54 -0
  24. package/cjs/lib/Addon/waveform.js +130 -0
  25. package/cjs/lib/Addon/zip.js +136 -0
  26. package/cjs/lib/Defaults/index.d.ts +2 -2
  27. package/cjs/lib/Defaults/index.js +2 -2
  28. package/cjs/lib/Signal/Group/ciphertext-message.d.ts +0 -0
  29. package/cjs/lib/Signal/Group/ciphertext-message.js +0 -0
  30. package/cjs/lib/Signal/Group/group-cipher.d.ts +0 -0
  31. package/cjs/lib/Signal/Group/group-cipher.js +0 -0
  32. package/cjs/lib/Signal/Group/group-session-builder.d.ts +0 -0
  33. package/cjs/lib/Signal/Group/group-session-builder.js +0 -0
  34. package/cjs/lib/Signal/Group/index.d.ts +0 -0
  35. package/cjs/lib/Signal/Group/index.js +0 -0
  36. package/cjs/lib/Signal/Group/keyhelper.d.ts +0 -0
  37. package/cjs/lib/Signal/Group/keyhelper.js +0 -0
  38. package/cjs/lib/Signal/Group/sender-chain-key.d.ts +0 -0
  39. package/cjs/lib/Signal/Group/sender-chain-key.js +0 -0
  40. package/cjs/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -0
  41. package/cjs/lib/Signal/Group/sender-key-distribution-message.js +0 -0
  42. package/cjs/lib/Signal/Group/sender-key-message.d.ts +0 -0
  43. package/cjs/lib/Signal/Group/sender-key-message.js +0 -0
  44. package/cjs/lib/Signal/Group/sender-key-name.d.ts +0 -0
  45. package/cjs/lib/Signal/Group/sender-key-name.js +0 -0
  46. package/cjs/lib/Signal/Group/sender-key-record.d.ts +0 -0
  47. package/cjs/lib/Signal/Group/sender-key-record.js +0 -0
  48. package/cjs/lib/Signal/Group/sender-key-state.d.ts +0 -0
  49. package/cjs/lib/Signal/Group/sender-key-state.js +0 -0
  50. package/cjs/lib/Signal/Group/sender-message-key.d.ts +0 -0
  51. package/cjs/lib/Signal/Group/sender-message-key.js +0 -0
  52. package/cjs/lib/Signal/libsignal.d.ts +0 -0
  53. package/cjs/lib/Signal/libsignal.js +0 -0
  54. package/cjs/lib/Signal/lid-mapping.d.ts +0 -0
  55. package/cjs/lib/Signal/lid-mapping.js +0 -0
  56. package/cjs/lib/Socket/Client/index.d.ts +0 -0
  57. package/cjs/lib/Socket/Client/index.js +0 -0
  58. package/cjs/lib/Socket/Client/types.d.ts +0 -0
  59. package/cjs/lib/Socket/Client/types.js +0 -0
  60. package/cjs/lib/Socket/Client/websocket.d.ts +0 -0
  61. package/cjs/lib/Socket/Client/websocket.js +0 -0
  62. package/cjs/lib/Socket/business.d.ts +0 -0
  63. package/cjs/lib/Socket/business.js +0 -0
  64. package/cjs/lib/Socket/chats.d.ts +0 -0
  65. package/cjs/lib/Socket/chats.js +0 -0
  66. package/cjs/lib/Socket/communities.d.ts +0 -0
  67. package/cjs/lib/Socket/communities.js +0 -0
  68. package/cjs/lib/Socket/groups.d.ts +0 -0
  69. package/cjs/lib/Socket/groups.js +0 -0
  70. package/cjs/lib/Socket/index.d.ts +0 -0
  71. package/cjs/lib/Socket/index.js +0 -0
  72. package/cjs/lib/Socket/messages-recv.d.ts +0 -0
  73. package/cjs/lib/Socket/messages-recv.js +0 -0
  74. package/cjs/lib/Socket/messages-send.d.ts +0 -0
  75. package/cjs/lib/Socket/messages-send.js +7 -7
  76. package/cjs/lib/Socket/mex.d.ts +0 -0
  77. package/cjs/lib/Socket/mex.js +0 -0
  78. package/cjs/lib/Socket/newsletter.d.ts +0 -0
  79. package/cjs/lib/Socket/newsletter.js +1 -1
  80. package/cjs/lib/Socket/socket.d.ts +0 -0
  81. package/cjs/lib/Socket/socket.js +0 -0
  82. package/cjs/lib/Store/index.d.ts +0 -0
  83. package/cjs/lib/Store/index.js +0 -0
  84. package/cjs/lib/Store/make-in-memory-store.d.ts +0 -0
  85. package/cjs/lib/Store/make-in-memory-store.js +0 -0
  86. package/cjs/lib/Store/make-ordered-dictionary.d.ts +0 -0
  87. package/cjs/lib/Store/make-ordered-dictionary.js +0 -0
  88. package/cjs/lib/Store/object-repository.d.ts +0 -0
  89. package/cjs/lib/Store/object-repository.js +0 -0
  90. package/cjs/lib/Transport/crypto.d.ts +0 -0
  91. package/cjs/lib/Transport/crypto.js +0 -0
  92. package/cjs/lib/Transport/curve.d.ts +0 -0
  93. package/cjs/lib/Transport/curve.js +0 -0
  94. package/cjs/lib/Transport/index.d.ts +0 -0
  95. package/cjs/lib/Transport/index.js +0 -0
  96. package/cjs/lib/Transport/internals.d.ts +0 -0
  97. package/cjs/lib/Transport/internals.js +0 -0
  98. package/cjs/lib/Transport/session-builder.d.ts +0 -0
  99. package/cjs/lib/Transport/session-builder.js +0 -0
  100. package/cjs/lib/Transport/session-cipher.d.ts +0 -0
  101. package/cjs/lib/Transport/session-cipher.js +0 -0
  102. package/cjs/lib/Transport/session-record.d.ts +0 -0
  103. package/cjs/lib/Transport/session-record.js +0 -0
  104. package/cjs/lib/Types/Auth.d.ts +0 -0
  105. package/cjs/lib/Types/Auth.js +0 -0
  106. package/cjs/lib/Types/Bussines.d.ts +0 -0
  107. package/cjs/lib/Types/Bussines.js +0 -0
  108. package/cjs/lib/Types/Call.d.ts +0 -0
  109. package/cjs/lib/Types/Call.js +0 -0
  110. package/cjs/lib/Types/Chat.d.ts +0 -0
  111. package/cjs/lib/Types/Chat.js +0 -0
  112. package/cjs/lib/Types/Contact.d.ts +0 -0
  113. package/cjs/lib/Types/Contact.js +0 -0
  114. package/cjs/lib/Types/Events.d.ts +0 -0
  115. package/cjs/lib/Types/Events.js +0 -0
  116. package/cjs/lib/Types/GroupMetadata.d.ts +0 -0
  117. package/cjs/lib/Types/GroupMetadata.js +0 -0
  118. package/cjs/lib/Types/Label.d.ts +0 -0
  119. package/cjs/lib/Types/Label.js +0 -0
  120. package/cjs/lib/Types/LabelAssociation.d.ts +0 -0
  121. package/cjs/lib/Types/LabelAssociation.js +0 -0
  122. package/cjs/lib/Types/Message.d.ts +0 -0
  123. package/cjs/lib/Types/Message.js +0 -0
  124. package/cjs/lib/Types/Mex.d.ts +0 -0
  125. package/cjs/lib/Types/Mex.js +0 -0
  126. package/cjs/lib/Types/Product.d.ts +0 -0
  127. package/cjs/lib/Types/Product.js +0 -0
  128. package/cjs/lib/Types/RichType.d.ts +0 -0
  129. package/cjs/lib/Types/RichType.js +0 -0
  130. package/cjs/lib/Types/Signal.d.ts +0 -0
  131. package/cjs/lib/Types/Signal.js +0 -0
  132. package/cjs/lib/Types/Socket.d.ts +0 -0
  133. package/cjs/lib/Types/Socket.js +0 -0
  134. package/cjs/lib/Types/State.d.ts +0 -0
  135. package/cjs/lib/Types/State.js +0 -0
  136. package/cjs/lib/Types/USync.d.ts +0 -0
  137. package/cjs/lib/Types/USync.js +0 -0
  138. package/cjs/lib/Types/index.d.ts +0 -0
  139. package/cjs/lib/Types/index.js +0 -0
  140. package/cjs/lib/Utils/auth-utils.d.ts +0 -0
  141. package/cjs/lib/Utils/auth-utils.js +0 -0
  142. package/cjs/lib/Utils/browser-utils.d.ts +0 -0
  143. package/cjs/lib/Utils/browser-utils.js +0 -0
  144. package/cjs/lib/Utils/business.d.ts +0 -0
  145. package/cjs/lib/Utils/business.js +0 -0
  146. package/cjs/lib/Utils/chat-utils.d.ts +0 -0
  147. package/cjs/lib/Utils/chat-utils.js +0 -0
  148. package/cjs/lib/Utils/companion-reg-client-utils.d.ts +0 -0
  149. package/cjs/lib/Utils/companion-reg-client-utils.js +0 -0
  150. package/cjs/lib/Utils/crypto.d.ts +0 -0
  151. package/cjs/lib/Utils/crypto.js +0 -0
  152. package/cjs/lib/Utils/decode-wa-message.d.ts +0 -0
  153. package/cjs/lib/Utils/decode-wa-message.js +0 -0
  154. package/cjs/lib/Utils/event-buffer.d.ts +0 -0
  155. package/cjs/lib/Utils/event-buffer.js +0 -0
  156. package/cjs/lib/Utils/generics.d.ts +0 -0
  157. package/cjs/lib/Utils/generics.js +1 -1
  158. package/cjs/lib/Utils/history.d.ts +0 -0
  159. package/cjs/lib/Utils/history.js +0 -0
  160. package/cjs/lib/Utils/identity-change-handler.d.ts +0 -0
  161. package/cjs/lib/Utils/identity-change-handler.js +0 -0
  162. package/cjs/lib/Utils/index.d.ts +0 -0
  163. package/cjs/lib/Utils/index.js +0 -0
  164. package/cjs/lib/Utils/link-preview.d.ts +0 -0
  165. package/cjs/lib/Utils/link-preview.js +0 -0
  166. package/cjs/lib/Utils/logger.d.ts +0 -0
  167. package/cjs/lib/Utils/logger.js +0 -0
  168. package/cjs/lib/Utils/lt-hash.d.ts +0 -0
  169. package/cjs/lib/Utils/lt-hash.js +0 -0
  170. package/cjs/lib/Utils/make-mutex.d.ts +0 -0
  171. package/cjs/lib/Utils/make-mutex.js +0 -0
  172. package/cjs/lib/Utils/message-retry-manager.d.ts +0 -0
  173. package/cjs/lib/Utils/message-retry-manager.js +0 -0
  174. package/cjs/lib/Utils/messages-media.d.ts +0 -0
  175. package/cjs/lib/Utils/messages-media.js +0 -0
  176. package/cjs/lib/Utils/messages.d.ts +0 -0
  177. package/cjs/lib/Utils/messages.js +11 -11
  178. package/cjs/lib/Utils/noise-handler.d.ts +0 -0
  179. package/cjs/lib/Utils/noise-handler.js +0 -0
  180. package/cjs/lib/Utils/offline-node-processor.d.ts +0 -0
  181. package/cjs/lib/Utils/offline-node-processor.js +0 -0
  182. package/cjs/lib/Utils/pre-key-manager.d.ts +0 -0
  183. package/cjs/lib/Utils/pre-key-manager.js +0 -0
  184. package/cjs/lib/Utils/process-message.d.ts +0 -0
  185. package/cjs/lib/Utils/process-message.js +0 -0
  186. package/cjs/lib/Utils/reporting-utils.d.ts +0 -0
  187. package/cjs/lib/Utils/reporting-utils.js +0 -0
  188. package/cjs/lib/Utils/rich-message-utils.d.ts +0 -0
  189. package/cjs/lib/Utils/rich-message-utils.js +6 -6
  190. package/cjs/lib/Utils/signal.d.ts +0 -0
  191. package/cjs/lib/Utils/signal.js +0 -0
  192. package/cjs/lib/Utils/stanza-ack.d.ts +0 -0
  193. package/cjs/lib/Utils/stanza-ack.js +0 -0
  194. package/cjs/lib/Utils/sync-action-utils.d.ts +0 -0
  195. package/cjs/lib/Utils/sync-action-utils.js +0 -0
  196. package/cjs/lib/Utils/tc-token-utils.d.ts +0 -0
  197. package/cjs/lib/Utils/tc-token-utils.js +0 -0
  198. package/cjs/lib/Utils/use-multi-file-auth-state.d.ts +0 -0
  199. package/cjs/lib/Utils/use-multi-file-auth-state.js +0 -0
  200. package/cjs/lib/Utils/use-single-file-auth-state.d.ts +0 -0
  201. package/cjs/lib/Utils/use-single-file-auth-state.js +0 -0
  202. package/cjs/lib/Utils/use-sqlite-auth-state.d.ts +0 -0
  203. package/cjs/lib/Utils/use-sqlite-auth-state.js +0 -0
  204. package/cjs/lib/Utils/validate-connection.d.ts +0 -0
  205. package/cjs/lib/Utils/validate-connection.js +0 -0
  206. package/cjs/lib/WABinary/constants.d.ts +0 -0
  207. package/cjs/lib/WABinary/constants.js +0 -0
  208. package/cjs/lib/WABinary/decode.d.ts +0 -0
  209. package/cjs/lib/WABinary/decode.js +0 -0
  210. package/cjs/lib/WABinary/encode.d.ts +0 -0
  211. package/cjs/lib/WABinary/encode.js +0 -0
  212. package/cjs/lib/WABinary/generic-utils.d.ts +0 -0
  213. package/cjs/lib/WABinary/generic-utils.js +0 -0
  214. package/cjs/lib/WABinary/index.d.ts +0 -0
  215. package/cjs/lib/WABinary/index.js +0 -0
  216. package/cjs/lib/WABinary/jid-utils.d.ts +0 -0
  217. package/cjs/lib/WABinary/jid-utils.js +0 -0
  218. package/cjs/lib/WABinary/types.d.ts +0 -0
  219. package/cjs/lib/WABinary/types.js +0 -0
  220. package/cjs/lib/WACrypto/appstate-keys.js +0 -0
  221. package/cjs/lib/WACrypto/curves/constants.js +0 -0
  222. package/cjs/lib/WACrypto/hkdf.js +0 -0
  223. package/cjs/lib/WACrypto/index.js +0 -0
  224. package/cjs/lib/WACrypto/lthash.js +0 -0
  225. package/cjs/lib/WACrypto/math/constants.js +0 -0
  226. package/cjs/lib/WACrypto/math/edwards.js +0 -0
  227. package/cjs/lib/WACrypto/math/fe.js +0 -0
  228. package/cjs/lib/WACrypto/math/le.js +0 -0
  229. package/cjs/lib/WACrypto/math/mod.js +0 -0
  230. package/cjs/lib/WACrypto/util/bytes.js +0 -0
  231. package/cjs/lib/WACrypto/x25519.js +0 -0
  232. package/cjs/lib/WACrypto/xeddsa.js +0 -0
  233. package/cjs/lib/WAM/BinaryInfo.d.ts +0 -0
  234. package/cjs/lib/WAM/BinaryInfo.js +0 -0
  235. package/cjs/lib/WAM/constants.d.ts +0 -0
  236. package/cjs/lib/WAM/constants.js +0 -0
  237. package/cjs/lib/WAM/encode.d.ts +0 -0
  238. package/cjs/lib/WAM/encode.js +0 -0
  239. package/cjs/lib/WAM/index.d.ts +0 -0
  240. package/cjs/lib/WAM/index.js +0 -0
  241. package/cjs/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -0
  242. package/cjs/lib/WAUSync/Protocols/USyncContactProtocol.js +0 -0
  243. package/cjs/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -0
  244. package/cjs/lib/WAUSync/Protocols/USyncDeviceProtocol.js +0 -0
  245. package/cjs/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -0
  246. package/cjs/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +0 -0
  247. package/cjs/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -0
  248. package/cjs/lib/WAUSync/Protocols/USyncStatusProtocol.js +0 -0
  249. package/cjs/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +0 -0
  250. package/cjs/lib/WAUSync/Protocols/USyncUsernameProtocol.js +0 -0
  251. package/cjs/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -0
  252. package/cjs/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +0 -0
  253. package/cjs/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -0
  254. package/cjs/lib/WAUSync/Protocols/UsyncLIDProtocol.js +0 -0
  255. package/cjs/lib/WAUSync/Protocols/index.d.ts +0 -0
  256. package/cjs/lib/WAUSync/Protocols/index.js +0 -0
  257. package/cjs/lib/WAUSync/USyncQuery.d.ts +0 -0
  258. package/cjs/lib/WAUSync/USyncQuery.js +0 -0
  259. package/cjs/lib/WAUSync/USyncUser.d.ts +0 -0
  260. package/cjs/lib/WAUSync/USyncUser.js +0 -0
  261. package/cjs/lib/WAUSync/index.d.ts +0 -0
  262. package/cjs/lib/WAUSync/index.js +0 -0
  263. package/cjs/lib/index.d.ts +0 -0
  264. package/cjs/lib/index.js +0 -0
  265. package/cjs/package.json +0 -0
  266. package/engine-requirements.js +0 -0
  267. package/lib/Addon/cache.js +201 -0
  268. package/lib/Addon/crc32.js +21 -0
  269. package/lib/Addon/file-type.js +198 -0
  270. package/lib/Addon/get-file.js +98 -0
  271. package/lib/Addon/http-error.d.ts +0 -0
  272. package/lib/Addon/http-error.js +0 -0
  273. package/lib/Addon/index.d.ts +93 -0
  274. package/lib/Addon/index.js +23 -1
  275. package/lib/Addon/keyed-db.d.ts +0 -0
  276. package/lib/Addon/keyed-db.js +0 -0
  277. package/lib/Addon/link-preview.d.ts +0 -0
  278. package/lib/Addon/link-preview.js +0 -0
  279. package/lib/Addon/media-info.js +96 -0
  280. package/lib/Addon/mutex.js +76 -0
  281. package/lib/Addon/qr.js +531 -0
  282. package/lib/Addon/queue.js +44 -0
  283. package/lib/Addon/waveform.js +135 -0
  284. package/lib/Addon/zip.js +144 -0
  285. package/lib/Defaults/index.d.ts +2 -2
  286. package/lib/Defaults/index.js +3 -3
  287. package/lib/Signal/Group/ciphertext-message.d.ts +0 -0
  288. package/lib/Signal/Group/ciphertext-message.js +0 -0
  289. package/lib/Signal/Group/group-cipher.d.ts +0 -0
  290. package/lib/Signal/Group/group-cipher.js +0 -0
  291. package/lib/Signal/Group/group-session-builder.d.ts +0 -0
  292. package/lib/Signal/Group/group-session-builder.js +0 -0
  293. package/lib/Signal/Group/index.d.ts +0 -0
  294. package/lib/Signal/Group/index.js +0 -0
  295. package/lib/Signal/Group/keyhelper.d.ts +0 -0
  296. package/lib/Signal/Group/keyhelper.js +0 -0
  297. package/lib/Signal/Group/sender-chain-key.d.ts +0 -0
  298. package/lib/Signal/Group/sender-chain-key.js +0 -0
  299. package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -0
  300. package/lib/Signal/Group/sender-key-distribution-message.js +0 -0
  301. package/lib/Signal/Group/sender-key-message.d.ts +0 -0
  302. package/lib/Signal/Group/sender-key-message.js +0 -0
  303. package/lib/Signal/Group/sender-key-name.d.ts +0 -0
  304. package/lib/Signal/Group/sender-key-name.js +0 -0
  305. package/lib/Signal/Group/sender-key-record.d.ts +0 -0
  306. package/lib/Signal/Group/sender-key-record.js +0 -0
  307. package/lib/Signal/Group/sender-key-state.d.ts +0 -0
  308. package/lib/Signal/Group/sender-key-state.js +0 -0
  309. package/lib/Signal/Group/sender-message-key.d.ts +0 -0
  310. package/lib/Signal/Group/sender-message-key.js +0 -0
  311. package/lib/Signal/libsignal.d.ts +0 -0
  312. package/lib/Signal/libsignal.js +0 -0
  313. package/lib/Signal/lid-mapping.d.ts +0 -0
  314. package/lib/Signal/lid-mapping.js +0 -0
  315. package/lib/Socket/Client/index.d.ts +0 -0
  316. package/lib/Socket/Client/index.js +0 -0
  317. package/lib/Socket/Client/types.d.ts +0 -0
  318. package/lib/Socket/Client/types.js +0 -0
  319. package/lib/Socket/Client/websocket.d.ts +0 -0
  320. package/lib/Socket/Client/websocket.js +0 -0
  321. package/lib/Socket/business.d.ts +0 -0
  322. package/lib/Socket/business.js +0 -0
  323. package/lib/Socket/chats.d.ts +0 -0
  324. package/lib/Socket/chats.js +1 -1
  325. package/lib/Socket/communities.d.ts +0 -0
  326. package/lib/Socket/communities.js +0 -0
  327. package/lib/Socket/groups.d.ts +0 -0
  328. package/lib/Socket/groups.js +0 -0
  329. package/lib/Socket/index.d.ts +0 -0
  330. package/lib/Socket/index.js +0 -0
  331. package/lib/Socket/messages-recv.d.ts +0 -0
  332. package/lib/Socket/messages-recv.js +2 -2
  333. package/lib/Socket/messages-send.d.ts +0 -0
  334. package/lib/Socket/messages-send.js +19 -19
  335. package/lib/Socket/mex.d.ts +0 -0
  336. package/lib/Socket/mex.js +0 -0
  337. package/lib/Socket/newsletter.d.ts +0 -0
  338. package/lib/Socket/newsletter.js +1 -1
  339. package/lib/Socket/socket.d.ts +0 -0
  340. package/lib/Socket/socket.js +0 -0
  341. package/lib/Store/index.d.ts +0 -0
  342. package/lib/Store/index.js +0 -0
  343. package/lib/Store/make-in-memory-store.d.ts +0 -0
  344. package/lib/Store/make-in-memory-store.js +1 -1
  345. package/lib/Store/make-ordered-dictionary.d.ts +0 -0
  346. package/lib/Store/make-ordered-dictionary.js +0 -0
  347. package/lib/Store/object-repository.d.ts +0 -0
  348. package/lib/Store/object-repository.js +0 -0
  349. package/lib/Transport/crypto.d.ts +0 -0
  350. package/lib/Transport/crypto.js +0 -0
  351. package/lib/Transport/curve.d.ts +0 -0
  352. package/lib/Transport/curve.js +0 -0
  353. package/lib/Transport/index.d.ts +0 -0
  354. package/lib/Transport/index.js +0 -0
  355. package/lib/Transport/internals.d.ts +0 -0
  356. package/lib/Transport/internals.js +0 -0
  357. package/lib/Transport/session-builder.d.ts +0 -0
  358. package/lib/Transport/session-builder.js +0 -0
  359. package/lib/Transport/session-cipher.d.ts +0 -0
  360. package/lib/Transport/session-cipher.js +0 -0
  361. package/lib/Transport/session-record.d.ts +0 -0
  362. package/lib/Transport/session-record.js +0 -0
  363. package/lib/Types/Auth.d.ts +0 -0
  364. package/lib/Types/Auth.js +0 -0
  365. package/lib/Types/Bussines.d.ts +0 -0
  366. package/lib/Types/Bussines.js +0 -0
  367. package/lib/Types/Call.d.ts +0 -0
  368. package/lib/Types/Call.js +0 -0
  369. package/lib/Types/Chat.d.ts +0 -0
  370. package/lib/Types/Chat.js +0 -0
  371. package/lib/Types/Contact.d.ts +0 -0
  372. package/lib/Types/Contact.js +0 -0
  373. package/lib/Types/Events.d.ts +0 -0
  374. package/lib/Types/Events.js +0 -0
  375. package/lib/Types/GroupMetadata.d.ts +0 -0
  376. package/lib/Types/GroupMetadata.js +0 -0
  377. package/lib/Types/Label.d.ts +0 -0
  378. package/lib/Types/Label.js +0 -0
  379. package/lib/Types/LabelAssociation.d.ts +0 -0
  380. package/lib/Types/LabelAssociation.js +0 -0
  381. package/lib/Types/Message.d.ts +0 -0
  382. package/lib/Types/Message.js +1 -1
  383. package/lib/Types/Mex.d.ts +0 -0
  384. package/lib/Types/Mex.js +0 -0
  385. package/lib/Types/Product.d.ts +0 -0
  386. package/lib/Types/Product.js +0 -0
  387. package/lib/Types/RichType.d.ts +0 -0
  388. package/lib/Types/RichType.js +0 -0
  389. package/lib/Types/Signal.d.ts +0 -0
  390. package/lib/Types/Signal.js +0 -0
  391. package/lib/Types/Socket.d.ts +0 -0
  392. package/lib/Types/Socket.js +0 -0
  393. package/lib/Types/State.d.ts +0 -0
  394. package/lib/Types/State.js +0 -0
  395. package/lib/Types/USync.d.ts +0 -0
  396. package/lib/Types/USync.js +0 -0
  397. package/lib/Types/index.d.ts +0 -0
  398. package/lib/Types/index.js +0 -0
  399. package/lib/Utils/auth-utils.d.ts +0 -0
  400. package/lib/Utils/auth-utils.js +0 -0
  401. package/lib/Utils/browser-utils.d.ts +0 -0
  402. package/lib/Utils/browser-utils.js +0 -0
  403. package/lib/Utils/business.d.ts +0 -0
  404. package/lib/Utils/business.js +0 -0
  405. package/lib/Utils/chat-utils.d.ts +0 -0
  406. package/lib/Utils/chat-utils.js +0 -0
  407. package/lib/Utils/companion-reg-client-utils.d.ts +0 -0
  408. package/lib/Utils/companion-reg-client-utils.js +0 -0
  409. package/lib/Utils/crypto.d.ts +0 -0
  410. package/lib/Utils/crypto.js +0 -0
  411. package/lib/Utils/decode-wa-message.d.ts +0 -0
  412. package/lib/Utils/decode-wa-message.js +0 -0
  413. package/lib/Utils/event-buffer.d.ts +0 -0
  414. package/lib/Utils/event-buffer.js +0 -0
  415. package/lib/Utils/generics.d.ts +0 -0
  416. package/lib/Utils/generics.js +1 -1
  417. package/lib/Utils/history.d.ts +0 -0
  418. package/lib/Utils/history.js +0 -0
  419. package/lib/Utils/identity-change-handler.d.ts +0 -0
  420. package/lib/Utils/identity-change-handler.js +0 -0
  421. package/lib/Utils/index.d.ts +0 -0
  422. package/lib/Utils/index.js +0 -0
  423. package/lib/Utils/link-preview.d.ts +0 -0
  424. package/lib/Utils/link-preview.js +0 -0
  425. package/lib/Utils/logger.d.ts +0 -0
  426. package/lib/Utils/logger.js +0 -0
  427. package/lib/Utils/lt-hash.d.ts +0 -0
  428. package/lib/Utils/lt-hash.js +0 -0
  429. package/lib/Utils/make-mutex.d.ts +0 -0
  430. package/lib/Utils/make-mutex.js +0 -0
  431. package/lib/Utils/message-retry-manager.d.ts +0 -0
  432. package/lib/Utils/message-retry-manager.js +0 -0
  433. package/lib/Utils/messages-media.d.ts +0 -0
  434. package/lib/Utils/messages-media.js +2 -2
  435. package/lib/Utils/messages.d.ts +0 -0
  436. package/lib/Utils/messages.js +46 -50
  437. package/lib/Utils/noise-handler.d.ts +0 -0
  438. package/lib/Utils/noise-handler.js +0 -0
  439. package/lib/Utils/offline-node-processor.d.ts +0 -0
  440. package/lib/Utils/offline-node-processor.js +0 -0
  441. package/lib/Utils/pre-key-manager.d.ts +0 -0
  442. package/lib/Utils/pre-key-manager.js +0 -0
  443. package/lib/Utils/process-message.d.ts +0 -0
  444. package/lib/Utils/process-message.js +0 -0
  445. package/lib/Utils/reporting-utils.d.ts +0 -0
  446. package/lib/Utils/reporting-utils.js +0 -0
  447. package/lib/Utils/rich-message-utils.d.ts +0 -0
  448. package/lib/Utils/rich-message-utils.js +10 -13
  449. package/lib/Utils/signal.d.ts +0 -0
  450. package/lib/Utils/signal.js +0 -0
  451. package/lib/Utils/stanza-ack.d.ts +0 -0
  452. package/lib/Utils/stanza-ack.js +0 -0
  453. package/lib/Utils/sync-action-utils.d.ts +0 -0
  454. package/lib/Utils/sync-action-utils.js +0 -0
  455. package/lib/Utils/tc-token-utils.d.ts +0 -0
  456. package/lib/Utils/tc-token-utils.js +0 -0
  457. package/lib/Utils/use-multi-file-auth-state.d.ts +0 -0
  458. package/lib/Utils/use-multi-file-auth-state.js +1 -1
  459. package/lib/Utils/use-single-file-auth-state.d.ts +0 -0
  460. package/lib/Utils/use-single-file-auth-state.js +1 -1
  461. package/lib/Utils/use-sqlite-auth-state.d.ts +0 -0
  462. package/lib/Utils/use-sqlite-auth-state.js +1 -1
  463. package/lib/Utils/validate-connection.d.ts +0 -0
  464. package/lib/Utils/validate-connection.js +0 -0
  465. package/lib/WABinary/constants.d.ts +0 -0
  466. package/lib/WABinary/constants.js +0 -0
  467. package/lib/WABinary/decode.d.ts +0 -0
  468. package/lib/WABinary/decode.js +0 -0
  469. package/lib/WABinary/encode.d.ts +0 -0
  470. package/lib/WABinary/encode.js +0 -0
  471. package/lib/WABinary/generic-utils.d.ts +0 -0
  472. package/lib/WABinary/generic-utils.js +0 -2
  473. package/lib/WABinary/index.d.ts +0 -0
  474. package/lib/WABinary/index.js +0 -0
  475. package/lib/WABinary/jid-utils.d.ts +0 -0
  476. package/lib/WABinary/jid-utils.js +0 -0
  477. package/lib/WABinary/types.d.ts +0 -0
  478. package/lib/WABinary/types.js +0 -0
  479. package/lib/WACrypto/appstate-keys.js +0 -0
  480. package/lib/WACrypto/curves/constants.js +0 -0
  481. package/lib/WACrypto/hkdf.js +0 -0
  482. package/lib/WACrypto/index.js +0 -0
  483. package/lib/WACrypto/lthash.js +1 -1
  484. package/lib/WACrypto/math/constants.js +0 -0
  485. package/lib/WACrypto/math/edwards.js +0 -0
  486. package/lib/WACrypto/math/fe.js +0 -0
  487. package/lib/WACrypto/math/le.js +0 -0
  488. package/lib/WACrypto/math/mod.js +0 -0
  489. package/lib/WACrypto/util/bytes.js +0 -0
  490. package/lib/WACrypto/x25519.js +3 -3
  491. package/lib/WACrypto/xeddsa.js +0 -0
  492. package/lib/WAM/BinaryInfo.d.ts +0 -0
  493. package/lib/WAM/BinaryInfo.js +0 -0
  494. package/lib/WAM/constants.d.ts +0 -0
  495. package/lib/WAM/constants.js +0 -0
  496. package/lib/WAM/encode.d.ts +0 -0
  497. package/lib/WAM/encode.js +0 -0
  498. package/lib/WAM/index.d.ts +0 -0
  499. package/lib/WAM/index.js +0 -0
  500. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -0
  501. package/lib/WAUSync/Protocols/USyncContactProtocol.js +0 -0
  502. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -0
  503. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +0 -0
  504. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -0
  505. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +0 -0
  506. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -0
  507. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +0 -0
  508. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +0 -0
  509. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +0 -0
  510. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -0
  511. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +0 -0
  512. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -0
  513. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +0 -0
  514. package/lib/WAUSync/Protocols/index.d.ts +0 -0
  515. package/lib/WAUSync/Protocols/index.js +0 -0
  516. package/lib/WAUSync/USyncQuery.d.ts +0 -0
  517. package/lib/WAUSync/USyncQuery.js +0 -0
  518. package/lib/WAUSync/USyncUser.d.ts +0 -0
  519. package/lib/WAUSync/USyncUser.js +0 -0
  520. package/lib/WAUSync/index.d.ts +0 -0
  521. package/lib/WAUSync/index.js +0 -0
  522. package/lib/index.d.ts +0 -0
  523. package/lib/index.js +0 -0
  524. package/package.json +4 -9
  525. package/tests/addon-test.mjs +162 -0
  526. package/tests/differential-test.mjs +90 -0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -219,7 +219,7 @@ function bindWaitForEvent(ev, event) {
219
219
  }
220
220
  const bindWaitForConnectionUpdate = (ev) => bindWaitForEvent(ev, "connection.update");
221
221
  const fetchLatestBaileysVersion = async (options = {}) => {
222
- const URL = "https://raw.githubusercontent.com/itsliaaa/baileys/main/lib/Defaults/index.js";
222
+ const URL = "https://raw.githubusercontent.com/eduh_dev021/baileys/main/lib/Defaults/index.js";
223
223
  try {
224
224
  const response = await fetch(URL, {
225
225
  dispatcher: options.dispatcher,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -171,7 +171,7 @@ const prepareWAMessageMedia = async (message, options) => {
171
171
  } catch (error) {
172
172
  logger?.warn({ trace: error.stack }, "failed to obtain extra info");
173
173
  }
174
- })()
174
+ })
175
175
  ]).finally(async () => {
176
176
  try {
177
177
  await import_node_fs.promises.unlink(filePath);
@@ -253,7 +253,7 @@ const prepareWAMessageMedia = async (message, options) => {
253
253
  } catch (error) {
254
254
  logger?.warn({ trace: error.stack }, "failed to obtain extra info");
255
255
  }
256
- })()
256
+ })
257
257
  ]).finally(async () => {
258
258
  try {
259
259
  await import_node_fs.promises.unlink(encFilePath);
@@ -304,7 +304,7 @@ const prepareProductMessage = async (message, options) => {
304
304
  return content;
305
305
  };
306
306
  const prepareStickerPackMessage = async (message, options) => {
307
- const { cover, stickers = [], name = "\u{1F4E6} Sticker Pack", publisher = "GitHub: itsliaaa", description = "\u{1F3F7}\uFE0F itsliaaa/baileys" } = message;
307
+ const { cover, stickers = [], name = "\u{1F4E6} Sticker Pack", publisher = "GitHub: eduh_dev021", description = "\u{1F3F7}\uFE0F eduh_dev021/baileys" } = message;
308
308
  if (stickers.length > 60) {
309
309
  throw new import_Addon.HttpError("Sticker pack exceeds the maximum limit of 60 stickers", { statusCode: 400 });
310
310
  }
@@ -483,7 +483,7 @@ const prepareNativeFlowButtons = (message) => {
483
483
  limited_time_offer: {
484
484
  text: message.offerText || import_Defaults.LIBRARY_NAME,
485
485
  url: message.offerUrl || import_Defaults.DONATE_URL,
486
- // Lia@Note 02-02-26 --- Apologies if this feels cheeky, just a fallback
486
+ // Apologies if this feels cheeky, just a fallback
487
487
  copy_code: message.offerCode,
488
488
  expiration_time: message.offerExpiration
489
489
  }
@@ -817,10 +817,10 @@ const generateWAMessageContent = async (message, options) => {
817
817
  throw new import_Addon.HttpError('No "correctAnswer" provided for quiz', { statusCode: 400 });
818
818
  }
819
819
  m.pollCreationMessageV5 = {
820
- // Lia@Note 08-02-26 --- quiz for newsletter only
820
+ // quiz for newsletter only
821
821
  ...pollCreationMessage,
822
822
  correctAnswer: {
823
- optionName: message.poll.correctAnswer.toString()
823
+ optionName: message.poll.correctAnswer.toString
824
824
  },
825
825
  pollType: 1,
826
826
  selectableOptionsCount: 1
@@ -1182,7 +1182,7 @@ const generateWAMessageContent = async (message, options) => {
1182
1182
  attachmentMediaKey: mediaKey,
1183
1183
  attachmentMediaKeyTimestamp: mediaKeyTimestamp,
1184
1184
  attachmentMimetype: mimetype,
1185
- token: (0, import_generics.generateMessageIDV2)()
1185
+ token: import_generics.generateMessageIDV2
1186
1186
  });
1187
1187
  } else {
1188
1188
  throw new import_Addon.HttpError("Invalid media type for invoice message", { statusCode: 400 });
@@ -1279,7 +1279,7 @@ const generateWAMessageContent = async (message, options) => {
1279
1279
  templateMessage: {
1280
1280
  interactiveMessageTemplate: m.interactiveMessage,
1281
1281
  templateId: message.id || "template-" + Date.now()
1282
- // Lia@Note 04-02-26 --- Minimal templateId to satisfy WhatsApp (⁠ ⁠ꈍ⁠ᴗ⁠ꈍ⁠)
1282
+ // Minimal templateId to satisfy WhatsApp (⁠ ⁠ꈍ⁠ᴗ⁠ꈍ⁠)
1283
1283
  }
1284
1284
  };
1285
1285
  delete message.interactiveAsTemplate;
@@ -1360,13 +1360,13 @@ const generateWAMessageFromContent = (jid, message, options) => {
1360
1360
  innerMessage[key].contextInfo = {
1361
1361
  ...innerMessage[key].contextInfo || {},
1362
1362
  expiration: options.ephemeralExpiration || import_Defaults.WA_DEFAULT_EPHEMERAL
1363
- //ephemeralSettingTimestamp: options.ephemeralOptions.eph_setting_ts?.toString()
1363
+ //ephemeralSettingTimestamp: options.ephemeralOptions.eph_setting_ts?.toString
1364
1364
  };
1365
1365
  }
1366
1366
  if (messageContextInfo?.messageSecret && ((0, import_WABinary.isPnUser)(jid) || (0, import_WABinary.isLidUser)(jid))) {
1367
1367
  messageContextInfo.deviceListMetadata = {
1368
1368
  recipientKeyHash: (0, import_node_crypto.randomBytes)(10),
1369
- recipientTimestamp: (0, import_generics.unixTimestampSeconds)()
1369
+ recipientTimestamp: import_generics.unixTimestampSeconds
1370
1370
  };
1371
1371
  messageContextInfo.deviceListMetadataVersion = 2;
1372
1372
  }
@@ -1374,7 +1374,7 @@ const generateWAMessageFromContent = (jid, message, options) => {
1374
1374
  key: {
1375
1375
  remoteJid: jid,
1376
1376
  fromMe: true,
1377
- id: options?.messageId || (0, import_generics.generateMessageIDV2)()
1377
+ id: options?.messageId || import_generics.generateMessageIDV2
1378
1378
  },
1379
1379
  message: ensureMessageProto(message),
1380
1380
  messageTimestamp: timestamp,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -253,8 +253,8 @@ const prepareRichResponseMessage = (content) => {
253
253
  const url = linkField.url || import_Defaults.DONATE_URL;
254
254
  const sources = linkField.sources?.map((sourceField) => ({
255
255
  source_type: "THIRD_PARTY",
256
- source_display_name: sourceField.displayName || "Donate",
257
- source_subtitle: sourceField.subtitle || "Saweria",
256
+ source_display_name: sourceField.displayName || "Source",
257
+ source_subtitle: sourceField.subtitle || "External link",
258
258
  source_url: sourceField.url || url
259
259
  }));
260
260
  submessages.push({
@@ -265,8 +265,8 @@ const prepareRichResponseMessage = (content) => {
265
265
  metadata: {
266
266
  reference_id: index + 1,
267
267
  reference_url: url,
268
- reference_title: linkField.title || "For Donation via Saweria",
269
- reference_display_name: linkField.displayName || "Donation",
268
+ reference_title: linkField.title || "External link",
269
+ reference_display_name: linkField.displayName || "Link",
270
270
  sources: sources || [],
271
271
  __typename: "GenAISearchCitationItem"
272
272
  }
@@ -318,7 +318,7 @@ const prepareRichResponseMessage = (content) => {
318
318
  messageType: import_WAProto.proto.AIRichResponseMessageType.AI_RICH_RESPONSE_TYPE_STANDARD,
319
319
  unifiedResponse: {
320
320
  data: import_Defaults.TEXT_ENCODER.encode(JSON.stringify(unified))
321
- // Lia@Note 25-04-26 --- Expects "ArrayBufferLike"
321
+ // Expects "ArrayBufferLike"
322
322
  },
323
323
  contextInfo: {
324
324
  isForwarded: true,
@@ -350,7 +350,7 @@ const botMetadataCertificate = (length = 685) => {
350
350
  const wrapToBotForwardedMessage = (richResponseMessage) => ({
351
351
  messageContextInfo: {
352
352
  botMetadata: {
353
- // Lia@Note 09-04-26 --- TODO: Fill verificationMetadata field
353
+ // TODO: Fill verificationMetadata field
354
354
  verificationMetadata: {
355
355
  proofs: [
356
356
  {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/cjs/lib/index.js CHANGED
File without changes
package/cjs/package.json CHANGED
File without changes
File without changes