plogme 2.1.0 → 2.1.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 (147) hide show
  1. package/README.md +226 -2
  2. package/WAProto/WAProto.proto +12 -0
  3. package/WAProto/index.d.ts +12 -0
  4. package/WAProto/index.js +12 -0
  5. package/engine-requirements.js +12 -0
  6. package/lib/Defaults/ban-checker.js +12 -0
  7. package/lib/Defaults/index.js +12 -0
  8. package/lib/Signal/Group/ciphertext-message.js +12 -0
  9. package/lib/Signal/Group/group-session-builder.js +12 -0
  10. package/lib/Signal/Group/group_cipher.js +12 -0
  11. package/lib/Signal/Group/index.js +12 -0
  12. package/lib/Signal/Group/keyhelper.js +12 -0
  13. package/lib/Signal/Group/sender-chain-key.js +12 -0
  14. package/lib/Signal/Group/sender-key-distribution-message.js +12 -0
  15. package/lib/Signal/Group/sender-key-message.js +12 -0
  16. package/lib/Signal/Group/sender-key-name.js +12 -0
  17. package/lib/Signal/Group/sender-key-record.js +12 -0
  18. package/lib/Signal/Group/sender-key-state.js +12 -0
  19. package/lib/Signal/Group/sender-message-key.js +12 -0
  20. package/lib/Signal/libsignal.js +12 -0
  21. package/lib/Signal/lid-mapping.js +12 -0
  22. package/lib/Socket/Client/index.js +12 -0
  23. package/lib/Socket/Client/types.js +12 -0
  24. package/lib/Socket/Client/websocket.js +12 -0
  25. package/lib/Socket/aigroups.js +12 -0
  26. package/lib/Socket/ban-checker.js +12 -0
  27. package/lib/Socket/business.js +12 -0
  28. package/lib/Socket/chats.js +12 -0
  29. package/lib/Socket/communities.js +12 -0
  30. package/lib/Socket/graphql.js +12 -0
  31. package/lib/Socket/groups.js +12 -0
  32. package/lib/Socket/index.js +12 -0
  33. package/lib/Socket/interactive-handler.js +12 -0
  34. package/lib/Socket/interop.js +12 -0
  35. package/lib/Socket/managed-account.js +12 -0
  36. package/lib/Socket/messages-recv.js +12 -0
  37. package/lib/Socket/messages-send.js +358 -7
  38. package/lib/Socket/mex.js +12 -0
  39. package/lib/Socket/newsletter.js +12 -0
  40. package/lib/Socket/privacy.js +12 -0
  41. package/lib/Socket/registration.js +12 -0
  42. package/lib/Socket/socket.js +12 -0
  43. package/lib/Socket/username.js +12 -0
  44. package/lib/Store/index.js +12 -0
  45. package/lib/Store/make-cache-manager-store.js +12 -0
  46. package/lib/Store/make-in-memory-store.js +12 -0
  47. package/lib/Store/make-ordered-dictionary.js +12 -0
  48. package/lib/Store/object-repository.js +12 -0
  49. package/lib/Types/Auth.js +12 -0
  50. package/lib/Types/Bussines.js +12 -0
  51. package/lib/Types/Call.js +12 -0
  52. package/lib/Types/Chat.js +12 -0
  53. package/lib/Types/Contact.js +12 -0
  54. package/lib/Types/Events.js +12 -0
  55. package/lib/Types/GroupMetadata.js +12 -0
  56. package/lib/Types/Label.js +12 -0
  57. package/lib/Types/LabelAssociation.js +12 -0
  58. package/lib/Types/Message.js +12 -0
  59. package/lib/Types/Mex.js +12 -0
  60. package/lib/Types/Product.js +12 -0
  61. package/lib/Types/RichType.js +12 -0
  62. package/lib/Types/Signal.js +12 -0
  63. package/lib/Types/Socket.js +12 -0
  64. package/lib/Types/State.js +12 -0
  65. package/lib/Types/USync.js +12 -0
  66. package/lib/Types/index.js +12 -0
  67. package/lib/Utils/auth-utils.js +12 -0
  68. package/lib/Utils/bot-capabilities.js +12 -0
  69. package/lib/Utils/bot-planning-replay.js +12 -0
  70. package/lib/Utils/browser-utils.js +12 -0
  71. package/lib/Utils/business.js +12 -0
  72. package/lib/Utils/channel-policy.js +12 -0
  73. package/lib/Utils/chat-utils.js +12 -0
  74. package/lib/Utils/companion-reg-client-utils.js +12 -0
  75. package/lib/Utils/consumer-application.js +12 -0
  76. package/lib/Utils/crypto.js +12 -0
  77. package/lib/Utils/decode-wa-message.js +12 -0
  78. package/lib/Utils/event-buffer.js +12 -0
  79. package/lib/Utils/games/miniapp.js +12 -0
  80. package/lib/Utils/games/slot-machine.js +12 -0
  81. package/lib/Utils/games/website-preview.js +12 -0
  82. package/lib/Utils/generics.js +12 -0
  83. package/lib/Utils/group-history.js +12 -0
  84. package/lib/Utils/history.js +12 -0
  85. package/lib/Utils/identity-change-handler.js +12 -0
  86. package/lib/Utils/index.js +12 -0
  87. package/lib/Utils/jid-display-normalization.js +12 -0
  88. package/lib/Utils/link-preview.js +12 -0
  89. package/lib/Utils/logger.js +12 -0
  90. package/lib/Utils/lt-hash.js +12 -0
  91. package/lib/Utils/make-mutex.js +12 -0
  92. package/lib/Utils/message-composer.js +18 -1
  93. package/lib/Utils/message-inspect.js +12 -0
  94. package/lib/Utils/message-retry-manager.js +12 -0
  95. package/lib/Utils/messages-media.js +12 -0
  96. package/lib/Utils/messages.js +232 -4
  97. package/lib/Utils/meta-ai-msmsg.js +12 -0
  98. package/lib/Utils/meta-compositing.js +12 -0
  99. package/lib/Utils/native-flow.js +12 -0
  100. package/lib/Utils/noise-handler.js +12 -0
  101. package/lib/Utils/offline-node-processor.js +12 -0
  102. package/lib/Utils/pre-key-manager.js +12 -0
  103. package/lib/Utils/process-message.js +12 -0
  104. package/lib/Utils/reporting-utils.js +12 -0
  105. package/lib/Utils/rich-message-utils.js +484 -91
  106. package/lib/Utils/signal.js +12 -0
  107. package/lib/Utils/source-grep.js +12 -0
  108. package/lib/Utils/stanza-ack.js +12 -0
  109. package/lib/Utils/sync-action-utils.js +12 -0
  110. package/lib/Utils/tc-token-utils.js +12 -0
  111. package/lib/Utils/use-multi-file-auth-state.js +12 -0
  112. package/lib/Utils/use-single-file-auth-state.js +12 -0
  113. package/lib/Utils/use-sqlite-auth-state.js +12 -0
  114. package/lib/Utils/validate-connection.js +12 -0
  115. package/lib/Utils/view-once-utils.js +12 -0
  116. package/lib/Utils/voip-rekey.js +12 -0
  117. package/lib/Utils/welcome-flow.js +12 -0
  118. package/lib/WABinary/constants.js +12 -0
  119. package/lib/WABinary/decode.js +12 -0
  120. package/lib/WABinary/encode.js +12 -0
  121. package/lib/WABinary/generic-utils.js +12 -0
  122. package/lib/WABinary/index.js +12 -0
  123. package/lib/WABinary/jid-utils.js +12 -0
  124. package/lib/WABinary/types.js +12 -0
  125. package/lib/WAM/BinaryInfo.js +12 -0
  126. package/lib/WAM/constants.js +12 -0
  127. package/lib/WAM/encode.js +12 -0
  128. package/lib/WAM/index.js +12 -0
  129. package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +12 -0
  130. package/lib/WAUSync/Protocols/USyncContactProtocol.js +12 -0
  131. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +12 -0
  132. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +12 -0
  133. package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +12 -0
  134. package/lib/WAUSync/Protocols/USyncPictureProtocol.js +12 -0
  135. package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +12 -0
  136. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +12 -0
  137. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +12 -0
  138. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +12 -0
  139. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +12 -0
  140. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +12 -0
  141. package/lib/WAUSync/Protocols/index.js +12 -0
  142. package/lib/WAUSync/USyncQuery.js +12 -0
  143. package/lib/WAUSync/USyncUser.js +12 -0
  144. package/lib/WAUSync/index.js +12 -0
  145. package/lib/index.d.ts +50 -2
  146. package/lib/index.js +12 -0
  147. package/package.json +9 -2
