@nexustechpro/baileys 2.0.2 → 2.0.6

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 (108) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +924 -1299
  3. package/WAProto/index.js +22 -18
  4. package/lib/Defaults/baileys-version.json +6 -2
  5. package/lib/Defaults/index.js +173 -172
  6. package/lib/Signal/libsignal.js +395 -292
  7. package/lib/Signal/lid-mapping.js +264 -171
  8. package/lib/Socket/Client/index.js +2 -2
  9. package/lib/Socket/Client/types.js +10 -10
  10. package/lib/Socket/Client/websocket.js +45 -310
  11. package/lib/Socket/business.js +375 -375
  12. package/lib/Socket/chats.js +916 -963
  13. package/lib/Socket/communities.js +430 -430
  14. package/lib/Socket/groups.js +342 -342
  15. package/lib/Socket/index.js +21 -22
  16. package/lib/Socket/messages-recv.js +963 -743
  17. package/lib/Socket/messages-send.js +273 -321
  18. package/lib/Socket/mex.js +50 -50
  19. package/lib/Socket/newsletter.js +148 -148
  20. package/lib/Socket/nexus-handler.js +296 -247
  21. package/lib/Socket/registration.js +50 -33
  22. package/lib/Socket/socket.js +872 -1201
  23. package/lib/Store/index.js +5 -5
  24. package/lib/Store/make-cache-manager-store.js +81 -81
  25. package/lib/Store/make-in-memory-store.js +416 -416
  26. package/lib/Store/make-ordered-dictionary.js +81 -81
  27. package/lib/Store/object-repository.js +30 -30
  28. package/lib/Types/Auth.js +1 -1
  29. package/lib/Types/Bussines.js +1 -1
  30. package/lib/Types/Call.js +1 -1
  31. package/lib/Types/Chat.js +7 -7
  32. package/lib/Types/Contact.js +1 -1
  33. package/lib/Types/Events.js +1 -1
  34. package/lib/Types/GroupMetadata.js +1 -1
  35. package/lib/Types/Label.js +24 -24
  36. package/lib/Types/LabelAssociation.js +6 -6
  37. package/lib/Types/Message.js +10 -10
  38. package/lib/Types/Newsletter.js +37 -29
  39. package/lib/Types/Product.js +1 -1
  40. package/lib/Types/Signal.js +1 -1
  41. package/lib/Types/Socket.js +2 -2
  42. package/lib/Types/State.js +55 -12
  43. package/lib/Types/USync.js +1 -1
  44. package/lib/Types/index.js +25 -25
  45. package/lib/Utils/auth-utils.js +264 -256
  46. package/lib/Utils/baileys-event-stream.js +55 -55
  47. package/lib/Utils/browser-utils.js +27 -27
  48. package/lib/Utils/business.js +228 -230
  49. package/lib/Utils/chat-utils.js +726 -764
  50. package/lib/Utils/companion-reg-client-utils.js +34 -0
  51. package/lib/Utils/crypto.js +109 -135
  52. package/lib/Utils/decode-wa-message.js +342 -314
  53. package/lib/Utils/event-buffer.js +547 -547
  54. package/lib/Utils/generics.js +295 -297
  55. package/lib/Utils/history.js +91 -83
  56. package/lib/Utils/index.js +25 -20
  57. package/lib/Utils/key-store.js +17 -0
  58. package/lib/Utils/link-preview.js +107 -98
  59. package/lib/Utils/logger.js +2 -2
  60. package/lib/Utils/lt-hash.js +47 -47
  61. package/lib/Utils/make-mutex.js +39 -39
  62. package/lib/Utils/message-retry-manager.js +148 -148
  63. package/lib/Utils/messages-media.js +579 -535
  64. package/lib/Utils/messages.js +821 -706
  65. package/lib/Utils/noise-handler.js +255 -255
  66. package/lib/Utils/pre-key-manager.js +105 -105
  67. package/lib/Utils/process-message.js +430 -412
  68. package/lib/Utils/reporting-utils.js +155 -0
  69. package/lib/Utils/signal.js +191 -159
  70. package/lib/Utils/sync-action-utils.js +33 -0
  71. package/lib/Utils/tc-token-utils.js +162 -0
  72. package/lib/Utils/use-multi-file-auth-state.js +120 -120
  73. package/lib/Utils/validate-connection.js +194 -194
  74. package/lib/WABinary/constants.js +1306 -1300
  75. package/lib/WABinary/decode.js +237 -237
  76. package/lib/WABinary/encode.js +232 -232
  77. package/lib/WABinary/generic-utils.js +252 -211
  78. package/lib/WABinary/index.js +6 -5
  79. package/lib/WABinary/jid-utils.js +279 -95
  80. package/lib/WABinary/types.js +1 -1
  81. package/lib/WAM/BinaryInfo.js +9 -9
  82. package/lib/WAM/constants.js +22852 -22852
  83. package/lib/WAM/encode.js +149 -149
  84. package/lib/WAM/index.js +3 -3
  85. package/lib/WAUSync/Protocols/USyncContactProtocol.js +28 -28
  86. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +53 -53
  87. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -26
  88. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +37 -37
  89. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +50 -50
  90. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +28 -28
  91. package/lib/WAUSync/Protocols/index.js +4 -4
  92. package/lib/WAUSync/USyncQuery.js +93 -93
  93. package/lib/WAUSync/USyncUser.js +22 -22
  94. package/lib/WAUSync/index.js +3 -3
  95. package/lib/index.js +65 -66
  96. package/package.json +172 -143
  97. package/lib/Signal/Group/ciphertext-message.js +0 -12
  98. package/lib/Signal/Group/group-session-builder.js +0 -30
  99. package/lib/Signal/Group/group_cipher.js +0 -100
  100. package/lib/Signal/Group/index.js +0 -12
  101. package/lib/Signal/Group/keyhelper.js +0 -18
  102. package/lib/Signal/Group/sender-chain-key.js +0 -26
  103. package/lib/Signal/Group/sender-key-distribution-message.js +0 -63
  104. package/lib/Signal/Group/sender-key-message.js +0 -66
  105. package/lib/Signal/Group/sender-key-name.js +0 -48
  106. package/lib/Signal/Group/sender-key-record.js +0 -41
  107. package/lib/Signal/Group/sender-key-state.js +0 -84
  108. package/lib/Signal/Group/sender-message-key.js +0 -26
