@alannxd/baileys 6.0.4 → 6.0.5

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 (234) hide show
  1. package/WAProto/GenerateStatics.sh +3 -0
  2. package/WAProto/WAProto.proto +5479 -0
  3. package/WAProto/fix-imports.js +85 -0
  4. package/WAProto/index.d.ts +14017 -0
  5. package/WAProto/index.js +201 -160
  6. package/engine-requirements.js +1 -1
  7. package/lib/Defaults/index.d.ts +37 -15
  8. package/lib/Defaults/index.js +119 -136
  9. package/lib/Signal/Group/ciphertext-message.d.ts +1 -0
  10. package/lib/Signal/Group/ciphertext-message.js +2 -5
  11. package/lib/Signal/Group/group-session-builder.d.ts +4 -3
  12. package/lib/Signal/Group/group-session-builder.js +7 -41
  13. package/lib/Signal/Group/group_cipher.d.ts +4 -4
  14. package/lib/Signal/Group/group_cipher.js +37 -51
  15. package/lib/Signal/Group/index.d.ts +12 -11
  16. package/lib/Signal/Group/index.js +12 -57
  17. package/lib/Signal/Group/keyhelper.d.ts +2 -1
  18. package/lib/Signal/Group/keyhelper.js +7 -44
  19. package/lib/Signal/Group/sender-chain-key.d.ts +3 -2
  20. package/lib/Signal/Group/sender-chain-key.js +7 -15
  21. package/lib/Signal/Group/sender-key-distribution-message.d.ts +2 -1
  22. package/lib/Signal/Group/sender-key-distribution-message.js +8 -11
  23. package/lib/Signal/Group/sender-key-message.d.ts +2 -1
  24. package/lib/Signal/Group/sender-key-message.js +9 -12
  25. package/lib/Signal/Group/sender-key-name.d.ts +1 -0
  26. package/lib/Signal/Group/sender-key-name.js +2 -5
  27. package/lib/Signal/Group/sender-key-record.d.ts +3 -2
  28. package/lib/Signal/Group/sender-key-record.js +9 -21
  29. package/lib/Signal/Group/sender-key-state.d.ts +7 -6
  30. package/lib/Signal/Group/sender-key-state.js +27 -42
  31. package/lib/Signal/Group/sender-message-key.d.ts +1 -0
  32. package/lib/Signal/Group/sender-message-key.js +4 -7
  33. package/lib/Signal/libsignal.d.ts +5 -3
  34. package/lib/Signal/libsignal.js +347 -90
  35. package/lib/Signal/lid-mapping.d.ts +23 -0
  36. package/lib/Signal/lid-mapping.js +277 -0
  37. package/lib/Socket/Client/index.d.ts +3 -3
  38. package/lib/Socket/Client/index.js +3 -19
  39. package/lib/Socket/Client/{abstract-socket-client.d.ts → types.d.ts} +4 -5
  40. package/lib/Socket/Client/types.js +11 -0
  41. package/lib/Socket/Client/{web-socket-client.d.ts → websocket.d.ts} +3 -2
  42. package/lib/Socket/Client/websocket.js +54 -0
  43. package/lib/Socket/business.d.ts +154 -108
  44. package/lib/Socket/business.js +162 -43
  45. package/lib/Socket/chats.d.ts +96 -239
  46. package/lib/Socket/chats.js +627 -427
  47. package/lib/Socket/communities.d.ts +239 -146
  48. package/lib/Socket/communities.js +90 -80
  49. package/lib/Socket/groups.d.ts +104 -57
  50. package/lib/Socket/groups.js +154 -161
  51. package/lib/Socket/index.d.ts +202 -115
  52. package/lib/Socket/index.js +11 -10
  53. package/lib/Socket/luxu.d.ts +22 -266
  54. package/lib/Socket/luxu.js +422 -465
  55. package/lib/Socket/messages-recv.d.ts +136 -84
  56. package/lib/Socket/messages-recv.js +1421 -615
  57. package/lib/Socket/messages-send.d.ts +142 -126
  58. package/lib/Socket/messages-send.js +878 -671
  59. package/lib/Socket/mex.d.ts +3 -0
  60. package/lib/Socket/mex.js +42 -0
  61. package/lib/Socket/newsletter.d.ts +121 -85
  62. package/lib/Socket/newsletter.js +147 -272
  63. package/lib/Socket/socket.d.ts +34 -19
  64. package/lib/Socket/socket.js +544 -313
  65. package/lib/Store/index.d.ts +10 -3
  66. package/lib/Store/index.js +10 -10
  67. package/lib/Store/keyed-db.d.ts +22 -0
  68. package/lib/Store/keyed-db.js +108 -0
  69. package/lib/Store/make-cache-manager-store.d.ts +17 -11
  70. package/lib/Store/make-cache-manager-store.js +43 -41
  71. package/lib/Store/make-in-memory-store.d.ts +39 -118
  72. package/lib/Store/make-in-memory-store.js +112 -341
  73. package/lib/Store/make-ordered-dictionary.d.ts +11 -10
  74. package/lib/Store/make-ordered-dictionary.js +14 -20
  75. package/lib/Store/object-repository.d.ts +10 -9
  76. package/lib/Store/object-repository.js +11 -6
  77. package/lib/Types/Auth.d.ts +19 -12
  78. package/lib/Types/Auth.js +2 -2
  79. package/lib/Types/Bussines.d.ts +25 -0
  80. package/lib/Types/Bussines.js +2 -0
  81. package/lib/Types/Call.d.ts +3 -1
  82. package/lib/Types/Call.js +2 -2
  83. package/lib/Types/Chat.d.ts +35 -13
  84. package/lib/Types/Chat.js +8 -4
  85. package/lib/Types/Contact.d.ts +8 -1
  86. package/lib/Types/Contact.js +2 -2
  87. package/lib/Types/Events.d.ts +116 -17
  88. package/lib/Types/Events.js +2 -2
  89. package/lib/Types/GroupMetadata.d.ts +21 -5
  90. package/lib/Types/GroupMetadata.js +2 -2
  91. package/lib/Types/Label.d.ts +12 -0
  92. package/lib/Types/Label.js +3 -5
  93. package/lib/Types/LabelAssociation.d.ts +1 -0
  94. package/lib/Types/LabelAssociation.js +3 -5
  95. package/lib/Types/Message.d.ts +105 -58
  96. package/lib/Types/Message.js +11 -9
  97. package/lib/Types/Mex.d.ts +141 -0
  98. package/lib/Types/Mex.js +37 -0
  99. package/lib/Types/Product.d.ts +2 -1
  100. package/lib/Types/Product.js +2 -2
  101. package/lib/Types/Signal.d.ts +32 -2
  102. package/lib/Types/Signal.js +2 -2
  103. package/lib/Types/Socket.d.ts +50 -25
  104. package/lib/Types/Socket.js +3 -2
  105. package/lib/Types/State.d.ts +72 -2
  106. package/lib/Types/State.js +56 -2
  107. package/lib/Types/USync.d.ts +3 -2
  108. package/lib/Types/USync.js +2 -2
  109. package/lib/Types/index.d.ts +22 -14
  110. package/lib/Types/index.js +15 -31
  111. package/lib/Utils/auth-utils.d.ts +12 -6
  112. package/lib/Utils/auth-utils.js +239 -143
  113. package/lib/Utils/browser-utils.d.ts +4 -0
  114. package/lib/Utils/browser-utils.js +28 -0
  115. package/lib/Utils/business.d.ts +3 -2
  116. package/lib/Utils/business.js +66 -69
  117. package/lib/Utils/chat-utils.d.ts +52 -23
  118. package/lib/Utils/chat-utils.js +396 -253
  119. package/lib/Utils/companion-reg-client-utils.d.ts +17 -0
  120. package/lib/Utils/companion-reg-client-utils.js +35 -0
  121. package/lib/Utils/crypto.d.ts +18 -22
  122. package/lib/Utils/crypto.js +57 -90
  123. package/lib/Utils/decode-wa-message.d.ts +55 -8
  124. package/lib/Utils/decode-wa-message.js +203 -84
  125. package/lib/Utils/event-buffer.d.ts +9 -8
  126. package/lib/Utils/event-buffer.js +185 -77
  127. package/lib/Utils/generics.d.ts +28 -29
  128. package/lib/Utils/generics.js +180 -210
  129. package/lib/Utils/history.d.ts +18 -9
  130. package/lib/Utils/history.js +93 -55
  131. package/lib/Utils/identity-change-handler.d.ts +44 -0
  132. package/lib/Utils/identity-change-handler.js +50 -0
  133. package/lib/Utils/index.d.ts +22 -17
  134. package/lib/Utils/index.js +22 -33
  135. package/lib/Utils/link-preview.d.ts +5 -5
  136. package/lib/Utils/link-preview.js +16 -24
  137. package/lib/Utils/logger.d.ts +11 -3
  138. package/lib/Utils/logger.js +3 -7
  139. package/lib/Utils/lt-hash.d.ts +8 -12
  140. package/lib/Utils/lt-hash.js +3 -46
  141. package/lib/Utils/make-mutex.d.ts +4 -2
  142. package/lib/Utils/make-mutex.js +24 -34
  143. package/lib/Utils/message-retry-manager.d.ts +115 -0
  144. package/lib/Utils/message-retry-manager.js +265 -0
  145. package/lib/Utils/messages-media.d.ts +61 -44
  146. package/lib/Utils/messages-media.js +451 -482
  147. package/lib/Utils/messages.d.ts +32 -18
  148. package/lib/Utils/messages.js +458 -369
  149. package/lib/Utils/noise-handler.d.ts +13 -14
  150. package/lib/Utils/noise-handler.js +145 -99
  151. package/lib/Utils/offline-node-processor.d.ts +17 -0
  152. package/lib/Utils/offline-node-processor.js +40 -0
  153. package/lib/Utils/pre-key-manager.d.ts +28 -0
  154. package/lib/Utils/pre-key-manager.js +106 -0
  155. package/lib/Utils/process-message.d.ts +31 -12
  156. package/lib/Utils/process-message.js +459 -150
  157. package/lib/Utils/reporting-utils.d.ts +11 -0
  158. package/lib/Utils/reporting-utils.js +258 -0
  159. package/lib/Utils/signal.d.ts +20 -5
  160. package/lib/Utils/signal.js +120 -72
  161. package/lib/Utils/stanza-ack.d.ts +11 -0
  162. package/lib/Utils/stanza-ack.js +38 -0
  163. package/lib/Utils/sync-action-utils.d.ts +19 -0
  164. package/lib/Utils/sync-action-utils.js +49 -0
  165. package/lib/Utils/tc-token-utils.d.ts +37 -0
  166. package/lib/Utils/tc-token-utils.js +163 -0
  167. package/lib/Utils/use-multi-file-auth-state.d.ts +2 -2
  168. package/lib/Utils/use-multi-file-auth-state.js +29 -27
  169. package/lib/Utils/validate-connection.d.ts +7 -7
  170. package/lib/Utils/validate-connection.js +73 -99
  171. package/lib/WABinary/constants.d.ts +25 -27
  172. package/lib/WABinary/constants.js +1281 -20
  173. package/lib/WABinary/decode.d.ts +5 -5
  174. package/lib/WABinary/decode.js +52 -42
  175. package/lib/WABinary/encode.d.ts +3 -3
  176. package/lib/WABinary/encode.js +110 -155
  177. package/lib/WABinary/generic-utils.d.ts +8 -7
  178. package/lib/WABinary/generic-utils.js +48 -49
  179. package/lib/WABinary/index.d.ts +6 -5
  180. package/lib/WABinary/index.js +6 -21
  181. package/lib/WABinary/jid-utils.d.ts +25 -8
  182. package/lib/WABinary/jid-utils.js +74 -40
  183. package/lib/WABinary/types.d.ts +2 -1
  184. package/lib/WABinary/types.js +2 -2
  185. package/lib/WAM/BinaryInfo.d.ts +3 -11
  186. package/lib/WAM/BinaryInfo.js +2 -5
  187. package/lib/WAM/constants.d.ts +5 -3
  188. package/lib/WAM/constants.js +19071 -11568
  189. package/lib/WAM/encode.d.ts +3 -3
  190. package/lib/WAM/encode.js +17 -22
  191. package/lib/WAM/index.d.ts +4 -3
  192. package/lib/WAM/index.js +4 -19
  193. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +4 -3
  194. package/lib/WAUSync/Protocols/USyncContactProtocol.js +33 -13
  195. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +3 -2
  196. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +11 -14
  197. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +3 -2
  198. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +9 -12
  199. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +3 -2
  200. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +9 -13
  201. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +10 -0
  202. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +25 -0
  203. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +4 -3
  204. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +20 -22
  205. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +5 -3
  206. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +13 -8
  207. package/lib/WAUSync/Protocols/index.d.ts +6 -4
  208. package/lib/WAUSync/Protocols/index.js +6 -20
  209. package/lib/WAUSync/USyncQuery.d.ts +6 -4
  210. package/lib/WAUSync/USyncQuery.js +44 -35
  211. package/lib/WAUSync/USyncUser.d.ts +10 -5
  212. package/lib/WAUSync/USyncUser.js +10 -5
  213. package/lib/WAUSync/index.d.ts +4 -0
  214. package/lib/WAUSync/index.js +4 -19
  215. package/lib/index.d.ts +10 -9
  216. package/lib/index.js +12 -34
  217. package/package.json +84 -51
  218. package/WAProto/fix-import.js +0 -29
  219. package/lib/Defaults/baileys-version.json +0 -3
  220. package/lib/Defaults/phonenumber-mcc.json +0 -223
  221. package/lib/Signal/Group/queue-job.d.ts +0 -1
  222. package/lib/Signal/Group/queue-job.js +0 -57
  223. package/lib/Socket/Client/abstract-socket-client.js +0 -13
  224. package/lib/Socket/Client/mobile-socket-client.d.ts +0 -13
  225. package/lib/Socket/Client/mobile-socket-client.js +0 -65
  226. package/lib/Socket/Client/web-socket-client.js +0 -62
  227. package/lib/Socket/registration.d.ts +0 -267
  228. package/lib/Socket/registration.js +0 -166
  229. package/lib/Socket/usync.d.ts +0 -36
  230. package/lib/Socket/usync.js +0 -70
  231. package/lib/Types/Newsletter.d.ts +0 -103
  232. package/lib/Types/Newsletter.js +0 -38
  233. package/lib/Utils/baileys-event-stream.d.ts +0 -16
  234. package/lib/Utils/baileys-event-stream.js +0 -63