package/README.md CHANGED
@@ -326,8 +326,24 @@ await sock.sendMessage(jid, {
326
326
  canAddOption: false
327
327
  }
328
328
  })
329
+
330
+ // Photo polls: each image is uploaded and sent as a MEDIA_POLL-associated child.
331
+ // Values without an image can be mixed in with image options.
332
+ await sock.sendMessage(channelJid, {
333
+ poll: {
334
+ name: 'Choose a cover',
335
+ values: [
336
+ { name: 'Purple', image: { url: './purple-cover.jpg' } },
337
+ { name: 'Blue', image: { url: './blue-cover.jpg' } },
338
+ 'Other'
339
+ ],
340
+ selectableCount: 1
341
+ }
342
+ })
329
343
  ```
330
344
 
345
+ Photo polls use WhatsApp's experimental image-poll format: a V3 poll with `pollContentType: IMAGE`, option hashes, and separately associated `pollCreationOptionImageMessage` children. Forwarding a received poll with a generic one-message forward does not automatically collect and resend those associated image children.
346
+
331
347
  ### Latest WAProto additions
332
348
 
333
349
  The WAProto generation is updated to WhatsApp Web revision
@@ -417,10 +433,39 @@ await sock.sendMessage(jid, {
417
433
  await sock.sendMessage(jid, {
418
434
  sticker: { url: './sticker.webp' }
419
435
  })
436
+
437
+ // AI and avatar-style protected sticker markers
438
+ await sock.sendMessage(jid, {
439
+ sticker: { url: './sticker.webp' },
440
+ meta: true, // native StickerMessage.isAiSticker
441
+ lock: true // native avatar-style marker; WhatsApp has no literal lock field
442
+ })
420
443
  ```