@@ -1,51 +1,51 @@
1
- import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../../WABinary/index.js';
2
- import { USyncUser } from '../USyncUser.js';
3
- export class USyncBotProfileProtocol {
4
- constructor() {
5
- this.name = 'bot';
6
- }
7
- getQueryElement() {
8
- return {
9
- tag: 'bot',
10
- attrs: {},
11
- content: [{ tag: 'profile', attrs: { v: '1' } }]
12
- };
13
- }
14
- getUserElement(user) {
15
- return {
16
- tag: 'bot',
17
- attrs: {},
18
- content: [{ tag: 'profile', attrs: { persona_id: user.personaId } }]
19
- };
20
- }
21
- parser(node) {
22
- const botNode = getBinaryNodeChild(node, 'bot');
23
- const profile = getBinaryNodeChild(botNode, 'profile');
24
- const commandsNode = getBinaryNodeChild(profile, 'commands');
25
- const promptsNode = getBinaryNodeChild(profile, 'prompts');
26
- const commands = [];
27
- const prompts = [];
28
- for (const command of getBinaryNodeChildren(commandsNode, 'command')) {
29
- commands.push({
30
- name: getBinaryNodeChildString(command, 'name'),
31
- description: getBinaryNodeChildString(command, 'description')
32
- });
33
- }
34
- for (const prompt of getBinaryNodeChildren(promptsNode, 'prompt')) {
35
- prompts.push(`${getBinaryNodeChildString(prompt, 'emoji')} ${getBinaryNodeChildString(prompt, 'text')}`);
36
- }
37
- return {
38
- isDefault: !!getBinaryNodeChild(profile, 'default'),
39
- jid: node.attrs.jid,
40
- name: getBinaryNodeChildString(profile, 'name'),
41
- attributes: getBinaryNodeChildString(profile, 'attributes'),
42
- description: getBinaryNodeChildString(profile, 'description'),
43
- category: getBinaryNodeChildString(profile, 'category'),
44
- personaId: profile.attrs['persona_id'],
45
- commandsDescription: getBinaryNodeChildString(commandsNode, 'description'),
46
- commands,
47
- prompts
48
- };
49
- }
50
- }
1
+ import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../../WABinary/index.js';
2
+ import { USyncUser } from '../USyncUser.js';
3
+ export class USyncBotProfileProtocol {
4
+ constructor() {
5
+ this.name = 'bot';
6
+ }
7
+ getQueryElement() {
8
+ return {
9
+ tag: 'bot',
10
+ attrs: {},
11
+ content: [{ tag: 'profile', attrs: { v: '1' } }]
12
+ };
13
+ }
14
+ getUserElement(user) {
15
+ return {
16
+ tag: 'bot',
17
+ attrs: {},
18
+ content: [{ tag: 'profile', attrs: { persona_id: user.personaId } }]
19
+ };
20
+ }
21
+ parser(node) {
22
+ const botNode = getBinaryNodeChild(node, 'bot');
23
+ const profile = getBinaryNodeChild(botNode, 'profile');
24
+ const commandsNode = getBinaryNodeChild(profile, 'commands');
25
+ const promptsNode = getBinaryNodeChild(profile, 'prompts');
26
+ const commands = [];
27
+ const prompts = [];
28
+ for (const command of getBinaryNodeChildren(commandsNode, 'command')) {
29
+ commands.push({
30
+ name: getBinaryNodeChildString(command, 'name'),
31
+ description: getBinaryNodeChildString(command, 'description')
32
+ });
33
+ }
34
+ for (const prompt of getBinaryNodeChildren(promptsNode, 'prompt')) {
35
+ prompts.push(`${getBinaryNodeChildString(prompt, 'emoji')} ${getBinaryNodeChildString(prompt, 'text')}`);
36
+ }
37
+ return {
38
+ isDefault: !!getBinaryNodeChild(profile, 'default'),
39
+ jid: node.attrs.jid,
40
+ name: getBinaryNodeChildString(profile, 'name'),
41
+ attributes: getBinaryNodeChildString(profile, 'attributes'),
42
+ description: getBinaryNodeChildString(profile, 'description'),
43
+ category: getBinaryNodeChildString(profile, 'category'),
44
+ personaId: profile.attrs['persona_id'],
45
+ commandsDescription: getBinaryNodeChildString(commandsNode, 'description'),
46
+ commands,
47
+ prompts
48
+ };
49
+ }
50
+ }
51
51
  //# sourceMappingURL=UsyncBotProfileProtocol.js.map
