@vanzxy/baileys 1.3.7 → 1.3.8

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.

Potentially problematic release.


This version of @vanzxy/baileys might be problematic. Click here for more details.

Files changed (122) hide show
  1. package/README.md +1 -1
  2. package/WAProto/index.d.ts +9 -0
  3. package/lib/Defaults/index.d.ts +147 -0
  4. package/lib/Defaults/index.js +2 -2
  5. package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
  6. package/lib/Signal/Group/group-session-builder.d.ts +7 -0
  7. package/lib/Signal/Group/group_cipher.d.ts +10 -0
  8. package/lib/Signal/Group/index.d.ts +11 -0
  9. package/lib/Signal/Group/keyhelper.d.ts +6 -0
  10. package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
  11. package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
  12. package/lib/Signal/Group/sender-key-message.d.ts +18 -0
  13. package/lib/Signal/Group/sender-key-name.d.ts +11 -0
  14. package/lib/Signal/Group/sender-key-record.d.ts +12 -0
  15. package/lib/Signal/Group/sender-key-state.d.ts +16 -0
  16. package/lib/Signal/Group/sender-message-key.d.ts +11 -0
  17. package/lib/Signal/libsignal.d.ts +54 -0
  18. package/lib/Signal/lid-mapping.d.ts +20 -0
  19. package/lib/Socket/Client/index.d.ts +2 -0
  20. package/lib/Socket/Client/types.d.ts +5 -0
  21. package/lib/Socket/Client/websocket.d.ts +12 -0
  22. package/lib/Socket/business.d.ts +395 -0
  23. package/lib/Socket/chats.d.ts +136 -0
  24. package/lib/Socket/communities.d.ts +561 -0
  25. package/lib/Socket/communities.js +4 -2
  26. package/lib/Socket/dugong.d.ts +117 -0
  27. package/lib/Socket/dugong.js +26 -1
  28. package/lib/Socket/groups.d.ts +285 -0
  29. package/lib/Socket/index.d.ts +531 -0
  30. package/lib/Socket/messages-recv.d.ts +333 -0
  31. package/lib/Socket/messages-send.d.ts +329 -0
  32. package/lib/Socket/mex.d.ts +1 -0
  33. package/lib/Socket/newsletter.d.ts +281 -0
  34. package/lib/Socket/newsletter.js +19 -19
  35. package/lib/Socket/socket.d.ts +60 -0
  36. package/lib/Store/index.d.ts +3 -0
  37. package/lib/Store/make-in-memory-store.d.ts +62 -0
  38. package/lib/Store/make-ordered-dictionary.d.ts +12 -0
  39. package/lib/Store/object-repository.d.ts +10 -0
  40. package/lib/Types/Auth.d.ts +117 -0
  41. package/lib/Types/Bussines.d.ts +25 -0
  42. package/lib/Types/Call.d.ts +15 -0
  43. package/lib/Types/Chat.d.ts +124 -0
  44. package/lib/Types/Contact.d.ts +26 -0
  45. package/lib/Types/Events.d.ts +256 -0
  46. package/lib/Types/GroupMetadata.d.ts +71 -0
  47. package/lib/Types/Label.d.ts +2 -0
  48. package/lib/Types/LabelAssociation.d.ts +2 -0
  49. package/lib/Types/Message.d.ts +11 -0
  50. package/lib/Types/Mex.d.ts +2 -0
  51. package/lib/Types/Product.d.ts +79 -0
  52. package/lib/Types/RichType.d.ts +2 -0
  53. package/lib/Types/Signal.d.ts +87 -0
  54. package/lib/Types/Socket.d.ts +136 -0
  55. package/lib/Types/State.d.ts +5 -0
  56. package/lib/Types/USync.d.ts +26 -0
  57. package/lib/Types/index.d.ts +66 -0
  58. package/lib/Utils/auth-utils.d.ts +57 -0
  59. package/lib/Utils/browser-utils.d.ts +8 -0
  60. package/lib/Utils/business.d.ts +49 -0
  61. package/lib/Utils/business.js +2 -1
  62. package/lib/Utils/chat-utils.d.ts +407 -0
  63. package/lib/Utils/chat-utils.js +15 -1
  64. package/lib/Utils/companion-reg-client-utils.d.ts +4 -0
  65. package/lib/Utils/crypto.d.ts +41 -0
  66. package/lib/Utils/decode-wa-message.d.ts +83 -0
  67. package/lib/Utils/decode-wa-message.js +1 -3
  68. package/lib/Utils/event-buffer.d.ts +12 -0
  69. package/lib/Utils/generics.d.ts +63 -0
  70. package/lib/Utils/generics.js +2 -4
  71. package/lib/Utils/history.d.ts +90 -0
  72. package/lib/Utils/identity-change-handler.d.ts +13 -0
  73. package/lib/Utils/index.d.ts +24 -0
  74. package/lib/Utils/link-preview.d.ts +12 -0
  75. package/lib/Utils/logger.d.ts +2 -0
  76. package/lib/Utils/lt-hash.d.ts +12 -0
  77. package/lib/Utils/lt-hash.js +21 -2
  78. package/lib/Utils/make-mutex.d.ts +6 -0
  79. package/lib/Utils/message-retry-manager.d.ts +79 -0
  80. package/lib/Utils/messages-media.d.ts +135 -0
  81. package/lib/Utils/messages.d.ts +44 -0
  82. package/lib/Utils/noise-handler.d.ts +20 -0
  83. package/lib/Utils/offline-node-processor.d.ts +9 -0
  84. package/lib/Utils/pre-key-manager.d.ts +25 -0
  85. package/lib/Utils/process-message.d.ts +82 -0
  86. package/lib/Utils/reporting-utils.d.ts +12 -0
  87. package/lib/Utils/rich-message-utils.d.ts +48 -0
  88. package/lib/Utils/signal.d.ts +82 -0
  89. package/lib/Utils/stanza-ack.d.ts +16 -0
  90. package/lib/Utils/sync-action-utils.d.ts +2 -0
  91. package/lib/Utils/tc-token-utils.d.ts +29 -0
  92. package/lib/Utils/use-multi-file-auth-state.d.ts +10 -0
  93. package/lib/Utils/use-single-file-auth-state.d.ts +10 -0
  94. package/lib/Utils/use-single-file-auth-state.js +6 -1
  95. package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
  96. package/lib/Utils/use-sqlite-auth-state.js +12 -0
  97. package/lib/Utils/validate-connection.d.ts +42 -0
  98. package/lib/WABinary/constants.d.ts +61 -0
  99. package/lib/WABinary/decode.d.ts +9 -0
  100. package/lib/WABinary/encode.d.ts +2 -0
  101. package/lib/WABinary/generic-utils.d.ts +74 -0
  102. package/lib/WABinary/index.d.ts +5 -0
  103. package/lib/WABinary/jid-utils.d.ts +28 -0
  104. package/lib/WABinary/types.d.ts +19 -0
  105. package/lib/WAM/BinaryInfo.d.ts +7 -0
  106. package/lib/WAM/constants.d.ts +34926 -0
  107. package/lib/WAM/encode.d.ts +1 -0
  108. package/lib/WAM/index.d.ts +3 -0
  109. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +36 -0
  110. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +29 -0
  111. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
  112. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
  113. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +9 -0
  114. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +38 -0
  115. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +14 -0
  116. package/lib/WAUSync/Protocols/index.d.ts +7 -0
  117. package/lib/WAUSync/USyncQuery.d.ts +20 -0
  118. package/lib/WAUSync/USyncUser.d.ts +16 -0
  119. package/lib/WAUSync/index.d.ts +3 -0
  120. package/lib/index.d.ts +12 -0
  121. package/package.json +12 -7
  122. package/postinstall-banner.js +23 -0