421
444
 
422
445
  Remote URLs, local file paths, and buffers are supported where the selected media helper accepts them.
423
446
 
447
+ For reel and rich-image cards, Plogme keeps its native AIRich representation and can additionally emit the field shape used by `New compatibility`:
448
+
449
+ ```js
450
+ await sock.sendNewRichMedia(jid, {
451
+ reels: [{
452
+ creator: 'Creator Name',
453
+ avatar: 'https://example.com/avatar.jpg',
454
+ verified: true,
455
+ thumbnail: 'https://example.com/reel.jpg',
456
+ url: 'https://example.com/reel.mp4',
457
+ source: 'IG'
458
+ }],
459
+ images: [{
460
+ url: 'https://example.com/post.jpg',
461
+ thumbnail: 'https://example.com/post-thumb.jpg',
462
+ post_type: 'IMAGE'
463
+ }]
464
+ })
465
+ ```
466
+
467
+ This compatibility path is additive; `sendRichMedia()` and the native Plogme serializers remain available unchanged.
468
+
424
469
  > [!WARNING]
425
470
  > A URL must point to a real, playable media file. A URL returning an HTML error page, an empty file, or an invalid video container can produce a WhatsApp media verification or download warning even when the library code is correct.
426
471
 
@@ -724,6 +769,81 @@ await sock.sendMessage(jid, {
724
769
  })