@@ -1,29 +1,29 @@
1
- export class USyncLIDProtocol {
2
- constructor() {
3
- this.name = 'lid';
4
- }
5
- getQueryElement() {
6
- return {
7
- tag: 'lid',
8
- attrs: {}
9
- };
10
- }
11
- getUserElement(user) {
12
- if (user.lid) {
13
- return {
14
- tag: 'lid',
15
- attrs: { jid: user.lid }
16
- };
17
- }
18
- else {
19
- return null;
20
- }
21
- }
22
- parser(node) {
23
- if (node.tag === 'lid') {
24
- return node.attrs.val;
25
- }
26
- return null;
27
- }
28
- }
1
+ export class USyncLIDProtocol {
2
+ constructor() {
3
+ this.name = 'lid';
4
+ }
5
+ getQueryElement() {
6
+ return {
7
+ tag: 'lid',
8
+ attrs: {}
9
+ };
10
+ }
11
+ getUserElement(user) {
12
+ if (user.lid) {
13
+ return {
14
+ tag: 'lid',
15
+ attrs: { jid: user.lid }
16
+ };
17
+ }
18
+ else {
19
+ return null;
20
+ }
21
+ }
22
+ parser(node) {
23
+ if (node.tag === 'lid') {
24
+ return node.attrs.val;
25
+ }
26
+ return null;
27
+ }
28
+ }
29
29
  //# sourceMappingURL=UsyncLIDProtocol.js.map