@@ -7,4 +7,4 @@ if (major < 20) {
7
7
  ` Please upgrade to Node.js 20+ to proceed.\n`
8
8
  );
9
9
  process.exit(1);
10
- }
10
+ }
@@ -1,23 +1,39 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import { proto } from '../../WAProto';
4
- import type { MediaType, SocketConfig } from '../Types';
1
+ import { proto } from '../../WAProto/index.js';
2
+ import type { SocketConfig } from '../Types/index.js';
5
3
  export declare const UNAUTHORIZED_CODES: number[];
6
4
  export declare const DEFAULT_ORIGIN = "https://web.whatsapp.com";
5
+ export declare const CALL_VIDEO_PREFIX = "https://call.whatsapp.com/video/";
6
+ export declare const CALL_AUDIO_PREFIX = "https://call.whatsapp.com/voice/";
7
7
  export declare const DEF_CALLBACK_PREFIX = "CB:";
8
8
  export declare const DEF_TAG_PREFIX = "TAG:";
9
9
  export declare const PHONE_CONNECTION_CB = "CB:Pong";
10
+ export declare const WA_ADV_ACCOUNT_SIG_PREFIX: Buffer<ArrayBuffer>;
11
+ export declare const WA_ADV_DEVICE_SIG_PREFIX: Buffer<ArrayBuffer>;
12
+ export declare const WA_ADV_HOSTED_ACCOUNT_SIG_PREFIX: Buffer<ArrayBuffer>;
13
+ export declare const WA_ADV_HOSTED_DEVICE_SIG_PREFIX: Buffer<ArrayBuffer>;
10
14
  export declare const WA_DEFAULT_EPHEMERAL: number;
