@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
@@ -0,0 +1,54 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var queue_exports = {};
19
+ __export(queue_exports, {
20
+ createQueue: () => createQueue
21
+ });
22
+ module.exports = __toCommonJS(queue_exports);
23
+ function createQueue(concurrency = 1) {
24
+ const limit = Number.isFinite(concurrency) && concurrency > 0 ? Math.floor(concurrency) : 1;
25
+ const pending = [];
26
+ let active = 0;
27
+ function pump() {
28
+ while (active < limit && pending.length > 0) {
29
+ const { task, resolve, reject } = pending.shift();
30
+ active++;
31
+ Promise.resolve().then(task).then(resolve, reject).finally(() => {
32
+ active--;
33
+ pump();
34
+ });
35
+ }
36
+ }
37
+ function add(task) {
38
+ if (typeof task !== "function") {
39
+ return Promise.reject(new TypeError("queue.add() expects a function"));
40
+ }
41
+ return new Promise((resolve, reject) => {
42
+ pending.push({ task, resolve, reject });
43
+ pump();
44
+ });
45
+ }
46
+ return {
47
+ add,
48
+ push: add
49
+ };
50
+ }
51
+ // Annotate the CommonJS export names for ESM import in node:
52
+ 0 && (module.exports = {
53
+ createQueue
54
+ });
@@ -0,0 +1,130 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var waveform_exports = {};
19
+ __export(waveform_exports, {
20
+ getAudioWaveform: () => getAudioWaveform
21
+ });
22
+ module.exports = __toCommonJS(waveform_exports);
23
+ var import_node_child_process = require("node:child_process");
24
+ const SAMPLE_RATE = 16e3;
25
+ const BAR_COUNT = 64;
26
+ const TIMEOUT_MS = 3e4;
27
+ function decodePcm(input) {
28
+ let args;
29
+ let stdinData;
30
+ if (typeof input === "string") {
31
+ args = ["-i", input];
32
+ } else if (Buffer.isBuffer(input) || input instanceof Uint8Array) {
33
+ args = ["-i", "pipe:0"];
34
+ stdinData = Buffer.from(input.buffer, input.byteOffset, input.byteLength);
35
+ } else if (input && typeof input.pipe === "function") {
36
+ args = ["-i", "pipe:0"];
37
+ stdinData = input;
38
+ } else {
39
+ return Promise.reject(new TypeError("getAudioWaveform: expects a path, Buffer/Uint8Array or Readable"));
40
+ }
41
+ return new Promise((resolve, reject) => {
42
+ const child = (0, import_node_child_process.spawn)("ffmpeg", [
43
+ "-v",
44
+ "error",
45
+ ...args,
46
+ "-vn",
47
+ // ignore cover art video streams
48
+ "-map",
49
+ "a:0?",
50
+ // first audio stream, when present
51
+ "-f",
52
+ "s16le",
53
+ "-acodec",
54
+ "pcm_s16le",
55
+ "-ac",
56
+ "1",
57
+ "-ar",
58
+ String(SAMPLE_RATE),
59
+ "pipe:1"
60
+ ], { stdio: ["pipe", "pipe", "pipe"] });
61
+ const chunks = [];
62
+ let stderr = "";
63
+ let settled = false;
64
+ const timer = setTimeout(() => {
65
+ child.kill("SIGKILL");
66
+ settleReject("ffmpeg timed out");
67
+ }, TIMEOUT_MS);
68
+ function settleReject(message) {
69
+ if (settled) return;
70
+ settled = true;
71
+ clearTimeout(timer);
72
+ reject(new Error(message || "ffmpeg failed"));
73
+ }
74
+ function settleResolve(value) {
75
+ if (settled) return;
76
+ settled = true;
77
+ clearTimeout(timer);
78
+ resolve(value);
79
+ }
80
+ child.stdout.on("data", (c) => chunks.push(c));
81
+ child.stderr.on("data", (c) => stderr += c);
82
+ child.on("error", (err) => settleReject(err.message));
83
+ child.on("close", (code) => {
84
+ const pcm = Buffer.concat(chunks);
85
+ if (code !== 0 || pcm.length === 0) {
86
+ settleReject(stderr.trim() || "no audio stream found in the input");
87
+ return;
88
+ }
89
+ settleResolve({ samples: pcm });
90
+ });
91
+ if (stdinData) {
92
+ child.stdin.on("error", () => {
93
+ });
94
+ if (typeof stdinData.pipe === "function") stdinData.pipe(child.stdin);
95
+ else child.stdin.end(stdinData);
96
+ }
97
+ });
98
+ }
99
+ function computeWaveform(samples) {
100
+ const frameCount = Math.floor(samples.length / 2);
101
+ if (frameCount === 0) return { durationSeconds: 0, waveform: new Array(BAR_COUNT).fill(0) };
102
+ const barFrames = frameCount / BAR_COUNT;
103
+ const peaks = new Array(BAR_COUNT).fill(0);
104
+ let globalPeak = 0;
105
+ for (let bar = 0; bar < BAR_COUNT; bar++) {
106
+ const start = Math.floor(bar * barFrames);
107
+ const end = Math.min(frameCount, Math.floor((bar + 1) * barFrames));
108
+ let peak = 0;
109
+ for (let i = start; i < end; i++) {
110
+ const s = Math.abs(samples.readInt16LE(i * 2));
111
+ if (s > peak) peak = s;
112
+ }
113
+ peaks[bar] = peak;
114
+ if (peak > globalPeak) globalPeak = peak;
115
+ }
116
+ const waveform = peaks.map((peak) => {
117
+ if (globalPeak === 0) return 0;
118
+ return Math.max(0, Math.min(100, Math.round(peak / globalPeak * 100)));
119
+ });
120
+ const durationSeconds = Math.round(frameCount / SAMPLE_RATE);
121
+ return { durationSeconds, waveform };
122
+ }
123
+ async function getAudioWaveform(input) {
124
+ const { samples } = await decodePcm(input);
125
+ return computeWaveform(samples);
126
+ }
127
+ // Annotate the CommonJS export names for ESM import in node:
128
+ 0 && (module.exports = {
129
+ getAudioWaveform
130
+ });
@@ -0,0 +1,136 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var zip_exports = {};
19
+ __export(zip_exports, {
20
+ createZip: () => createZip
21
+ });
22
+ module.exports = __toCommonJS(zip_exports);
23
+ var import_node_zlib = require("node:zlib");
24
+ var import_crc32 = require("./crc32.js");
25
+ const SIG_LOCAL = 67324752;
26
+ const SIG_CENTRAL = 33639248;
27
+ const SIG_EOCD = 101010256;
28
+ const FLAG_UTF8 = 2048;
29
+ function dosDateTime(date) {
30
+ const d = date instanceof Date && !isNaN(date) ? date : /* @__PURE__ */ new Date();
31
+ const time = (d.getHours() & 31) << 11 | (d.getMinutes() & 63) << 5 | Math.floor(d.getSeconds() / 2) & 31;
32
+ const day = (d.getFullYear() - 1980 & 127) << 9 | (d.getMonth() + 1 & 15) << 5 | d.getDate() & 31;
33
+ return { time, day };
34
+ }
35
+ async function normalizeEntry(entry) {
36
+ if (entry === null || entry === void 0) return null;
37
+ let { name, data } = entry;
38
+ if (typeof name !== "string" || name.length === 0) {
39
+ throw new TypeError('createZip: every entry needs a non-empty "name"');
40
+ }
41
+ let date = entry.date instanceof Date ? entry.date : void 0;
42
+ if (data && typeof data.pipe === "function") {
43
+ const chunks = [];
44
+ for await (const chunk of data) chunks.push(chunk);
45
+ data = Buffer.concat(chunks.map((c) => Buffer.isBuffer(c) ? c : Buffer.from(c)));
46
+ } else if (data && typeof data[Symbol.asyncIterator] === "function") {
47
+ const chunks = [];
48
+ for await (const chunk of data) chunks.push(chunk);
49
+ data = Buffer.concat(chunks.map((c) => Buffer.isBuffer(c) ? c : Buffer.from(c)));
50
+ }
51
+ if (data === void 0 || data === null) return null;
52
+ if (typeof data === "string") data = Buffer.from(data, "utf8");
53
+ else if (ArrayBuffer.isView(data)) data = Buffer.from(data.buffer, data.byteOffset, data.byteLength);
54
+ else if (data instanceof ArrayBuffer) data = Buffer.from(data);
55
+ else if (!Buffer.isBuffer(data)) throw new TypeError(`createZip: entry "${name}" data must be Buffer/Uint8Array/string/stream`);
56
+ return { name, data, date };
57
+ }
58
+ async function createZip(entries) {
59
+ if (entries === null || entries === void 0) {
60
+ throw new TypeError("createZip: expected an array of { name, data } entries");
61
+ }
62
+ const list = [];
63
+ if (Array.isArray(entries) || typeof entries[Symbol.iterator] === "function") {
64
+ for (const entry of entries) {
65
+ const normalized = await normalizeEntry(entry);
66
+ if (normalized) list.push(normalized);
67
+ }
68
+ } else if (typeof entries === "object") {
69
+ for (const [name, data] of Object.entries(entries)) {
70
+ const normalized = await normalizeEntry({ name, data });
71
+ if (normalized) list.push(normalized);
72
+ }
73
+ } else {
74
+ throw new TypeError("createZip: expected an array of { name, data } entries");
75
+ }
76
+ const now = dosDateTime(/* @__PURE__ */ new Date());
77
+ const localParts = [];
78
+ const centralParts = [];
79
+ let offset = 0;
80
+ for (const entry of list) {
81
+ const nameBuf = Buffer.from(entry.name, "utf8");
82
+ const raw = entry.data;
83
+ const crc = (0, import_crc32.crc32)(raw);
84
+ let method = 0;
85
+ let payload = raw;
86
+ if (raw.length > 32) {
87
+ const deflated = (0, import_node_zlib.deflateRawSync)(raw, { level: 6 });
88
+ if (deflated.length < raw.length) {
89
+ method = 8;
90
+ payload = deflated;
91
+ }
92
+ }
93
+ const { time, day } = entry.date ? dosDateTime(entry.date) : now;
94
+ const local = Buffer.alloc(30);
95
+ local.writeUInt32LE(SIG_LOCAL, 0);
96
+ local.writeUInt16LE(20, 4);
97
+ local.writeUInt16LE(FLAG_UTF8, 6);
98
+ local.writeUInt16LE(method, 8);
99
+ local.writeUInt16LE(time, 10);
100
+ local.writeUInt16LE(day, 12);
101
+ local.writeUInt32LE(crc, 14);
102
+ local.writeUInt32LE(payload.length, 18);
103
+ local.writeUInt32LE(raw.length, 22);
104
+ local.writeUInt16LE(nameBuf.length, 26);
105
+ local.writeUInt16LE(0, 28);
106
+ const central = Buffer.alloc(46);
107
+ central.writeUInt32LE(SIG_CENTRAL, 0);
108
+ central.writeUInt16LE(798, 4);
109
+ central.writeUInt16LE(20, 6);
110
+ central.writeUInt16LE(FLAG_UTF8, 8);
111
+ central.writeUInt16LE(method, 10);
112
+ central.writeUInt16LE(time, 12);
113
+ central.writeUInt16LE(day, 14);
114
+ central.writeUInt32LE(crc, 16);
115
+ central.writeUInt32LE(payload.length, 20);
116
+ central.writeUInt32LE(raw.length, 24);
117
+ central.writeUInt16LE(nameBuf.length, 28);
118
+ central.writeUInt32LE(384 << 16, 38);
119
+ central.writeUInt32LE(offset, 42);
120
+ localParts.push(local, nameBuf, payload);
121
+ centralParts.push(central, nameBuf);
122
+ offset += local.length + nameBuf.length + payload.length;
123
+ }
124
+ const centralDir = Buffer.concat(centralParts);
125
+ const eocd = Buffer.alloc(22);
126
+ eocd.writeUInt32LE(SIG_EOCD, 0);
127
+ eocd.writeUInt16LE(list.length, 8);
128
+ eocd.writeUInt16LE(list.length, 10);
129
+ eocd.writeUInt32LE(centralDir.length, 12);
130
+ eocd.writeUInt32LE(offset, 16);
131
+ return Buffer.concat([...localParts, centralDir, eocd]);
132
+ }
133
+ // Annotate the CommonJS export names for ESM import in node:
134
+ 0 && (module.exports = {
135
+ createZip
136
+ });
@@ -3,8 +3,8 @@ export const BIZ_BOT_SUPPORT_PAYLOAD: "{\"version\":1,\"is_ai_message\":true,\"s
3
3
  export const DEFAULT_ORIGIN: "https://web.whatsapp.com";