@@ -1,5 +1,5 @@
1
- export * from './USyncDeviceProtocol.js';
2
- export * from './USyncContactProtocol.js';
3
- export * from './USyncStatusProtocol.js';
4
- export * from './USyncDisappearingModeProtocol.js';
1
+ export * from './USyncDeviceProtocol.js';
2
+ export * from './USyncContactProtocol.js';
3
+ export * from './USyncStatusProtocol.js';
4
+ export * from './USyncDisappearingModeProtocol.js';
5
5
  //# sourceMappingURL=index.js.map
@@ -1,94 +1,94 @@
1
- import { getBinaryNodeChild } from '../WABinary/index.js';
2
- import { USyncBotProfileProtocol } from './Protocols/UsyncBotProfileProtocol.js';
3
- import { USyncLIDProtocol } from './Protocols/UsyncLIDProtocol.js';
4
- import { USyncContactProtocol, USyncDeviceProtocol, USyncDisappearingModeProtocol, USyncStatusProtocol } from './Protocols/index.js';
5
- import { USyncUser } from './USyncUser.js';
6
- export class USyncQuery {
7
- constructor() {
8
- this.protocols = [];
9
- this.users = [];
10
- this.context = 'interactive';
11
- this.mode = 'query';
12
- }
13
- withMode(mode) {
14
- this.mode = mode;
15
- return this;
16
- }
17
- withContext(context) {
18
- this.context = context;
19
- return this;
20
- }
21
- withUser(user) {
22
- this.users.push(user);
23
- return this;
24
- }
25
- parseUSyncQueryResult(result) {
26
- if (!result || result.attrs.type !== 'result') {
27
- return;
28
- }
29
- const protocolMap = Object.fromEntries(this.protocols.map(protocol => {
30
- return [protocol.name, protocol.parser];
31
- }));
32
- const queryResult = {
33
- // TODO: implement errors etc.
34
- list: [],
35
- sideList: []
36
- };
37
- const usyncNode = getBinaryNodeChild(result, 'usync');
38
- //TODO: implement error backoff, refresh etc.
39
- //TODO: see if there are any errors in the result node
40
- //const resultNode = getBinaryNodeChild(usyncNode, 'result')
41
- const listNode = usyncNode ? getBinaryNodeChild(usyncNode, 'list') : undefined;
42
- if (listNode?.content && Array.isArray(listNode.content)) {
43
- queryResult.list = listNode.content.reduce((acc, node) => {
44
- const id = node?.attrs.jid;
45
- if (id) {
46
- const data = Array.isArray(node?.content)
47
- ? Object.fromEntries(node.content
48
- .map(content => {
49
- const protocol = content.tag;
50
- const parser = protocolMap[protocol];
51
- if (parser) {
52
- return [protocol, parser(content)];
53
- }
54
- else {
55
- return [protocol, null];
56
- }
57
- })
58
- .filter(([, b]) => b !== null))
59
- : {};
60
- acc.push({ ...data, id });
61
- }
62
- return acc;
63
- }, []);
64
- }
65
- //TODO: implement side list
66
- //const sideListNode = getBinaryNodeChild(usyncNode, 'side_list')
67
- return queryResult;
68
- }
69
- withDeviceProtocol() {
70
- this.protocols.push(new USyncDeviceProtocol());
71
- return this;
72
- }
73
- withContactProtocol() {
74
- this.protocols.push(new USyncContactProtocol());
75
- return this;
76
- }
77
- withStatusProtocol() {
78
- this.protocols.push(new USyncStatusProtocol());
79
- return this;
80
- }
81
- withDisappearingModeProtocol() {
82
- this.protocols.push(new USyncDisappearingModeProtocol());
83
- return this;
84
- }
85
- withBotProfileProtocol() {
86
- this.protocols.push(new USyncBotProfileProtocol());
87
- return this;
88
- }
89
- withLIDProtocol() {
90
- this.protocols.push(new USyncLIDProtocol());
91
- return this;
92
- }
93
- }
1
+ import { getBinaryNodeChild } from '../WABinary/index.js';
2
+ import { USyncBotProfileProtocol } from './Protocols/UsyncBotProfileProtocol.js';
3
+ import { USyncLIDProtocol } from './Protocols/UsyncLIDProtocol.js';
4
+ import { USyncContactProtocol, USyncDeviceProtocol, USyncDisappearingModeProtocol, USyncStatusProtocol } from './Protocols/index.js';
5
+ import { USyncUser } from './USyncUser.js';
6
+ export class USyncQuery {
7
+ constructor() {
8
+ this.protocols = [];
9
+ this.users = [];
10
+ this.context = 'interactive';
11
+ this.mode = 'query';
12
+ }
13
+ withMode(mode) {
14
+ this.mode = mode;
15
+ return this;
16
+ }
17
+ withContext(context) {
18
+ this.context = context;
19
+ return this;
20
+ }
21
+ withUser(user) {
22
+ this.users.push(user);
23
+ return this;
24
+ }
25
+ parseUSyncQueryResult(result) {
26
+ if (!result || result.attrs.type !== 'result') {
27
+ return;
28
+ }
29
+ const protocolMap = Object.fromEntries(this.protocols.map(protocol => {
30
+ return [protocol.name, protocol.parser];
31
+ }));
32
+ const queryResult = {
33
+ // TODO: implement errors etc.
34
+ list: [],
35
+ sideList: []
36
+ };
37
+ const usyncNode = getBinaryNodeChild(result, 'usync');
38
+ //TODO: implement error backoff, refresh etc.
39
+ //TODO: see if there are any errors in the result node
40
+ //const resultNode = getBinaryNodeChild(usyncNode, 'result')
41
+ const listNode = usyncNode ? getBinaryNodeChild(usyncNode, 'list') : undefined;
42
+ if (listNode?.content && Array.isArray(listNode.content)) {
43
+ queryResult.list = listNode.content.reduce((acc, node) => {
44
+ const id = node?.attrs.jid;
45
+ if (id) {
46
+ const data = Array.isArray(node?.content)
47
+ ? Object.fromEntries(node.content
48
+ .map(content => {
49
+ const protocol = content.tag;
50
+ const parser = protocolMap[protocol];
51
+ if (parser) {
52
+ return [protocol, parser(content)];
53
+ }
54
+ else {
55
+ return [protocol, null];
56
+ }
57
+ })
58
+ .filter(([, b]) => b !== null))
59
+ : {};
60
+ acc.push({ ...data, id });
61
+ }
62
+ return acc;
63
+ }, []);
64
+ }
65
+ //TODO: implement side list
66
+ //const sideListNode = getBinaryNodeChild(usyncNode, 'side_list')
67
+ return queryResult;
68
+ }
69
+ withDeviceProtocol() {
70
+ this.protocols.push(new USyncDeviceProtocol());
71
+ return this;
72
+ }
73
+ withContactProtocol() {
74
+ this.protocols.push(new USyncContactProtocol());
75
+ return this;
76
+ }
77
+ withStatusProtocol() {
78
+ this.protocols.push(new USyncStatusProtocol());
79
+ return this;
80
+ }
81
+ withDisappearingModeProtocol() {
82
+ this.protocols.push(new USyncDisappearingModeProtocol());
83
+ return this;
84
+ }
85
+ withBotProfileProtocol() {
86
+ this.protocols.push(new USyncBotProfileProtocol());
87
+ return this;
88
+ }
89
+ withLIDProtocol() {
90
+ this.protocols.push(new USyncLIDProtocol());
91
+ return this;
92
+ }
93
+ }
94
94
  //# sourceMappingURL=USyncQuery.js.map