@@ -0,0 +1,82 @@
1
+ export function createSignalIdentity(wid: any, accountSignatureKey: any): {
2
+ identifier: {
3
+ name: any;
4
+ deviceId: number;
5
+ };
6
+ identifierKey: any;
7
+ };
8
+ export function getPreKeys({ get }: {
9
+ get: any;
10
+ }, min: any, limit: any): Promise<any>;
11
+ export function generateOrGetPreKeys(creds: any, range: any): {
12
+ newPreKeys: {};
13
+ lastPreKeyId: number;
14
+ preKeysRange: any[];
15
+ };
16
+ export function xmppSignedPreKey(key: any): {
17
+ tag: string;
18
+ attrs: {};
19
+ content: {
20
+ tag: string;
21
+ attrs: {};
22
+ content: any;
23
+ }[];
24
+ };
25
+ export function xmppPreKey(pair: any, id: any): {
26
+ tag: string;
27
+ attrs: {};
28
+ content: {
29
+ tag: string;
30
+ attrs: {};
31
+ content: any;
32
+ }[];
33
+ };
34
+ export function extractE2ESessionFromRetryReceipt(receipt: any): {
35
+ registrationId: number | undefined;
36
+ identityKey: any;
37
+ signedPreKey: {
38
+ keyId: number | undefined;
39
+ publicKey: any;
40
+ signature: any;
41
+ };
42
+ preKey: {
43
+ keyId: number | undefined;
44
+ publicKey: any;
45
+ } | undefined;
46
+ } | null;
47
+ export function parseAndInjectE2ESessions(node: any, repository: any): Promise<void>;
48
+ export function extractDeviceJids(result: any, myJid: any, myLid: any, excludeZeroDevices: any): {
49
+ user: any;
50
+ device: any;
51
+ domainType: any;
52
+ server: any;
53
+ }[];
54
+ export function getNextPreKeys({ creds, keys }: {
55
+ creds: any;
56
+ keys: any;
57
+ }, count: any): Promise<{
58
+ update: {
59
+ nextPreKeyId: number;
60
+ firstUnuploadedPreKeyId: number;
61
+ };
62
+ preKeys: any;
63
+ }>;
64
+ export function getNextPreKeysNode(state: any, count: any): Promise<{
65
+ update: {
66
+ nextPreKeyId: number;
67
+ firstUnuploadedPreKeyId: number;
68
+ };
69
+ node: {
70
+ tag: string;
71
+ attrs: {
72
+ xmlns: string;
73
+ type: string;
74
+ to: string;
75
+ };
76
+ content: {
77
+ tag: string;
78
+ attrs: {};
79
+ content: any;
80
+ }[];
81
+ };
82
+ }>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Builds an ACK stanza for a received node.
3
+ * Pure function -- no I/O, no side effects.
4
+ *
5
+ * Mirrors WhatsApp Web's ACK construction:
6
+ * - WAWebHandleMsgSendAck.sendAck / sendNack
7
+ * - WAWebCreateNackFromStanza.createNackFromStanza
8
+ */
9
+ export function buildAckStanza(node: any, errorCode: any, meId: any): {
10
+ tag: string;
11
+ attrs: {
12
+ id: any;
13
+ to: any;
14
+ class: any;
15
+ };
16
+ };
@@ -0,0 +1,2 @@
1
+ export function processContactAction(action: any, id: any, logger: any): any[];
2
+ export function emitSyncActionResults(ev: any, results: any): void;
@@ -0,0 +1,29 @@
1
+ /** Read the persisted tctoken JID index and return its entries (never contains the sentinel key itself). */
2
+ export function readTcTokenIndex(keys: any): Promise<any[]>;
3
+ /** Build a SignalDataSet fragment that writes the merged index (persisted ∪ added) under the sentinel key. */
4
+ export function buildMergedTcTokenIndexWrite(keys: any, addedJids: any): Promise<{
5
+ __index: {
6
+ token: any;
7
+ };
8
+ }>;
9
+ export function isTcTokenExpired(timestamp: any): boolean;
10
+ export function shouldSendNewTcToken(senderTimestamp: any): boolean;
11
+ /** Resolve JID to LID for tctoken storage (WA Web stores under LID) */
12
+ export function resolveTcTokenJid(jid: any, getLIDForPN: any): Promise<any>;
13
+ /** Resolve target JID for issuing privacy token based on AB prop 14303 */
14
+ export function resolveIssuanceJid(jid: any, issueToLid: any, getLIDForPN: any, getPNForLID: any): Promise<any>;
15
+ export function buildTcTokenFromJid({ authState, jid, baseContent, getLIDForPN }: {
16
+ authState: any;
17
+ jid: any;
18
+ baseContent?: never[] | undefined;
19
+ getLIDForPN: any;
20
+ }): Promise<any[] | undefined>;
21
+ export function storeTcTokensFromIqResult({ result, fallbackJid, keys, getLIDForPN, onNewJidStored }: {
22
+ result: any;
23
+ fallbackJid: any;
24
+ keys: any;
25
+ getLIDForPN: any;
26
+ onNewJidStored: any;
27
+ }): Promise<void>;
28
+ /** Sentinel key under `tctoken` store holding a JSON array of tracked storage JIDs for cross-session pruning. */
29
+ export const TC_TOKEN_INDEX_KEY: "__index";
@@ -0,0 +1,10 @@
1
+ export function useMultiFileAuthState(folder: any): Promise<{
2
+ state: {
3
+ creds: any;
4
+ keys: {
5
+ get: (type: any, ids: any) => Promise<{}>;
6
+ set: (data: any) => Promise<void>;
7
+ };
8
+ };
9
+ saveCreds: () => Promise<any>;
10
+ }>;
@@ -0,0 +1,10 @@
1
+ export function useSingleFileAuthState(fileName: any): Promise<{
2
+ state: {
3
+ creds: any;
4
+ keys: {
5
+ get: (type: any, ids: any) => {};
6
+ set: (data: any) => void;
7
+ };
8
+ };
9
+ saveCreds: () => void;
10
+ }>;
@@ -5,6 +5,7 @@ import { initAuthCreds } from './auth-utils.js';
5
5
  import { BufferJSON } from './generics.js';