725
770
  ```
726
771
 
772
+ ### Convenience message helpers
773
+
774
+ `replyButton()` wraps the existing legacy button builder. Buttons accept `id` or
775
+ `command` actions, as well as URL, call, copy, and native-flow definitions. A
776
+ single image, video, document, or location can be used as the header.
777
+
778
+ ```js
779
+ await sock.replyButton(jid, [
780
+ { text: 'Open menu', command: '#menu' },
781
+ { text: 'Visit docs', url: 'https://example.com/docs' }
782
+ ], quotedMessage, {
783
+ text: 'Choose an action',
784
+ footer: 'Plogme'
785
+ })
786
+
787
+ await sock.replyButton(jid, [
788
+ { text: 'I am coming', id: 'attend' }
789
+ ], quotedMessage, {
790
+ text: 'Meet here',
791
+ footer: 'Plogme',
792
+ location: {
793
+ name: 'Lagos',
794
+ address: 'Nigeria',
795
+ degreesLatitude: 6.5244,
796
+ degreesLongitude: 3.3792
797
+ }
798
+ })
799
+ ```
800
+
801
+ `sendProgress()` renders a text progress bar. Start a message, retain its key,
802
+ then pass that key back to edit the same message as progress changes.
803
+
804
+ ```js
805
+ const progress = await sock.sendProgress(jid, 'Uploading', quotedMessage, {
806
+ progress: 20
807
+ })
808
+ await sock.sendProgress(jid, 'Uploading', undefined, {
809
+ progress: 75,
810
+ messageKey: progress.key
811
+ })
812
+ ```
813
+
814
+ `sendMessageModify()` and its `sendMessageModifyV2()` alias create a text
815
+ message with a custom external preview card. Thumbnails may be buffers, URLs,
816
+ or local paths. `largeThumb` controls the larger preview and `ads` controls the
817
+ ad-attribution marker.
818
+
819
+ ```js
820
+ await sock.sendMessageModify(jid, 'Open the documentation', quotedMessage, {
821
+ title: 'Plogme docs',
822
+ description: 'API reference and examples',
823
+ url: 'https://example.com/docs',
824
+ thumbnail: 'https://example.com/docs-card.jpg',
825
+ largeThumb: true,
826
+ ads: false
827
+ })
828
+ ```
829
+
830
+ `sendFile()` accepts a path, URL, buffer, or `{ url }` media input. Set
831
+ `photo_live: true` for a motion photo: Plogme sends a still image followed by
832
+ the associated video child. Supply `thumbnail` or `image` for the still; if
833
+ omitted, the video thumbnail is used. Motion-photo rendering depends on the
834
+ recipient's WhatsApp client version.
835
+
836
+ ```js
837
+ await sock.sendFile(
838
+ jid,
839
+ 'https://example.com/clip.mp4',
840
+ 'clip.mp4',
841
+ 'A moment in motion',
842
+ quotedMessage,
843
+ { photo_live: true, thumbnail: 'https://example.com/still.jpg' }
844
+ )
845
+ ```
846
+
727
847
  ### Interactive table
728
848
 
729
849
  ```js
@@ -1003,6 +1123,20 @@ const result = await sock.sendPlogmeMessage(jid, {
1003
1123
  verified: true
1004
1124
  }],
1005
1125
 
1126
+ // Optional raw HTML section, composed into this same unified response.
1127
+ html: '<section><h2>Deployment</h2><p>Ready</p></section>',
1128
+ trustedSources: ['crysnovax.com'],
1129
+
1130
+ // Optional tabbed HTML screen, using the same format as sendRichHtmlMessage.
1131
+ richHtml: {
1132
+ title: 'Service dashboard',
1133
+ url: 'https://crysnovax.com/dashboard',
1134
+ tabs: [
1135
+ { tab_header: 'Overview', html: '<h1>Overview</h1>' },
1136
+ { tab_header: 'Logs', html: '<h1>Logs</h1>' }
1137
+ ]
1138
+ },
1139
+
1006
1140
  // Optional source cards: [favicon URL, source URL, display text].
