lyndra-blanys 0.0.0-stage → 0.0.2

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 (662) hide show
  1. package/LICENSE +23 -0
  2. package/NOTICE.md +34 -0
  3. package/README.md +1657 -2
  4. package/WAProto/GenerateStatics.sh +3 -0
  5. package/WAProto/LICENSE +190 -0
  6. package/WAProto/WAProto.proto +7779 -0
  7. package/WAProto/fix-imports.js +86 -0
  8. package/WAProto/index.d.ts +27298 -0
  9. package/WAProto/index.js +173923 -0
  10. package/engine-requirements.js +10 -0
  11. package/lib/AnchorGuard/index.d.ts +35 -0
  12. package/lib/AnchorGuard/index.d.ts.map +1 -0
  13. package/lib/AnchorGuard/index.js +532 -0
  14. package/lib/AnchorGuard/index.js.map +1 -0
  15. package/lib/BugLogs/index.d.ts +10 -0
  16. package/lib/BugLogs/index.d.ts.map +1 -0
  17. package/lib/BugLogs/index.js +144 -0
  18. package/lib/BugLogs/index.js.map +1 -0
  19. package/lib/Defaults/index.d.ts +99 -0
  20. package/lib/Defaults/index.d.ts.map +1 -0
  21. package/lib/Defaults/index.js +162 -0
  22. package/lib/Defaults/index.js.map +1 -0
  23. package/lib/MessageBuilder/bot-signature.d.ts +21 -0
  24. package/lib/MessageBuilder/bot-signature.d.ts.map +1 -0
  25. package/lib/MessageBuilder/bot-signature.js +110 -0
  26. package/lib/MessageBuilder/bot-signature.js.map +1 -0
  27. package/lib/MessageBuilder/extras.d.ts +293 -0
  28. package/lib/MessageBuilder/extras.d.ts.map +1 -0
  29. package/lib/MessageBuilder/extras.js +1184 -0
  30. package/lib/MessageBuilder/extras.js.map +1 -0
  31. package/lib/MessageBuilder/index.d.ts +648 -0
  32. package/lib/MessageBuilder/index.d.ts.map +1 -0
  33. package/lib/MessageBuilder/index.js +3046 -0
  34. package/lib/MessageBuilder/index.js.map +1 -0
  35. package/lib/MessageBuilder/members.d.ts +2 -0
  36. package/lib/MessageBuilder/members.d.ts.map +1 -0
  37. package/lib/MessageBuilder/members.js +38 -0
  38. package/lib/MessageBuilder/members.js.map +1 -0
  39. package/lib/MessageBuilder/metaai.d.ts +344 -0
  40. package/lib/MessageBuilder/metaai.d.ts.map +1 -0
  41. package/lib/MessageBuilder/metaai.js +630 -0
  42. package/lib/MessageBuilder/metaai.js.map +1 -0
  43. package/lib/Signal/Group/ciphertext-message.d.ts +10 -0
  44. package/lib/Signal/Group/ciphertext-message.d.ts.map +1 -0
  45. package/lib/Signal/Group/ciphertext-message.js +12 -0
  46. package/lib/Signal/Group/ciphertext-message.js.map +1 -0
  47. package/lib/Signal/Group/group-session-builder.d.ts +15 -0
  48. package/lib/Signal/Group/group-session-builder.d.ts.map +1 -0
  49. package/lib/Signal/Group/group-session-builder.js +30 -0
  50. package/lib/Signal/Group/group-session-builder.js.map +1 -0
  51. package/lib/Signal/Group/group_cipher.d.ts +17 -0
  52. package/lib/Signal/Group/group_cipher.d.ts.map +1 -0
  53. package/lib/Signal/Group/group_cipher.js +82 -0
  54. package/lib/Signal/Group/group_cipher.js.map +1 -0
  55. package/lib/Signal/Group/index.d.ts +12 -0
  56. package/lib/Signal/Group/index.d.ts.map +1 -0
  57. package/lib/Signal/Group/index.js +12 -0
  58. package/lib/Signal/Group/index.js.map +1 -0
  59. package/lib/Signal/Group/keyhelper.d.ts +11 -0
  60. package/lib/Signal/Group/keyhelper.d.ts.map +1 -0
  61. package/lib/Signal/Group/keyhelper.js +18 -0
  62. package/lib/Signal/Group/keyhelper.js.map +1 -0
  63. package/lib/Signal/Group/sender-chain-key.d.ts +14 -0
  64. package/lib/Signal/Group/sender-chain-key.d.ts.map +1 -0
  65. package/lib/Signal/Group/sender-chain-key.js +26 -0
  66. package/lib/Signal/Group/sender-chain-key.js.map +1 -0
  67. package/lib/Signal/Group/sender-key-distribution-message.d.ts +17 -0
  68. package/lib/Signal/Group/sender-key-distribution-message.d.ts.map +1 -0
  69. package/lib/Signal/Group/sender-key-distribution-message.js +63 -0
  70. package/lib/Signal/Group/sender-key-distribution-message.js.map +1 -0
  71. package/lib/Signal/Group/sender-key-message.d.ts +19 -0
  72. package/lib/Signal/Group/sender-key-message.d.ts.map +1 -0
  73. package/lib/Signal/Group/sender-key-message.js +66 -0
  74. package/lib/Signal/Group/sender-key-message.js.map +1 -0
  75. package/lib/Signal/Group/sender-key-name.d.ts +18 -0
  76. package/lib/Signal/Group/sender-key-name.d.ts.map +1 -0
  77. package/lib/Signal/Group/sender-key-name.js +48 -0
  78. package/lib/Signal/Group/sender-key-name.js.map +1 -0
  79. package/lib/Signal/Group/sender-key-record.d.ts +31 -0
  80. package/lib/Signal/Group/sender-key-record.d.ts.map +1 -0
  81. package/lib/Signal/Group/sender-key-record.js +41 -0
  82. package/lib/Signal/Group/sender-key-record.js.map +1 -0
  83. package/lib/Signal/Group/sender-key-state.d.ts +39 -0
  84. package/lib/Signal/Group/sender-key-state.d.ts.map +1 -0
  85. package/lib/Signal/Group/sender-key-state.js +84 -0
  86. package/lib/Signal/Group/sender-key-state.js.map +1 -0
  87. package/lib/Signal/Group/sender-message-key.d.ts +12 -0
  88. package/lib/Signal/Group/sender-message-key.d.ts.map +1 -0
  89. package/lib/Signal/Group/sender-message-key.js +26 -0
  90. package/lib/Signal/Group/sender-message-key.js.map +1 -0
  91. package/lib/Signal/libsignal.d.ts +5 -0
  92. package/lib/Signal/libsignal.d.ts.map +1 -0
  93. package/lib/Signal/libsignal.js +437 -0
  94. package/lib/Signal/libsignal.js.map +1 -0
  95. package/lib/Signal/lid-mapping.d.ts +23 -0
  96. package/lib/Signal/lid-mapping.d.ts.map +1 -0
  97. package/lib/Signal/lid-mapping.js +277 -0
  98. package/lib/Signal/lid-mapping.js.map +1 -0
  99. package/lib/Socket/Client/index.d.ts +3 -0
  100. package/lib/Socket/Client/index.d.ts.map +1 -0
  101. package/lib/Socket/Client/index.js +3 -0
  102. package/lib/Socket/Client/index.js.map +1 -0
  103. package/lib/Socket/Client/types.d.ts +16 -0
  104. package/lib/Socket/Client/types.d.ts.map +1 -0
  105. package/lib/Socket/Client/types.js +11 -0
  106. package/lib/Socket/Client/types.js.map +1 -0
  107. package/lib/Socket/Client/websocket.d.ts +13 -0
  108. package/lib/Socket/Client/websocket.d.ts.map +1 -0
  109. package/lib/Socket/Client/websocket.js +54 -0
  110. package/lib/Socket/Client/websocket.js.map +1 -0
  111. package/lib/Socket/album.d.ts +11 -0
  112. package/lib/Socket/album.d.ts.map +1 -0
  113. package/lib/Socket/album.js +35 -0
  114. package/lib/Socket/album.js.map +1 -0
  115. package/lib/Socket/business.d.ts +371 -0
  116. package/lib/Socket/business.d.ts.map +1 -0
  117. package/lib/Socket/business.js +381 -0
  118. package/lib/Socket/business.js.map +1 -0
  119. package/lib/Socket/chats-extended.d.ts +98 -0
  120. package/lib/Socket/chats-extended.d.ts.map +1 -0
  121. package/lib/Socket/chats-extended.js +311 -0
  122. package/lib/Socket/chats-extended.js.map +1 -0
  123. package/lib/Socket/chats.d.ts +151 -0
  124. package/lib/Socket/chats.d.ts.map +1 -0
  125. package/lib/Socket/chats.js +1236 -0
  126. package/lib/Socket/chats.js.map +1 -0
  127. package/lib/Socket/communities.d.ts +427 -0
  128. package/lib/Socket/communities.d.ts.map +1 -0
  129. package/lib/Socket/communities.js +432 -0
  130. package/lib/Socket/communities.js.map +1 -0
  131. package/lib/Socket/dugong.d.ts +118 -0
  132. package/lib/Socket/dugong.d.ts.map +1 -0
  133. package/lib/Socket/dugong.js +685 -0
  134. package/lib/Socket/dugong.js.map +1 -0
  135. package/lib/Socket/groups.d.ts +187 -0
  136. package/lib/Socket/groups.d.ts.map +1 -0
  137. package/lib/Socket/groups.js +348 -0
  138. package/lib/Socket/groups.js.map +1 -0
  139. package/lib/Socket/index.d.ts +423 -0
  140. package/lib/Socket/index.d.ts.map +1 -0
  141. package/lib/Socket/index.js +37 -0
  142. package/lib/Socket/index.js.map +1 -0
  143. package/lib/Socket/messages-recv.d.ts +356 -0
  144. package/lib/Socket/messages-recv.d.ts.map +1 -0
  145. package/lib/Socket/messages-recv.js +1818 -0
  146. package/lib/Socket/messages-recv.js.map +1 -0
  147. package/lib/Socket/messages-send.d.ts +386 -0
  148. package/lib/Socket/messages-send.d.ts.map +1 -0
  149. package/lib/Socket/messages-send.js +1540 -0
  150. package/lib/Socket/messages-send.js.map +1 -0
  151. package/lib/Socket/mex.d.ts +3 -0
  152. package/lib/Socket/mex.d.ts.map +1 -0
  153. package/lib/Socket/mex.js +42 -0
  154. package/lib/Socket/mex.js.map +1 -0
  155. package/lib/Socket/newsletter-extended.d.ts +134 -0
  156. package/lib/Socket/newsletter-extended.d.ts.map +1 -0
  157. package/lib/Socket/newsletter-extended.js +508 -0
  158. package/lib/Socket/newsletter-extended.js.map +1 -0
  159. package/lib/Socket/newsletter.d.ts +219 -0
  160. package/lib/Socket/newsletter.d.ts.map +1 -0
  161. package/lib/Socket/newsletter.js +231 -0
  162. package/lib/Socket/newsletter.js.map +1 -0
  163. package/lib/Socket/send-extended.d.ts +45 -0
  164. package/lib/Socket/send-extended.d.ts.map +1 -0
  165. package/lib/Socket/send-extended.js +264 -0
  166. package/lib/Socket/send-extended.js.map +1 -0
  167. package/lib/Socket/socket.d.ts +72 -0
  168. package/lib/Socket/socket.d.ts.map +1 -0
  169. package/lib/Socket/socket.js +1066 -0
  170. package/lib/Socket/socket.js.map +1 -0
  171. package/lib/Store/index.d.ts +4 -0
  172. package/lib/Store/index.d.ts.map +1 -0
  173. package/lib/Store/index.js +5 -0
  174. package/lib/Store/index.js.map +1 -0
  175. package/lib/Store/make-in-memory-store.d.ts +46 -0
  176. package/lib/Store/make-in-memory-store.d.ts.map +1 -0
  177. package/lib/Store/make-in-memory-store.js +391 -0
  178. package/lib/Store/make-in-memory-store.js.map +1 -0
  179. package/lib/Store/make-ordered-dictionary.d.ts +13 -0
  180. package/lib/Store/make-ordered-dictionary.d.ts.map +1 -0
  181. package/lib/Store/make-ordered-dictionary.js +80 -0
  182. package/lib/Store/make-ordered-dictionary.js.map +1 -0
  183. package/lib/Store/object-repository.d.ts +11 -0
  184. package/lib/Store/object-repository.d.ts.map +1 -0
  185. package/lib/Store/object-repository.js +25 -0
  186. package/lib/Store/object-repository.js.map +1 -0
  187. package/lib/Types/Auth.d.ts +117 -0
  188. package/lib/Types/Auth.d.ts.map +1 -0
  189. package/lib/Types/Auth.js +2 -0
  190. package/lib/Types/Auth.js.map +1 -0
  191. package/lib/Types/Bussines.d.ts +25 -0
  192. package/lib/Types/Bussines.d.ts.map +1 -0
  193. package/lib/Types/Bussines.js +2 -0
  194. package/lib/Types/Bussines.js.map +1 -0
  195. package/lib/Types/Call.d.ts +15 -0
  196. package/lib/Types/Call.d.ts.map +1 -0
  197. package/lib/Types/Call.js +2 -0
  198. package/lib/Types/Call.js.map +1 -0
  199. package/lib/Types/Chat.d.ts +160 -0
  200. package/lib/Types/Chat.d.ts.map +1 -0
  201. package/lib/Types/Chat.js +27 -0
  202. package/lib/Types/Chat.js.map +1 -0
  203. package/lib/Types/Contact.d.ts +26 -0
  204. package/lib/Types/Contact.d.ts.map +1 -0
  205. package/lib/Types/Contact.js +2 -0
  206. package/lib/Types/Contact.js.map +1 -0
  207. package/lib/Types/Events.d.ts +265 -0
  208. package/lib/Types/Events.d.ts.map +1 -0
  209. package/lib/Types/Events.js +2 -0
  210. package/lib/Types/Events.js.map +1 -0
  211. package/lib/Types/GroupMetadata.d.ts +78 -0
  212. package/lib/Types/GroupMetadata.d.ts.map +1 -0
  213. package/lib/Types/GroupMetadata.js +7 -0
  214. package/lib/Types/GroupMetadata.js.map +1 -0
  215. package/lib/Types/Label.d.ts +47 -0
  216. package/lib/Types/Label.d.ts.map +1 -0
  217. package/lib/Types/Label.js +25 -0
  218. package/lib/Types/Label.js.map +1 -0
  219. package/lib/Types/LabelAssociation.d.ts +30 -0
  220. package/lib/Types/LabelAssociation.d.ts.map +1 -0
  221. package/lib/Types/LabelAssociation.js +7 -0
  222. package/lib/Types/LabelAssociation.js.map +1 -0
  223. package/lib/Types/Message.d.ts +415 -0
  224. package/lib/Types/Message.d.ts.map +1 -0
  225. package/lib/Types/Message.js +22 -0
  226. package/lib/Types/Message.js.map +1 -0
  227. package/lib/Types/Mex.d.ts +204 -0
  228. package/lib/Types/Mex.d.ts.map +1 -0
  229. package/lib/Types/Mex.js +102 -0
  230. package/lib/Types/Mex.js.map +1 -0
  231. package/lib/Types/Product.d.ts +79 -0
  232. package/lib/Types/Product.d.ts.map +1 -0
  233. package/lib/Types/Product.js +2 -0
  234. package/lib/Types/Product.js.map +1 -0
  235. package/lib/Types/Signal.d.ts +89 -0
  236. package/lib/Types/Signal.d.ts.map +1 -0
  237. package/lib/Types/Signal.js +2 -0
  238. package/lib/Types/Signal.js.map +1 -0
  239. package/lib/Types/Socket.d.ts +152 -0
  240. package/lib/Types/Socket.d.ts.map +1 -0
  241. package/lib/Types/Socket.js +3 -0
  242. package/lib/Types/Socket.js.map +1 -0
  243. package/lib/Types/State.d.ts +97 -0
  244. package/lib/Types/State.d.ts.map +1 -0
  245. package/lib/Types/State.js +56 -0
  246. package/lib/Types/State.js.map +1 -0
  247. package/lib/Types/USync.d.ts +26 -0
  248. package/lib/Types/USync.d.ts.map +1 -0
  249. package/lib/Types/USync.js +2 -0
  250. package/lib/Types/USync.js.map +1 -0
  251. package/lib/Types/index.d.ts +66 -0
  252. package/lib/Types/index.d.ts.map +1 -0
  253. package/lib/Types/index.js +26 -0
  254. package/lib/Types/index.js.map +1 -0
  255. package/lib/Utils/audio-sticker.d.ts +18 -0
  256. package/lib/Utils/audio-sticker.d.ts.map +1 -0
  257. package/lib/Utils/audio-sticker.js +196 -0
  258. package/lib/Utils/audio-sticker.js.map +1 -0
  259. package/lib/Utils/auth-store.d.ts +17 -0
  260. package/lib/Utils/auth-store.d.ts.map +1 -0
  261. package/lib/Utils/auth-store.js +78 -0
  262. package/lib/Utils/auth-store.js.map +1 -0
  263. package/lib/Utils/auth-utils.d.ts +24 -0
  264. package/lib/Utils/auth-utils.d.ts.map +1 -0
  265. package/lib/Utils/auth-utils.js +312 -0
  266. package/lib/Utils/auth-utils.js.map +1 -0
  267. package/lib/Utils/browser-utils.d.ts +4 -0
  268. package/lib/Utils/browser-utils.d.ts.map +1 -0
  269. package/lib/Utils/browser-utils.js +29 -0
  270. package/lib/Utils/browser-utils.js.map +1 -0
  271. package/lib/Utils/business.d.ts +23 -0
  272. package/lib/Utils/business.d.ts.map +1 -0
  273. package/lib/Utils/business.js +231 -0
  274. package/lib/Utils/business.js.map +1 -0
  275. package/lib/Utils/chat-theme.d.ts +135 -0
  276. package/lib/Utils/chat-theme.d.ts.map +1 -0
  277. package/lib/Utils/chat-theme.js +448 -0
  278. package/lib/Utils/chat-theme.js.map +1 -0
  279. package/lib/Utils/chat-utils.d.ts +100 -0
  280. package/lib/Utils/chat-utils.d.ts.map +1 -0
  281. package/lib/Utils/chat-utils.js +881 -0
  282. package/lib/Utils/chat-utils.js.map +1 -0
  283. package/lib/Utils/companion-reg-client-utils.d.ts +17 -0
  284. package/lib/Utils/companion-reg-client-utils.d.ts.map +1 -0
  285. package/lib/Utils/companion-reg-client-utils.js +35 -0
  286. package/lib/Utils/companion-reg-client-utils.js.map +1 -0
  287. package/lib/Utils/crypto.d.ts +37 -0
  288. package/lib/Utils/crypto.d.ts.map +1 -0
  289. package/lib/Utils/crypto.js +118 -0
  290. package/lib/Utils/crypto.js.map +1 -0
  291. package/lib/Utils/decode-wa-message.d.ts +84 -0
  292. package/lib/Utils/decode-wa-message.d.ts.map +1 -0
  293. package/lib/Utils/decode-wa-message.js +413 -0
  294. package/lib/Utils/decode-wa-message.js.map +1 -0
  295. package/lib/Utils/event-buffer.d.ts +37 -0
  296. package/lib/Utils/event-buffer.d.ts.map +1 -0
  297. package/lib/Utils/event-buffer.js +633 -0
  298. package/lib/Utils/event-buffer.js.map +1 -0
  299. package/lib/Utils/generics.d.ts +92 -0
  300. package/lib/Utils/generics.d.ts.map +1 -0
  301. package/lib/Utils/generics.js +393 -0
  302. package/lib/Utils/generics.js.map +1 -0
  303. package/lib/Utils/group-metadata-cache.d.ts +4 -0
  304. package/lib/Utils/group-metadata-cache.d.ts.map +1 -0
  305. package/lib/Utils/group-metadata-cache.js +24 -0
  306. package/lib/Utils/group-metadata-cache.js.map +1 -0
  307. package/lib/Utils/history.d.ts +24 -0
  308. package/lib/Utils/history.d.ts.map +1 -0
  309. package/lib/Utils/history.js +134 -0
  310. package/lib/Utils/history.js.map +1 -0
  311. package/lib/Utils/html-app.d.ts +15 -0
  312. package/lib/Utils/html-app.d.ts.map +1 -0
  313. package/lib/Utils/html-app.js +73 -0
  314. package/lib/Utils/html-app.js.map +1 -0
  315. package/lib/Utils/html-multiplayer.d.ts +6 -0
  316. package/lib/Utils/html-multiplayer.d.ts.map +1 -0
  317. package/lib/Utils/html-multiplayer.js +91 -0
  318. package/lib/Utils/html-multiplayer.js.map +1 -0
  319. package/lib/Utils/identity-change-handler.d.ts +44 -0
  320. package/lib/Utils/identity-change-handler.d.ts.map +1 -0
  321. package/lib/Utils/identity-change-handler.js +50 -0
  322. package/lib/Utils/identity-change-handler.js.map +1 -0
  323. package/lib/Utils/index.d.ts +54 -0
  324. package/lib/Utils/index.d.ts.map +1 -0
  325. package/lib/Utils/index.js +54 -0
  326. package/lib/Utils/index.js.map +1 -0
  327. package/lib/Utils/link-preview-metadata.d.ts +12 -0
  328. package/lib/Utils/link-preview-metadata.d.ts.map +1 -0
  329. package/lib/Utils/link-preview-metadata.js +73 -0
  330. package/lib/Utils/link-preview-metadata.js.map +1 -0
  331. package/lib/Utils/link-preview.d.ts +21 -0
  332. package/lib/Utils/link-preview.d.ts.map +1 -0
  333. package/lib/Utils/link-preview.js +85 -0
  334. package/lib/Utils/link-preview.js.map +1 -0
  335. package/lib/Utils/logger.d.ts +13 -0
  336. package/lib/Utils/logger.d.ts.map +1 -0
  337. package/lib/Utils/logger.js +3 -0
  338. package/lib/Utils/logger.js.map +1 -0
  339. package/lib/Utils/lt-hash.d.ts +8 -0
  340. package/lib/Utils/lt-hash.d.ts.map +1 -0
  341. package/lib/Utils/lt-hash.js +8 -0
  342. package/lib/Utils/lt-hash.js.map +1 -0
  343. package/lib/Utils/make-mutex.d.ts +9 -0
  344. package/lib/Utils/make-mutex.d.ts.map +1 -0
  345. package/lib/Utils/make-mutex.js +33 -0
  346. package/lib/Utils/make-mutex.js.map +1 -0
  347. package/lib/Utils/media-info.d.ts +37 -0
  348. package/lib/Utils/media-info.d.ts.map +1 -0
  349. package/lib/Utils/media-info.js +105 -0
  350. package/lib/Utils/media-info.js.map +1 -0
  351. package/lib/Utils/message-retry-manager.d.ts +115 -0
  352. package/lib/Utils/message-retry-manager.d.ts.map +1 -0
  353. package/lib/Utils/message-retry-manager.js +265 -0
  354. package/lib/Utils/message-retry-manager.js.map +1 -0
  355. package/lib/Utils/message_builder.d.ts +5 -0
  356. package/lib/Utils/message_builder.d.ts.map +1 -0
  357. package/lib/Utils/message_builder.js +8 -0
  358. package/lib/Utils/message_builder.js.map +1 -0
  359. package/lib/Utils/messages-extra.d.ts +168 -0
  360. package/lib/Utils/messages-extra.d.ts.map +1 -0
  361. package/lib/Utils/messages-extra.js +1038 -0
  362. package/lib/Utils/messages-extra.js.map +1 -0
  363. package/lib/Utils/messages-media.d.ts +146 -0
  364. package/lib/Utils/messages-media.d.ts.map +1 -0
  365. package/lib/Utils/messages-media.js +832 -0
  366. package/lib/Utils/messages-media.js.map +1 -0
  367. package/lib/Utils/messages.d.ts +100 -0
  368. package/lib/Utils/messages.d.ts.map +1 -0
  369. package/lib/Utils/messages.js +1127 -0
  370. package/lib/Utils/messages.js.map +1 -0
  371. package/lib/Utils/modern-messages.d.ts +65 -0
  372. package/lib/Utils/modern-messages.d.ts.map +1 -0
  373. package/lib/Utils/modern-messages.js +440 -0
  374. package/lib/Utils/modern-messages.js.map +1 -0
  375. package/lib/Utils/native-flow.d.ts +20 -0
  376. package/lib/Utils/native-flow.d.ts.map +1 -0
  377. package/lib/Utils/native-flow.js +105 -0
  378. package/lib/Utils/native-flow.js.map +1 -0
  379. package/lib/Utils/newsletter-status.d.ts +273 -0
  380. package/lib/Utils/newsletter-status.d.ts.map +1 -0
  381. package/lib/Utils/newsletter-status.js +587 -0
  382. package/lib/Utils/newsletter-status.js.map +1 -0
  383. package/lib/Utils/noise-handler.d.ts +20 -0
  384. package/lib/Utils/noise-handler.d.ts.map +1 -0
  385. package/lib/Utils/noise-handler.js +201 -0
  386. package/lib/Utils/noise-handler.js.map +1 -0
  387. package/lib/Utils/offline-node-processor.d.ts +17 -0
  388. package/lib/Utils/offline-node-processor.d.ts.map +1 -0
  389. package/lib/Utils/offline-node-processor.js +40 -0
  390. package/lib/Utils/offline-node-processor.js.map +1 -0
  391. package/lib/Utils/optional-media.d.ts +4 -0
  392. package/lib/Utils/optional-media.d.ts.map +1 -0
  393. package/lib/Utils/optional-media.js +38 -0
  394. package/lib/Utils/optional-media.js.map +1 -0
  395. package/lib/Utils/payment-messages.d.ts +43 -0
  396. package/lib/Utils/payment-messages.d.ts.map +1 -0
  397. package/lib/Utils/payment-messages.js +139 -0
  398. package/lib/Utils/payment-messages.js.map +1 -0
  399. package/lib/Utils/pre-key-manager.d.ts +28 -0
  400. package/lib/Utils/pre-key-manager.d.ts.map +1 -0
  401. package/lib/Utils/pre-key-manager.js +106 -0
  402. package/lib/Utils/pre-key-manager.js.map +1 -0
  403. package/lib/Utils/process-message.d.ts +70 -0
  404. package/lib/Utils/process-message.d.ts.map +1 -0
  405. package/lib/Utils/process-message.js +746 -0
  406. package/lib/Utils/process-message.js.map +1 -0
  407. package/lib/Utils/reporting-utils.d.ts +11 -0
  408. package/lib/Utils/reporting-utils.d.ts.map +1 -0
  409. package/lib/Utils/reporting-utils.js +258 -0
  410. package/lib/Utils/reporting-utils.js.map +1 -0
  411. package/lib/Utils/rich-message-builder.d.ts +54 -0
  412. package/lib/Utils/rich-message-builder.d.ts.map +1 -0
  413. package/lib/Utils/rich-message-builder.js +170 -0
  414. package/lib/Utils/rich-message-builder.js.map +1 -0
  415. package/lib/Utils/rich-messages.d.ts +323 -0
  416. package/lib/Utils/rich-messages.d.ts.map +1 -0
  417. package/lib/Utils/rich-messages.js +1117 -0
  418. package/lib/Utils/rich-messages.js.map +1 -0
  419. package/lib/Utils/scheduled-message.d.ts +82 -0
  420. package/lib/Utils/scheduled-message.d.ts.map +1 -0
  421. package/lib/Utils/scheduled-message.js +102 -0
  422. package/lib/Utils/scheduled-message.js.map +1 -0
  423. package/lib/Utils/sender-key-memory.d.ts +14 -0
  424. package/lib/Utils/sender-key-memory.d.ts.map +1 -0
  425. package/lib/Utils/sender-key-memory.js +49 -0
  426. package/lib/Utils/sender-key-memory.js.map +1 -0
  427. package/lib/Utils/signal.d.ts +47 -0
  428. package/lib/Utils/signal.d.ts.map +1 -0
  429. package/lib/Utils/signal.js +201 -0
  430. package/lib/Utils/signal.js.map +1 -0
  431. package/lib/Utils/stanza-ack.d.ts +11 -0
  432. package/lib/Utils/stanza-ack.d.ts.map +1 -0
  433. package/lib/Utils/stanza-ack.js +38 -0
  434. package/lib/Utils/stanza-ack.js.map +1 -0
  435. package/lib/Utils/status-stickers.d.ts +80 -0
  436. package/lib/Utils/status-stickers.d.ts.map +1 -0
  437. package/lib/Utils/status-stickers.js +222 -0
  438. package/lib/Utils/status-stickers.js.map +1 -0
  439. package/lib/Utils/sticker-pack.d.ts +19 -0
  440. package/lib/Utils/sticker-pack.d.ts.map +1 -0
  441. package/lib/Utils/sticker-pack.js +35 -0
  442. package/lib/Utils/sticker-pack.js.map +1 -0
  443. package/lib/Utils/sync-action-utils.d.ts +19 -0
  444. package/lib/Utils/sync-action-utils.d.ts.map +1 -0
  445. package/lib/Utils/sync-action-utils.js +49 -0
  446. package/lib/Utils/sync-action-utils.js.map +1 -0
  447. package/lib/Utils/tc-token-utils.d.ts +37 -0
  448. package/lib/Utils/tc-token-utils.d.ts.map +1 -0
  449. package/lib/Utils/tc-token-utils.js +164 -0
  450. package/lib/Utils/tc-token-utils.js.map +1 -0
  451. package/lib/Utils/ttl-cache.d.ts +29 -0
  452. package/lib/Utils/ttl-cache.d.ts.map +1 -0
  453. package/lib/Utils/ttl-cache.js +112 -0
  454. package/lib/Utils/ttl-cache.js.map +1 -0
  455. package/lib/Utils/use-mongo-auth-state.d.ts +13 -0
  456. package/lib/Utils/use-mongo-auth-state.d.ts.map +1 -0
  457. package/lib/Utils/use-mongo-auth-state.js +69 -0
  458. package/lib/Utils/use-mongo-auth-state.js.map +1 -0
  459. package/lib/Utils/use-multi-file-auth-state.d.ts +15 -0
  460. package/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -0
  461. package/lib/Utils/use-multi-file-auth-state.js +148 -0
  462. package/lib/Utils/use-multi-file-auth-state.js.map +1 -0
  463. package/lib/Utils/use-mysql-auth-state.d.ts +13 -0
  464. package/lib/Utils/use-mysql-auth-state.d.ts.map +1 -0
  465. package/lib/Utils/use-mysql-auth-state.js +81 -0
  466. package/lib/Utils/use-mysql-auth-state.js.map +1 -0
  467. package/lib/Utils/use-postgres-auth-state.d.ts +13 -0
  468. package/lib/Utils/use-postgres-auth-state.d.ts.map +1 -0
  469. package/lib/Utils/use-postgres-auth-state.js +81 -0
  470. package/lib/Utils/use-postgres-auth-state.js.map +1 -0
  471. package/lib/Utils/use-redis-auth-state.d.ts +13 -0
  472. package/lib/Utils/use-redis-auth-state.d.ts.map +1 -0
  473. package/lib/Utils/use-redis-auth-state.js +91 -0
  474. package/lib/Utils/use-redis-auth-state.js.map +1 -0
  475. package/lib/Utils/use-single-file-auth-state.d.ts +13 -0
  476. package/lib/Utils/use-single-file-auth-state.d.ts.map +1 -0
  477. package/lib/Utils/use-single-file-auth-state.js +173 -0
  478. package/lib/Utils/use-single-file-auth-state.js.map +1 -0
  479. package/lib/Utils/use-sqlite-auth-state.d.ts +13 -0
  480. package/lib/Utils/use-sqlite-auth-state.d.ts.map +1 -0
  481. package/lib/Utils/use-sqlite-auth-state.js +119 -0
  482. package/lib/Utils/use-sqlite-auth-state.js.map +1 -0
  483. package/lib/Utils/useNekoDBAuth.d.ts +12 -0
  484. package/lib/Utils/useNekoDBAuth.d.ts.map +1 -0
  485. package/lib/Utils/useNekoDBAuth.js +74 -0
  486. package/lib/Utils/useNekoDBAuth.js.map +1 -0
  487. package/lib/Utils/username.d.ts +23 -0
  488. package/lib/Utils/username.d.ts.map +1 -0
  489. package/lib/Utils/username.js +60 -0
  490. package/lib/Utils/username.js.map +1 -0
  491. package/lib/Utils/validate-connection.d.ts +11 -0
  492. package/lib/Utils/validate-connection.d.ts.map +1 -0
  493. package/lib/Utils/validate-connection.js +210 -0
  494. package/lib/Utils/validate-connection.js.map +1 -0
  495. package/lib/Utils/view-once.d.ts +56 -0
  496. package/lib/Utils/view-once.d.ts.map +1 -0
  497. package/lib/Utils/view-once.js +226 -0
  498. package/lib/Utils/view-once.js.map +1 -0
  499. package/lib/Utils/voice-note.d.ts +9 -0
  500. package/lib/Utils/voice-note.d.ts.map +1 -0
  501. package/lib/Utils/voice-note.js +104 -0
  502. package/lib/Utils/voice-note.js.map +1 -0
  503. package/lib/Utils/voice-recognition.d.ts +9 -0
  504. package/lib/Utils/voice-recognition.d.ts.map +1 -0
  505. package/lib/Utils/voice-recognition.js +208 -0
  506. package/lib/Utils/voice-recognition.js.map +1 -0
  507. package/lib/VoIP/audio-feeder.d.ts +54 -0
  508. package/lib/VoIP/audio-feeder.d.ts.map +1 -0
  509. package/lib/VoIP/audio-feeder.js +278 -0
  510. package/lib/VoIP/audio-feeder.js.map +1 -0
  511. package/lib/VoIP/index.d.ts +127 -0
  512. package/lib/VoIP/index.d.ts.map +1 -0
  513. package/lib/VoIP/index.js +1068 -0
  514. package/lib/VoIP/index.js.map +1 -0
  515. package/lib/VoIP/relay-transport.d.ts +42 -0
  516. package/lib/VoIP/relay-transport.d.ts.map +1 -0
  517. package/lib/VoIP/relay-transport.js +639 -0
  518. package/lib/VoIP/relay-transport.js.map +1 -0
  519. package/lib/VoIP/signaling.d.ts +71 -0
  520. package/lib/VoIP/signaling.d.ts.map +1 -0
  521. package/lib/VoIP/signaling.js +1016 -0
  522. package/lib/VoIP/signaling.js.map +1 -0
  523. package/lib/VoIP/types.d.ts +13 -0
  524. package/lib/VoIP/types.d.ts.map +1 -0
  525. package/lib/VoIP/types.js +14 -0
  526. package/lib/VoIP/types.js.map +1 -0
  527. package/lib/VoIP/video-feeder.d.ts +53 -0
  528. package/lib/VoIP/video-feeder.d.ts.map +1 -0
  529. package/lib/VoIP/video-feeder.js +278 -0
  530. package/lib/VoIP/video-feeder.js.map +1 -0
  531. package/lib/VoIP/wasm-engine.d.ts +50 -0
  532. package/lib/VoIP/wasm-engine.d.ts.map +1 -0
  533. package/lib/VoIP/wasm-engine.js +1358 -0
  534. package/lib/VoIP/wasm-engine.js.map +1 -0
  535. package/lib/VoIP/worker-bootstrap.d.ts +2 -0
  536. package/lib/VoIP/worker-bootstrap.d.ts.map +1 -0
  537. package/lib/VoIP/worker-bootstrap.js +1032 -0
  538. package/lib/VoIP/worker-bootstrap.js.map +1 -0
  539. package/lib/WABinary/constants.d.ts +28 -0
  540. package/lib/WABinary/constants.d.ts.map +1 -0
  541. package/lib/WABinary/constants.js +1301 -0
  542. package/lib/WABinary/constants.js.map +1 -0
  543. package/lib/WABinary/decode.d.ts +7 -0
  544. package/lib/WABinary/decode.d.ts.map +1 -0
  545. package/lib/WABinary/decode.js +262 -0
  546. package/lib/WABinary/decode.js.map +1 -0
  547. package/lib/WABinary/encode.d.ts +3 -0
  548. package/lib/WABinary/encode.d.ts.map +1 -0
  549. package/lib/WABinary/encode.js +220 -0
  550. package/lib/WABinary/encode.js.map +1 -0
  551. package/lib/WABinary/generic-utils.d.ts +31 -0
  552. package/lib/WABinary/generic-utils.d.ts.map +1 -0
  553. package/lib/WABinary/generic-utils.js +179 -0
  554. package/lib/WABinary/generic-utils.js.map +1 -0
  555. package/lib/WABinary/index.d.ts +6 -0
  556. package/lib/WABinary/index.d.ts.map +1 -0
  557. package/lib/WABinary/index.js +6 -0
  558. package/lib/WABinary/index.js.map +1 -0
  559. package/lib/WABinary/jid-utils.d.ts +50 -0
  560. package/lib/WABinary/jid-utils.d.ts.map +1 -0
  561. package/lib/WABinary/jid-utils.js +98 -0
  562. package/lib/WABinary/jid-utils.js.map +1 -0
  563. package/lib/WABinary/types.d.ts +19 -0
  564. package/lib/WABinary/types.d.ts.map +1 -0
  565. package/lib/WABinary/types.js +2 -0
  566. package/lib/WABinary/types.js.map +1 -0
  567. package/lib/WAM/BinaryInfo.d.ts +9 -0
  568. package/lib/WAM/BinaryInfo.d.ts.map +1 -0
  569. package/lib/WAM/BinaryInfo.js +10 -0
  570. package/lib/WAM/BinaryInfo.js.map +1 -0
  571. package/lib/WAM/constants.d.ts +40 -0
  572. package/lib/WAM/constants.d.ts.map +1 -0
  573. package/lib/WAM/constants.js +22853 -0
  574. package/lib/WAM/constants.js.map +1 -0
  575. package/lib/WAM/encode.d.ts +3 -0
  576. package/lib/WAM/encode.d.ts.map +1 -0
  577. package/lib/WAM/encode.js +150 -0
  578. package/lib/WAM/encode.js.map +1 -0
  579. package/lib/WAM/index.d.ts +4 -0
  580. package/lib/WAM/index.d.ts.map +1 -0
  581. package/lib/WAM/index.js +4 -0
  582. package/lib/WAM/index.js.map +1 -0
  583. package/lib/WAUSync/Protocols/USyncBusinessProtocol.d.ts +19 -0
  584. package/lib/WAUSync/Protocols/USyncBusinessProtocol.d.ts.map +1 -0
  585. package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +42 -0
  586. package/lib/WAUSync/Protocols/USyncBusinessProtocol.js.map +1 -0
  587. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +10 -0
  588. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -0
  589. package/lib/WAUSync/Protocols/USyncContactProtocol.js +52 -0
  590. package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +1 -0
  591. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +23 -0
  592. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +1 -0
  593. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +54 -0
  594. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +1 -0
  595. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +13 -0
  596. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +1 -0
  597. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +27 -0
  598. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +1 -0
  599. package/lib/WAUSync/Protocols/USyncFeatureProtocol.d.ts +18 -0
  600. package/lib/WAUSync/Protocols/USyncFeatureProtocol.d.ts.map +1 -0
  601. package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +48 -0
  602. package/lib/WAUSync/Protocols/USyncFeatureProtocol.js.map +1 -0
  603. package/lib/WAUSync/Protocols/USyncPictureProtocol.d.ts +18 -0
  604. package/lib/WAUSync/Protocols/USyncPictureProtocol.d.ts.map +1 -0
  605. package/lib/WAUSync/Protocols/USyncPictureProtocol.js +25 -0
  606. package/lib/WAUSync/Protocols/USyncPictureProtocol.js.map +1 -0
  607. package/lib/WAUSync/Protocols/USyncSidelistProtocol.d.ts +15 -0
  608. package/lib/WAUSync/Protocols/USyncSidelistProtocol.d.ts.map +1 -0
  609. package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +21 -0
  610. package/lib/WAUSync/Protocols/USyncSidelistProtocol.js.map +1 -0
  611. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
  612. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +1 -0
  613. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +38 -0
  614. package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +1 -0
  615. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.d.ts +17 -0
  616. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.d.ts.map +1 -0
  617. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +27 -0
  618. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js.map +1 -0
  619. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +10 -0
  620. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +1 -0
  621. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +25 -0
  622. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +1 -0
  623. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +26 -0
  624. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +1 -0
  625. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +51 -0
  626. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +1 -0
  627. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +10 -0
  628. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +1 -0
  629. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +29 -0
  630. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +1 -0
  631. package/lib/WAUSync/Protocols/index.d.ts +11 -0
  632. package/lib/WAUSync/Protocols/index.d.ts.map +1 -0
  633. package/lib/WAUSync/Protocols/index.js +11 -0
  634. package/lib/WAUSync/Protocols/index.js.map +1 -0
  635. package/lib/WAUSync/USyncQuery.d.ts +35 -0
  636. package/lib/WAUSync/USyncQuery.d.ts.map +1 -0
  637. package/lib/WAUSync/USyncQuery.js +118 -0
  638. package/lib/WAUSync/USyncQuery.js.map +1 -0
  639. package/lib/WAUSync/USyncUser.d.ts +25 -0
  640. package/lib/WAUSync/USyncUser.d.ts.map +1 -0
  641. package/lib/WAUSync/USyncUser.js +47 -0
  642. package/lib/WAUSync/USyncUser.js.map +1 -0
  643. package/lib/WAUSync/index.d.ts +4 -0
  644. package/lib/WAUSync/index.d.ts.map +1 -0
  645. package/lib/WAUSync/index.js +4 -0
  646. package/lib/WAUSync/index.js.map +1 -0
  647. package/lib/assets/wasm/loader.d.ts +2 -0
  648. package/lib/assets/wasm/loader.d.ts.map +1 -0
  649. package/lib/assets/wasm/loader.js +5 -0
  650. package/lib/assets/wasm/loader.js.map +1 -0
  651. package/lib/assets/wasm/whatsapp.wasm +0 -0
  652. package/lib/assets/wasm/worker-modules.d.ts +2 -0
  653. package/lib/assets/wasm/worker-modules.d.ts.map +1 -0
  654. package/lib/assets/wasm/worker-modules.js +273 -0
  655. package/lib/assets/wasm/worker-modules.js.map +1 -0
  656. package/lib/cjs/index.cjs +226721 -0
  657. package/lib/cjs/index.d.cts +3 -0
  658. package/lib/index.d.ts +20 -0
  659. package/lib/index.d.ts.map +1 -0
  660. package/lib/index.js +17 -0
  661. package/lib/index.js.map +1 -0
  662. package/package.json +209 -4