6
6
  import { LRUCache } from 'lru-cache';
7
7
  import { Mutex } from 'async-mutex';
8
+ import defaultLogger from './logger.js';
8
9
  // Lia@Changes 25-03-26 --- Add useSingleFileAuthState with integrated cache
9
10
  const FLUSH_TIMEOUT_MS = 3000;
10
11
  // Lia@Changes 22-04-26 --- Enhanced useSingleFileAuthState with LRUCache
@@ -49,7 +50,11 @@ export const useSingleFileAuthState = async (fileName) => {
49
50
  await writeFile(tempFile, JSON.stringify(fileData, BufferJSON.replacer));
50
51
  await rename(tempFile, fileName);
51
52
  }
52
- catch { }
53
+ catch (err) {
54
+ // Vanz@Fix (bug 58): was silently swallowed — auth session could fail
55
+ // to persist (disk full, permission error, etc.) with zero trace.
56
+ defaultLogger.error({ err, fileName }, 'failed to flush auth state to disk');
57
+ }
53
58
  });
54
59
  }, FLUSH_TIMEOUT_MS);
55
60
  };
@@ -0,0 +1,11 @@
1
+ export function useSqliteAuthState(opts: any): Promise<{
2
+ state: {
3
+ creds: any;
4
+ keys: {
5
+ get: (type: any, ids: any) => Promise<{}>;
6
+ set: (data: any) => Promise<void>;
7
+ };
8
+ };
9
+ saveCreds: () => Promise<void>;
10
+ close: () => Promise<void>;
11
+ }>;
@@ -125,6 +125,18 @@ export async function useSqliteAuthState(opts) {
125
125
  },
