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
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/signal.js
5
+ * About: Signal module for the Plogme WhatsApp protocol client.
6
+ * Important exports: createSignalIdentity, getPreKeys, generateOrGetPreKeys, xmppSignedPreKey, xmppPreKey, extractE2ESessionFromRetryReceipt, parseAndInjectE2ESessions, extractDeviceJids; …
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 { KEY_BUNDLE_TYPE } from '../Defaults/index.js';
2
14
  import { assertNodeErrorFree, getBinaryNodeChild, getBinaryNodeChildBuffer, getBinaryNodeChildren, getBinaryNodeChildUInt, getServerFromDomainType, jidDecode, S_WHATSAPP_NET, WAJIDDomains } from '../WABinary/index.js';
3
15
  import { Curve, generateSignalPubKey } from './crypto.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/source-grep.js
5
+ * About: Source grep module for the Plogme WhatsApp protocol client.
6
+ * Important exports: grepSource
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 fs from 'node:fs';
2
14
  import path from 'node:path';
3
15
  import { fileURLToPath } from 'node:url';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/stanza-ack.js
5
+ * About: Stanza ack module for the Plogme WhatsApp protocol client.
6
+ * Important exports: buildAckStanza
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
  /**
2
14
  * Builds an ACK stanza for a received node.
3
15
  * Pure function -- no I/O, no side effects.
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/sync-action-utils.js
5
+ * About: Sync action utils module for the Plogme WhatsApp protocol client.
6
+ * Important exports: processContactAction, emitSyncActionResults
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 { isLidUser, isPnUser } from '../WABinary/index.js';
3
15
  /**
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/tc-token-utils.js
5
+ * About: Tc token utils module for the Plogme WhatsApp protocol client.
6
+ * Important exports: TC_TOKEN_INDEX_KEY, readTcTokenIndex, buildMergedTcTokenIndexWrite, isTcTokenExpired, shouldSendNewTcToken, resolveTcTokenJid, resolveIssuanceJid, buildTcTokenFromJid; …
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 { getBinaryNodeChild, getBinaryNodeChildren, isHostedLidUser, isHostedPnUser, isJidMetaAI, isLidUser, isPnUser, jidNormalizedUser } from '../WABinary/index.js';
2
14
  // Same phone-number pattern as WABinary's isJidBot, applied against the user
3
15
  // part so the check is invariant to @c.us ↔ @s.whatsapp.net normalization.
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/use-multi-file-auth-state.js
5
+ * About: Use multi file auth state module for the Plogme WhatsApp protocol client.
6
+ * Important exports: useMultiFileAuthState
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 { Mutex } from 'async-mutex';
2
14
  import { mkdir, readFile, stat, unlink, writeFile } from 'fs/promises';
3
15
  import { join } from 'path';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/use-single-file-auth-state.js
5
+ * About: Use single file auth state module for the Plogme WhatsApp protocol client.
6
+ * Important exports: useSingleFileAuthState
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 { readFile, rename, stat, writeFile } from 'fs/promises';
2
14
  import { DEFAULT_CACHE_TTLS } from '../Defaults/index.js';
3
15
  import { proto } from '../../WAProto/index.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/use-sqlite-auth-state.js
5
+ * About: Use sqlite auth state module for the Plogme WhatsApp protocol client.
6
+ * Important exports: useSqliteAuthState
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 { mkdir, readFile, stat, unlink, writeFile } from 'fs/promises';
2
14
  import { join } from 'path';
3
15
  import { proto } from '../../WAProto/index.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/validate-connection.js
5
+ * About: Validate connection module for the Plogme WhatsApp protocol client.
6
+ * Important exports: generateLoginNode, generateRegistrationNode, configureSuccessfulPairing, encodeSignedDeviceIdentity
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 { createHash } from 'crypto';
3
15
  import { proto } from '../../WAProto/index.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/view-once-utils.js
5
+ * About: View once utils module for the Plogme WhatsApp protocol client.
6
+ * Important exports: isViewOnceMessage, extractViewOnceContent, getViewOnceMediaType, getViewOnceMediaContent, downloadViewOnceMedia, createRegularMessageFromViewOnce, shouldAutoDecryptViewOnce, shouldDeleteViewOnce; …
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
  /**
2
14
  * View-Once Message Utilities
3
15
  *
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/voip-rekey.js
5
+ * About: Voip rekey module for the Plogme WhatsApp protocol client.
6
+ * Important exports: decodeE2eRekeyPayload
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
 
3
15
  const REKEY_TYPE_NAMES = {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/Utils/welcome-flow.js
5
+ * About: Welcome flow module for the Plogme WhatsApp protocol client.
6
+ * Important exports: createWelcomeFlow
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
  /**
2
14
  * Lia@Changes [WIP]
3
15
  * Welcome Flow — Meta Business-style startup template.
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WABinary/constants.js
5
+ * About: Constants module for the Plogme WhatsApp protocol client.
6
+ * Important exports: TAGS, DOUBLE_BYTE_TOKENS, SINGLE_BYTE_TOKENS, TOKEN_MAP, CPP_KEYWORDS, CSS_KEYWORDS, GO_KEYWORDS, HTML_KEYWORDS; …
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 const TAGS = {
2
14
  LIST_EMPTY: 0,
3
15
  DICTIONARY_0: 236,
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WABinary/decode.js
5
+ * About: Decode module for the Plogme WhatsApp protocol client.
6
+ * Important exports: decompressingIfRequired, decodeDecompressedBinaryNode, decodeBinaryNode
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 { promisify } from 'util';
2
14
  import { inflate } from 'zlib';
3
15
  import * as constants from './constants.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WABinary/encode.js
5
+ * About: Encode module for the Plogme WhatsApp protocol client.
6
+ * Important exports: encodeBinaryNode
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 constants from './constants.js';
2
14
  import { jidDecode } from './jid-utils.js';
3
15
  export const encodeBinaryNode = (node, opts = constants, buffer = [0]) => {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WABinary/generic-utils.js
5
+ * About: Generic utils module for the Plogme WhatsApp protocol client.
6
+ * Important exports: getBinaryNodeChildren, getBinaryNodeChild, getAllBinaryNodeChildren, getBinaryNodeChildBuffer, getBinaryNodeChildString, getBinaryNodeChildUInt, assertNodeErrorFree, reduceBinaryNodeToDictionary; …
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 { randomBytes } from 'crypto';
3
15
  import { proto } from '../../WAProto/index.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WABinary/index.js
5
+ * About: WABinary 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 './encode.js';
2
14
  export * from './decode.js';
3
15
  export * from './generic-utils.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WABinary/jid-utils.js
5
+ * About: Jid utils module for the Plogme WhatsApp protocol client.
6
+ * Important exports: S_WHATSAPP_NET, OFFICIAL_BIZ_JID, SERVER_JID, PSA_WID, STORIES_JID, META_AI_JID, WAJIDDomains, getServerFromDomainType; …
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 const S_WHATSAPP_NET = '@s.whatsapp.net';
2
14
  export const OFFICIAL_BIZ_JID = '16505361212@c.us';
3
15
  export const SERVER_JID = 'server@c.us';
@@ -1 +1,13 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WABinary/types.js
5
+ * About: Types 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 constants from './constants.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAM/BinaryInfo.js
5
+ * About: BinaryInfo module for the Plogme WhatsApp protocol client.
6
+ * Important exports: BinaryInfo
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 BinaryInfo {
2
14
  constructor(options = {}) {
3
15
  this.protocolVersion = 5;
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAM/constants.js
5
+ * About: Constants module for the Plogme WhatsApp protocol client.
6
+ * Important exports: WEB_EVENTS, WEB_GLOBALS, FLAG_BYTE
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 const WEB_EVENTS = [
2
14
  {
3
15
  name: 'WamDroppedEvent',
package/lib/WAM/encode.js CHANGED
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAM/encode.js
5
+ * About: Encode module for the Plogme WhatsApp protocol client.
6
+ * Important exports: encodeWAM
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 { BinaryInfo } from './BinaryInfo.js';
2
14
  import { FLAG_BYTE, FLAG_EVENT, FLAG_EXTENDED, FLAG_FIELD, FLAG_GLOBAL, WEB_EVENTS, WEB_GLOBALS } from './constants.js';
3
15
  const getHeaderBitLength = (key) => (key < 256 ? 2 : 3);
package/lib/WAM/index.js CHANGED
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAM/index.js
5
+ * About: WAM 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 './constants.js';
2
14
  export * from './encode.js';
3
15
  export * from './BinaryInfo.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncBusinessProtocol.js
5
+ * About: USyncBusinessProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncBusinessProtocol
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 { assertNodeErrorFree, getBinaryNodeChild, getBinaryNodeChildren } from '../../WABinary/index.js';
2
14
  export class USyncBusinessProtocol {
3
15
  constructor(profileVersion = '2') {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncContactProtocol.js
5
+ * About: USyncContactProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncContactProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncContactProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncDeviceProtocol.js
5
+ * About: USyncDeviceProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncDeviceProtocol
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 { assertNodeErrorFree, getBinaryNodeChild } from '../../WABinary/index.js';
2
14
  export class USyncDeviceProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js
5
+ * About: USyncDisappearingModeProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncDisappearingModeProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncDisappearingModeProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncFeatureProtocol.js
5
+ * About: USyncFeatureProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USYNC_FEATURES, USyncFeatureProtocol
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 { getBinaryNodeChild } from '../../WABinary/index.js';
2
14
  // Device feature flags that can be queried, ported from WhatsApp Web's
3
15
  // WAWebUsyncFeature module.
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncPictureProtocol.js
5
+ * About: USyncPictureProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncPictureProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncPictureProtocol {
3
15
  constructor(type = 'image') {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncSidelistProtocol.js
5
+ * About: USyncSidelistProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncSidelistProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncSidelistProtocol {
3
15
  constructor(useLidAddressing = true) {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncStatusProtocol.js
5
+ * About: USyncStatusProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncStatusProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncStatusProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncTextStatusProtocol.js
5
+ * About: USyncTextStatusProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncTextStatusProtocol
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 { assertNodeErrorFree, getBinaryNodeChild } from '../../WABinary/index.js';
2
14
  export class USyncTextStatusProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncUsernameProtocol.js
5
+ * About: USyncUsernameProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncUsernameProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncUsernameProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/UsyncBotProfileProtocol.js
5
+ * About: UsyncBotProfileProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncBotProfileProtocol
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 { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../../WABinary/index.js';
2
14
  import { USyncUser } from '../USyncUser.js';
3
15
  export class USyncBotProfileProtocol {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/UsyncLIDProtocol.js
5
+ * About: UsyncLIDProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncLIDProtocol
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 USyncLIDProtocol {
2
14
  constructor() {
3
15
  this.name = 'lid';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/index.js
5
+ * About: Protocols 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 './USyncDeviceProtocol.js';
2
14
  export * from './USyncContactProtocol.js';
3
15
  export * from './USyncStatusProtocol.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/USyncQuery.js
5
+ * About: USyncQuery module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncQuery
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 { getBinaryNodeChild } from '../WABinary/index.js';
2
14
  import { USyncBotProfileProtocol } from './Protocols/UsyncBotProfileProtocol.js';
3
15
  import { USyncLIDProtocol } from './Protocols/UsyncLIDProtocol.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/USyncUser.js
5
+ * About: USyncUser module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncUser
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 USyncUser {
2
14
  withId(id) {
3
15
  this.id = id;