15
+ /** Status messages older than 24 hours are considered expired */
16
+ export declare const STATUS_EXPIRY_SECONDS: number;
17
+ /** WA Web enforces a 14-day maximum age for placeholder resend requests */
18
+ export declare const PLACEHOLDER_MAX_AGE_SECONDS: number;
11
19
  export declare const NOISE_MODE = "Noise_XX_25519_AESGCM_SHA256\0\0\0\0";
12
- export declare const DICT_VERSION = 2;
13
- export declare const KEY_BUNDLE_TYPE: Buffer;
14
- export declare const NOISE_WA_HEADER: Buffer;
20
+ export declare const DICT_VERSION = 3;
21
+ export declare const KEY_BUNDLE_TYPE: Buffer<ArrayBuffer>;
22
+ export declare const NOISE_WA_HEADER: Buffer<ArrayBuffer>;
15
23
  /** from: https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url */
16
24
  export declare const URL_REGEX: RegExp;
17
25
  export declare const WA_CERT_DETAILS: {
18
26
  SERIAL: number;
27
+ ISSUER: string;
28
+ PUBLIC_KEY: Buffer<ArrayBuffer>;
29
+ };
30
+ export declare const PROCESSABLE_HISTORY_TYPES: proto.HistorySync.HistorySyncType[];
31
+ export declare const DEFAULT_CACHE_TTLS: {
32
+ SIGNAL_STORE: number;
33
+ MSG_RETRY: number;
34
+ CALL_OFFER: number;
35
+ USER_DEVICES: number;
19
36
  };
20
- export declare const PROCESSABLE_HISTORY_TYPES: proto.Message.HistorySyncNotification.HistorySyncType[];
21
37
  export declare const DEFAULT_CONNECTION_CONFIG: SocketConfig;