@@ -1,23 +1,23 @@
1
- export class USyncUser {
2
- withId(id) {
3
- this.id = id;
4
- return this;
5
- }
6
- withLid(lid) {
7
- this.lid = lid;
8
- return this;
9
- }
10
- withPhone(phone) {
11
- this.phone = phone;
12
- return this;
13
- }
14
- withType(type) {
15
- this.type = type;
16
- return this;
17
- }
18
- withPersonaId(personaId) {
19
- this.personaId = personaId;
20
- return this;
21
- }
22
- }
1
+ export class USyncUser {
2
+ withId(id) {
3
+ this.id = id;
4
+ return this;
5
+ }
6
+ withLid(lid) {
7
+ this.lid = lid;
8
+ return this;
9
+ }
10
+ withPhone(phone) {
11
+ this.phone = phone;
12
+ return this;
13
+ }
14
+ withType(type) {
15
+ this.type = type;
16
+ return this;
17
+ }
18
+ withPersonaId(personaId) {
19
+ this.personaId = personaId;
20
+ return this;
21
+ }
22
+ }
23
23
  //# sourceMappingURL=USyncUser.js.map
@@ -1,4 +1,4 @@
1
- export * from './Protocols/index.js';
2
- export * from './USyncQuery.js';
3
- export * from './USyncUser.js';
1
+ export * from './Protocols/index.js';
2
+ export * from './USyncQuery.js';
3
+ export * from './USyncUser.js';
4
4
  //# sourceMappingURL=index.js.map