126
126
  saveCreds: async () => {
127
127
  persistCreds(creds);
128
+ },
129
+ // Vanz@Fix: release the WAL cleanup interval and (if we opened it ourselves)
130
+ // the underlying db handle. Without this, every useSqliteAuthState() call
131
+ // (e.g. re-pairing / rotating sessions) leaked a timer + open sqlite fd forever.
132
+ close: async () => {
133
+ clearInterval(_walCleanupInterval);
134
+ if (!opts.database) {
135
+ try {
136
+ db.close();
137
+ }
138
+ catch { /* already closed */ }
139
+ }
128
140
  }
129
141
  };
130
142
  }
@@ -0,0 +1,42 @@
1
+ export function generateLoginNode(userJid: any, config: any): any;
2
+ export function generateRegistrationNode({ registrationId, signedPreKey, signedIdentityKey }: {
3
+ registrationId: any;
4
+ signedPreKey: any;
5
+ signedIdentityKey: any;
6
+ }, config: any): any;
7
+ export function configureSuccessfulPairing(stanza: any, { advSecretKey, signedIdentityKey, signalIdentities }: {
8
+ advSecretKey: any;
9
+ signedIdentityKey: any;
10
+ signalIdentities: any;
11
+ }): {
12
+ creds: {
13
+ account: any;
14
+ me: {
15
+ id: any;
16
+ name: any;
17
+ lid: any;
18
+ };
19
+ signalIdentities: any[];
20
+ platform: any;
21
+ };
22
+ reply: {
23
+ tag: string;
24
+ attrs: {
25
+ to: string;
26
+ type: string;
27
+ id: any;
28
+ };
29
+ content: {
30
+ tag: string;
31
+ attrs: {};
32
+ content: {
33
+ tag: string;
34
+ attrs: {
35
+ 'key-index': any;
36
+ };
37
+ content: any;
38
+ }[];
39
+ }[];
40
+ };
41
+ };
42
+ export function encodeSignedDeviceIdentity(account: any, includeSignatureKey: any): any;
@@ -0,0 +1,61 @@
1
+ export namespace TAGS {
2
+ let LIST_EMPTY: number;
3
+ let DICTIONARY_0: number;
4
+ let DICTIONARY_1: number;
5
+ let DICTIONARY_2: number;
6
+ let DICTIONARY_3: number;
7
+ let INTEROP_JID: number;
8
+ let FB_JID: number;
9
+ let AD_JID: number;
10
+ let LIST_8: number;
11
+ let LIST_16: number;
12
+ let JID_PAIR: number;
13
+ let HEX_8: number;
14
+ let BINARY_8: number;
15
+ let BINARY_20: number;
16
+ let BINARY_32: number;
17
+ let NIBBLE_8: number;
18
+ let PACKED_MAX: number;
19
+ }
20
+ export const DOUBLE_BYTE_TOKENS: string[][];
21
+ export const SINGLE_BYTE_TOKENS: string[];
22
+ export const TOKEN_MAP: {};
23
+ export const CPP_KEYWORDS: Set<string>;
24
+ export const CSS_KEYWORDS: Set<string>;
25
+ export const GO_KEYWORDS: Set<string>;
26
+ export const HTML_KEYWORDS: Set<string>;
27
+ export const JS_KEYWORDS: Set<string>;
28
+ export const PYTHON_KEYWORDS: Set<string>;
29
+ export const RUST_KEYWORDS: Set<string>;
30
+ export const C_KEYWORDS: Set<string>;
31
+ export const CSHARP_KEYWORDS: Set<string>;
32
+ export const BASH_KEYWORDS: Set<string>;
33
+ export const CMD_KEYWORDS: Set<string>;
34
+ export const POWERSHELL_KEYWORDS: Set<string>;
35
+ export const LANGUAGE_KEYWORDS: {
36
+ css: Set<string>;
37
+ html: Set<string>;
38
+ javascript: Set<string>;
39
+ typescript: Set<string>;
40
+ js: Set<string>;
41
+ ts: Set<string>;
42
+ python: Set<string>;
43
+ py: Set<string>;
44
+ go: Set<string>;
45
+ golang: Set<string>;
46
+ cpp: Set<string>;
47
+ 'c++': Set<string>;
48
+ rust: Set<string>;
49
+ rs: Set<string>;
50
+ c: Set<string>;
51
+ h: Set<string>;
52
+ csharp: Set<string>;
53
+ cs: Set<string>;
54
+ bash: Set<string>;
55
+ sh: Set<string>;
56
+ zsh: Set<string>;
57
+ cmd: Set<string>;
58
+ bat: Set<string>;
59
+ powershell: Set<string>;
60
+ ps1: Set<string>;
61
+ };
@@ -0,0 +1,9 @@
1
+ export function decompressingIfRequired(buffer: any): Promise<any>;
2
+ export function decodeDecompressedBinaryNode(buffer: any, opts: any, indexRef?: {
3
+ index: number;
4
+ }): {
5
+ tag: any;
6
+ attrs: {};
7
+ content: any;
8
+ };
9
+ export function decodeBinaryNode(buff: any): Promise<any>;
@@ -0,0 +1,2 @@
1
+ export function encodeBinaryNode(node: any, opts?: typeof constants, buffer?: number[]): any;
2
+ import * as constants from './constants.js';
@@ -0,0 +1,74 @@
1
+ export function binaryNodeToString(node: any, i?: number): any;
2
+ export function getBinaryNodeChildren(node: any, childTag: any): any;
3
+ export function getBinaryNodeChild(node: any, childTag: any): any;
4
+ export function getAllBinaryNodeChildren({ content }: {
5
+ content: any;
6
+ }): any[];
7
+ export function getBinaryNodeChildBuffer(node: any, childTag: any): any;
8
+ export function getBinaryNodeChildString(node: any, childTag: any): any;
9
+ export function getBinaryNodeChildUInt(node: any, childTag: any, length: any): number | undefined;
10
+ export function assertNodeErrorFree(node: any): void;
11
+ export function reduceBinaryNodeToDictionary(node: any, tag: any): any;
12
+ export function getBinaryNodeMessages({ content }: {
13
+ content: any;
14
+ }): any[];
15
+ export function getBizBinaryNode(message: any): {
16
+ tag: string;
17
+ attrs: {
18
+ actual_actors: string;
19
+ host_storage: string;
20
+ privacy_mode_ts: string;
21
+ };
22
+ content: ({
23
+ tag: string;
24
+ attrs: {
25
+ decision_id: any;
26
+ source_type: string;
27
+ };
28
+ content: {
29
+ tag: string;
30
+ attrs: {
31
+ value: string;
32
+ };
33
+ }[];
34
+ } | {
35
+ tag: string;
36
+ attrs: {
37
+ type: string;
38
+ v: string;
39
+ };
40
+ content: {
41
+ tag: string;
42
+ attrs: {
43
+ v: string;
44
+ name: any;
45
+ };
46
+ }[];
47
+ })[];
48
+ } | {
49
+ tag: string;
50
+ attrs: {
51
+ actual_actors: string;
52
+ host_storage: string;
53
+ privacy_mode_ts: string;
54
+ };
55
+ content: ({
56
+ tag: string;
57
+ attrs: {
58
+ decision_id: any;
59
+ source_type: string;
60
+ };
61
+ content: {
62
+ tag: string;
63
+ attrs: {
64
+ value: string;
65
+ };
66
+ }[];
67
+ } | {
68
+ tag: string;
69
+ attrs: {
70
+ v: string;
71
+ type: string;
72
+ };
73
+ })[];
74
+ };
@@ -0,0 +1,5 @@
1
+ export * from "./encode.js";
2
+ export * from "./decode.js";
3
+ export * from "./generic-utils.js";
4
+ export * from "./jid-utils.js";
5
+ export * from "./types.js";
@@ -0,0 +1,28 @@
1
+ export const S_WHATSAPP_NET: "@s.whatsapp.net";
2
+ export const OFFICIAL_BIZ_JID: "16505361212@c.us";
3
+ export const SERVER_JID: "server@c.us";
4
+ export const PSA_WID: "0@c.us";
5
+ export const STORIES_JID: "status@broadcast";
6
+ export const META_AI_JID: "13135550002@c.us";
7
+ export const WAJIDDomains: any;
8
+ export function getServerFromDomainType(initialServer: any, domainType: any): any;
9
+ export function jidEncode(user: any, server: any, device: any, agent: any): string;
10
+ export function jidDecode(jid: any): {
11
+ server: any;
12
+ user: any;
13
+ domainType: any;
14
+ device: number | undefined;
15
+ } | undefined;
16
+ export function areJidsSameUser(jid1: any, jid2: any): boolean;
17
+ export function isJidMetaAI(jid: any): any;
18
+ export function isPnUser(jid: any): any;
19
+ export function isLidUser(jid: any): any;
20
+ export function isJidBroadcast(jid: any): any;
21
+ export function isJidGroup(jid: any): any;
22
+ export function isJidStatusBroadcast(jid: any): boolean;
23
+ export function isJidNewsletter(jid: any): any;
24
+ export function isHostedPnUser(jid: any): any;
25
+ export function isHostedLidUser(jid: any): any;
26
+ export function isJidBot(jid: any): any;
27
+ export function jidNormalizedUser(jid: any): string;
28
+ export function transferDevice(fromJid: any, toJid: any): string;
@@ -0,0 +1,19 @@
1
+ import * as constants from './constants.js';
2
+ /**
3
+ * the binary node WA uses internally for communication
4
+ *
5
+ * this is manipulated soley as an object and it does not have any functions.
6
+ * This is done for easy serialization, to prevent running into issues with prototypes &
7
+ * to maintain functional code structure
8
+ * */
9
+ export type BinaryNode = {
10
+ tag: string;
11
+ attrs: {
12
+ [key: string]: string;
13
+ };
14
+ content?: BinaryNode[] | string | Uint8Array;
15
+ };
16
+ export type BinaryNodeAttributes = BinaryNode['attrs'];
17
+ export type BinaryNodeData = BinaryNode['content'];
18
+ export type BinaryNodeCodingOptions = typeof constants;
19
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,7 @@
1
+ export class BinaryInfo {
2
+ constructor(options?: {});
3
+ protocolVersion: number;
4
+ sequence: number;
5
+ events: any[];
6
+ buffer: any[];
7
+ }