4
4
  export const CALL_VIDEO_PREFIX: "https://call.whatsapp.com/video/";
5
5
  export const CALL_AUDIO_PREFIX: "https://call.whatsapp.com/voice/";
6
- export const DONATE_URL: "https://saweria.co/itsliaaa";
7
- export const LIBRARY_NAME: "itsliaaa/baileys";
6
+ export const DONATE_URL: "https://github.com/eduh_dev021/baileys";
7
+ export const LIBRARY_NAME: "eduh_dev021/baileys";
8
8
  export const TEXT_ENCODER: TextEncoder;
9
9
  export const TEXT_DECODER: TextDecoder;
10
10
  export const DEF_CALLBACK_PREFIX: "CB:";
@@ -78,8 +78,8 @@ const BIZ_BOT_SUPPORT_PAYLOAD = '{"version":1,"is_ai_message":true,"should_uploa
78
78
  const DEFAULT_ORIGIN = "https://web.whatsapp.com";
79
79
  const CALL_VIDEO_PREFIX = "https://call.whatsapp.com/video/";
80
80
  const CALL_AUDIO_PREFIX = "https://call.whatsapp.com/voice/";
81
- const DONATE_URL = "https://saweria.co/itsliaaa";
82
- const LIBRARY_NAME = "itsliaaa/baileys";
81
+ const DONATE_URL = "https://github.com/eduh_dev021/baileys";
82
+ const LIBRARY_NAME = "eduh_dev021/baileys";
83
83
  const TEXT_ENCODER = new TextEncoder();