package/lib/index.js CHANGED
@@ -1,67 +1,66 @@
1
- "use strict";
2
- import gradient from 'gradient-string';
3
- import makeWASocket from './Socket/index.js';
4
- import NexusHandler from './Socket/nexus-handler.js';
5
- const banner = `
6
- ╔══════════════════════════════════════════════════════════════════╗
7
-
8
- ███╗ ██╗███████╗██╗ ██╗██╗ ██╗███████╗
9
- ████╗ ██║██╔════╝╚██╗██╔╝██║ ██║██╔════╝
10
- ║ ██╔██╗ ██║█████╗ ╚███╔╝ ██║ ██║███████╗
11
- ██║╚██╗██║██╔══╝ ██╔██╗ ██║ ██║╚════██║
12
- ██║ ╚████║███████╗██╔╝ ██╗╚██████╔╝███████║
13
- ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝
14
-
15
- ████████╗███████╗ ██████╗██╗ ██╗
16
- ╚══██╔══╝██╔════╝██╔════╝██║ ██║ ║
17
- ║ ██║ █████╗ ██║ ███████║
18
- ║ ██║ ██╔══╝ ██║ ██╔══██║
19
- ██║ ███████╗╚██████╗██║ ██║
20
- ╚═╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝
21
-
22
- ██████╗ ██████╗ ██████╗
23
- ██╔══██╗██╔══██╗██╔═══██╗
24
- ██████╔╝██████╔╝██║ ██║ ║
25
- ██╔═══╝ ██╔══██╗██║ ██║ ║
26
- ██║ ██║ ██║╚██████╔╝
27
- ╚═╝ ╚═╝ ╚═╝ ╚═════╝
28
- ║ ║
29
- ╚══════════════════════════════════════════════════════════════════╝
30
- `;
31
-
32
- const info = `
33
- ┌───────────────────────────────────────────────────────────────────────┐
34
- 📦 Package: @nexustechpro/baileys
35
- 🔖 Version: 2.0.2
36
- │ ⚡ Status: Production Ready │
37
- ├───────────────────────────────────────────────────────────────────────┤
38
- 🚀 Advanced WhatsApp Web API Client
39
- Interactive ButtonsProducts • Events • Media
40
- 🔐 End-to-End EncryptionMulti-Device Support
41
- │ 📱 Business API • Channels • Status Updates │
42
- ├───────────────────────────────────────────────────────────────────────┤
43
- 💡 Built by NexusTech Pro Team
44
- 📚 Docs: github.com/nexustechpro2/baileys
45
- │ 💬 Support: Join our community for updates & assistance │
46
- └───────────────────────────────────────────────────────────────────────┘
47
- `;
48
-
49
- // Print banner with gradient
50
- console.log(gradient(['#00D4FF', '#0099FF', '#00D4FF'])(banner));
51
-
52
- // Print info with gradient
53
- console.log(gradient(['#FFD700', '#FF6B6B', '#4ECDC4'])(info));
54
-
55
- // Startup message
56
- console.log(gradient(['#00FF88', '#FFFFFF'])('\n🎯 Initializing Baileys Socket Connection...\n'));
57
-
58
- export * from '../WAProto/index.js';
59
- export * from './Utils/index.js';
60
- export * from './Store/index.js';
61
- export * from './Types/index.js';
62
- export * from './Defaults/index.js';
63
- export * from './WABinary/index.js';
64
- export * from './WAM/index.js';
65
- export * from './WAUSync/index.js';
66
- export { NexusHandler, makeWASocket };
1
+ "use strict";
2
+ import gradient from 'gradient-string';
3
+ import makeWASocket from './Socket/index.js';
4
+ const banner = `
5
+ ╔══════════════════════════════════════════════════════════════════╗
6
+ ║ ║
7
+ ███╗ ██╗███████╗██╗ ██╗██╗ ██╗███████╗
8
+ ████╗ ██║██╔════╝╚██╗██╔╝██║ ██║██╔════╝
9
+ ██╔██╗ ██║█████╗ ╚███╔╝ ██║ ██║███████╗
10
+ ██║╚██╗██║██╔══╝ ██╔██╗ ██║ ██║╚════██║
11
+ ██║ ╚████║███████╗██╔╝ ██╗╚██████╔╝███████║
12
+ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝
13
+
14
+ ████████╗███████╗ ██████╗██╗ ██╗
15
+ ╚══██╔══╝██╔════╝██╔════╝██║ ██║
16
+ ██║ █████╗ ██║ ███████║
17
+ ║ ██║ ██╔══╝ ██║ ██╔══██║
18
+ ║ ██║ ███████╗╚██████╗██║ ██║ ║
19
+ ╚═╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝
20
+
21
+ ██████╗ ██████╗ ██████╗
22
+ ██╔══██╗██╔══██╗██╔═══██╗
23
+ ██████╔╝██████╔╝██║ ██║
24
+ ██╔═══╝ ██╔══██╗██║ ██║ ║
25
+ ║ ██║ ██║ ██║╚██████╔╝
26
+ ╚═╝ ╚═╝ ╚═╝ ╚═════╝
27
+
28
+ ╚══════════════════════════════════════════════════════════════════╝
29
+ `;
30
+
31
+ const info = `
32
+ ┌───────────────────────────────────────────────────────────────────────┐
33
+ │ 📦 Package: @nexustechpro/baileys │
34
+ 🔖 Version: 2.0.6
35
+ Status: Production Ready
36
+ ├───────────────────────────────────────────────────────────────────────┤
37
+ │ 🚀 Advanced WhatsApp Web API Client │
38
+ Interactive Buttons Products • Events • Media
39
+ 🔐 End-to-End EncryptionMulti-Device Support
40
+ 📱 Business APIChannels • Status Updates
41
+ ├───────────────────────────────────────────────────────────────────────┤
42
+ │ 💡 Built by NexusTech Pro Team │
43
+ 📚 Docs: github.com/nexustechpro2/baileys
44
+ 💬 Support: Join our community for updates & assistance
45
+ └───────────────────────────────────────────────────────────────────────┘
46
+ `;
47
+
48
+ // Print banner with gradient
49
+ console.log(gradient(['#00D4FF', '#0099FF', '#00D4FF'])(banner));
50
+
51
+ // Print info with gradient
52
+ console.log(gradient(['#FFD700', '#FF6B6B', '#4ECDC4'])(info));
53
+
54
+ // Startup message
55
+ console.log(gradient(['#00FF88', '#FFFFFF'])('\n🎯 Initializing Baileys Socket Connection...\n'));
56
+
57
+ export * from '../WAProto/index.js';
58
+ export * from './Utils/index.js';
59
+ export * from './Store/index.js';
60
+ export * from './Types/index.js';
61
+ export * from './Defaults/index.js';
62
+ export * from './WABinary/index.js';
63
+ export * from './WAM/index.js';
64
+ export * from './WAUSync/index.js';
65
+ export * from './Socket/index.js';
67
66
  export default makeWASocket;