1007
1141
  sources: [[
1008
1142
  'https://example.com/favicon.jpg',
@@ -1029,6 +1163,26 @@ const result = await sock.sendPlogmeMessage(jid, {
1029
1163
  console.log('Sent message:', result.key.id)
1030
1164
  ```
1031
1165
 
1166
+ `sendPlogmeMessage` accepts both HTML formats: `html` uses the same `FOAHtmlPrimitiveDemoDONOTUSE` primitive as `sendHtmlMessage`, while `richHtml` uses the tabbed `GenAIaeacdsnwHtmlPrimitive` format from `sendRichHtmlMessage`. They can be included together in one response. Alternatively, pass the tabbed config as `html: { title, url, tabs, trustedSources }`.
1167
+ It also composes the compatible standalone AIRich helpers in the same response: `copyButton`/`copyToClipboard`, `richText`, `quote`, `richImage`, `richLinks`, `richMap`/`map`, `dynamicMedia`/`richDynamicMedia`, `socialEntity`, `socialProfile`, `richMenu`, `airichCommandMenu`, `gridImages`, `verticalAlbum`, `videoGrid`, `richGeneration`, `richLabel`, `suggestedPrompt`, `botSources`, and `botPttTranscript`. Use `sections` or `richSections` for newly discovered unified-response primitives, or `unifiedResponse: { sections, embedded_screens }` when passing an already serialized section set. A2UI/native-flow payloads remain separate because they use an `interactiveMessage` envelope rather than AIRich's `unifiedResponse` envelope; use `sendA2UIMessage` for those.
1168
+
1169
+ Tables can use either renderer: `table: [['Name', 'Value'], ...]` keeps the inline table, while `table: { title, headers, rows }` or `richTable: { title, headers, rows }` uses the preview-table submessage. To include both in one message, pass a mixed `tables` array; its order is preserved, with `headerText` and `footerText` bracketing the table content:
1170
+
1171
+ ```js
1172
+ await sock.sendPlogmeMessage(jid, {
1173
+ headerText: 'Testing rich rendering',
1174
+ footerText: 'CODY AI',
1175
+ tables: [
1176
+ {
1177
+ title: 'CODY Rich Table Test',
1178
+ headers: ['Feature', 'Result'],
1179
+ rows: [['Instagram profile card', 'Rich edit works'], ['Table message', 'Testing']]
1180
+ },
1181
+ [['Service', 'State'], ['API', 'Online'], ['Worker', 'Online']]
1182
+ ]
1183
+ }, undefined, { renderRichResponse: true })
1184
+ ```
1185
+
1032
1186
  Every field in the example is optional. A minimal response is valid as well:
1033
1187
 
1034
1188
  ```js
@@ -2155,7 +2309,12 @@ await sock.sendMessage(groupJid, {
2155
2309
  mentions: ['628123456789@s.whatsapp.net'],
2156
2310
  groupStatus: true
2157
2311
  })
2158
-
2312
+ // Compatibility test for the older groupStatusMessage envelope.
2313
+ await sock.sendMessage(groupJid, {
2314
+ text: 'Legacy group-status test',
2315
+ groupStatus: true,
2316
+ groupStatusVersion: 'legacy'
2317
+ })
2159
2318
  // Delete using the key returned by the original group-status send.
2160
2319
  // The group JID must match key.remoteJid when that field is present.
2161
2320
  await sock.deleteGroupStatus(groupJid, groupStatus.key)
@@ -2296,8 +2455,73 @@ await sock.sendMessage('status@broadcast', {
2296
2455
 
2297
2456
  Named, hex, and ARGB colors are accepted. Viewer JIDs are normalized and deduplicated.
2298
2457
 
2299
- ### Status Mentions
2458
+ ### Named custom audiences
2459
+
2460
+ A normal status can be restricted to a named status audience. This is different from a group status: it is still sent through `status@broadcast`, while the audience is configured through status privacy lists. The list name and emoji are rendered by the WhatsApp client when supported.
2461
+
2462
+ ```javascript
2463
+ const audienceMembers = [
2464
+ '15551234567@s.whatsapp.net',
2465
+ '15557654321@s.whatsapp.net'
2466
+ ]
2467
+
2468
+ await sock.setStatusPrivacy('whitelist', audienceMembers, [
2469
+ {
2470
+ id: 'cody-test-audience',
2471
+ listname: 'Cody AI Testers',
2472
+ emoji: '🧸',
2473
+ selected: true,
2474
+ members: audienceMembers
2475
+ }
2476
+ ])
2300
2477
 
2478
+ await sock.sendStatus(
2479
+ { text: 'Only the selected custom audience can see this status.' },
2480
+ { statusJidList: audienceMembers }
2481
+ )
2482
+
2483
+ console.log(await sock.getStatusPrivacy())
2484
+ ```
2485
+
2486
+ Supported status privacy distribution types are `contacts`, `whitelist`, `blacklist`, and `null`. Named lists use the `customlist` status-privacy entry. A custom list does not turn the status into a group status, and the group JID itself must not be used as a status viewer; expand a group to its participant JIDs first.
2487
+
2488
+ ### Group status versus custom-audience status
2489
+
2490
+ These are separate WhatsApp features:
2491
+
2492
+ | Feature | Destination | Content flag/envelope | Result |
2493
+ | --- | --- | --- | --- |
2494
+ | Normal status | `status@broadcast` | `status: true` or `sendStatus()` | Personal status with selected viewers or privacy audience |
2495
+ | Custom-audience status | `status@broadcast` | Normal status plus status privacy/custom-list configuration | Native “custom audience” experience where supported by the client |
2496
+ | Group status | A group JID | `groupStatus: true` | Status attached to the group with “Added by …” and “Reply to group” UI |
2497
+ | Status mention | Array of user/group JIDs | `sendStatusMention()` or array destination | Status plus mention notification |
2498
+
2499
+ Plogme's default group-status wire envelope is `groupStatusMessageV2`. For compatibility testing, the older envelope can be selected explicitly with `groupStatusVersion: 'legacy'` (or `'v1'`). This selector applies only to group status and does not configure a custom audience.
2500
+
2501
+ For example, this tests the older group-status envelope in the supplied group without adding Cody or changing group membership:
2502
+
2503
+ ```javascript
2504
+ const testGroupJid = '120363406852054490@g.us'
2505
+
2506
+ await sock.sendMessage(testGroupJid, {
2507
+ text: 'Legacy group-status test',
2508
+ groupStatus: true,
2509
+ groupStatusVersion: 'legacy'
2510
+ })
2511
+ ```
2512
+
2513
+ The default V2 test is:
2514
+
2515
+ ```javascript
2516
+ await sock.sendMessage(testGroupJid, {
2517
+ text: 'V2 group-status test',
2518
+ groupStatus: true
2519
+ })
2520
+ ```
2521
+
2522
+ `groupStatusMessage` and `groupStatusMessageV2` are the two group-status protocol wrappers. They are not the same as `statusMentionMessage`, `groupStatusMentionMessage`, or the normal status/custom-audience path. `aiGroupAddBot()` is unrelated to all of these status APIs and is not required to send either group-status variant.
2523
+
2524
+ ### Status Mentions
2301
2525
  Passing an array as the destination posts a status and sends mention notifications to those contacts or groups. This is intentionally separate from `statusJidList`, which controls viewers without mentioning them.
2302
2526
 
2303
2527
  ```javascript
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: WAProto/WAProto.proto
5
+ * About: WAProto module for the Plogme WhatsApp protocol client.
6
+ * Important exports: Protocol message and enum declarations.
7
+ * Directions: Generated schema source; update through the repository protobuf workflow.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  syntax = "proto3";
2
14
  package proto;
3
15
 
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: WAProto/index.d.ts
5
+ * About: Index.d module for the Plogme WhatsApp protocol client.
6
+ * Important exports: No public exports detected; module side effects or declarations are local.
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import * as $protobuf from "protobufjs";
2
14
  import Long = require("long");
3
15
  /** Namespace proto. */
package/WAProto/index.js CHANGED
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: WAProto/index.js
5
+ * About: WAProto module for the Plogme WhatsApp protocol client.
6
+ * Important exports: proto
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
2
14
  "use strict";
3
15
 
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: engine-requirements.js
5
+ * About: Engine requirements module for the Plogme WhatsApp protocol client.
6
+ * Important exports: No public exports detected; module side effects or declarations are local.
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { readFileSync } from 'fs';
2
14
 
3
15
  const major = parseInt(
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Defaults/ban-checker.js
5
+ * About: Ban checker module for the Plogme WhatsApp protocol client.
6
+ * Important exports: MOBILE_ENDPOINT, MOBILE_PORT, WA_VERSION, WA_VERSION_HASH, MOBILE_TOKEN, MOBILE_REGISTRATION_ENDPOINT, MOBILE_USERAGENT, GRAPHQL_ENDPOINT; …
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { createHash } from 'crypto';
2
14
 
3
15
  export const MOBILE_ENDPOINT =
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Defaults/index.js
5
+ * About: Defaults module for the Plogme WhatsApp protocol client.
6
+ * Important exports: UNAUTHORIZED_CODES, BIZ_BOT_SUPPORT_PAYLOAD, DEFAULT_ORIGIN, CALL_VIDEO_PREFIX, CALL_AUDIO_PREFIX, DEF_CALLBACK_PREFIX, DEF_TAG_PREFIX, DONATE_URL; …
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { proto } from '../../WAProto/index.js';
2
14
  import { makeLibSignalRepository } from '../Signal/libsignal.js';
3
15
  import { Browsers } from '../Utils/browser-utils.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/ciphertext-message.js
5
+ * About: Ciphertext message module for the Plogme WhatsApp protocol client.
6
+ * Important exports: CiphertextMessage
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  export class CiphertextMessage {
2
14
  constructor() {
3
15
  this.UNSUPPORTED_VERSION = 1;
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/group-session-builder.js
5
+ * About: Group session builder module for the Plogme WhatsApp protocol client.
6
+ * Important exports: GroupSessionBuilder
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import * as keyhelper from './keyhelper.js';
2
14
  import { SenderKeyDistributionMessage } from './sender-key-distribution-message.js';
3
15
  import { SenderKeyName } from './sender-key-name.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/group_cipher.js
5
+ * About: Group cipher module for the Plogme WhatsApp protocol client.
6
+ * Important exports: GroupCipher
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { decrypt, encrypt } from 'libsignal/src/crypto.js';
2
14
  import { SenderKeyMessage } from './sender-key-message.js';
3
15
  import { SenderKeyName } from './sender-key-name.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/index.js
5
+ * About: Group module for the Plogme WhatsApp protocol client.
6
+ * Important exports: GroupSessionBuilder, SenderKeyDistributionMessage, SenderKeyRecord, SenderKeyName, GroupCipher, SenderKeyState, SenderKeyMessage, SenderMessageKey; …
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  export { GroupSessionBuilder } from './group-session-builder.js';
2
14
  export { SenderKeyDistributionMessage } from './sender-key-distribution-message.js';
3
15
  export { SenderKeyRecord } from './sender-key-record.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/keyhelper.js
5
+ * About: Keyhelper module for the Plogme WhatsApp protocol client.
6
+ * Important exports: generateSenderKey, generateSenderKeyId, generateSenderSigningKey
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import * as nodeCrypto from 'crypto';
2
14
  import { generateKeyPair } from 'libsignal/src/curve.js';
3
15
  export function generateSenderKey() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/sender-chain-key.js
5
+ * About: Sender chain key module for the Plogme WhatsApp protocol client.
6
+ * Important exports: SenderChainKey
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { calculateMAC } from 'libsignal/src/crypto.js';
2
14
  import { SenderMessageKey } from './sender-message-key.js';
3
15
  export class SenderChainKey {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/sender-key-distribution-message.js
5
+ * About: Sender key distribution message module for the Plogme WhatsApp protocol client.
6
+ * Important exports: SenderKeyDistributionMessage
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { proto } from '../../../WAProto/index.js';
2
14
  import { CiphertextMessage } from './ciphertext-message.js';
3
15
  export class SenderKeyDistributionMessage extends CiphertextMessage {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/sender-key-message.js
5
+ * About: Sender key message module for the Plogme WhatsApp protocol client.
6
+ * Important exports: SenderKeyMessage
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { calculateSignature, verifySignature } from 'libsignal/src/curve.js';
2
14
  import { proto } from '../../../WAProto/index.js';
3
15
  import { CiphertextMessage } from './ciphertext-message.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/sender-key-name.js
5
+ * About: Sender key name module for the Plogme WhatsApp protocol client.
6
+ * Important exports: SenderKeyName
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  function isNull(str) {
2
14
  return str === null || str === '';
3
15
  }
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/sender-key-record.js
5
+ * About: Sender key record module for the Plogme WhatsApp protocol client.
6
+ * Important exports: SenderKeyRecord
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { BufferJSON } from '../../Utils/generics.js';
2
14
  import { SenderKeyState } from './sender-key-state.js';
3
15
  export class SenderKeyRecord {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/sender-key-state.js
5
+ * About: Sender key state module for the Plogme WhatsApp protocol client.
6
+ * Important exports: SenderKeyState
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { SenderChainKey } from './sender-chain-key.js';
2
14
  import { SenderMessageKey } from './sender-message-key.js';
3
15
  export class SenderKeyState {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/Group/sender-message-key.js
5
+ * About: Sender message key module for the Plogme WhatsApp protocol client.
6
+ * Important exports: SenderMessageKey
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { deriveSecrets } from 'libsignal/src/crypto.js';
2
14
  export class SenderMessageKey {
3
15
  constructor(iteration, seed) {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/libsignal.js
5
+ * About: Libsignal module for the Plogme WhatsApp protocol client.
6
+ * Important exports: makeLibSignalRepository
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  // @ts-ignore
2
14
  import * as libsignal from 'libsignal';
3
15
  // @ts-ignore
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Signal/lid-mapping.js
5
+ * About: Lid mapping module for the Plogme WhatsApp protocol client.
6
+ * Important exports: LIDMappingStore
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { LRUCache } from 'lru-cache';
2
14
  import { isHostedLidUser, isHostedPnUser, isLidUser, isPnUser, jidDecode, jidNormalizedUser, WAJIDDomains } from '../WABinary/index.js';
3
15
  export class LIDMappingStore {
@@ -1,2 +1,14 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Socket/Client/index.js
5
+ * About: Client module for the Plogme WhatsApp protocol client.
6
+ * Important exports: No public exports detected; module side effects or declarations are local.
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  export * from './types.js';
2
14
  export * from './websocket.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Socket/Client/types.js
5
+ * About: Types module for the Plogme WhatsApp protocol client.
6
+ * Important exports: AbstractSocketClient
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import { EventEmitter } from 'events';
2
14
  import { URL } from 'url';
3
15
  export class AbstractSocketClient extends EventEmitter {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Socket/Client/websocket.js
5
+ * About: Websocket module for the Plogme WhatsApp protocol client.
6
+ * Important exports: WebSocketClient
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import WebSocket from 'ws';
2
14
  import { DEFAULT_ORIGIN } from '../../Defaults/index.js';
3
15
  import { AbstractSocketClient } from './types.js';