84
84
  const TEXT_DECODER = new TextDecoder();
85
85
  const DEF_CALLBACK_PREFIX = "CB:";
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
@@ -265,7 +265,7 @@ const makeMessagesSocket = (config) => {
265
265
  type: import_WAProto.proto.Message.ProtocolMessage.Type.GROUP_MEMBER_LABEL_CHANGE,
266
266
  memberLabel: {
267
267
  label: memberLabel?.slice(0, 30),
268
- labelTimestamp: (0, import_Utils.unixTimestampSeconds)()
268
+ labelTimestamp: import_Utils.unixTimestampSeconds
269
269
  }
270
270
  }
271
271
  }, {
@@ -458,7 +458,7 @@ const makeMessagesSocket = (config) => {
458
458
  binaryNodeContent.push({
459
459
  tag: "plaintext",
460
460
  attrs: extraAttrs,
461
- // Lia@Changes 02-02-26 --- Add extraAttrs to fix media being rejected when sending to newsletter (⁠◠⁠‿⁠◕⁠)
461
+ // Add extraAttrs to fix media being rejected when sending to newsletter (⁠◠⁠‿⁠◕⁠)
462
462
  content: bytes
463
463
  });
464
464
  const stanza2 = {
@@ -522,13 +522,13 @@ const makeMessagesSocket = (config) => {
522
522
  return result[jid] || {};
523
523
  }
524
524
  return {};
525
- })()
525
+ })
526
526
  ]);
