@nexustechpro/baileys 2.0.2 → 2.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 (102) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +924 -1299
  3. package/lib/Defaults/baileys-version.json +6 -2
  4. package/lib/Defaults/index.js +172 -172
  5. package/lib/Signal/libsignal.js +380 -292
  6. package/lib/Signal/lid-mapping.js +264 -171
  7. package/lib/Socket/Client/index.js +2 -2
  8. package/lib/Socket/Client/types.js +10 -10
  9. package/lib/Socket/Client/websocket.js +45 -310
  10. package/lib/Socket/business.js +375 -375
  11. package/lib/Socket/chats.js +909 -963
  12. package/lib/Socket/communities.js +430 -430
  13. package/lib/Socket/groups.js +342 -342
  14. package/lib/Socket/index.js +22 -22
  15. package/lib/Socket/messages-recv.js +777 -743
  16. package/lib/Socket/messages-send.js +295 -305
  17. package/lib/Socket/mex.js +50 -50
  18. package/lib/Socket/newsletter.js +148 -148
  19. package/lib/Socket/nexus-handler.js +75 -261
  20. package/lib/Socket/socket.js +709 -1201
  21. package/lib/Store/index.js +5 -5
  22. package/lib/Store/make-cache-manager-store.js +81 -81
  23. package/lib/Store/make-in-memory-store.js +416 -416
  24. package/lib/Store/make-ordered-dictionary.js +81 -81
  25. package/lib/Store/object-repository.js +30 -30
  26. package/lib/Types/Auth.js +1 -1
  27. package/lib/Types/Bussines.js +1 -1
  28. package/lib/Types/Call.js +1 -1
  29. package/lib/Types/Chat.js +7 -7
  30. package/lib/Types/Contact.js +1 -1
  31. package/lib/Types/Events.js +1 -1
  32. package/lib/Types/GroupMetadata.js +1 -1
  33. package/lib/Types/Label.js +24 -24
  34. package/lib/Types/LabelAssociation.js +6 -6
  35. package/lib/Types/Message.js +10 -10
  36. package/lib/Types/Newsletter.js +28 -28
  37. package/lib/Types/Product.js +1 -1
  38. package/lib/Types/Signal.js +1 -1
  39. package/lib/Types/Socket.js +2 -2
  40. package/lib/Types/State.js +12 -12
  41. package/lib/Types/USync.js +1 -1
  42. package/lib/Types/index.js +25 -25
  43. package/lib/Utils/auth-utils.js +264 -256
  44. package/lib/Utils/baileys-event-stream.js +55 -55
  45. package/lib/Utils/browser-utils.js +27 -27
  46. package/lib/Utils/business.js +228 -230
  47. package/lib/Utils/chat-utils.js +694 -764
  48. package/lib/Utils/crypto.js +109 -135
  49. package/lib/Utils/decode-wa-message.js +310 -314
  50. package/lib/Utils/event-buffer.js +547 -547
  51. package/lib/Utils/generics.js +297 -297
  52. package/lib/Utils/history.js +91 -83
  53. package/lib/Utils/index.js +21 -20
  54. package/lib/Utils/key-store.js +17 -0
  55. package/lib/Utils/link-preview.js +97 -98
  56. package/lib/Utils/logger.js +2 -2
  57. package/lib/Utils/lt-hash.js +47 -47
  58. package/lib/Utils/make-mutex.js +39 -39
  59. package/lib/Utils/message-retry-manager.js +148 -148
  60. package/lib/Utils/messages-media.js +534 -534
  61. package/lib/Utils/messages.js +705 -705
  62. package/lib/Utils/noise-handler.js +255 -255
  63. package/lib/Utils/pre-key-manager.js +105 -105
  64. package/lib/Utils/process-message.js +412 -412
  65. package/lib/Utils/signal.js +160 -158
  66. package/lib/Utils/use-multi-file-auth-state.js +120 -120
  67. package/lib/Utils/validate-connection.js +194 -194
  68. package/lib/WABinary/constants.js +1300 -1300
  69. package/lib/WABinary/decode.js +237 -237
  70. package/lib/WABinary/encode.js +232 -232
  71. package/lib/WABinary/generic-utils.js +252 -211
  72. package/lib/WABinary/index.js +5 -5
  73. package/lib/WABinary/jid-utils.js +279 -95
  74. package/lib/WABinary/types.js +1 -1
  75. package/lib/WAM/BinaryInfo.js +9 -9
  76. package/lib/WAM/constants.js +22852 -22852
  77. package/lib/WAM/encode.js +149 -149
  78. package/lib/WAM/index.js +3 -3
  79. package/lib/WAUSync/Protocols/USyncContactProtocol.js +28 -28
  80. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +53 -53
  81. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -26
  82. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +37 -37
  83. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +50 -50
  84. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +28 -28
  85. package/lib/WAUSync/Protocols/index.js +4 -4
  86. package/lib/WAUSync/USyncQuery.js +93 -93
  87. package/lib/WAUSync/USyncUser.js +22 -22
  88. package/lib/WAUSync/index.js +3 -3
  89. package/lib/index.js +66 -66
  90. package/package.json +171 -144
  91. package/lib/Signal/Group/ciphertext-message.js +0 -12
  92. package/lib/Signal/Group/group-session-builder.js +0 -30
  93. package/lib/Signal/Group/group_cipher.js +0 -100
  94. package/lib/Signal/Group/index.js +0 -12
  95. package/lib/Signal/Group/keyhelper.js +0 -18
  96. package/lib/Signal/Group/sender-chain-key.js +0 -26
  97. package/lib/Signal/Group/sender-key-distribution-message.js +0 -63
  98. package/lib/Signal/Group/sender-key-message.js +0 -66
  99. package/lib/Signal/Group/sender-key-name.js +0 -48
  100. package/lib/Signal/Group/sender-key-record.js +0 -41
  101. package/lib/Signal/Group/sender-key-state.js +0 -84
  102. 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,67 @@
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 Buttons • Products • Events • Media │
40
- │ 🔐 End-to-End Encryption • Multi-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
+ 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.5
36
+ │ ⚡ Status: Production Ready │
37
+ ├───────────────────────────────────────────────────────────────────────┤
38
+ │ 🚀 Advanced WhatsApp Web API Client │
39
+ │ ✨ Interactive Buttons • Products • Events • Media │
40
+ │ 🔐 End-to-End Encryption • Multi-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 };
67
67
  export default makeWASocket;