package/README.md CHANGED
@@ -1,3 +1,1658 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <img src="https://files.catbox.moe/0r4ck8.jpg" alt="Lyndrā-Blanys banner" width="100%" />
4
+
5
+ ### Modded Baileys — Interactive Messages, AI Rich Responses, Albums & More
6
+
7
+ [![npm version](https://img.shields.io/npm/v/Lyndrā-Blanys?color=CB3837&logo=npm&logoColor=white&style=for-the-badge)](https://www.npmjs.com/package/Lyndrā-Blanys)
8
+ [![npm downloads](https://img.shields.io/npm/dm/Lyndrā-Blanys?color=CB3837&logo=npm&logoColor=white&style=for-the-badge)](https://www.npmjs.com/package/Lyndrā-Blanys)
9
+ [![License](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge)](LICENSE)
10
+ [![Node](https://img.shields.io/badge/node-%3E%3D20.0.0-339933?logo=node.js&logoColor=white&style=for-the-badge)](https://nodejs.org)
11
+ [![ESM](https://img.shields.io/badge/ESM-only-F7DF1E?logo=javascript&logoColor=black&style=for-the-badge)](#)
12
+
13
+ ---
14
+
15
+ **A modded build of [WhiskeySockets/Baileys](https://github.com/WhiskeySockets/Baileys)**
16
+ with native support for interactive messages, album messages, unified rich responses, newsletter helpers, status mentions, and additional business/community utilities.
17
+
18
+ This repository is a **distribution/build repo** for `Lyndrā-Blanys`.
19
+ It ships compiled runtime files in `lib/` and protobuf artifacts in `WAProto/`, and is intended to be consumed directly from npm or as a vendored dependency inside the **Lyndrā-MD** ecosystem.
20
+
21
+ </div>
22
+
23
+ ---
24
+
25
+ ## 🆕 Changelog / Updates (v0.0.2)
26
+
27
+ **1. Fix `additionalNodes` Conflict (v0.0.2)**
28
+
29
+ - Fixed an issue where supplying a custom `<biz>` node in `additionalNodes` alongside interactive messages caused duplicate `<biz>` nodes in the stanza, which led to the message being silently rejected by WhatsApp.
30
+
31
+ **2. Built-in VoIP (Voice Call) Engine (v0.0.2)**
32
+
33
+ - Full integration of the WebRTC and WASM engines to enable native WhatsApp voice calling, eliminating the need for a separate package.
34
+
35
+ **2. Fix View Once Error (Anti-Crash)**
36
+
37
+ - WhatsApp (Meta) Web API no longer receives media content for View Once messages, which previously caused the socket to crash. We've added robust parsing (`viewOnceMessageV3` & `ptvMessage`) to gracefully handle these empty stubs without crashing your bot.
38
+
39
+ **2. Decryption Retry Fix (Private Chats)**
40
+
41
+ - Fixed an issue in `messages-recv.js` where "Bad MAC" / decryption errors would close the connection. Combined with a proper `getMessage` hook in your main connection setup, the bot now seamlessly retries failed decryptions.
42
+ - Browser parameter spoofing upgraded to MacOS to prevent Error 405 (Method Not Allowed) during pairing.
43
+
44
+ **3. AI Rich Implementation (`ORich`)**
45
+
46
+ - Added the `ORich` class (an extension of `AIRich` from `message_builder.js`) to generate stunning AI response layouts easily.
47
+ - **Example Usage:**
48
+
49
+ ```javascript
50
+ import { ORich } from 'Lyndrā-Blanys';
51
+
52
+ const Lyndrā = new ORich(sock)
53
+ .addText('Hello from ORich AI!')
54
+ .addSuggest(['Tell me more', 'Next']);
55
+
56
+ await Lyndrā.send(jid);
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Table of Contents
62
+
63
+ - [Lyndrā-Blanys](#Lyndrā-Blanys)
64
+ - [Modded Baileys v7 — Interactive Messages, AI Rich Responses, Albums & More](#modded-baileys-v7--interactive-messages-ai-rich-responses-albums--more)
65
+ - [Table of Contents](#table-of-contents)
66
+ - [✨ Features](#-features)
67
+ - [✅ Requirements](#-requirements)
68
+ - [🗂️ What’s Inside This Repo](#-whats-inside-this-repo)
69
+ - [📦 Installation](#-installation)
70
+ - [From NPM](#from-npm)
71
+ - [Using Alias (Recommended for Lyndrā-MD Bots)](#using-alias-recommended-for-Lyndrā-md-bots)
72
+ - [🛠️ Quick Start](#️-quick-start)
73
+ - [1. Project Setup](#1-project-setup)
74
+ - [2. Install Dependencies](#2-install-dependencies)
75
+ - [3. Create `index.js`](#3-create-indexjs)
76
+ - [4. Run](#4-run)
77
+ - [5. Pairing Code Example](#5-pairing-code-example)
78
+ - [🏗️ Architecture](#️-architecture)
79
+ - [Socket Layer Chain](#socket-layer-chain)
80
+ - [Key Modules](#key-modules)
81
+ - [Build Repo Layout](#build-repo-layout)
82
+ - [Connection Flow](#connection-flow)
83
+ - [📡 Socket API Reference](#-socket-api-reference)
84
+ - [Connection \& Authentication](#connection--authentication)
85
+ - [VoIP (Voice Calls)](#voip-voice-calls)
86
+ - [Message Sending](#message-sending)
87
+ - [Interactive Messages](#interactive-messages)
88
+ - [Album Messages](#album-messages)
89
+ - [AI Rich Response Messages](#ai-rich-response-messages)
90
+ - [Code Block V2 (Unified Response)](#code-block-v2-unified-response)
91
+ - [Other Message Types](#other-message-types)
92
+ - [Newsletter Methods](#newsletter-methods)
93
+ - [Group Methods](#group-methods)
94
+ - [Community Methods](#community-methods)
95
+ - [Business Methods](#business-methods)
96
+ - [Chat \& Profile Methods](#chat--profile-methods)
97
+ - [Privacy Settings](#privacy-settings)
98
+ - [📡 Event Reference](#-event-reference)
99
+ - [🔧 Utility Exports](#-utility-exports)
100
+ - [🏗️ Building This Package](#️-building-this-package)
101
+ - [🔀 Differences from Official Baileys](#-differences-from-official-baileys)
102
+ - [🤝 Contributing](#-contributing)
103
+ - [📄 License](#-license)
104
+
105
+ ---
106
+
107
+ ## ✨ Features
108
+
109
+ | Feature | Description | Status |
110
+ | --------------------------- | -------------------------------------------------------------------------------------- | ------ |
111
+ | **VoIP Voice Calls** | Native VoIP engine (WASM/WebRTC) via `VoipClient`, single shared socket | ✅ |
112
+ | **Interactive Messages** | Native flow buttons, list/select menus, button wrappers, carousel support via `Dugong` | ✅ |
113
+ | **Album Messages** | Multi-image/video album relay with count metadata and grouped delivery | ✅ |
114
+ | **Rich Response Helpers** | `sendTable`, `sendList`, `sendCodeBlock`, `sendRichMessage`, `sendUnifiedResponse` | ✅ |
115
+ | **Unified Response V2** | `sendTableV2`, `sendCodeBlockV2`, `sendLinkV2` with Meta-AI-style unified sections | ✅ |
116
+ | **Link Messages** | Rich inline links with citations, proofs, and forwarded bot context | ✅ |
117
+ | **Latex Rendering Hooks** | `sendLatex`, `sendLatexImage`, `sendLatexInlineImage` helper APIs | ✅ |
118
+ | **Payment Messages** | Request payment messages with note/sticker support | ✅ |
119
+ | **Product / Catalog** | Business product messages, catalog fetch/create/update/delete, cover photo helpers | ✅ |
120
+ | **Event / Poll Result** | Event message builders and poll result snapshots | ✅ |
121
+ | **Newsletter Extras** | URL resolve, metadata fetch, create/update, bulk follow, admin utilities, live updates | ✅ |
122
+ | **Communities & Groups** | Community CRUD, linked groups, invite workflows, join approval, labels | ✅ |
123
+ | **Status Mention** | `sendStatusMention()` helper to mention users/groups in status flows | ✅ |
124
+ | **LID & Session Handling** | LID↔PN mapping, session migration, retry/session recreation helpers | ✅ |
125
+ | **Build Output Ready** | Published runtime in `lib/` and protobuf artifacts in `WAProto/` | ✅ |
126
+ | **TypeScript Declarations** | Included `.d.ts` files for exported APIs and socket methods | ✅ |
127
+
128
+ ---
129
+
130
+ ## ✅ Requirements
131
+
132
+ - **Node.js** `>= 20.0.0`
133
+ - **ESM project** (`"type": "module"` in your `package.json`)
134
+ - A persistent auth store implementation for production use
135
+ - Optional helpers depending on your use case:
136
+ - `pino` for logging
137
+ - `qrcode-terminal` if you want to render QR codes in the terminal yourself
138
+ - `sharp`, `jimp`, `audio-decode`, `link-preview-js` for optional media/rich utilities
139
+
140
+ > [!IMPORTANT]
141
+ > `Lyndrā-Blanys` is **ESM-only**. CommonJS projects will need migration or dynamic import wrappers.
142
+
143
+ ---
144
+
145
+ ## 📁 What’s Inside This Repo
146
+
147
+ This package is not the TypeScript source workspace. It contains the compiled distributable files you actually publish/use.
148
+
149
+ | Path | Purpose |
150
+ | --------------------- | ------------------------------------------------------ |
151
+ | `lib/` | Main compiled runtime, types, socket layers, utilities |
152
+ | `WAProto/` | Generated protobuf runtime and typings |
153
+ | `package.json` | Published package metadata, dependencies, build script |
154
+ | `tsconfig.json` | TypeScript config used for authoring/build pipeline |
155
+ | `tsconfig.build.json` | Build-specific TS emit config targeting `lib/` |
156
+ | `proto-extract/` | Protobuf-related extraction/build assets |
157
+
158
+ If you are documenting or integrating this project, treat `lib/index.js` and `lib/index.d.ts` as the primary public surface.
159
+
160
+ ---
161
+
162
+ ## 📦 Installation
163
+
164
+ ### From NPM
165
+
166
+ ```bash
167
+ npm install Lyndrā-Blanys
168
+ ```
169
+
170
+ Recommended companion packages for examples in this README:
171
+
172
+ ```bash
173
+ npm install pino qrcode-terminal
174
+ ```
175
+
176
+ ### Using Alias (Recommended for Lyndrā-MD Bots)
177
+
178
+ Add to `package.json`:
179
+
180
+ ```json
181
+ {
182
+ "dependencies": {
183
+ "Lyndrā": "npm:Lyndrā-Blanys@latest"
184
+ }
185
+ }
186
+ ```
187
+
188
+ Then run:
189
+
190
+ ```bash
191
+ npm install
192
+ ```
193
+
194
+ > [!TIP]
195
+ > Using the alias `Lyndrā` allows you to `import Lyndrā from 'Lyndrā'` without changing existing code.
196
+
197
+ > [!NOTE]
198
+ > Peer dependencies such as `sharp`, `jimp`, `audio-decode`, and `link-preview-js` are optional. Install only what your bot features need.
199
+
200
+ ---
201
+
202
+ ## 🛠️ Quick Start
203
+
204
+ ### 1. Project Setup
205
+
206
+ ```bash
207
+ mkdir my-bot && cd my-bot
208
+ npm init -y
209
+ ```
210
+
211
+ Ensure `package.json` has `"type": "module"`:
212
+
213
+ ```json
214
+ {
215
+ "name": "my-bot",
216
+ "type": "module",
217
+ "dependencies": {
218
+ "Lyndrā": "npm:Lyndrā-Blanys@latest"
219
+ }
220
+ }
221
+ ```
222
+
223
+ > [!IMPORTANT]
224
+ > **Required**: `"type": "module"` — Lyndrā-Blanys is ESM-only. Without this, imports will fail.
225
+
226
+ ### 2. Install Dependencies
227
+
228
+ ```bash
229
+ npm install Lyndrā-Blanys pino qrcode-terminal
230
+ ```
231
+
232
+ ### 3. Create `index.js`
233
+
234
+ ```js
235
+ import makeWASocket, {
236
+ useMultiFileAuthState,
237
+ DisconnectReason,
238
+ Browsers,
239
+ } from "Lyndrā-Blanys";
240
+ import pino from "pino";
241
+ import qrcode from "qrcode-terminal";
242
+
243
+ const logger = pino({ level: "silent" });
244
+
245
+ async function startBot() {
246
+ const { state, saveCreds } = await useMultiFileAuthState("./session");
247
+
248
+ const sock = makeWASocket({
249
+ auth: state,
250
+ logger,
251
+ browser: Browsers.ubuntu("Chrome"),
252
+ syncFullHistory: false,
253
+ });
254
+
255
+ sock.ev.on("creds.update", saveCreds);
256
+
257
+ sock.ev.on("connection.update", ({ connection, lastDisconnect, qr }) => {
258
+ if (qr) {
259
+ qrcode.generate(qr, { small: true });
260
+ }
261
+
262
+ if (connection === "close") {
263
+ const shouldReconnect =
264
+ lastDisconnect?.error?.output?.statusCode !==
265
+ DisconnectReason.loggedOut;
266
+ if (shouldReconnect) startBot();
267
+ }
268
+ if (connection === "open") console.log("Connected!");
269
+ });
270
+
271
+ sock.ev.on("messages.upsert", async ({ messages }) => {
272
+ const msg = messages[0];
273
+ if (!msg?.message || msg.key.fromMe) return;
274
+
275
+ const text =
276
+ msg.message.conversation || msg.message.extendedTextMessage?.text || "";
277
+
278
+ if (text === ".ping") {
279
+ await sock.sendMessage(msg.key.remoteJid, { text: "Pong!" });
280
+ }
281
+ });
282
+ }
283
+
284
+ startBot();
285
+ ```
286
+
287
+ ### 4. Run
288
+
289
+ ```bash
290
+ node index.js
291
+ ```
292
+
293
+ Scan the QR code, wait until the socket reaches `connection: "open"`, then send `.ping` to test.
294
+
295
+ ### 5. Pairing Code Example
296
+
297
+ If you prefer pairing code over QR:
298
+
299
+ ```js
300
+ const sock = makeWASocket({
301
+ auth: state,
302
+ logger,
303
+ browser: Browsers.windows("Chrome"),
304
+ });
305
+
306
+ sock.ev.on("connection.update", async ({ connection }) => {
307
+ if (connection === "connecting") {
308
+ const code = await sock.requestPairingCode("6281234567890");
309
+ console.log("Pairing code:", code);
310
+ }
311
+ });
312
+ ```
313
+
314
+ You can also provide your own custom pairing code:
315
+
316
+ ```js
317
+ const code = await sock.requestPairingCode("6281234567890", "A1B2C3D4");
318
+ console.log("Custom pairing code:", code);
319
+ ```
320
+
321
+ Custom pairing codes must be exactly `8` characters.
322
+
323
+ > [!WARNING]
324
+ > `printQRInTerminal` still exists in the type surface for compatibility, but it is **deprecated** in the current build. Prefer handling the `qr` value from `connection.update` yourself.
325
+
326
+ ---
327
+
328
+ ## 🏗️ Architecture
329
+
330
+ ### Socket Layer Chain
331
+
332
+ Each socket layer extends the previous via composition, adding functionality from bottom to top:
333
+
334
+ ```
335
+ makeSocket → WebSocket + Noise protocol + pre-key management
336
+ makeChatsSocket → App state sync + chat modifications + profile
337
+ makeGroupsSocket → Group CRUD + participant management
338
+ makeMessagesSendSocket → Message sending + rich messages + relay
339
+ makeMessagesRecvSocket → Message receiving + decryption + notifications
340
+ makeBusinessSocket → Product catalog + business profile
341
+ makeCommunitiesSocket → Community CRUD + sub-groups
342
+ makeNewsletterSocket → Newsletter follow/unfollow/metadata
343
+ makeWASocket ← TOP LEVEL EXPORT
344
+ ```
345
+
346
+ ### Key Modules
347
+
348
+ | Module | Path | Description |
349
+ | ------------ | --------------- | ---------------------------------------------------------------- |
350
+ | **Socket** | `lib/Socket/` | Connection, messaging, groups, newsletter, business, communities |
351
+ | **Signal** | `lib/Signal/` | Signal protocol: 1:1 encryption, group SenderKey, LID mapping |
352
+ | **WABinary** | `lib/WABinary/` | Binary node encoding/decoding, JID utilities |
353
+ | **Utils** | `lib/Utils/` | Crypto, auth state, noise handler, rich messages, media |
354
+ | **WAProto** | `WAProto/` | Compiled protobuf encode/decode |
355
+ | **WAUSync** | `lib/WAUSync/` | User sync protocol (contact, device, LID) |
356
+ | **WAM** | `lib/WAM/` | WhatsApp analytics binary encoding |
357
+ | **Types** | `lib/Types/` | Full TypeScript type definitions |
358
+
359
+ ### Build Repo Layout
360
+
361
+ This repository does **not** currently expose a `src/` directory in the checked-in package tree.
362
+
363
+ That means:
364
+
365
+ - Documentation should reference **`lib/` as the public implementation**
366
+ - API discovery is best done through:
367
+ - `lib/index.js`
368
+ - `lib/index.d.ts`
369
+ - `lib/Socket/*.d.ts`
370
+ - `lib/Utils/*.d.ts`
371
+ - Consumers should treat this repo as a **ready-to-install runtime artifact**, not the authoring source tree
372
+
373
+ ### Connection Flow
374
+
375
+ 1. WebSocket connect → Noise XX handshake (Curve25519 + AES-256-GCM)
376
+ 2. QR code or Pairing Code authentication
377
+ 3. `CB:success` → upload pre-keys → send passive IQ → emit `connection: 'open'`
378
+ 4. Store own LID↔PN mapping, migrate own session
379
+ 5. Buffer events → process offline notifications → flush → `receivedPendingNotifications: true`
380
+
381
+ ---
382
+
383
+ ## 📡 Socket API Reference
384
+
385
+ ### Connection & Authentication
386
+
387
+ ```js
388
+ const sock = makeWASocket({
389
+ auth: state, // AuthenticationState from useMultiFileAuthState
390
+ logger, // pino logger instance
391
+ browser: Browsers.ubuntu("Chrome"), // Browser identity
392
+ version: [2, 3000, 1035194821], // WA version
393
+ connectTimeoutMs: 20_000, // Connection timeout
394
+ defaultQueryTimeoutMs: 60_000, // Query timeout
395
+ retryRequestDelayMs: 250, // Retry delay
396
+ maxMsgRetryCount: 5, // Max message retry count
397
+ enableRecentMessageCache: true, // Enable message retry manager
398
+ enableAutoSessionRecreation: true,
399
+ syncFullHistory: false, // Sync full chat history
400
+ shouldIgnoreJid: (jid) => false, // Filter specific JIDs
401
+ qrTimeout: 60_000,
402
+ generateHighQualityLinkPreview: false,
403
+ });
404
+ ```
405
+
406
+ **Pairing Code Authentication:**
407
+
408
+ ```js
409
+ const sock = makeWASocket({
410
+ auth: state,
411
+ logger,
412
+ browser: Browsers.windows("Chrome"),
413
+ });
414
+
415
+ sock.ev.on("connection.update", async ({ connection, qr, isNewLogin }) => {
416
+ if (qr) {
417
+ // QR code available (fallback)
418
+ }
419
+ });
420
+
421
+ // Request pairing code
422
+ const code = await sock.requestPairingCode("6281234567890");
423
+ console.log("Pairing code:", code); // e.g. "A1B2-C3D4"
424
+ ```
425
+
426
+ **Authentication State:**
427
+
428
+ ```js
429
+ import { useMultiFileAuthState } from "Lyndrā-Blanys";
430
+
431
+ const { state, saveCreds } = await useMultiFileAuthState("./session");
432
+ // state.creds → credentials (me, platform, noise keys, etc.)
433
+ // state.keys → SignalKeyStore (pre-keys, sessions, identity keys, etc.)
434
+ // saveCreds() → persist credentials to disk
435
+ ```
436
+
437
+ **Custom Data Store / Memory Store Pattern:**
438
+
439
+ ```js
440
+ import {
441
+ BufferJSON,
442
+ initAuthCreds,
443
+ makeCacheableSignalKeyStore,
444
+ } from "Lyndrā-Blanys";
445
+
446
+ const credsStore = new Map();
447
+ const keyStoreData = new Map();
448
+
449
+ const creds = credsStore.get("creds") || initAuthCreds();
450
+
451
+ const keys = makeCacheableSignalKeyStore({
452
+ get: async (type, ids) => {
453
+ const data = {};
454
+ for (const id of ids) {
455
+ data[id] = keyStoreData.get(`${type}:${id}`);
456
+ }
457
+ return data;
458
+ },
459
+ set: async (data) => {
460
+ for (const category in data) {
461
+ for (const id in data[category]) {
462
+ const value = data[category][id];
463
+ const key = `${category}:${id}`;
464
+ if (value == null) keyStoreData.delete(key);
465
+ else keyStoreData.set(key, value);
466
+ }
467
+ }
468
+ },
469
+ });
470
+
471
+ const state = { creds, keys };
472
+
473
+ const saveCreds = async () => {
474
+ credsStore.set(
475
+ "creds",
476
+ JSON.parse(
477
+ JSON.stringify(state.creds, BufferJSON.replacer),
478
+ BufferJSON.reviver,
479
+ ),
480
+ );
481
+ };
482
+ ```
483
+
484
+ This package does **not** currently ship a built-in `makeInMemoryStore()` helper.
485
+
486
+ Use these patterns instead:
487
+
488
+ - `useMultiFileAuthState()` for bot/local usage
489
+ - `initAuthCreds()` + custom `SignalKeyStore` for DB/Redis/in-memory persistence
490
+ - `makeCacheableSignalKeyStore()` when you want faster repeated key access with caching
491
+
492
+ > [!WARNING]
493
+ > `useMultiFileAuthState()` is convenient for bots and local testing, but the package itself warns against using it as your long-term production persistence layer. For production, write your own SQL/NoSQL-backed auth store.
494
+
495
+ **Useful companion helpers:**
496
+
497
+ ```js
498
+ import {
499
+ Browsers,
500
+ DisconnectReason,
501
+ fetchLatestBaileysVersion,
502
+ makeCacheableSignalKeyStore,
503
+ } from "Lyndrā-Blanys";
504
+
505
+ const { version, isLatest } = await fetchLatestBaileysVersion();
506
+ console.log(version, isLatest);
507
+ ```
508
+
509
+ ---
510
+
511
+ ### VoIP (Voice Calls)
512
+
513
+ Modul VoIP kini terintegrasi langsung di `Lyndrā-Blanys` menggunakan `VoipClient` dan memanfaatkan *shared socket* (tanpa double pairing). Aset WebAssembly sudah built-in.
514
+
515
+ **Inisiasi VoIP Client:**
516
+
517
+ ```js
518
+ import { VoipClient, CallState } from "Lyndrā-Blanys";
519
+
520
+ // Lakukan ini SETELAH connection === "open"
521
+ if (!global.voipClient) {
522
+ global.voipClient = new VoipClient();
523
+ await global.voipClient.connectWithSocket(sock);
524
+ console.log("VoIP engine aktif!");
525
+ }
526
+ ```
527
+
528
+ **Melakukan Panggilan:**
529
+
530
+ ```js
531
+ try {
532
+ // Panggil nomor target (PN) - harus terhubung
533
+ const call = await global.voipClient.call("6281234567890", {
534
+ durationMs: 60000, // Timeout dalam ms
535
+ audioSource: "silence", // Atau "mic" / "file" (butuh audio-feeder & ffmpeg)
536
+ });
537
+
538
+ call.on("ringing", () => console.log("Berdering..."));
539
+ call.on("connected", () => console.log("Terhubung!"));
540
+ call.on("ended", (reason) => console.log("Panggilan berakhir:", reason));
541
+
542
+ // Menunggu hingga panggilan selesai
543
+ await call.waitForEnd();
544
+ } catch (e) {
545
+ console.error("Gagal menelpon:", e);
546
+ }
547
+ ```
548
+
549
+ ---
550
+
551
+ ### Message Sending
552
+
553
+ ```js
554
+ // Text
555
+ await sock.sendMessage(jid, { text: "Hello!" });
556
+
557
+ // Text with mention
558
+ await sock.sendMessage(jid, {
559
+ text: "Hello @628xxx!",
560
+ mentions: ["628xxx@s.whatsapp.net"],
561
+ });
562
+
563
+ // Image
564
+ await sock.sendMessage(jid, {
565
+ image: { url: "./photo.jpg" },
566
+ caption: "A photo",
567
+ });
568
+
569
+ // Video
570
+ await sock.sendMessage(jid, {
571
+ video: { url: "./video.mp4" },
572
+ caption: "A video",
573
+ gifPlayback: false,
574
+ });
575
+
576
+ // Audio
577
+ await sock.sendMessage(jid, {
578
+ audio: { url: "./audio.ogg" },
579
+ mimetype: "audio/ogg; codecs=opus",
580
+ ptt: true, // voice note
581
+ });
582
+
583
+ // Sticker
584
+ await sock.sendMessage(jid, {
585
+ sticker: { url: "./sticker.webp" },
586
+ });
587
+
588
+ // Sticker pack
589
+ await sock.sendMessage(
590
+ jid,
591
+ makeStickerPack({
592
+ name: "Lyndrā Starter Pack",
593
+ publisher: "Lyndrā",
594
+ description: "Starter sticker pack",
595
+ stickers: [
596
+ { url: "./stickers/1.webp", emojis: ["🔥"] },
597
+ { url: "./stickers/2.webp", emojis: ["😎"] },
598
+ ],
599
+ cover: { url: "./stickers/cover.webp" },
600
+ }),
601
+ );
602
+
603
+ // Document
604
+ await sock.sendMessage(jid, {
605
+ document: { url: "./file.pdf" },
606
+ fileName: "document.pdf",
607
+ mimetype: "application/pdf",
608
+ });
609
+
610
+ // Reaction
611
+ await sock.sendMessage(jid, {
612
+ react: { key: msg.key, text: "👍" },
613
+ });
614
+
615
+ // Location
616
+ await sock.sendMessage(jid, {
617
+ location: {
618
+ degreesLatitude: -6.2,
619
+ degreesLongitude: 106.8,
620
+ name: "Jakarta",
621
+ },
622
+ });
623
+
624
+ // Contact
625
+ await sock.sendMessage(jid, {
626
+ contacts: {
627
+ displayName: "Contacts",
628
+ contacts: [
629
+ { vcard: "BEGIN:VCARD\nVERSION:3.0\nFN:John\nTEL:+628xxx\nEND:VCARD" },
630
+ ],
631
+ },
632
+ });
633
+
634
+ // Poll
635
+ await sock.sendMessage(jid, {
636
+ poll: {
637
+ name: "Vote!",
638
+ values: ["Option A", "Option B", "Option C"],
639
+ selectableCount: 1,
640
+ },
641
+ });
642
+
643
+ // Forward message
644
+ await sock.sendMessage(jid, {
645
+ forward: msg,
646
+ forwardingScore: 1,
647
+ isForwarded: true,
648
+ });
649
+
650
+ // Delete message
651
+ await sock.sendMessage(jid, { delete: msg.key });
652
+
653
+ // Edit message
654
+ await sock.sendMessage(jid, {
655
+ text: "Edited text",
656
+ edit: msg.key,
657
+ });
658
+ ```
659
+
660
+ ---
661
+
662
+ ### Interactive Messages
663
+
664
+ **Native Flow Buttons:**
665
+
666
+ ```js
667
+ await sock.sendMessage(jid, {
668
+ interactiveMessage: {
669
+ title: "Welcome!",
670
+ footer: "Powered by Lyndrā",
671
+ buttons: [
672
+ {
673
+ name: "quick_reply",
674
+ buttonParamsJson: JSON.stringify({
675
+ display_text: "Menu",
676
+ id: "menu",
677
+ }),
678
+ },
679
+ {
680
+ name: "cta_url",
681
+ buttonParamsJson: JSON.stringify({
682
+ display_text: "Website",
683
+ url: "https://example.com",
684
+ }),
685
+ },
686
+ {
687
+ name: "cta_copy",
688
+ buttonParamsJson: JSON.stringify({
689
+ display_text: "Copy Code",
690
+ copy_code: "Lyndrā2024",
691
+ }),
692
+ },
693
+ ],
694
+ header: "Choose an option",
695
+ image: { url: "https://example.com/banner.jpg" },
696
+ },
697
+ });
698
+ ```
699
+
700
+ **List Menu (single_select):**
701
+
702
+ ```js
703
+ await sock.sendMessage(jid, {
704
+ interactiveMessage: {
705
+ title: "Select Category",
706
+ footer: "Powered by Lyndrā",
707
+ buttons: [
708
+ {
709
+ name: "single_select",
710
+ buttonParamsJson: JSON.stringify({
711
+ title: "Menu",
712
+ sections: [
713
+ {
714
+ title: "Games",
715
+ rows: [
716
+ { title: "Quiz", id: ".quiz" },
717
+ { title: "Tebak Gambar", id: ".tebakgambar" },
718
+ ],
719
+ },
720
+ {
721
+ title: "Tools",
722
+ rows: [
723
+ { title: "Sticker", id: ".sticker" },
724
+ { title: "TTS", id: ".tts" },
725
+ ],
726
+ },
727
+ ],
728
+ }),
729
+ },
730
+ ],
731
+ header: "Bot Menu",
732
+ },
733
+ });
734
+ ```
735
+
736
+ ---
737
+
738
+ ### Album Messages
739
+
740
+ ```js
741
+ await sock.sendMessage(jid, {
742
+ albumMessage: [
743
+ { image: { url: "./photo1.jpg" }, caption: "First" },
744
+ { image: { url: "./photo2.jpg" }, caption: "Second" },
745
+ { video: { url: "./clip.mp4" }, caption: "Video" },
746
+ ],
747
+ });
748
+ ```
749
+
750
+ > [!NOTE]
751
+ > Albums automatically set `expectedImageCount` and `expectedVideoCount` based on array content.
752
+
753
+ ---
754
+
755
+ ### AI Rich Response Messages
756
+
757
+ Send messages styled like Meta AI — tables, code blocks, and rich text. All rendered via `botForwardedMessage` > `richResponseMessage`.
758
+
759
+ **Table (with heading):**
760
+
761
+ ```js
762
+ await sock.sendTable(
763
+ jid,
764
+ "Java vs JavaScript",
765
+ ["Feature", "Java", "JavaScript"],
766
+ [
767
+ ["Type", "Compiled", "Interpreted"],
768
+ ["Typing", "Static", "Dynamic"],
769
+ ["Main Use", "Enterprise", "Web, Full-stack"],
770
+ ],
771
+ quoted,
772
+ {
773
+ headerText: "Comparison:",
774
+ footer: "Hope this helps!",
775
+ },
776
+ );
777
+ ```
778
+
779
+ **List (without heading):**
780
+
781
+ ```js
782
+ await sock.sendList(
783
+ jid,
784
+ "Bot Info",
785
+ [
786
+ ["Name", "Lyndrā AI"],
787
+ ["Version", "2.4.0"],
788
+ ["Developer", "Lin"],
789
+ ],
790
+ quoted,
791
+ { footer: "© Lyndrā AI" },
792
+ );
793
+ ```
794
+
795
+ **Code Block V1 (basic syntax highlighting):**
796
+
797
+ ```js
798
+ await sock.sendCodeBlock(
799
+ jid,
800
+ `const greeting = "Hello World"
801
+ function sayHello(name) {
802
+ return greeting + " " + name
803
+ }
804
+ sayHello("Lyndrā")`,
805
+ quoted,
806
+ {
807
+ language: "javascript",
808
+ title: "Example Code",
809
+ footer: "Powered by Lyndrā",
810
+ },
811
+ );
812
+ ```
813
+
814
+ **Supported V1 languages:** `javascript`, `typescript`, `python`
815
+
816
+ **Table V2 (Unified Response):**
817
+
818
+ The V2 table uses the **unified response** format with `GenATableUXPrimitive` typename and base64-encoded data, matching the Meta AI rich response protocol.
819
+
820
+ **Features over V1:**
821
+
822
+ - String-based table input with flexible delimiters (`|` or `,` for columns, `;;` for rows)
823
+ - Unified response sections with `GenATableUXPrimitive` / `GenAIMarkdownTextUXPrimitive` typenames
824
+ - Dual output: `rows` (for submessages) + `unified_rows` (for sections)
825
+ - Enhanced `contextInfo` with `botMessageSharingInfo`
826
+
827
+ ```js
828
+ await sock.sendTableV2(
829
+ jid,
830
+ [
831
+ "Java vs JavaScript", // title
832
+ "Feature | Java | JavaScript", // header (pipe-delimited)
833
+ "Type | Compiled | Interpreted;;Typing | Static | Dynamic;;Main Use | Enterprise | Web, Full-stack", // rows (;; separated, | or , delimited)
834
+ ],
835
+ quoted,
836
+ {
837
+ headerText: "Comparison:",
838
+ text: "Here is a comparison table:",
839
+ footer: "Hope this helps!",
840
+ },
841
+ );
842
+ ```
843
+
844
+ **Input format:**
845
+
846
+ - `table[0]` — title string
847
+ - `table[1]` — header row (columns separated by `|` or `,`)
848
+ - `table[2+]` — data rows (rows separated by `;;`, columns by `|` or `,`)
849
+
850
+ **V2 Options:**
851
+
852
+ | Option | Type | Default | Description |
853
+ | ------------ | -------- | ------- | ---------------------------------------------------- |
854
+ | `title` | `string` | — | Title (used if `headerText` not set) |
855
+ | `headerText` | `string` | — | Text shown before the table |
856
+ | `text` | `string` | — | Markdown text section (GenAIMarkdownTextUXPrimitive) |
857
+ | `footer` | `string` | — | Text shown after the table |
858
+
859
+ ---
860
+
861
+ ### Code Block V2 (Unified Response)
862
+
863
+ The V2 code block uses the **unified response** format with `sections/view_model/primitive` structure and base64-encoded data, matching the Meta AI rich response protocol exactly.
864
+
865
+ **Features over V1:**
866
+
867
+ - 6 language families with keyword detection
868
+ - `/* */` block comment support
869
+ - `#` comment support for python/bash/lua
870
+ - Hex/binary/octal number literals
871
+ - Dual token output: numeric `codeBlock` + string-typed `unified_codeBlock`
872
+ - Unified response sections with `GenAICodeUXPrimitive` / `GenAIMarkdownTextUXPrimitive` typenames
873
+ - Enhanced `contextInfo` with `botMessageSharingInfo`
874
+
875
+ ```js
876
+ await sock.sendCodeBlockV2(
877
+ jid,
878
+ `package main
879
+
880
+ import "fmt"
881
+
882
+ func main() {
883
+ fmt.Println("Hello, World!")
884
+ }`,
885
+ quoted,
886
+ {
887
+ language: "go",
888
+ title: "Go Example",
889
+ text: "Here is a Go code snippet:",
890
+ footer: "Powered by Lyndrā",
891
+ },
892
+ );
893
+ ```
894
+
895
+ **Supported V2 languages:**
896
+
897
+ | Language Key | Aliases |
898
+ | ------------ | ------------------------ |
899
+ | `javascript` | `js`, `typescript`, `ts` |
900
+ | `python` | `py` |
901
+ | `go` | `golang` |
902
+ | `lua` | — |
903
+ | `bash` | `sh`, `shell` |
904
+
905
+ **V2 Options:**
906
+
907
+ | Option | Type | Default | Description |
908
+ | ---------- | -------- | -------------- | ---------------------------------------------------- |
909
+ | `language` | `string` | `'javascript'` | Programming language for syntax highlighting |
910
+ | `title` | `string` | — | Title text shown before the code block |
911
+ | `text` | `string` | — | Markdown text section (GenAIMarkdownTextUXPrimitive) |
912
+ | `footer` | `string` | — | Footer text shown after the code block |
913
+
914
+ **V2 Token Types:**
915
+
916
+ | Code | V1 Name | V2 Name | Description |
917
+ | ---- | --------- | --------- | -------------------------------------------------- |
918
+ | 0 | `DEFAULT` | `DEFAULT` | Normal text, whitespace, operators |
919
+ | 1 | `KEYWORD` | `KEYWORD` | Language keywords (`const`, `func`, `if`, etc.) |
920
+ | 2 | `METHOD` | `METHOD` | Function/method calls (identifier followed by `(`) |
921
+ | 3 | `STRING` | `STR` | String literals (`"..."`, `'...'`, `` `...` ``) |
922
+ | 4 | `NUMBER` | `NUMBER` | Numeric values (int, float, hex, binary, octal) |
923
+ | 5 | `COMMENT` | `COMMENT` | Comments (`//`, `/* */`, `#`) |
924
+
925
+ ---
926
+
927
+ ### Link Message (Inline Embeds)
928
+
929
+ Send rich text with inline clickable links using `{{IE_N}}display_text{{/IE_N}}` placeholders, with optional citation metadata and verification proofs.
930
+
931
+ ```js
932
+ await sock.sendLink(
933
+ jid,
934
+ "Upload results:\n✅ Freeimage\n🔗 Klik: {{IE_0}}link disini{{/IE_0}}\n✅ Yardsansh\n🔗 Klik: {{IE_1}}link disini{{/IE_1}}",
935
+ ["https://example.com/upload1", "https://example.com/upload2"],
936
+ quoted,
937
+ {
938
+ headerText: "📁 Media Uploader V3",
939
+ footer: "✨ Selesai!",
940
+ botJid: "867051314767696@bot",
941
+ forwardingScore: 3,
942
+ citations: [
943
+ {
944
+ sourceTitle: "Freeimage",
945
+ citationNumber: 1,
946
+ faviconCdnUrl: "https://cdn.example.com/favicon.ico",
947
+ },
948
+ { sourceTitle: "Yardsansh", citationNumber: 2 },
949
+ ],
950
+ proofs: [
951
+ {
952
+ version: 1,
953
+ useCase: 1,
954
+ signature: "base64signature==",
955
+ certificateChain: ["base64cert1", "base64cert2"],
956
+ },
957
+ ],
958
+ },
959
+ );
960
+ ```
961
+
962
+ **Link Options:**
963
+
964
+ | Option | Type | Default | Description |
965
+ | ----------------- | ------------ | ----------------------- | ------------------------------------- |
966
+ | `headerText` | `string` | — | Text shown before the link content |
967
+ | `footer` | `string` | — | Text shown after the link content |
968
+ | `botJid` | `string` | `'867051314767696@bot'` | Bot JID for forwardedAiBotMessageInfo |
969
+ | `forwardingScore` | `number` | `3` | Forward score for context info |
970
+ | `citations` | `Citation[]` | `[]` | Citation metadata entries |
971
+ | `proofs` | `Proof[]` | `[]` | Verification proof entries |
972
+
973
+ **Citation object:**
974
+
975
+ | Field | Type | Description |
976
+ | ---------------- | -------- | -------------------------------------------- |
977
+ | `sourceQuery` | `string` | Source query text |
978
+ | `faviconCdnUrl` | `string` | CDN URL for favicon |
979
+ | `citationNumber` | `number` | Citation index (auto-incremented if omitted) |
980
+ | `sourceTitle` | `string` | Title of the source |
981
+
982
+ **Proof object:**
983
+
984
+ | Field | Type | Description |
985
+ | ------------------ | ---------- | ------------------------ |
986
+ | `version` | `number` | Proof version |
987
+ | `useCase` | `number` | Use case identifier |
988
+ | `signature` | `string` | Base64 signature |
989
+ | `certificateChain` | `string[]` | Base64 certificate chain |
990
+
991
+ **Link V2 (search-result style):**
992
+
993
+ ```js
994
+ await sock.sendLinkV2(
995
+ jid,
996
+ "Search results:\n- {{IE_0}}Official docs{{/IE_0}}\n- {{IE_1}}GitHub repo{{/IE_1}}",
997
+ [
998
+ {
999
+ url: "https://www.npmjs.com/package/Lyndrā-Blanys",
1000
+ displayName: "Official docs",
1001
+ sourceDisplayName: "npm",
1002
+ sourceSubtitle: "package registry",
1003
+ },
1004
+ {
1005
+ url: "https://github.com/linanran1/Lyndrā-Blanys",
1006
+ displayName: "GitHub repo",
1007
+ sourceDisplayName: "github",
1008
+ sourceSubtitle: "source hosting",
1009
+ },
1010
+ ],
1011
+ quoted,
1012
+ {
1013
+ headerText: "Lyndrā-Blanys",
1014
+ footer: "Reference links",
1015
+ searchEngine: "MAME",
1016
+ },
1017
+ );
1018
+ ```
1019
+
1020
+ ---
1021
+
1022
+ ### Other Message Types
1023
+
1024
+ **Payment Request:**
1025
+
1026
+ ```js
1027
+ await sock.sendMessage(jid, {
1028
+ requestPaymentMessage: {
1029
+ amount: 50000,
1030
+ currency: "IDR",
1031
+ note: "Payment for order #123",
1032
+ from: "628xxx@s.whatsapp.net",
1033
+ },
1034
+ });
1035
+ ```
1036
+
1037
+ **Event:**
1038
+
1039
+ ```js
1040
+ await sock.sendMessage(jid, {
1041
+ eventMessage: {
1042
+ name: "Community Meetup",
1043
+ description: "Join us for the monthly meetup!",
1044
+ startTime: Date.now() + 86400000,
1045
+ endTime: Date.now() + 90000000,
1046
+ location: {
1047
+ name: "Jakarta",
1048
+ degreesLatitude: -6.2,
1049
+ degreesLongitude: 106.8,
1050
+ },
1051
+ },
1052
+ });
1053
+ ```
1054
+
1055
+ **Poll Result:**
1056
+
1057
+ ```js
1058
+ await sock.sendMessage(jid, {
1059
+ pollResultMessage: {
1060
+ name: "Favorite Color?",
1061
+ pollVotes: [
1062
+ { optionName: "Red", optionVoteCount: 42 },
1063
+ { optionName: "Blue", optionVoteCount: 38 },
1064
+ { optionName: "Green", optionVoteCount: 25 },
1065
+ ],
1066
+ },
1067
+ });
1068
+ ```
1069
+
1070
+ **Status with Mentions:**
1071
+
1072
+ ```js
1073
+ await sock.sendStatusMention({ text: "Big update coming!" }, [
1074
+ "628xxx@s.whatsapp.net",
1075
+ "groupid@g.us",
1076
+ ]);
1077
+ ```
1078
+
1079
+ **Product Message:**
1080
+
1081
+ ```js
1082
+ await sock.sendMessage(jid, {
1083
+ productMessage: {
1084
+ title: "Wireless Headphones",
1085
+ description: "High quality bluetooth headphones",
1086
+ productId: "WH-001",
1087
+ retailerId: "Lyndrā-shop",
1088
+ url: "https://example.com/product",
1089
+ priceAmount1000: 299000,
1090
+ currencyCode: "IDR",
1091
+ thumbnail: { url: "https://example.com/product.jpg" },
1092
+ body: "Check out this product!",
1093
+ footer: "Lyndrā Shop",
1094
+ buttons: [
1095
+ {
1096
+ name: "quick_reply",
1097
+ buttonParamsJson: JSON.stringify({
1098
+ display_text: "Buy Now",
1099
+ id: "buy_wh001",
1100
+ }),
1101
+ },
1102
+ ],
1103
+ },
1104
+ });
1105
+ ```
1106
+
1107
+ **Mixed Rich Message (custom submessages):**
1108
+
1109
+ ```js
1110
+ await sock.sendRichMessage(
1111
+ jid,
1112
+ [
1113
+ { messageType: 2, messageText: "Here is some info:" },
1114
+ {
1115
+ messageType: 4,
1116
+ tableMetadata: {
1117
+ title: "Stats",
1118
+ rows: [
1119
+ { items: ["Metric", "Value"], isHeading: true },
1120
+ { items: ["Users", "1000"] },
1121
+ { items: ["Uptime", "99.9%"] },
1122
+ ],
1123
+ },
1124
+ },
1125
+ { messageType: 2, messageText: "And some code:" },
1126
+ {
1127
+ messageType: 5,
1128
+ codeMetadata: {
1129
+ codeLanguage: "javascript",
1130
+ codeBlocks: [{ highlightType: 0, codeContent: 'console.log("OK")' }],
1131
+ },
1132
+ },
1133
+ ],
1134
+ quoted,
1135
+ );
1136
+ ```
1137
+
1138
+ **SubMessage Types:**
1139
+
1140
+ | messageType | Name | Payload Field |
1141
+ | ----------- | ------------- | ---------------------- |
1142
+ | 0 | UNKNOWN | — |
1143
+ | 1 | GRID_IMAGE | `gridImageMetadata` |
1144
+ | 2 | TEXT | `messageText` |
1145
+ | 3 | INLINE_IMAGE | `imageMetadata` |
1146
+ | 4 | TABLE | `tableMetadata` |
1147
+ | 5 | CODE | `codeMetadata` |
1148
+ | 6 | DYNAMIC | `dynamicMetadata` |
1149
+ | 7 | MAP | `mapMetadata` |
1150
+ | 8 | LATEX | `latexMetadata` |
1151
+ | 9 | CONTENT_ITEMS | `contentItemsMetadata` |
1152
+
1153
+ ---
1154
+
1155
+ ### Newsletter Methods
1156
+
1157
+ ```js
1158
+ // Resolve channel URL to metadata
1159
+ const info = await sock.cekIDSaluran("https://whatsapp.com/channel/xxxxx");
1160
+ console.log(info.name, info.subscribers);
1161
+
1162
+ // Bulk follow multiple channels
1163
+ await sock.newsletterMultipleFollow("id1@newsletter id2@newsletter");
1164
+
1165
+ // Fetch all subscribed channels
1166
+ const channels = await sock.newsletterFetchAllSubscribe();
1167
+
1168
+ // Generic action (follow/unfollow/mute/unmute)
1169
+ await sock.newsletterAction("id@newsletter", "follow");
1170
+
1171
+ // Create newsletter
1172
+ const nl = await sock.newsletterCreate("My Channel", "Description");
1173
+
1174
+ // Update newsletter
1175
+ await sock.newsletterUpdate("id@newsletter", { name: "New Name" });
1176
+
1177
+ // Get subscriber count
1178
+ const { subscribers } = await sock.newsletterSubscribers("id@newsletter");
1179
+
1180
+ // Get metadata
1181
+ const meta = await sock.newsletterMetadata("jid", "id@newsletter");
1182
+
1183
+ // Follow / Unfollow
1184
+ await sock.newsletterFollow("id@newsletter");
1185
+ await sock.newsletterUnfollow("id@newsletter");
1186
+
1187
+ // Mute / Unmute
1188
+ await sock.newsletterMute("id@newsletter");
1189
+ await sock.newsletterUnmute("id@newsletter");
1190
+
1191
+ // Update name / description / picture
1192
+ await sock.newsletterUpdateName("id@newsletter", "New Name");
1193
+ await sock.newsletterUpdateDescription("id@newsletter", "New Desc");
1194
+ await sock.newsletterUpdatePicture("id@newsletter", mediaUpload);
1195
+ await sock.newsletterRemovePicture("id@newsletter");
1196
+
1197
+ // React to message
1198
+ await sock.newsletterReactMessage("id@newsletter", serverId, "👍");
1199
+
1200
+ // Fetch messages
1201
+ const msgs = await sock.newsletterFetchMessages("id@newsletter", 50, 0, 0);
1202
+
1203
+ // Admin operations
1204
+ const count = await sock.newsletterAdminCount("id@newsletter");
1205
+ await sock.newsletterChangeOwner("id@newsletter", newOwnerJid);
1206
+ await sock.newsletterDemote("id@newsletter", userJid);
1207
+ await sock.newsletterDelete("id@newsletter");
1208
+ ```
1209
+
1210
+ ---
1211
+
1212
+ ### Group Methods
1213
+
1214
+ ```js
1215
+ // Fetch group metadata
1216
+ const meta = await sock.groupMetadata("id@g.us");
1217
+
1218
+ // Create group
1219
+ const group = await sock.groupCreate("My Group", ["628xxx@s.whatsapp.net"]);
1220
+
1221
+ // Leave group
1222
+ await sock.groupLeave("id@g.us");
1223
+
1224
+ // Update subject / description
1225
+ await sock.groupUpdateSubject("id@g.us", "New Subject");
1226
+ await sock.groupUpdateDescription("id@g.us", "New Description");
1227
+
1228
+ // Participant actions: add, remove, promote, demote
1229
+ const result = await sock.groupParticipantsUpdate(
1230
+ "id@g.us",
1231
+ ["628xxx@s.whatsapp.net"],
1232
+ "add", // 'remove' | 'promote' | 'demote'
1233
+ );
1234
+
1235
+ // Handle join requests
1236
+ const requests = await sock.groupRequestParticipantsList("id@g.us");
1237
+ await sock.groupRequestParticipantsUpdate(
1238
+ "id@g.us",
1239
+ ["628xxx@s.whatsapp.net"],
1240
+ "approve",
1241
+ );
1242
+
1243
+ // Invite code
1244
+ const code = await sock.groupInviteCode("id@g.us");
1245
+ await sock.groupRevokeInvite("id@g.us");
1246
+ await sock.groupAcceptInvite("ABCDE12345");
1247
+ const info = await sock.groupGetInviteInfo("ABCDE12345");
1248
+
1249
+ // Settings: announcement, not_announcement, locked, unlocked
1250
+ await sock.groupSettingUpdate("id@g.us", "announcement");
1251
+ await sock.groupSettingUpdate("id@g.us", "locked");
1252
+
1253
+ // Member add mode / Join approval
1254
+ await sock.groupMemberAddMode("id@g.us", "admin_add");
1255
+ await sock.groupJoinApprovalMode("id@g.us", "on");
1256
+
1257
+ // Toggle disappearing messages
1258
+ await sock.groupToggleEphemeral("id@g.us", 86400); // 24h
1259
+
1260
+ // Fetch all participating groups
1261
+ const groups = await sock.groupFetchAllParticipating();
1262
+
1263
+ // Update member label
1264
+ await sock.updateMemberLabel("id@g.us", "VIP");
1265
+ ```
1266
+
1267
+ ---
1268
+
1269
+ ### Community Methods
1270
+
1271
+ ```js
1272
+ // Fetch community metadata
1273
+ const meta = await sock.communityMetadata("communityid@g.us");
1274
+
1275
+ // Create community
1276
+ const community = await sock.communityCreate(
1277
+ "Our Community",
1278
+ "Community description",
1279
+ );
1280
+
1281
+ // Create a subgroup under a community
1282
+ const subgroup = await sock.communityCreateGroup(
1283
+ "Announcements",
1284
+ ["628xxx@s.whatsapp.net"],
1285
+ "communityid@g.us",
1286
+ );
1287
+
1288
+ // Link / unlink an existing group
1289
+ await sock.communityLinkGroup("groupid@g.us", "communityid@g.us");
1290
+ await sock.communityUnlinkGroup("groupid@g.us", "communityid@g.us");
1291
+
1292
+ // Fetch linked groups
1293
+ const linked = await sock.communityFetchLinkedGroups("communityid@g.us");
1294
+
1295
+ // Invite handling
1296
+ const code = await sock.communityInviteCode("communityid@g.us");
1297
+ await sock.communityRevokeInvite("communityid@g.us");
1298
+ await sock.communityAcceptInvite(code);
1299
+ const inviteInfo = await sock.communityGetInviteInfo(code);
1300
+
1301
+ // Requests / participants
1302
+ const requests =
1303
+ await sock.communityRequestParticipantsList("communityid@g.us");
1304
+ await sock.communityRequestParticipantsUpdate(
1305
+ "communityid@g.us",
1306
+ ["628xxx@s.whatsapp.net"],
1307
+ "approve",
1308
+ );
1309
+ await sock.communityParticipantsUpdate(
1310
+ "communityid@g.us",
1311
+ ["628xxx@s.whatsapp.net"],
1312
+ "add",
1313
+ );
1314
+
1315
+ // Settings
1316
+ await sock.communityUpdateSubject("communityid@g.us", "New Subject");
1317
+ await sock.communityUpdateDescription("communityid@g.us", "New Description");
1318
+ await sock.communityToggleEphemeral("communityid@g.us", 86400);
1319
+ await sock.communitySettingUpdate("communityid@g.us", "announcement");
1320
+ await sock.communityMemberAddMode("communityid@g.us", "admin_add");
1321
+ await sock.communityJoinApprovalMode("communityid@g.us", "on");
1322
+
1323
+ // Leave / list all
1324
+ await sock.communityLeave("communityid@g.us");
1325
+ const communities = await sock.communityFetchAllParticipating();
1326
+ ```
1327
+
1328
+ ---
1329
+
1330
+ ### Business Methods
1331
+
1332
+ ```js
1333
+ // Catalog
1334
+ const { products, nextPageCursor } = await sock.getCatalog({
1335
+ jid: "628xxx@s.whatsapp.net",
1336
+ limit: 10,
1337
+ });
1338
+
1339
+ const { collections } = await sock.getCollections("628xxx@s.whatsapp.net", 10);
1340
+
1341
+ // Orders
1342
+ const order = await sock.getOrderDetails(orderId, tokenBase64);
1343
+
1344
+ // Product CRUD
1345
+ const product = await sock.productCreate({
1346
+ name: "Premium Package",
1347
+ description: "Official premium plan",
1348
+ price: 150000,
1349
+ currency: "IDR",
1350
+ originCountryCode: "ID",
1351
+ images: [mediaUpload],
1352
+ });
1353
+
1354
+ await sock.productUpdate(product.id, {
1355
+ name: "Premium Package Plus",
1356
+ description: "Official premium plan plus",
1357
+ price: 175000,
1358
+ currency: "IDR",
1359
+ images: [mediaUpload],
1360
+ });
1361
+
1362
+ await sock.productDelete([product.id]);
1363
+
1364
+ // Business profile
1365
+ await sock.updateBusinessProfile({
1366
+ address: "Jakarta, Indonesia",
1367
+ description: "Official store",
1368
+ websites: ["https://example.com"],
1369
+ email: "hello@example.com",
1370
+ hours: {
1371
+ timezone: "Asia/Jakarta",
1372
+ days: [{ day: "mon", mode: "open_24h" }],
1373
+ },
1374
+ });
1375
+
1376
+ // Legacy alias is still available for backward compatibility
1377
+ await sock.updateBussinesProfile({
1378
+ description: "Legacy alias still works",
1379
+ });
1380
+
1381
+ await sock.updateCoverPhoto(mediaUpload);
1382
+ await sock.removeCoverPhoto(coverId);
1383
+
1384
+ // Quick replies
1385
+ await sock.addOrEditQuickReply({
1386
+ shortcut: "hello",
1387
+ message: "Hello from business account",
1388
+ });
1389
+
1390
+ await sock.removeQuickReply(timestamp);
1391
+ ```
1392
+
1393
+ ---
1394
+
1395
+ ### Chat & Profile Methods
1396
+
1397
+ ```js
1398
+ // Profile picture
1399
+ const url = await sock.profilePictureUrl(jid, "image");
1400
+ await sock.updateProfilePicture(jid, mediaUpload);
1401
+ await sock.removeProfilePicture(jid);
1402
+
1403
+ // Profile name / status
1404
+ await sock.updateProfileName("My Name");
1405
+ await sock.updateProfileStatus("Available");
1406
+
1407
+ // Presence
1408
+ await sock.sendPresenceUpdate("available", jid);
1409
+ await sock.presenceSubscribe(jid);
1410
+
1411
+ // Read receipts
1412
+ await sock.readMessages([msg.key]);
1413
+ await sock.sendReceipt(jid, participant, [msgId], "read");
1414
+
1415
+ // Block / Unblock
1416
+ await sock.updateBlockStatus(jid, "block");
1417
+ await sock.updateBlockStatus(jid, "unblock");
1418
+
1419
+ // Fetch blocklist
1420
+ const list = await sock.fetchBlocklist();
1421
+
1422
+ // Chat modifications
1423
+ await sock.chatModify(
1424
+ {
1425
+ archive: true,
1426
+ lastMessageOrig: msg,
1427
+ lastMessage: msg,
1428
+ },
1429
+ jid,
1430
+ );
1431
+
1432
+ // Star messages
1433
+ await sock.star(jid, [{ id: msgId, fromMe: true }], true);
1434
+
1435
+ // Contact management
1436
+ await sock.addOrEditContact(jid, { displayName: "Name" });
1437
+ await sock.removeContact(jid);
1438
+
1439
+ // Labels
1440
+ await sock.addChatLabel(jid, labelId);
1441
+ await sock.removeChatLabel(jid, labelId);
1442
+ await sock.addMessageLabel(jid, messageId, labelId);
1443
+
1444
+ // App state sync
1445
+ await sock.resyncAppState(["regular", "critical_block"], true);
1446
+
1447
+ // Business profile
1448
+ const biz = await sock.getBusinessProfile(jid);
1449
+ ```
1450
+
1451
+ ---
1452
+
1453
+ ### Privacy Settings
1454
+
1455
+ ```js
1456
+ await sock.updateLastSeenPrivacy("all"); // 'all' | 'contacts' | 'contact_blacklist' | 'nobody'
1457
+ await sock.updateOnlinePrivacy("all"); // 'all' | 'match_last_seen'
1458
+ await sock.updateProfilePicturePrivacy("contacts");
1459
+ await sock.updateStatusPrivacy("contacts");
1460
+ await sock.updateReadReceiptsPrivacy("all"); // 'all' | 'none'
1461
+ await sock.updateGroupsAddPrivacy("all"); // 'all' | 'contacts'
1462
+ await sock.updateMessagesPrivacy("all"); // 'all' | 'contacts' | 'nobody'
1463
+ await sock.updateCallPrivacy("everyone");
1464
+ await sock.updateDefaultDisappearingMode(86400);
1465
+ await sock.updateDisableLinkPreviewsPrivacy(true);
1466
+ ```
1467
+
1468
+ ---
1469
+
1470
+ ## 📡 Event Reference
1471
+
1472
+ ```js
1473
+ sock.ev.on('connection.update', ({ connection, lastDisconnect, qr, isNewLogin, receivedPendingNotifications, isOnline }) => {})
1474
+ sock.ev.on('creds.update', (update) => {})
1475
+ sock.ev.on('messaging-history.set', ({ chats, contacts, messages, isLatest }) => {})
1476
+ sock.ev.on('chats.upsert', (chats) => {})
1477
+ sock.ev.on('chats.update', (updates) => {})
1478
+ sock.ev.on('chats.delete', (jids) => {})
1479
+ sock.ev.on('contacts.upsert', (contacts) => {})
1480
+ sock.ev.on('contacts.update', (updates) => {})
1481
+ sock.ev.on('messages.upsert', ({ messages, type }) => {})
1482
+ sock.ev.on('messages.update', (updates) => {})
1483
+ sock.ev.on('messages.delete', (keys) => {})
1484
+ sock.ev.on('messages.reaction', (reactions) => {})
1485
+ sock.ev.on('message-receipt.update', (updates) => {})
1486
+ sock.ev.on('groups.update', (updates) => {})
1487
+ sock.ev.on('group-participants.update', (update) => {})
1488
+ sock.ev.on('group.join-request', (update) => {})
1489
+ sock.ev.on('call', (calls) => {})
1490
+ sock.ev.on('labels.edit', (label) => {})
1491
+ sock.ev.on('labels.associations', ({ associated, label, type }) => {})
1492
+ sock.ev.on('newsletter.update', (updates) => {})
1493
+ sock.ev.on('newsletter.follow', (jid) => {})
1494
+ sock.ev.on('newsletter.unfollow', (jid) => {})
1495
+ sock.ev.on('settings.update', ({ isAutoEmojiEnabled, isReadReceiptsEnabled, ... }) => {})
1496
+ ```
1497
+
1498
+ ---
1499
+
1500
+ ## 🔧 Utility Exports
1501
+
1502
+ ```js
1503
+ import {
1504
+ // Auth
1505
+ useMultiFileAuthState,
1506
+ makeCacheableSignalKeyStore,
1507
+ initAuthCreds,
1508
+ BufferJSON,
1509
+ fetchLatestBaileysVersion,
1510
+
1511
+ // Code tokenization
1512
+ tokenizeCode,
1513
+ tokenizeCodeV2,
1514
+ CodeHighlightType,
1515
+ RichSubMessageType,
1516
+
1517
+ // Rich message generators
1518
+ generateTableContent,
1519
+ generateTableContentV2,
1520
+ toTableMetadataV2,
1521
+ generateListContent,
1522
+ generateCodeBlockContent,
1523
+ generateCodeBlockContentV2,
1524
+ generateLinkContent,
1525
+ generateLinkContentV2,
1526
+ generateRichMessageContent,
1527
+ generateLatexContent,
1528
+ generateLatexImageContent,
1529
+ generateLatexInlineImageContent,
1530
+ generateUnifiedResponseContent,
1531
+ captureUnifiedResponse,
1532
+
1533
+ // Rich message builders
1534
+ buildRichContextInfo,
1535
+ buildBotForwardedMessage,
1536
+
1537
+ // Sticker pack helper
1538
+ makeStickerPack,
1539
+
1540
+ // Language keyword sets
1541
+ JS_KEYWORDS,
1542
+ PYTHON_KEYWORDS,
1543
+ GO_KEYWORDS,
1544
+ LUA_KEYWORDS,
1545
+ BASH_KEYWORDS,
1546
+ LANGUAGE_KEYWORDS,
1547
+
1548
+ // Crypto
1549
+ Curve,
1550
+ signedKeyPair,
1551
+ aesEncryptGCM,
1552
+ aesDecryptGCM,
1553
+
1554
+ // JID utilities
1555
+ jidEncode,
1556
+ jidDecode,
1557
+ jidNormalizedUser,
1558
+ areJidsSameUser,
1559
+ isJidGroup,
1560
+ isJidNewsletter,
1561
+ isLidUser,
1562
+ isPnUser,
1563
+ isJidBot,
1564
+ isJidMetaAI,
1565
+ isJidBroadcast,
1566
+ isJidStatusBroadcast,
1567
+
1568
+ // Connection
1569
+ DisconnectReason,
1570
+ Browsers,
1571
+
1572
+ // Dugong (advanced message types)
1573
+ Dugong,
1574
+
1575
+ // Types
1576
+ WASocket,
1577
+ } from "Lyndrā-Blanys";
1578
+ ```
1579
+
1580
+ > [!NOTE]
1581
+ > In this build, some advanced helper typings may appear first in `lib/Socket/messages-send.d.ts` before they are reflected everywhere else in aggregated socket declarations. If your editor autocomplete lags behind runtime behavior, inspect `lib/Socket/messages-send.js` and `lib/Utils/rich-messages.d.ts` for the most complete helper surface.
1582
+
1583
+ ---
1584
+
1585
+ ## 🏗️ Building This Package
1586
+
1587
+ This repository ships compiled files, but it still includes the build script used to emit/update `lib/`.
1588
+
1589
+ ```bash
1590
+ npm install
1591
+ npm run build
1592
+ ```
1593
+
1594
+ What the build does:
1595
+
1596
+ - runs TypeScript with `tsconfig.build.json`
1597
+ - emits JavaScript and declaration files into `lib/`
1598
+ - runs `tsc-esm-fix` so generated ESM imports resolve cleanly
1599
+
1600
+ Important build notes:
1601
+
1602
+ - `tsconfig.json` is authoring-oriented and uses `noEmit: true`
1603
+ - `tsconfig.build.json` flips emit back on and excludes test files
1604
+ - published package files are limited to `lib/**/*` and `WAProto/**/*`
1605
+
1606
+ ---
1607
+
1608
+ ## 🔀 Differences from Official Baileys
1609
+
1610
+ | Area | Official Baileys v7 | Lyndrā-Blanys |
1611
+ | -------------------- | ------------------- | ---------------------------------------- |
1612
+ | Interactive messages | No native support | Full support via Dugong |
1613
+ | Album messages | Not supported | Multi-media albums |
1614
+ | AI Rich Response | Not available | Table, code block, rich text |
1615
+ | Table V1 | Not available | Basic table with headers |
1616
+ | Table V2 | Not available | Unified response + GenATableUXPrimitive |
1617
+ | Code Block V1 | Not available | Syntax highlighting (JS/TS/Python) |
1618
+ | Code Block V2 | Not available | Unified response + 6 languages |
1619
+ | Link Message | Not available | Inline embeds + citations + verification |
1620
+ | Business nodes | Manual injection | Auto-inject on relay |
1621
+ | Newsletter extras | Basic only | Auto-follow, bulk follow, URL resolve |
1622
+ | Button detection | Not available | `getButtonType()` auto-detect |
1623
+ | Payment messages | Not supported | Full support |
1624
+ | Event messages | Basic | Enhanced all fields |
1625
+ | Status mentions | Not available | `sendStatusMention()` |
1626
+ | Product messages | Not supported | Catalog + buttons |
1627
+ | LID support | Basic | Full LID↔PN mapping + session migration |
1628
+ | Identity changes | No handling | Debounced session refresh |
1629
+ | Message retry | Basic | `MessageRetryManager` with cache |
1630
+
1631
+ ---
1632
+
1633
+ ## 🤝 Contributing
1634
+
1635
+ 1. Fork this repo
1636
+ 2. Create a branch (`git checkout -b feature/name`)
1637
+ 3. Commit changes (`git commit -m 'feat: add feature'`)
1638
+ 4. Push to branch (`git push origin feature/name`)
1639
+ 5. Open a Pull Request
1640
+
1641
+ ---
1642
+
1643
+ ## 📄 License
1644
+
1645
+ MIT © [Lín Ān Rán](https://github.com/linanran1)
1646
+
1647
+ > [!CAUTION]
1648
+ > This library is for **educational purposes**. Ensure compliance with WhatsApp Terms of Service.
1649
+
1650
+ ---
1651
+
1652
+ <div align="center">
1653
+
1654
+ **Made with 💚 by Lin**
1655
+
1656
+ [⭐ Star this repo](https://github.com/linanran1/Lyndrā-Blanys) · [🐛 Report Bug](https://github.com/linanran1/Lyndrā-Blanys/issues) · [💡 Request Feature](https://github.com/linanran1/Lyndrā-Blanys/issues)
1657
+
1658
+ </div>