527
527
  const participantsList = groupData ? groupData.participants.map((p) => p.id) : [];
528
528
  if (groupData?.ephemeralDuration && groupData.ephemeralDuration > 0) {
529
529
  additionalAttributes = {
530
530
  ...additionalAttributes,
531
- expiration: groupData.ephemeralDuration.toString()
531
+ expiration: groupData.ephemeralDuration.toString
532
532
  };
533
533
  }
534
534
  if (isStatus && statusJidList) {
@@ -706,7 +706,7 @@ const makeMessagesSocket = (config) => {
706
706
  attrs: {
707
707
  v: "2",
708
708
  type,
709
- count: (participant.count || 0).toString()
709
+ count: (participant.count || 0).toString
710
710
  },
711
711
  content: encryptedContent
712
712
  });
@@ -1013,7 +1013,7 @@ const makeMessagesSocket = (config) => {
1013
1013
  ev.emit("messages.update", [{ key: message.key, update: { message: message.message } }]);
1014
1014
  return message;
1015
1015
  },
1016
- // Lia@Changes 30-01-26 --- Add support for modifying additionalNodes and additionalAttributes using "options" in sendMessage()
1016
+ // Add support for modifying additionalNodes and additionalAttributes using "options" in sendMessage
1017
1017
  sendMessage: async (jid, content, options = {}) => {
1018
1018
  var _a;
1019
1019
  const userJid = authState.creds.me.id;
@@ -1161,7 +1161,7 @@ const makeMessagesSocket = (config) => {
1161
1161
  additionalNodes.push({
1162
1162
  tag: "meta",
1163
1163
  attrs: {
1164
- // Lia@Note 08-02-26 --- Still a hypothesis regarding PollResult ༎ຶ⁠‿⁠༎ຶ
1164
+ // Still a hypothesis regarding PollResult ༎ຶ⁠‿⁠༎ຶ
1165
1165
  polltype: isQuizMsg ? "quiz_creation" : "creation",
1166
1166
  contenttype: isPollMsg && isNewsletter ? "text" : void 0
1167
1167
  },
File without changes
File without changes
File without changes
@@ -89,7 +89,7 @@ const makeNewsletterSocket = (config) => {
89
89
  newsletterSubscribers: async (jid) => {
90
90
  return executeWMexQuery({ newsletter_id: jid }, import_Types.QueryIds.SUBSCRIBERS, import_Types.XWAPaths.xwa2_newsletter_subscribers);
91
91
  },
92
- // Lia@Changes 29-01-26 --- Add newsletterSubscribed to fetch all subscribed newsletters (similar to groupFetchAllParticipating (⁠ ⁠╹⁠▽⁠╹⁠ ⁠))
92
+ // Add newsletterSubscribed to fetch all subscribed newsletters (similar to groupFetchAllParticipating (⁠ ⁠╹⁠▽⁠╹⁠ ⁠))
93
93
  newsletterSubscribed: async () => {
94
94
  return executeWMexQuery({}, import_Types.QueryIds.SUBSCRIBED, import_Types.XWAPaths.xwa2_newsletter_subscribed);
95
95
  },
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