22
38
  export declare const MEDIA_PATH_MAP: {
23
39
  [T in MediaType]?: string;
@@ -41,13 +57,19 @@ export declare const MEDIA_HKDF_KEY_MAPPING: {
41
57
  'product-catalog-image': string;
42
58
  'payment-bg-image': string;
43
59
  ptv: string;
60
+ 'biz-cover-photo': string;
44
61
  };
45
- export declare const MEDIA_KEYS: ("ppic" | "product" | "image" | "video" | "sticker" | "audio" | "gif" | "ptt" | "thumbnail-document" | "thumbnail-image" | "thumbnail-link" | "thumbnail-video" | "md-app-state" | "md-msg-hist" | "document" | "product-catalog-image" | "payment-bg-image" | "ptv")[];
62
+ export type MediaType = keyof typeof MEDIA_HKDF_KEY_MAPPING;
63
+ export declare const MEDIA_KEYS: MediaType[];
64
+ /** 120s timeout for history sync stall detection, same as WA Web's handleChunkProgress / restartPausedTimer (g = 120) */
65
+ export declare const HISTORY_SYNC_PAUSED_TIMEOUT_MS = 120000;
46
66
  export declare const MIN_PREKEY_COUNT = 5;
47
- export declare const INITIAL_PREKEY_COUNT = 30;
48
- export declare const DEFAULT_CACHE_TTLS: {
49
- SIGNAL_STORE: number;
50
- MSG_RETRY: number;
51
- CALL_OFFER: number;
52
- USER_DEVICES: number;
67
+ export declare const INITIAL_PREKEY_COUNT = 812;
68
+ export declare const UPLOAD_TIMEOUT = 30000;
69
+ export declare const TimeMs: {
70
+ Minute: number;
71
+ Hour: number;
72
+ Day: number;
73
+ Week: number;
53
74
  };
75
+ //# sourceMappingURL=index.d.ts.map
@@ -1,147 +1,130 @@
1
- var __importDefault = this && this.__importDefault || function (a) {
2
- return a && a.__esModule ? a : { "default": a }
1
+ import { proto } from '../../WAProto/index.js';
2
+ import { makeLibSignalRepository } from '../Signal/libsignal.js';
3
+ import { Browsers } from '../Utils/browser-utils.js';
4
+ import logger from '../Utils/logger.js';
5
+ const version = [2, 3000, 1035194821];
6
+ export const UNAUTHORIZED_CODES = [401, 403, 419];
7
+ export const DEFAULT_ORIGIN = 'https://web.whatsapp.com';
8
+ export const CALL_VIDEO_PREFIX = 'https://call.whatsapp.com/video/';
9
+ export const CALL_AUDIO_PREFIX = 'https://call.whatsapp.com/voice/';
10
+ export const DEF_CALLBACK_PREFIX = 'CB:';
11
+ export const DEF_TAG_PREFIX = 'TAG:';
12
+ export const PHONE_CONNECTION_CB = 'CB:Pong';
13
+ export const WA_ADV_ACCOUNT_SIG_PREFIX = Buffer.from([6, 0]);
14
+ export const WA_ADV_DEVICE_SIG_PREFIX = Buffer.from([6, 1]);
15
+ export const WA_ADV_HOSTED_ACCOUNT_SIG_PREFIX = Buffer.from([6, 5]);
16
+ export const WA_ADV_HOSTED_DEVICE_SIG_PREFIX = Buffer.from([6, 6]);
17
+ export const WA_DEFAULT_EPHEMERAL = 7 * 24 * 60 * 60;
18
+ /** Status messages older than 24 hours are considered expired */
19
+ export const STATUS_EXPIRY_SECONDS = 24 * 60 * 60;
20
+ /** WA Web enforces a 14-day maximum age for placeholder resend requests */
21
+ export const PLACEHOLDER_MAX_AGE_SECONDS = 14 * 24 * 60 * 60;
22
+ export const NOISE_MODE = 'Noise_XX_25519_AESGCM_SHA256\0\0\0\0';
23
+ export const DICT_VERSION = 3;
24
+ export const KEY_BUNDLE_TYPE = Buffer.from([5]);
25
+ export const NOISE_WA_HEADER = Buffer.from([87, 65, 6, DICT_VERSION]); // last is "DICT_VERSION"
26
+ /** from: https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url */
27
+ export const URL_REGEX = /https:\/\/(?![^:@\/\s]+:[^:@\/\s]+@)[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(:\d+)?(\/[^\s]*)?/g;
28
+ export const WA_CERT_DETAILS = {
29
+ SERIAL: 0,
30
+ ISSUER: 'WhatsAppLongTerm1',
31
+ PUBLIC_KEY: Buffer.from('142375574d0a587166aae71ebe516437c4a28b73e3695c6ce1f7f9545da8ee6b', 'hex')
3
32
  };
4
-
5
- Object.defineProperty(exports, "__esModule", { value: !0 });
6
-
7
- exports.DEFAULT_CACHE_TTLS =
8
- exports.INITIAL_PREKEY_COUNT =
9
- exports.MIN_PREKEY_COUNT =
10
- exports.MEDIA_KEYS =
11
- exports.MEDIA_HKDF_KEY_MAPPING =
12
- exports.MEDIA_PATH_MAP =
13
- exports.DEFAULT_CONNECTION_CONFIG =
14
- exports.PROCESSABLE_HISTORY_TYPES =
15
- exports.WA_CERT_DETAILS =
16
- exports.URL_REGEX =
17
- exports.NOISE_WA_HEADER =
18
- exports.KEY_BUNDLE_TYPE =
19
- exports.DICT_VERSION =
20
- exports.NOISE_MODE =
21
- exports.WA_DEFAULT_EPHEMERAL =
22
- exports.PHONE_CONNECTION_CB =
23
- exports.DEF_TAG_PREFIX =
24
- exports.DEF_CALLBACK_PREFIX =
25
- exports.DEFAULT_ORIGIN =
26
- exports.UNAUTHORIZED_CODES =
27
- void 0;
28
-
29
- const crypto_1 = require("crypto");
30
- const { proto } = require("../../WAProto"),
31
- libsignal_1 = require("../Signal/libsignal"),
32
- Utils_1 = require("../Utils"),
33
- logger_1 = __importDefault(require("../Utils/logger")),
34
- baileys_version_json_1 = require("./baileys-version.json"),
35
- phonenumber_mcc_json_1 = __importDefault(require("./phonenumber-mcc.json"));
36
-
37
- exports.UNAUTHORIZED_CODES = [401, 403, 419];
38
- exports.version = [2, 3000, 1027934701];
39
- exports.PHONENUMBER_MCC = phonenumber_mcc_json_1.default;
40
- exports.DEFAULT_ORIGIN = "https://web.whatsapp.com";
41
- exports.MOBILE_ENDPOINT = 'g.whatsapp.net';
42
- exports.MOBILE_PORT = 443;
43
- exports.DEF_CALLBACK_PREFIX = "CB:";
44
- exports.DEF_TAG_PREFIX = "TAG:";
45
- exports.PHONE_CONNECTION_CB = "CB:Pong";
46
- exports.WA_DEFAULT_EPHEMERAL = 604800;
47
- const WA_VERSION = '2.25.23.24';
48
- const WA_VERSION_HASH = (0, crypto_1.createHash)('md5').update(WA_VERSION).digest('hex');
49
- exports.MOBILE_TOKEN = Buffer.from('0a1mLfGUIBVrMKF1RdvLI5lkRBvof6vn0fD2QRSM' + WA_VERSION_HASH);
50
- exports.MOBILE_REGISTRATION_ENDPOINT = 'https://v.whatsapp.net/v2';
51
- exports.MOBILE_USERAGENT = `WhatsApp/${WA_VERSION} iOS/17.5.1 Device/Apple-iPhone_13`;
52
- exports.REGISTRATION_PUBLIC_KEY = Buffer.from([
53
- 5, 142, 140, 15, 116, 195, 235, 197, 215, 166, 134, 92, 108, 60, 132, 56, 86, 176, 97, 33, 204, 232, 234, 119, 77,
54
- 34, 251, 111, 18, 37, 18, 48, 45,
55
- ]);
56
- exports.NOISE_MODE = "Noise_XX_25519_AESGCM_SHA256\x00\x00\x00\x00";
57
- exports.DICT_VERSION = 2;
58
- exports.KEY_BUNDLE_TYPE = Buffer.from([5]);
59
- exports.NOISE_WA_HEADER = Buffer.from([87, 65, 6, exports.DICT_VERSION]);
60
- exports.PROTOCOL_VERSION = [5, 2];
61
- exports.MOBILE_NOISE_HEADER = Buffer.concat([Buffer.from('WA'), Buffer.from(exports.PROTOCOL_VERSION)]);
62
-
63
- exports.URL_REGEX = /https:\/\/(?![^:@\/\s]+:[^:@\/\s]+@)[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(:\d+)?(\/[^\s]*)?/g;
64
- exports.WA_CERT_DETAILS = { SERIAL: 0 };
65
-
66
- exports.PROCESSABLE_HISTORY_TYPES = [
67
- "INITIAL_BOOTSTRAP",
68
- "PUSH_NAME",
69
- "RECENT",
70
- "FULL",
71
- "ON_DEMAND"
33
+ export const PROCESSABLE_HISTORY_TYPES = [
34
+ proto.HistorySync.HistorySyncType.INITIAL_BOOTSTRAP,
35
+ proto.HistorySync.HistorySyncType.PUSH_NAME,
36
+ proto.HistorySync.HistorySyncType.RECENT,
37
+ proto.HistorySync.HistorySyncType.FULL,
38
+ proto.HistorySync.HistorySyncType.ON_DEMAND,
39
+ proto.HistorySync.HistorySyncType.NON_BLOCKING_DATA,
40
+ proto.HistorySync.HistorySyncType.INITIAL_STATUS_V3
72
41
  ];
73
-
74
- exports.DEFAULT_CONNECTION_CONFIG = {
75
- version: baileys_version_json_1.version,
76
- browser: Utils_1.Browsers("Chrome"),
77
- waWebSocketUrl: "wss://web.whatsapp.com/ws/chat",
78
- connectTimeoutMs: 2E4,
79
- keepAliveIntervalMs: 3E4,
80
- logger: logger_1.default.child({ class: "baileys" }),
81
- printQRInTerminal: !1,
82
- emitOwnEvents: !0,
83
- defaultQueryTimeoutMs: 6E4,
42
+ export const DEFAULT_CACHE_TTLS = {
43
+ SIGNAL_STORE: 5 * 60, // 5 minutes
44
+ MSG_RETRY: 60 * 60, // 1 hour
45
+ CALL_OFFER: 5 * 60, // 5 minutes
46
+ USER_DEVICES: 5 * 60 // 5 minutes
47
+ };
48
+ export const DEFAULT_CONNECTION_CONFIG = {
49
+ version: version,
50
+ browser: Browsers.macOS('Chrome'),
51
+ waWebSocketUrl: 'wss://web.whatsapp.com/ws/chat',
52
+ connectTimeoutMs: 20000,
53
+ keepAliveIntervalMs: 30000,
54
+ logger: logger.child({ class: 'baileys' }),
55
+ emitOwnEvents: true,
56
+ defaultQueryTimeoutMs: 60000,
84
57
  customUploadHosts: [],
85
58
  retryRequestDelayMs: 250,
86
59
  maxMsgRetryCount: 5,
87
- fireInitQueries: !0,
88
- auth: void 0,
89
- markOnlineOnConnect: !0,
90
- syncFullHistory: !1,
91
- patchMessageBeforeSending: a => a,
92
- shouldSyncHistoryMessage: () => !0,
93
- shouldIgnoreJid: () => !1,
60
+ fireInitQueries: true,
61
+ auth: undefined,
62
+ markOnlineOnConnect: true,
63
+ aiLabel: true,
64
+ syncFullHistory: true,
65
+ patchMessageBeforeSending: msg => msg,
66
+ shouldSyncHistoryMessage: ({ syncType }) => {
67
+ return syncType !== proto.HistorySync.HistorySyncType.FULL;
68
+ },
69
+ shouldIgnoreJid: () => false,
94
70
  linkPreviewImageThumbnailWidth: 192,
95
- transactionOpts: { maxCommitRetries: 10, delayBetweenTriesMs: 3E3 },
96
- generateHighQualityLinkPreview: !1,
71
+ transactionOpts: { maxCommitRetries: 10, delayBetweenTriesMs: 3000 },
72
+ generateHighQualityLinkPreview: false,
73
+ enableAutoSessionRecreation: true,
74
+ enableRecentMessageCache: true,
97
75
  options: {},
98
- appStateMacVerification: { patch: !1, snapshot: !1 },
99
- countryCode: "US",
100
- getMessage: async () => { },
101
- cachedGroupMetadata: async () => { },
102
- makeSignalRepository: libsignal_1.makeLibSignalRepository
76
+ appStateMacVerification: {
77
+ patch: false,
78
+ snapshot: false
79
+ },
80
+ countryCode: 'US',
81
+ getMessage: async () => undefined,
82
+ cachedGroupMetadata: async () => undefined,
83
+ makeSignalRepository: makeLibSignalRepository
103
84
  };
104
-
105
- exports.MEDIA_PATH_MAP = {
106
- image: "/mms/image",
107
- video: "/mms/video",
108
- document: "/mms/document",
109
- audio: "/mms/audio",
110
- sticker: "/mms/image",
111
- "thumbnail-link": "/mms/image",
112
- "product-catalog-image": "/product/image",
113
- "md-app-state": "",
114
- "md-msg-hist": "/mms/md-app-state"
85
+ export const MEDIA_PATH_MAP = {
86
+ image: '/mms/image',
87
+ video: '/mms/video',
88
+ document: '/mms/document',
89
+ audio: '/mms/audio',
90
+ sticker: '/mms/image',
91
+ 'thumbnail-link': '/mms/image',
92
+ 'product-catalog-image': '/product/image',
93
+ 'md-app-state': '',
94
+ 'md-msg-hist': '/mms/md-app-state',
95
+ 'biz-cover-photo': '/pps/biz-cover-photo'
115
96
  };
116
-
117
- exports.MEDIA_HKDF_KEY_MAPPING = {
118
- audio: "Audio",
119
- document: "Document",
120
- gif: "Video",
121
- image: "Image",
122
- ppic: "",
123
- product: "Image",
124
- ptt: "Audio",
125
- sticker: "Image",
126
- video: "Video",
127
- "thumbnail-document": "Document Thumbnail",
128
- "thumbnail-image": "Image Thumbnail",
129
- "thumbnail-video": "Video Thumbnail",
130
- "thumbnail-link": "Link Thumbnail",
131
- "md-msg-hist": "History",
132
- "md-app-state": "App State",
133
- "product-catalog-image": "",
134
- "payment-bg-image": "Payment Background",
135
- ptv: "Video"
97
+ export const MEDIA_HKDF_KEY_MAPPING = {
98
+ audio: 'Audio',
99
+ document: 'Document',
100
+ gif: 'Video',
101
+ image: 'Image',
102
+ ppic: '',
103
+ product: 'Image',
104
+ ptt: 'Audio',
105
+ sticker: 'Image',
106
+ video: 'Video',
107
+ 'thumbnail-document': 'Document Thumbnail',
108
+ 'thumbnail-image': 'Image Thumbnail',
109
+ 'thumbnail-video': 'Video Thumbnail',
110
+ 'thumbnail-link': 'Link Thumbnail',
111
+ 'md-msg-hist': 'History',
112
+ 'md-app-state': 'App State',
113
+ 'product-catalog-image': '',
114
+ 'payment-bg-image': 'Payment Background',
115
+ ptv: 'Video',
116
+ 'biz-cover-photo': 'Image'
136
117
  };
137
-
138
- exports.MEDIA_KEYS = Object.keys(exports.MEDIA_PATH_MAP);
139
- exports.MIN_PREKEY_COUNT = 5;
140
- exports.INITIAL_PREKEY_COUNT = 30;
141
-
142
- exports.DEFAULT_CACHE_TTLS = {
143
- SIGNAL_STORE: 300,
144
- MSG_RETRY: 3600,
145
- CALL_OFFER: 300,
146
- USER_DEVICES: 300
118
+ export const MEDIA_KEYS = Object.keys(MEDIA_PATH_MAP);
119
+ /** 120s timeout for history sync stall detection, same as WA Web's handleChunkProgress / restartPausedTimer (g = 120) */
120
+ export const HISTORY_SYNC_PAUSED_TIMEOUT_MS = 120000;
121
+ export const MIN_PREKEY_COUNT = 5;
122
+ export const INITIAL_PREKEY_COUNT = 812;
123
+ export const UPLOAD_TIMEOUT = 30000; // 30 seconds
124
+ export const TimeMs = {
125
+ Minute: 60 * 1000,
126
+ Hour: 60 * 60 * 1000,
127
+ Day: 24 * 60 * 60 * 1000,
128
+ Week: 7 * 24 * 60 * 60 * 1000
147
129
  };
130
+ //# sourceMappingURL=index.js.map
@@ -7,3 +7,4 @@ export declare class CiphertextMessage {
7
7
  readonly SENDERKEY_DISTRIBUTION_TYPE: number;
8
8
  readonly ENCRYPTED_MESSAGE_OVERHEAD: number;
9
9
  }
10
+ //# sourceMappingURL=ciphertext-message.d.ts.map
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CiphertextMessage = void 0;
4
- class CiphertextMessage {
1
+ export class CiphertextMessage {
5
2
  constructor() {
6
3
  this.UNSUPPORTED_VERSION = 1;
7
4
  this.CURRENT_VERSION = 3;
@@ -12,4 +9,4 @@ class CiphertextMessage {
12
9
  this.ENCRYPTED_MESSAGE_OVERHEAD = 53;
13
10
  }
14
11
  }
15
- exports.CiphertextMessage = CiphertextMessage;
12
+ //# sourceMappingURL=ciphertext-message.js.map
@@ -1,6 +1,6 @@
1
- import { SenderKeyDistributionMessage } from './sender-key-distribution-message';
2
- import { SenderKeyName } from './sender-key-name';
3
- import { SenderKeyRecord } from './sender-key-record';
1
+ import { SenderKeyDistributionMessage } from './sender-key-distribution-message.js';
2
+ import { SenderKeyName } from './sender-key-name.js';
3
+ import { SenderKeyRecord } from './sender-key-record.js';
4
4
  interface SenderKeyStore {
5
5
  loadSenderKey(senderKeyName: SenderKeyName): Promise<SenderKeyRecord>;
6
6
  storeSenderKey(senderKeyName: SenderKeyName, record: SenderKeyRecord): Promise<void>;
@@ -12,3 +12,4 @@ export declare class GroupSessionBuilder {
12
12
  create(senderKeyName: SenderKeyName): Promise<SenderKeyDistributionMessage>;
13
13
  }
14
14
  export {};
15
+ //# sourceMappingURL=group-session-builder.d.ts.map
@@ -1,42 +1,8 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.GroupSessionBuilder = void 0;
37
- const keyhelper = __importStar(require("./keyhelper"));
38
- const sender_key_distribution_message_1 = require("./sender-key-distribution-message");
39
- class GroupSessionBuilder {
1
+ import * as keyhelper from './keyhelper.js';
2
+ import { SenderKeyDistributionMessage } from './sender-key-distribution-message.js';
3
+ import { SenderKeyName } from './sender-key-name.js';
4
+ import { SenderKeyRecord } from './sender-key-record.js';
5
+ export class GroupSessionBuilder {
40
6
  constructor(senderKeyStore) {
41
7
  this.senderKeyStore = senderKeyStore;
42
8
  }
@@ -58,7 +24,7 @@ class GroupSessionBuilder {
58
24
  if (!state) {
59
25
  throw new Error('No session state available');
60
26
  }
61
- return new sender_key_distribution_message_1.SenderKeyDistributionMessage(state.getKeyId(), state.getSenderChainKey().getIteration(), state.getSenderChainKey().getSeed(), state.getSigningKeyPublic());
27
+ return new SenderKeyDistributionMessage(state.getKeyId(), state.getSenderChainKey().getIteration(), state.getSenderChainKey().getSeed(), state.getSigningKeyPublic());
62
28
  }
63
29
  }
64
- exports.GroupSessionBuilder = GroupSessionBuilder;
30
+ //# sourceMappingURL=group-session-builder.js.map
@@ -1,5 +1,5 @@
1
- import { SenderKeyName } from './sender-key-name';
2
- import { SenderKeyRecord } from './sender-key-record';
1
+ import { SenderKeyName } from './sender-key-name.js';
2
+ import { SenderKeyRecord } from './sender-key-record.js';
3
3
  export interface SenderKeyStore {
4
4
  loadSenderKey(senderKeyName: SenderKeyName): Promise<SenderKeyRecord>;
5
5
  storeSenderKey(senderKeyName: SenderKeyName, record: SenderKeyRecord): Promise<void>;
@@ -8,10 +8,10 @@ export declare class GroupCipher {
8
8
  private readonly senderKeyStore;
9
9
  private readonly senderKeyName;
10
10
  constructor(senderKeyStore: SenderKeyStore, senderKeyName: SenderKeyName);
11
- private queueJob;
12
- encrypt(paddedPlaintext: Uint8Array | string): Promise<Uint8Array>;
11
+ encrypt(paddedPlaintext: Uint8Array): Promise<Uint8Array>;
13
12
  decrypt(senderKeyMessageBytes: Uint8Array): Promise<Uint8Array>;
14
13
  private getSenderKey;
15
14
  private getPlainText;
16
15
  private getCipherText;
17
16
  }
17
+ //# sourceMappingURL=group_cipher.d.ts.map
@@ -1,55 +1,44 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.GroupCipher = void 0;
7
- const crypto_1 = require("libsignal/src/crypto");
8
- const queue_job_1 = __importDefault(require("./queue-job"));
9
- const sender_key_message_1 = require("./sender-key-message");
10
- class GroupCipher {
1
+ import { decrypt, encrypt } from 'libsignal/src/crypto.js';
2
+ import { SenderKeyMessage } from './sender-key-message.js';
3
+ import { SenderKeyName } from './sender-key-name.js';
4
+ import { SenderKeyRecord } from './sender-key-record.js';
5
+ import { SenderKeyState } from './sender-key-state.js';
6
+ export class GroupCipher {
11
7
  constructor(senderKeyStore, senderKeyName) {
12
8
  this.senderKeyStore = senderKeyStore;
13
9
  this.senderKeyName = senderKeyName;
14
10
  }
15
- queueJob(awaitable) {
16
- return (0, queue_job_1.default)(this.senderKeyName.toString(), awaitable);
17
- }
18
11
  async encrypt(paddedPlaintext) {
19
- return await this.queueJob(async () => {
20
- const record = await this.senderKeyStore.loadSenderKey(this.senderKeyName);
21
- if (!record) {
22
- throw new Error('No SenderKeyRecord found for encryption');
23
- }
24
- const senderKeyState = record.getSenderKeyState();
25
- if (!senderKeyState) {
26
- throw new Error('No session to encrypt message');
27
- }
28
- const iteration = senderKeyState.getSenderChainKey().getIteration();
29
- const senderKey = this.getSenderKey(senderKeyState, iteration === 0 ? 0 : iteration + 1);
30
- const ciphertext = await this.getCipherText(senderKey.getIv(), senderKey.getCipherKey(), paddedPlaintext);
31
- const senderKeyMessage = new sender_key_message_1.SenderKeyMessage(senderKeyState.getKeyId(), senderKey.getIteration(), ciphertext, senderKeyState.getSigningKeyPrivate());
32
- await this.senderKeyStore.storeSenderKey(this.senderKeyName, record);
33
- return senderKeyMessage.serialize();
34
- });
12
+ const record = await this.senderKeyStore.loadSenderKey(this.senderKeyName);
13
+ if (!record) {
14
+ throw new Error('No SenderKeyRecord found for encryption');
15
+ }
16
+ const senderKeyState = record.getSenderKeyState();
17
+ if (!senderKeyState) {
18
+ throw new Error('No session to encrypt message');
19
+ }
20
+ const iteration = senderKeyState.getSenderChainKey().getIteration();
21
+ const senderKey = this.getSenderKey(senderKeyState, iteration === 0 ? 0 : iteration + 1);
22
+ const ciphertext = await this.getCipherText(senderKey.getIv(), senderKey.getCipherKey(), paddedPlaintext);
23
+ const senderKeyMessage = new SenderKeyMessage(senderKeyState.getKeyId(), senderKey.getIteration(), ciphertext, senderKeyState.getSigningKeyPrivate());
24
+ await this.senderKeyStore.storeSenderKey(this.senderKeyName, record);
25
+ return senderKeyMessage.serialize();
35
26
  }
36
27
  async decrypt(senderKeyMessageBytes) {
37
- return await this.queueJob(async () => {
38
- const record = await this.senderKeyStore.loadSenderKey(this.senderKeyName);
39
- if (!record) {
40
- throw new Error('No SenderKeyRecord found for decryption');
41
- }
42
- const senderKeyMessage = new sender_key_message_1.SenderKeyMessage(null, null, null, null, senderKeyMessageBytes);
43
- const senderKeyState = record.getSenderKeyState(senderKeyMessage.getKeyId());
44
- if (!senderKeyState) {
45
- throw new Error('No session found to decrypt message');
46
- }
47
- senderKeyMessage.verifySignature(senderKeyState.getSigningKeyPublic());
48
- const senderKey = this.getSenderKey(senderKeyState, senderKeyMessage.getIteration());
49
- const plaintext = await this.getPlainText(senderKey.getIv(), senderKey.getCipherKey(), senderKeyMessage.getCipherText());
50
- await this.senderKeyStore.storeSenderKey(this.senderKeyName, record);
51
- return plaintext;
52
- });
28
+ const record = await this.senderKeyStore.loadSenderKey(this.senderKeyName);
29
+ if (!record) {
30
+ throw new Error('No SenderKeyRecord found for decryption');
31
+ }
32
+ const senderKeyMessage = new SenderKeyMessage(null, null, null, null, senderKeyMessageBytes);
33
+ const senderKeyState = record.getSenderKeyState(senderKeyMessage.getKeyId());
34
+ if (!senderKeyState) {
35
+ throw new Error('No session found to decrypt message');
36
+ }
37
+ senderKeyMessage.verifySignature(senderKeyState.getSigningKeyPublic());
38
+ const senderKey = this.getSenderKey(senderKeyState, senderKeyMessage.getIteration());
39
+ const plaintext = await this.getPlainText(senderKey.getIv(), senderKey.getCipherKey(), senderKeyMessage.getCipherText());
40
+ await this.senderKeyStore.storeSenderKey(this.senderKeyName, record);
41
+ return plaintext;
53
42
  }
54
43
  getSenderKey(senderKeyState, iteration) {
55
44
  let senderChainKey = senderKeyState.getSenderChainKey();
@@ -75,7 +64,7 @@ class GroupCipher {
75
64
  }
76
65
  async getPlainText(iv, key, ciphertext) {
77
66
  try {
78
- return (0, crypto_1.decrypt)(key, ciphertext, iv);
67
+ return decrypt(key, ciphertext, iv);
79
68
  }
80
69
  catch (e) {
81
70
  throw new Error('InvalidMessageException');
@@ -83,14 +72,11 @@ class GroupCipher {
83
72
  }
84
73
  async getCipherText(iv, key, plaintext) {
85
74
  try {
86
- const ivBuffer = typeof iv === 'string' ? Buffer.from(iv, 'base64') : iv;
87
- const keyBuffer = typeof key === 'string' ? Buffer.from(key, 'base64') : key;
88
- const plaintextBuffer = typeof plaintext === 'string' ? Buffer.from(plaintext) : plaintext;
89
- return (0, crypto_1.encrypt)(keyBuffer, plaintextBuffer, ivBuffer);
75
+ return encrypt(key, plaintext, iv);
90
76
  }
91
77
  catch (e) {
92
78
  throw new Error('InvalidMessageException');
93
79
  }
94
80
  }
95
81
  }
96
- exports.GroupCipher = GroupCipher;
82
+ //# sourceMappingURL=group_cipher.js.map
@@ -1,11 +1,12 @@
1
- export { GroupSessionBuilder } from './group-session-builder';
2
- export { SenderKeyDistributionMessage } from './sender-key-distribution-message';
3
- export { SenderKeyRecord } from './sender-key-record';
4
- export { SenderKeyName } from './sender-key-name';
5
- export { GroupCipher } from './group_cipher';
6
- export { SenderKeyState } from './sender-key-state';
7
- export { SenderKeyMessage } from './sender-key-message';
8
- export { SenderMessageKey } from './sender-message-key';
9
- export { SenderChainKey } from './sender-chain-key';
10
- export { CiphertextMessage } from './ciphertext-message';
11
- export * as keyhelper from './keyhelper';
1
+ export { GroupSessionBuilder } from './group-session-builder.js';
2
+ export { SenderKeyDistributionMessage } from './sender-key-distribution-message.js';
3
+ export { SenderKeyRecord } from './sender-key-record.js';
4
+ export { SenderKeyName } from './sender-key-name.js';
5
+ export { GroupCipher } from './group_cipher.js';
6
+ export { SenderKeyState } from './sender-key-state.js';
7
+ export { SenderKeyMessage } from './sender-key-message.js';
8
+ export { SenderMessageKey } from './sender-message-key.js';
9
+ export { SenderChainKey } from './sender-chain-key.js';
10
+ export { CiphertextMessage } from './ciphertext-message.js';
11
+ export * as keyhelper from './keyhelper.js';
12
+ //# sourceMappingURL=index.d.ts.map