plogme 2.1.1 → 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 +115 -0
  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 +307 -6
  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 +77 -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 +290 -9
  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 +46 -2
  146. package/lib/index.js +12 -0
  147. package/package.json +9 -2
package/README.md CHANGED
@@ -444,6 +444,28 @@ await sock.sendMessage(jid, {
444
444
 
445
445
  Remote URLs, local file paths, and buffers are supported where the selected media helper accepts them.
446
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
+
447
469
  > [!WARNING]
448
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.
449
471
 
@@ -747,6 +769,81 @@ await sock.sendMessage(jid, {
747
769
  })
748
770
  ```
749
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
+
750
847
  ### Interactive table
751
848
 
752
849
  ```js
@@ -1068,6 +1165,24 @@ console.log('Sent message:', result.key.id)
1068
1165
 
1069
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 }`.
1070
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
+
1071
1186
  Every field in the example is optional. A minimal response is valid as well:
1072
1187
 
1073
1188
  ```js
@@ -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';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Socket/aigroups.js
5
+ * About: Aigroups module for the Plogme WhatsApp protocol client.
6
+ * Important exports: META_AI_BOT_JID, isMetaAIBotResponse, collectMetaAIBotParticipantJids, makeAIGroupsSocket, extractAIGroupMetadata
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 { WAMessageAddressingMode } from '../Types/index.js';
2
14
  import { generateMessageIDV2, normalizeMessageContent } from '../Utils/index.js';
3
15
  import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString, isJidGroup, isJidMetaAI, isLidUser, isPnUser, jidEncode, jidNormalizedUser } from '../WABinary/index.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Socket/ban-checker.js
5
+ * About: Ban checker module for the Plogme WhatsApp protocol client.
6
+ * Important exports: checkStatusWA, getBanDetails, normalizePhone
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 { randomBytes, randomUUID } from 'crypto';
2
14
  import { initAuthCreds } from '../Utils/auth-utils.js';
3
15
  import { Curve, md5, signedKeyPair } from '../Utils/crypto.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Socket/business.js
5
+ * About: Business module for the Plogme WhatsApp protocol client.
6
+ * Important exports: makeBusinessSocket
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 { unlink } from 'node:fs/promises';
2
14
  import { getRawMediaUploadData } from '../Utils/index.js';
3
15
  import { parseCatalogNode, parseCollectionsNode, parseOrderDetailsNode, parseProductNode, toProductNode, uploadingNecessaryImagesOfProduct } from '../Utils/business.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Socket/chats.js
5
+ * About: Chats module for the Plogme WhatsApp protocol client.
6
+ * Important exports: makeChatsSocket
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 NodeCache from '@cacheable/node-cache';
2
14
  import { Boom } from '@hapi/boom';
3
15
  import { proto } from '../../WAProto/index.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Socket/communities.js
5
+ * About: Communities module for the Plogme WhatsApp protocol client.
6
+ * Important exports: makeCommunitiesSocket, extractCommunityMetadata
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 { WAMessageStubType } from '../Types/index.js';
3
15
  import { generateMessageID, generateMessageIDV2, unixTimestampSeconds } from '../Utils/index.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Socket/graphql.js
5
+ * About: Graphql module for the Plogme WhatsApp protocol client.
6
+ * Important exports: executeWWWGraphQL, executeFacebookGraphQL, executeWamoGraphQL, makeGraphQLSocket
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 { Boom } from '@hapi/boom';
2
14
 
3
15
  // Endpoints confirmed from APX.java and WamoGraphQLExecutor.java
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Socket/groups.js
5
+ * About: Groups module for the Plogme WhatsApp protocol client.
6
+ * Important exports: buildReportNode, buildGroupStatusRevokeMessage, makeGroupsSocket, extractGroupMetadata
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 { Boom } from '@hapi/boom';
2
14
  import { proto } from '../../WAProto/index.js';
3
15
  import { WAMessageAddressingMode, WAMessageStubType } from '../Types/index.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Socket/index.js
5
+ * About: Socket module for the Plogme WhatsApp protocol client.
6
+ * Important exports: checkStatusWA
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 { DEFAULT_CONNECTION_CONFIG } from '../Defaults/index.js';
2
14
  import { makeCommunitiesSocket } from './communities.js';
3
15
  import { makeInteropSocket } from './interop.js';