gifted-baileys 1.5.6 → 1.5.7
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.
- package/README.md +9 -0
- package/WAProto/WAProto.proto +969 -88
- package/WAProto/index.d.ts +13199 -1260
- package/WAProto/index.js +124901 -74525
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/index.d.ts +284 -0
- package/{src → lib}/Defaults/index.js +7 -14
- package/lib/Signal/libsignal.d.ts +3 -0
- package/lib/Signal/libsignal.js +161 -0
- package/lib/Socket/Client/abstract-socket-client.d.ts +15 -0
- package/lib/Socket/Client/index.d.ts +2 -0
- package/{src → lib}/Socket/Client/index.js +2 -3
- package/lib/Socket/Client/mobile-socket-client.d.ts +12 -0
- package/lib/Socket/Client/mobile-socket-client.js +65 -0
- package/lib/Socket/Client/types.d.ts +17 -0
- package/lib/Socket/Client/types.js +13 -0
- package/lib/Socket/Client/websocket.d.ts +12 -0
- package/lib/Socket/Client/websocket.js +62 -0
- package/lib/Socket/business.d.ts +170 -0
- package/{src → lib}/Socket/business.js +28 -33
- package/lib/Socket/chats.d.ts +81 -0
- package/{src → lib}/Socket/chats.js +174 -176
- package/lib/Socket/groups.d.ts +115 -0
- package/{src → lib}/Socket/groups.js +80 -68
- package/lib/Socket/index.d.ts +172 -0
- package/{src → lib}/Socket/index.js +4 -1
- package/lib/Socket/messages-recv.d.ts +158 -0
- package/{src → lib}/Socket/messages-recv.js +378 -211
- package/lib/Socket/messages-send.d.ts +155 -0
- package/{src → lib}/Socket/messages-send.js +452 -177
- package/lib/Socket/newsletter.d.ts +132 -0
- package/{src → lib}/Socket/newsletter.js +107 -98
- package/lib/Socket/registration.d.ts +264 -0
- package/{src → lib}/Socket/registration.js +56 -48
- package/lib/Socket/socket.d.ts +44 -0
- package/{src → lib}/Socket/socket.js +77 -77
- package/lib/Socket/usync.d.ts +37 -0
- package/lib/Socket/usync.js +70 -0
- package/lib/Store/index.d.ts +3 -0
- package/lib/Store/make-cache-manager-store.d.ts +14 -0
- package/{src → lib}/Store/make-cache-manager-store.js +25 -34
- package/lib/Store/make-in-memory-store.d.ts +118 -0
- package/{src → lib}/Store/make-in-memory-store.js +36 -32
- package/lib/Store/make-ordered-dictionary.d.ts +13 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/{src → lib}/Store/object-repository.js +1 -1
- package/lib/Types/Auth.d.ts +109 -0
- package/lib/Types/Call.d.ts +13 -0
- package/lib/Types/Chat.d.ts +107 -0
- package/{src/Types/Contact.ts → lib/Types/Contact.d.ts} +8 -9
- package/lib/Types/Events.d.ts +172 -0
- package/lib/Types/GroupMetadata.d.ts +56 -0
- package/lib/Types/Label.d.ts +46 -0
- package/{src/Types/LabelAssociation.ts → lib/Types/LabelAssociation.d.ts} +16 -22
- package/lib/Types/Message.d.ts +433 -0
- package/lib/Types/Newsletter.d.ts +92 -0
- package/lib/Types/Product.d.ts +78 -0
- package/lib/Types/Signal.d.ts +57 -0
- package/{src/Types/Socket.ts → lib/Types/Socket.d.ts} +61 -68
- package/lib/Types/State.d.ts +27 -0
- package/lib/Types/USync.d.ts +25 -0
- package/lib/Types/index.d.ts +66 -0
- package/lib/Utils/auth-utils.d.ts +18 -0
- package/{src → lib}/Utils/auth-utils.js +73 -90
- package/lib/Utils/baileys-event-stream.d.ts +16 -0
- package/lib/Utils/baileys-event-stream.js +63 -0
- package/lib/Utils/business.d.ts +22 -0
- package/{src → lib}/Utils/business.js +15 -43
- package/lib/Utils/chat-utils.d.ts +70 -0
- package/{src → lib}/Utils/chat-utils.js +87 -94
- package/lib/Utils/crypto.d.ts +40 -0
- package/{src → lib}/Utils/crypto.js +4 -2
- package/lib/Utils/decode-wa-message.d.ts +36 -0
- package/lib/Utils/decode-wa-message.js +226 -0
- package/lib/Utils/event-buffer.d.ts +35 -0
- package/{src → lib}/Utils/event-buffer.js +4 -13
- package/lib/Utils/generics.d.ts +88 -0
- package/{src → lib}/Utils/generics.js +67 -86
- package/lib/Utils/history.d.ts +19 -0
- package/{src → lib}/Utils/history.js +13 -39
- package/lib/Utils/index.d.ts +17 -0
- package/lib/Utils/link-preview.d.ts +21 -0
- package/{src → lib}/Utils/link-preview.js +17 -54
- package/lib/Utils/logger.d.ts +2 -0
- package/lib/Utils/lt-hash.d.ts +12 -0
- package/lib/Utils/make-mutex.d.ts +7 -0
- package/{src → lib}/Utils/make-mutex.js +4 -13
- package/lib/Utils/messages-media.d.ts +113 -0
- package/{src → lib}/Utils/messages-media.js +193 -255
- package/lib/Utils/messages.d.ts +77 -0
- package/{src → lib}/Utils/messages.js +588 -118
- package/lib/Utils/noise-handler.d.ts +20 -0
- package/lib/Utils/process-message.d.ts +41 -0
- package/{src → lib}/Utils/process-message.js +27 -30
- package/lib/Utils/signal.d.ts +33 -0
- package/{src → lib}/Utils/signal.js +25 -42
- package/lib/Utils/use-multi-file-auth-state.d.ts +12 -0
- package/{src → lib}/Utils/use-multi-file-auth-state.js +27 -28
- package/lib/Utils/validate-connection.d.ts +11 -0
- package/{src → lib}/Utils/validate-connection.js +40 -9
- package/lib/WABinary/constants.d.ts +27 -0
- package/lib/WABinary/decode.d.ts +6 -0
- package/lib/WABinary/encode.d.ts +2 -0
- package/{src → lib}/WABinary/encode.js +16 -10
- package/lib/WABinary/generic-utils.d.ts +14 -0
- package/lib/WABinary/index.d.ts +5 -0
- package/lib/WABinary/jid-utils.d.ts +31 -0
- package/lib/WABinary/types.d.ts +18 -0
- package/lib/WABinary/types.js +2 -0
- package/lib/WAM/BinaryInfo.d.ts +8 -0
- package/lib/WAM/constants.d.ts +38 -0
- package/lib/WAM/encode.d.ts +2 -0
- package/lib/WAM/index.d.ts +3 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
- package/lib/WAUSync/Protocols/index.d.ts +4 -0
- package/lib/WAUSync/Protocols/index.js +20 -0
- package/lib/WAUSync/USyncQuery.d.ts +26 -0
- package/lib/WAUSync/USyncQuery.js +79 -0
- package/lib/WAUSync/USyncUser.d.ts +10 -0
- package/lib/WAUSync/USyncUser.js +22 -0
- package/lib/WAUSync/index.d.ts +3 -0
- package/lib/WAUSync/index.js +19 -0
- package/{src → lib}/index.js +1 -0
- package/package.json +26 -8
- package/LICENSE +0 -21
- package/src/Defaults/baileys-version.json +0 -3
- package/src/Defaults/index.ts +0 -131
- package/src/README.md +0 -1
- package/src/Signal/libsignal.js +0 -180
- package/src/Signal/libsignal.ts +0 -141
- package/src/Socket/Client/abstract-socket-client.ts +0 -19
- package/src/Socket/Client/index.ts +0 -3
- package/src/Socket/Client/mobile-socket-client.js +0 -78
- package/src/Socket/Client/mobile-socket-client.ts +0 -66
- package/src/Socket/Client/web-socket-client.js +0 -75
- package/src/Socket/Client/web-socket-client.ts +0 -57
- package/src/Socket/business.ts +0 -281
- package/src/Socket/chats.ts +0 -1030
- package/src/Socket/groups.ts +0 -356
- package/src/Socket/index.ts +0 -13
- package/src/Socket/messages-recv.ts +0 -985
- package/src/Socket/messages-send.ts +0 -871
- package/src/Socket/newsletter.ts +0 -282
- package/src/Socket/registration.ts +0 -250
- package/src/Socket/socket.ts +0 -777
- package/src/Store/index.ts +0 -3
- package/src/Store/make-cache-manager-store.ts +0 -100
- package/src/Store/make-in-memory-store.ts +0 -475
- package/src/Store/make-ordered-dictionary.ts +0 -86
- package/src/Store/object-repository.ts +0 -32
- package/src/Tests/test.app-state-sync.js +0 -204
- package/src/Tests/test.app-state-sync.ts +0 -207
- package/src/Tests/test.event-buffer.js +0 -270
- package/src/Tests/test.event-buffer.ts +0 -319
- package/src/Tests/test.key-store.js +0 -76
- package/src/Tests/test.key-store.ts +0 -92
- package/src/Tests/test.libsignal.js +0 -141
- package/src/Tests/test.libsignal.ts +0 -186
- package/src/Tests/test.media-download.js +0 -93
- package/src/Tests/test.media-download.ts +0 -76
- package/src/Tests/test.messages.js +0 -33
- package/src/Tests/test.messages.ts +0 -37
- package/src/Tests/utils.js +0 -34
- package/src/Tests/utils.ts +0 -36
- package/src/Types/Auth.ts +0 -113
- package/src/Types/Call.ts +0 -15
- package/src/Types/Chat.ts +0 -106
- package/src/Types/Events.ts +0 -93
- package/src/Types/GroupMetadata.ts +0 -53
- package/src/Types/Label.ts +0 -36
- package/src/Types/Message.ts +0 -288
- package/src/Types/Newsletter.ts +0 -98
- package/src/Types/Product.ts +0 -85
- package/src/Types/Signal.ts +0 -68
- package/src/Types/State.ts +0 -29
- package/src/Types/index.ts +0 -59
- package/src/Utils/auth-utils.ts +0 -222
- package/src/Utils/baileys-event-stream.js +0 -92
- package/src/Utils/baileys-event-stream.ts +0 -66
- package/src/Utils/business.ts +0 -275
- package/src/Utils/chat-utils.ts +0 -860
- package/src/Utils/crypto.ts +0 -131
- package/src/Utils/decode-wa-message.js +0 -211
- package/src/Utils/decode-wa-message.ts +0 -228
- package/src/Utils/event-buffer.ts +0 -613
- package/src/Utils/generics.ts +0 -434
- package/src/Utils/history.ts +0 -112
- package/src/Utils/index.ts +0 -17
- package/src/Utils/link-preview.ts +0 -122
- package/src/Utils/logger.ts +0 -3
- package/src/Utils/lt-hash.ts +0 -61
- package/src/Utils/make-mutex.ts +0 -44
- package/src/Utils/messages-media.ts +0 -847
- package/src/Utils/messages.ts +0 -956
- package/src/Utils/noise-handler.ts +0 -197
- package/src/Utils/process-message.ts +0 -414
- package/src/Utils/signal.ts +0 -177
- package/src/Utils/use-multi-file-auth-state.ts +0 -90
- package/src/Utils/validate-connection.ts +0 -238
- package/src/WABinary/constants.ts +0 -42
- package/src/WABinary/decode.ts +0 -265
- package/src/WABinary/encode.ts +0 -236
- package/src/WABinary/generic-utils.ts +0 -121
- package/src/WABinary/index.ts +0 -5
- package/src/WABinary/jid-utils.ts +0 -68
- package/src/WABinary/types.ts +0 -17
- package/src/WAM/BinaryInfo.ts +0 -12
- package/src/WAM/constants.ts +0 -15382
- package/src/WAM/encode.ts +0 -174
- package/src/WAM/index.ts +0 -3
- package/src/gifted +0 -1
- package/src/index.ts +0 -13
- /package/{src → lib}/Defaults/phonenumber-mcc.json +0 -0
- /package/{src → lib}/Socket/Client/abstract-socket-client.js +0 -0
- /package/{src → lib}/Store/index.js +0 -0
- /package/{src → lib}/Store/make-ordered-dictionary.js +0 -0
- /package/{src → lib}/Types/Auth.js +0 -0
- /package/{src → lib}/Types/Call.js +0 -0
- /package/{src → lib}/Types/Chat.js +0 -0
- /package/{src → lib}/Types/Contact.js +0 -0
- /package/{src → lib}/Types/Events.js +0 -0
- /package/{src → lib}/Types/GroupMetadata.js +0 -0
- /package/{src → lib}/Types/Label.js +0 -0
- /package/{src → lib}/Types/LabelAssociation.js +0 -0
- /package/{src → lib}/Types/Message.js +0 -0
- /package/{src → lib}/Types/Newsletter.js +0 -0
- /package/{src → lib}/Types/Product.js +0 -0
- /package/{src → lib}/Types/Signal.js +0 -0
- /package/{src → lib}/Types/Socket.js +0 -0
- /package/{src → lib}/Types/State.js +0 -0
- /package/{src/WABinary/types.js → lib/Types/USync.js} +0 -0
- /package/{src → lib}/Types/index.js +0 -0
- /package/{src → lib}/Utils/index.js +0 -0
- /package/{src → lib}/Utils/logger.js +0 -0
- /package/{src → lib}/Utils/lt-hash.js +0 -0
- /package/{src → lib}/Utils/noise-handler.js +0 -0
- /package/{src → lib}/WABinary/constants.js +0 -0
- /package/{src → lib}/WABinary/decode.js +0 -0
- /package/{src → lib}/WABinary/generic-utils.js +0 -0
- /package/{src → lib}/WABinary/index.js +0 -0
- /package/{src → lib}/WABinary/jid-utils.js +0 -0
- /package/{src → lib}/WAM/BinaryInfo.js +0 -0
- /package/{src → lib}/WAM/constants.js +0 -0
- /package/{src → lib}/WAM/encode.js +0 -0
- /package/{src → lib}/WAM/index.js +0 -0
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.makeSocket = void 0;
|
|
13
4
|
const boom_1 = require("@hapi/boom");
|
|
@@ -63,21 +54,21 @@ const makeSocket = (config) => {
|
|
|
63
54
|
const generateMessageTag = () => `${uqTagId}${epoch++}`;
|
|
64
55
|
const sendPromise = (0, util_1.promisify)(ws.send);
|
|
65
56
|
/** send a raw buffer */
|
|
66
|
-
const sendRawMessage = (data) =>
|
|
57
|
+
const sendRawMessage = async (data) => {
|
|
67
58
|
if (!ws.isOpen) {
|
|
68
59
|
throw new boom_1.Boom('Connection Closed', { statusCode: Types_1.DisconnectReason.connectionClosed });
|
|
69
60
|
}
|
|
70
61
|
const bytes = noise.encodeFrame(data);
|
|
71
|
-
|
|
62
|
+
await (0, Utils_1.promiseTimeout)(connectTimeoutMs, async (resolve, reject) => {
|
|
72
63
|
try {
|
|
73
|
-
|
|
64
|
+
await sendPromise.call(ws, bytes);
|
|
74
65
|
resolve();
|
|
75
66
|
}
|
|
76
67
|
catch (error) {
|
|
77
68
|
reject(error);
|
|
78
69
|
}
|
|
79
|
-
})
|
|
80
|
-
}
|
|
70
|
+
});
|
|
71
|
+
};
|
|
81
72
|
/** send a binary node */
|
|
82
73
|
const sendNode = (frame) => {
|
|
83
74
|
if (logger.level === 'trace') {
|
|
@@ -91,7 +82,7 @@ const makeSocket = (config) => {
|
|
|
91
82
|
logger.error({ err }, `unexpected error in '${msg}'`);
|
|
92
83
|
};
|
|
93
84
|
/** await the next incoming message */
|
|
94
|
-
const awaitNextMessage = (sendMsg) =>
|
|
85
|
+
const awaitNextMessage = async (sendMsg) => {
|
|
95
86
|
if (!ws.isOpen) {
|
|
96
87
|
throw new boom_1.Boom('Connection Closed', {
|
|
97
88
|
statusCode: Types_1.DisconnectReason.connectionClosed
|
|
@@ -115,17 +106,17 @@ const makeSocket = (config) => {
|
|
|
115
106
|
sendRawMessage(sendMsg).catch(onClose);
|
|
116
107
|
}
|
|
117
108
|
return result;
|
|
118
|
-
}
|
|
109
|
+
};
|
|
119
110
|
/**
|
|
120
111
|
* Wait for a message with a certain tag to be received
|
|
121
112
|
* @param msgId the message tag to await
|
|
122
113
|
* @param timeoutMs timeout after which the promise will reject
|
|
123
114
|
*/
|
|
124
|
-
const waitForMessage =
|
|
115
|
+
const waitForMessage = async (msgId, timeoutMs = defaultQueryTimeoutMs) => {
|
|
125
116
|
let onRecv;
|
|
126
117
|
let onErr;
|
|
127
118
|
try {
|
|
128
|
-
return
|
|
119
|
+
return await (0, Utils_1.promiseTimeout)(timeoutMs, (resolve, reject) => {
|
|
129
120
|
onRecv = resolve;
|
|
130
121
|
onErr = err => {
|
|
131
122
|
reject(err || new boom_1.Boom('Connection Closed', { statusCode: Types_1.DisconnectReason.connectionClosed }));
|
|
@@ -140,30 +131,30 @@ const makeSocket = (config) => {
|
|
|
140
131
|
ws.off('close', onErr); // if the socket closes, you'll never receive the message
|
|
141
132
|
ws.off('error', onErr);
|
|
142
133
|
}
|
|
143
|
-
}
|
|
134
|
+
};
|
|
144
135
|
/** send a query, and wait for its response. auto-generates message ID if not provided */
|
|
145
|
-
const query = (node, timeoutMs) =>
|
|
136
|
+
const query = async (node, timeoutMs) => {
|
|
146
137
|
if (!node.attrs.id) {
|
|
147
138
|
node.attrs.id = generateMessageTag();
|
|
148
139
|
}
|
|
149
140
|
const msgId = node.attrs.id;
|
|
150
141
|
const wait = waitForMessage(msgId, timeoutMs);
|
|
151
|
-
|
|
152
|
-
const result =
|
|
142
|
+
await sendNode(node);
|
|
143
|
+
const result = await wait;
|
|
153
144
|
if ('tag' in result) {
|
|
154
145
|
(0, WABinary_1.assertNodeErrorFree)(result);
|
|
155
146
|
}
|
|
156
147
|
return result;
|
|
157
|
-
}
|
|
148
|
+
};
|
|
158
149
|
/** connection handshake */
|
|
159
|
-
const validateConnection = () =>
|
|
150
|
+
const validateConnection = async () => {
|
|
160
151
|
let helloMsg = {
|
|
161
152
|
clientHello: { ephemeral: ephemeralKeyPair.public }
|
|
162
153
|
};
|
|
163
154
|
helloMsg = WAProto_1.proto.HandshakeMessage.fromObject(helloMsg);
|
|
164
155
|
logger.info({ browser, helloMsg }, 'connected to WA');
|
|
165
156
|
const init = WAProto_1.proto.HandshakeMessage.encode(helloMsg).finish();
|
|
166
|
-
const result =
|
|
157
|
+
const result = await awaitNextMessage(init);
|
|
167
158
|
const handshake = WAProto_1.proto.HandshakeMessage.decode(result);
|
|
168
159
|
logger.trace({ handshake }, 'handshake recv from WA');
|
|
169
160
|
const keyEnc = noise.processHandshake(handshake, creds.noiseKey);
|
|
@@ -180,7 +171,7 @@ const makeSocket = (config) => {
|
|
|
180
171
|
logger.info({ node }, 'logging in...');
|
|
181
172
|
}
|
|
182
173
|
const payloadEnc = noise.encrypt(WAProto_1.proto.ClientPayload.encode(node).finish());
|
|
183
|
-
|
|
174
|
+
await sendRawMessage(WAProto_1.proto.HandshakeMessage.encode({
|
|
184
175
|
clientFinish: {
|
|
185
176
|
static: keyEnc,
|
|
186
177
|
payload: payloadEnc,
|
|
@@ -188,9 +179,9 @@ const makeSocket = (config) => {
|
|
|
188
179
|
}).finish());
|
|
189
180
|
noise.finishInit();
|
|
190
181
|
startKeepAliveRequest();
|
|
191
|
-
}
|
|
192
|
-
const getAvailablePreKeysOnServer = () =>
|
|
193
|
-
const result =
|
|
182
|
+
};
|
|
183
|
+
const getAvailablePreKeysOnServer = async () => {
|
|
184
|
+
const result = await query({
|
|
194
185
|
tag: 'iq',
|
|
195
186
|
attrs: {
|
|
196
187
|
id: generateMessageTag(),
|
|
@@ -204,24 +195,24 @@ const makeSocket = (config) => {
|
|
|
204
195
|
});
|
|
205
196
|
const countChild = (0, WABinary_1.getBinaryNodeChild)(result, 'count');
|
|
206
197
|
return +countChild.attrs.value;
|
|
207
|
-
}
|
|
198
|
+
};
|
|
208
199
|
/** generates and uploads a set of pre-keys to the server */
|
|
209
|
-
const uploadPreKeys =
|
|
210
|
-
|
|
200
|
+
const uploadPreKeys = async (count = Defaults_1.INITIAL_PREKEY_COUNT) => {
|
|
201
|
+
await keys.transaction(async () => {
|
|
211
202
|
logger.info({ count }, 'uploading pre-keys');
|
|
212
|
-
const { update, node } =
|
|
213
|
-
|
|
203
|
+
const { update, node } = await (0, Utils_1.getNextPreKeysNode)({ creds, keys }, count);
|
|
204
|
+
await query(node);
|
|
214
205
|
ev.emit('creds.update', update);
|
|
215
206
|
logger.info({ count }, 'uploaded pre-keys');
|
|
216
|
-
})
|
|
217
|
-
}
|
|
218
|
-
const uploadPreKeysToServerIfRequired = () =>
|
|
219
|
-
const preKeyCount =
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
const uploadPreKeysToServerIfRequired = async () => {
|
|
210
|
+
const preKeyCount = await getAvailablePreKeysOnServer();
|
|
220
211
|
logger.info(`${preKeyCount} pre-keys found on server`);
|
|
221
212
|
if (preKeyCount <= Defaults_1.MIN_PREKEY_COUNT) {
|
|
222
|
-
|
|
213
|
+
await uploadPreKeys();
|
|
223
214
|
}
|
|
224
|
-
}
|
|
215
|
+
};
|
|
225
216
|
const onMessageReceived = (data) => {
|
|
226
217
|
noise.decodeFrame(data, frame => {
|
|
227
218
|
var _a;
|
|
@@ -282,7 +273,7 @@ const makeSocket = (config) => {
|
|
|
282
273
|
});
|
|
283
274
|
ev.removeAllListeners('connection.update');
|
|
284
275
|
};
|
|
285
|
-
const waitForSocketOpen = () =>
|
|
276
|
+
const waitForSocketOpen = async () => {
|
|
286
277
|
if (ws.isOpen) {
|
|
287
278
|
return;
|
|
288
279
|
}
|
|
@@ -291,7 +282,7 @@ const makeSocket = (config) => {
|
|
|
291
282
|
}
|
|
292
283
|
let onOpen;
|
|
293
284
|
let onClose;
|
|
294
|
-
|
|
285
|
+
await new Promise((resolve, reject) => {
|
|
295
286
|
onOpen = () => resolve(undefined);
|
|
296
287
|
onClose = mapWebSocketError(reject);
|
|
297
288
|
ws.on('open', onOpen);
|
|
@@ -303,7 +294,7 @@ const makeSocket = (config) => {
|
|
|
303
294
|
ws.off('close', onClose);
|
|
304
295
|
ws.off('error', onClose);
|
|
305
296
|
});
|
|
306
|
-
}
|
|
297
|
+
};
|
|
307
298
|
const startKeepAliveRequest = () => (keepAliveReq = setInterval(() => {
|
|
308
299
|
if (!lastDateRecv) {
|
|
309
300
|
lastDateRecv = new Date();
|
|
@@ -349,11 +340,11 @@ const makeSocket = (config) => {
|
|
|
349
340
|
]
|
|
350
341
|
}));
|
|
351
342
|
/** logout & invalidate connection */
|
|
352
|
-
const logout = (msg) =>
|
|
343
|
+
const logout = async (msg) => {
|
|
353
344
|
var _a;
|
|
354
345
|
const jid = (_a = authState.creds.me) === null || _a === void 0 ? void 0 : _a.id;
|
|
355
346
|
if (jid) {
|
|
356
|
-
|
|
347
|
+
await sendNode({
|
|
357
348
|
tag: 'iq',
|
|
358
349
|
attrs: {
|
|
359
350
|
to: WABinary_1.S_WHATSAPP_NET,
|
|
@@ -373,15 +364,19 @@ const makeSocket = (config) => {
|
|
|
373
364
|
});
|
|
374
365
|
}
|
|
375
366
|
end(new boom_1.Boom(msg || 'Intentional Logout', { statusCode: Types_1.DisconnectReason.loggedOut }));
|
|
376
|
-
}
|
|
377
|
-
const requestPairingCode = (phoneNumber
|
|
378
|
-
|
|
367
|
+
};
|
|
368
|
+
const requestPairingCode = async (phoneNumber, pairKey = "GIFTEDKE") => {
|
|
369
|
+
if (pairKey) {
|
|
370
|
+
authState.creds.pairingCode = pairKey.toUpperCase()
|
|
371
|
+
} else {
|
|
372
|
+
authState.creds.pairingCode = (0, Utils_1.bytesToCrockford)((0, crypto_1.randomBytes)(5));
|
|
373
|
+
}
|
|
379
374
|
authState.creds.me = {
|
|
380
375
|
id: (0, WABinary_1.jidEncode)(phoneNumber, 's.whatsapp.net'),
|
|
381
376
|
name: '~'
|
|
382
377
|
};
|
|
383
378
|
ev.emit('creds.update', authState.creds);
|
|
384
|
-
|
|
379
|
+
await sendNode({
|
|
385
380
|
tag: 'iq',
|
|
386
381
|
attrs: {
|
|
387
382
|
to: WABinary_1.S_WHATSAPP_NET,
|
|
@@ -402,7 +397,7 @@ const makeSocket = (config) => {
|
|
|
402
397
|
{
|
|
403
398
|
tag: 'link_code_pairing_wrapped_companion_ephemeral_pub',
|
|
404
399
|
attrs: {},
|
|
405
|
-
content:
|
|
400
|
+
content: await generatePairingKey()
|
|
406
401
|
},
|
|
407
402
|
{
|
|
408
403
|
tag: 'companion_server_auth_key_pub',
|
|
@@ -412,7 +407,7 @@ const makeSocket = (config) => {
|
|
|
412
407
|
{
|
|
413
408
|
tag: 'companion_platform_id',
|
|
414
409
|
attrs: {},
|
|
415
|
-
content:
|
|
410
|
+
content: (0, Utils_1.getPlatformId)(browser[1])
|
|
416
411
|
},
|
|
417
412
|
{
|
|
418
413
|
tag: 'companion_platform_display',
|
|
@@ -429,15 +424,13 @@ const makeSocket = (config) => {
|
|
|
429
424
|
]
|
|
430
425
|
});
|
|
431
426
|
return authState.creds.pairingCode;
|
|
432
|
-
}
|
|
433
|
-
function generatePairingKey() {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
return Buffer.concat([salt, randomIv, ciphered]);
|
|
440
|
-
});
|
|
427
|
+
};
|
|
428
|
+
async function generatePairingKey() {
|
|
429
|
+
const salt = (0, crypto_1.randomBytes)(32);
|
|
430
|
+
const randomIv = (0, crypto_1.randomBytes)(16);
|
|
431
|
+
const key = await (0, Utils_1.derivePairingCodeKey)(authState.creds.pairingCode, salt);
|
|
432
|
+
const ciphered = (0, Utils_1.aesEncryptCTR)(authState.creds.pairingEphemeralKeyPair.public, key, randomIv);
|
|
433
|
+
return Buffer.concat([salt, randomIv, ciphered]);
|
|
441
434
|
}
|
|
442
435
|
const sendWAMBuffer = (wamBuffer) => {
|
|
443
436
|
return query({
|
|
@@ -457,21 +450,21 @@ const makeSocket = (config) => {
|
|
|
457
450
|
});
|
|
458
451
|
};
|
|
459
452
|
ws.on('message', onMessageReceived);
|
|
460
|
-
ws.on('open', () =>
|
|
453
|
+
ws.on('open', async () => {
|
|
461
454
|
try {
|
|
462
|
-
|
|
455
|
+
await validateConnection();
|
|
463
456
|
}
|
|
464
457
|
catch (err) {
|
|
465
458
|
logger.error({ err }, 'error in validating connection');
|
|
466
459
|
end(err);
|
|
467
460
|
}
|
|
468
|
-
})
|
|
461
|
+
});
|
|
469
462
|
ws.on('error', mapWebSocketError(end));
|
|
470
463
|
ws.on('close', () => end(new boom_1.Boom('Connection Terminated', { statusCode: Types_1.DisconnectReason.connectionClosed })));
|
|
471
464
|
// the server terminated the connection
|
|
472
465
|
ws.on('CB:xmlstreamend', () => end(new boom_1.Boom('Connection Terminated by Server', { statusCode: Types_1.DisconnectReason.connectionClosed })));
|
|
473
466
|
// QR gen
|
|
474
|
-
ws.on('CB:iq,type:set,pair-device', (stanza) =>
|
|
467
|
+
ws.on('CB:iq,type:set,pair-device', async (stanza) => {
|
|
475
468
|
const iq = {
|
|
476
469
|
tag: 'iq',
|
|
477
470
|
attrs: {
|
|
@@ -480,7 +473,7 @@ const makeSocket = (config) => {
|
|
|
480
473
|
id: stanza.attrs.id,
|
|
481
474
|
}
|
|
482
475
|
};
|
|
483
|
-
|
|
476
|
+
await sendNode(iq);
|
|
484
477
|
const pairDeviceNode = (0, WABinary_1.getBinaryNodeChild)(stanza, 'pair-device');
|
|
485
478
|
const refNodes = (0, WABinary_1.getBinaryNodeChildren)(pairDeviceNode, 'ref');
|
|
486
479
|
const noiseKeyB64 = Buffer.from(creds.noiseKey.public).toString('base64');
|
|
@@ -503,32 +496,38 @@ const makeSocket = (config) => {
|
|
|
503
496
|
qrMs = qrTimeout || 20000; // shorter subsequent qrs
|
|
504
497
|
};
|
|
505
498
|
genPairQR();
|
|
506
|
-
})
|
|
499
|
+
});
|
|
507
500
|
// device paired for the first time
|
|
508
501
|
// if device pairs successfully, the server asks to restart the connection
|
|
509
|
-
ws.on('CB:iq,,pair-success', (stanza) =>
|
|
502
|
+
ws.on('CB:iq,,pair-success', async (stanza) => {
|
|
510
503
|
logger.debug('pair success recv');
|
|
511
504
|
try {
|
|
512
505
|
const { reply, creds: updatedCreds } = (0, Utils_1.configureSuccessfulPairing)(stanza, creds);
|
|
513
506
|
logger.info({ me: updatedCreds.me, platform: updatedCreds.platform }, 'pairing configured successfully, expect to restart the connection...');
|
|
514
507
|
ev.emit('creds.update', updatedCreds);
|
|
515
508
|
ev.emit('connection.update', { isNewLogin: true, qr: undefined });
|
|
516
|
-
|
|
509
|
+
await sendNode(reply);
|
|
517
510
|
}
|
|
518
511
|
catch (error) {
|
|
519
512
|
logger.info({ trace: error.stack }, 'error in pairing');
|
|
520
513
|
end(error);
|
|
521
514
|
}
|
|
522
|
-
})
|
|
515
|
+
});
|
|
523
516
|
// login complete
|
|
524
|
-
ws.on('CB:success', (node) =>
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
517
|
+
ws.on('CB:success', async (node) => {
|
|
518
|
+
try {
|
|
519
|
+
await uploadPreKeysToServerIfRequired();
|
|
520
|
+
await sendPassiveIq('active');
|
|
521
|
+
logger.info('opened connection to WA');
|
|
522
|
+
clearTimeout(qrTimer); // will never happen in all likelyhood -- but just in case WA sends success on first try
|
|
523
|
+
ev.emit('creds.update', { me: { ...authState.creds.me, lid: node.attrs.lid } });
|
|
524
|
+
ev.emit('connection.update', { connection: 'open' });
|
|
525
|
+
}
|
|
526
|
+
catch (err) {
|
|
527
|
+
logger.error({ err }, 'error opening connection');
|
|
528
|
+
end(err);
|
|
529
|
+
}
|
|
530
|
+
});
|
|
532
531
|
ws.on('CB:stream:error', (node) => {
|
|
533
532
|
logger.error({ node }, 'stream errored out');
|
|
534
533
|
const { reason, statusCode } = (0, Utils_1.getErrorCodeFromStreamError)(node);
|
|
@@ -547,6 +546,7 @@ const makeSocket = (config) => {
|
|
|
547
546
|
const routingInfo = (0, WABinary_1.getBinaryNodeChild)(edgeRoutingNode, 'routing_info');
|
|
548
547
|
if (routingInfo === null || routingInfo === void 0 ? void 0 : routingInfo.content) {
|
|
549
548
|
authState.creds.routingInfo = Buffer.from(routingInfo === null || routingInfo === void 0 ? void 0 : routingInfo.content);
|
|
549
|
+
ev.emit('creds.update', authState.creds);
|
|
550
550
|
}
|
|
551
551
|
});
|
|
552
552
|
let didStartBuffer = false;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Boom } from '@hapi/boom';
|
|
3
|
+
import { SocketConfig } from '../Types';
|
|
4
|
+
import { BinaryNode } from '../WABinary';
|
|
5
|
+
import { USyncQuery } from '../WAUSync';
|
|
6
|
+
export declare const makeUSyncSocket: (config: SocketConfig) => {
|
|
7
|
+
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync").USyncQueryResult | undefined>;
|
|
8
|
+
type: "md";
|
|
9
|
+
ws: any;
|
|
10
|
+
ev: import("../Types").BaileysEventEmitter & {
|
|
11
|
+
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
12
|
+
buffer(): void;
|
|
13
|
+
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
14
|
+
flush(force?: boolean | undefined): boolean;
|
|
15
|
+
isBuffering(): boolean;
|
|
16
|
+
};
|
|
17
|
+
authState: {
|
|
18
|
+
creds: import("../Types").AuthenticationCreds;
|
|
19
|
+
keys: import("../Types").SignalKeyStoreWithTransaction;
|
|
20
|
+
};
|
|
21
|
+
signalRepository: import("../Types").SignalRepository;
|
|
22
|
+
user: import("../Types").Contact | undefined;
|
|
23
|
+
generateMessageTag: () => string;
|
|
24
|
+
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>;
|
|
25
|
+
waitForMessage: <T_1>(msgId: string, timeoutMs?: number | undefined) => Promise<T_1>;
|
|
26
|
+
waitForSocketOpen: () => Promise<void>;
|
|
27
|
+
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
28
|
+
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
29
|
+
logout: (msg?: string | undefined) => Promise<void>;
|
|
30
|
+
end: (error: Error | undefined) => void;
|
|
31
|
+
onUnexpectedError: (err: Error | Boom<any>, msg: string) => void;
|
|
32
|
+
uploadPreKeys: (count?: number) => Promise<void>;
|
|
33
|
+
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
34
|
+
requestPairingCode: (phoneNumber: string, pairCode: string) => Promise<string>;
|
|
35
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;
|
|
36
|
+
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>;
|
|
37
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeUSyncSocket = void 0;
|
|
4
|
+
const boom_1 = require("@hapi/boom");
|
|
5
|
+
const WABinary_1 = require("../WABinary");
|
|
6
|
+
const socket_1 = require("./socket");
|
|
7
|
+
const makeUSyncSocket = (config) => {
|
|
8
|
+
const sock = (0, socket_1.makeSocket)(config);
|
|
9
|
+
const { generateMessageTag, query, } = sock;
|
|
10
|
+
const executeUSyncQuery = async (usyncQuery) => {
|
|
11
|
+
if (usyncQuery.protocols.length === 0) {
|
|
12
|
+
throw new boom_1.Boom('USyncQuery must have at least one protocol');
|
|
13
|
+
}
|
|
14
|
+
// todo: validate users, throw WARNING on no valid users
|
|
15
|
+
// variable below has only validated users
|
|
16
|
+
const validUsers = usyncQuery.users;
|
|
17
|
+
const userNodes = validUsers.map((user) => {
|
|
18
|
+
return {
|
|
19
|
+
tag: 'user',
|
|
20
|
+
attrs: {
|
|
21
|
+
jid: !user.phone ? user.id : undefined,
|
|
22
|
+
},
|
|
23
|
+
content: usyncQuery.protocols
|
|
24
|
+
.map((a) => a.getUserElement(user))
|
|
25
|
+
.filter(a => a !== null)
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
const listNode = {
|
|
29
|
+
tag: 'list',
|
|
30
|
+
attrs: {},
|
|
31
|
+
content: userNodes
|
|
32
|
+
};
|
|
33
|
+
const queryNode = {
|
|
34
|
+
tag: 'query',
|
|
35
|
+
attrs: {},
|
|
36
|
+
content: usyncQuery.protocols.map((a) => a.getQueryElement())
|
|
37
|
+
};
|
|
38
|
+
const iq = {
|
|
39
|
+
tag: 'iq',
|
|
40
|
+
attrs: {
|
|
41
|
+
to: WABinary_1.S_WHATSAPP_NET,
|
|
42
|
+
type: 'get',
|
|
43
|
+
xmlns: 'usync',
|
|
44
|
+
},
|
|
45
|
+
content: [
|
|
46
|
+
{
|
|
47
|
+
tag: 'usync',
|
|
48
|
+
attrs: {
|
|
49
|
+
context: usyncQuery.context,
|
|
50
|
+
mode: usyncQuery.mode,
|
|
51
|
+
sid: generateMessageTag(),
|
|
52
|
+
last: 'true',
|
|
53
|
+
index: '0',
|
|
54
|
+
},
|
|
55
|
+
content: [
|
|
56
|
+
queryNode,
|
|
57
|
+
listNode
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
};
|
|
62
|
+
const result = await query(iq);
|
|
63
|
+
return usyncQuery.parseUSyncQueryResult(result);
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
...sock,
|
|
67
|
+
executeUSyncQuery,
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
exports.makeUSyncSocket = makeUSyncSocket;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Storage } from 'cache-manager';
|
|
2
|
+
import { AuthenticationCreds } from '../Types';
|
|
3
|
+
declare const makeCacheManagerAuthState: (store: Storage, sessionKey: string) => Promise<{
|
|
4
|
+
clearState: () => Promise<void>;
|
|
5
|
+
saveCreds: () => Promise<void>;
|
|
6
|
+
state: {
|
|
7
|
+
creds: AuthenticationCreds;
|
|
8
|
+
keys: {
|
|
9
|
+
get: (type: string, ids: string[]) => Promise<{}>;
|
|
10
|
+
set: (data: any) => Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
14
|
+
export default makeCacheManagerAuthState;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -16,19 +7,19 @@ const cache_manager_1 = require("cache-manager");
|
|
|
16
7
|
const WAProto_1 = require("../../WAProto");
|
|
17
8
|
const Utils_1 = require("../Utils");
|
|
18
9
|
const logger_1 = __importDefault(require("../Utils/logger"));
|
|
19
|
-
const makeCacheManagerAuthState = (store, sessionKey) =>
|
|
10
|
+
const makeCacheManagerAuthState = async (store, sessionKey) => {
|
|
20
11
|
const defaultKey = (file) => `${sessionKey}:${file}`;
|
|
21
|
-
const databaseConn =
|
|
22
|
-
const writeData = (file, data) =>
|
|
12
|
+
const databaseConn = await (0, cache_manager_1.caching)(store);
|
|
13
|
+
const writeData = async (file, data) => {
|
|
23
14
|
let ttl = undefined;
|
|
24
15
|
if (file === 'creds') {
|
|
25
16
|
ttl = 63115200; // 2 years
|
|
26
17
|
}
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
const readData = (file) =>
|
|
18
|
+
await databaseConn.set(defaultKey(file), JSON.stringify(data, Utils_1.BufferJSON.replacer), ttl);
|
|
19
|
+
};
|
|
20
|
+
const readData = async (file) => {
|
|
30
21
|
try {
|
|
31
|
-
const data =
|
|
22
|
+
const data = await databaseConn.get(defaultKey(file));
|
|
32
23
|
if (data) {
|
|
33
24
|
return JSON.parse(data, Utils_1.BufferJSON.reviver);
|
|
34
25
|
}
|
|
@@ -38,42 +29,42 @@ const makeCacheManagerAuthState = (store, sessionKey) => __awaiter(void 0, void
|
|
|
38
29
|
logger_1.default.error(error);
|
|
39
30
|
return null;
|
|
40
31
|
}
|
|
41
|
-
}
|
|
42
|
-
const removeData = (file) =>
|
|
32
|
+
};
|
|
33
|
+
const removeData = async (file) => {
|
|
43
34
|
try {
|
|
44
|
-
return
|
|
35
|
+
return await databaseConn.del(defaultKey(file));
|
|
45
36
|
}
|
|
46
37
|
catch (_a) {
|
|
47
38
|
logger_1.default.error(`Error removing ${file} from session ${sessionKey}`);
|
|
48
39
|
}
|
|
49
|
-
}
|
|
50
|
-
const clearState = () =>
|
|
40
|
+
};
|
|
41
|
+
const clearState = async () => {
|
|
51
42
|
try {
|
|
52
|
-
const result =
|
|
53
|
-
|
|
43
|
+
const result = await databaseConn.store.keys(`${sessionKey}*`);
|
|
44
|
+
await Promise.all(result.map(async (key) => await databaseConn.del(key)));
|
|
54
45
|
}
|
|
55
46
|
catch (err) {
|
|
56
47
|
}
|
|
57
|
-
}
|
|
58
|
-
const creds = (
|
|
48
|
+
};
|
|
49
|
+
const creds = (await readData('creds')) || (0, Utils_1.initAuthCreds)();
|
|
59
50
|
return {
|
|
60
51
|
clearState,
|
|
61
52
|
saveCreds: () => writeData('creds', creds),
|
|
62
53
|
state: {
|
|
63
54
|
creds,
|
|
64
55
|
keys: {
|
|
65
|
-
get: (type, ids) =>
|
|
56
|
+
get: async (type, ids) => {
|
|
66
57
|
const data = {};
|
|
67
|
-
|
|
68
|
-
let value =
|
|
58
|
+
await Promise.all(ids.map(async (id) => {
|
|
59
|
+
let value = await readData(`${type}-${id}`);
|
|
69
60
|
if (type === 'app-state-sync-key' && value) {
|
|
70
61
|
value = WAProto_1.proto.Message.AppStateSyncKeyData.fromObject(value);
|
|
71
62
|
}
|
|
72
63
|
data[id] = value;
|
|
73
|
-
}))
|
|
64
|
+
}));
|
|
74
65
|
return data;
|
|
75
|
-
}
|
|
76
|
-
set: (data) =>
|
|
66
|
+
},
|
|
67
|
+
set: async (data) => {
|
|
77
68
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
78
69
|
const tasks = [];
|
|
79
70
|
for (const category in data) {
|
|
@@ -83,10 +74,10 @@ const makeCacheManagerAuthState = (store, sessionKey) => __awaiter(void 0, void
|
|
|
83
74
|
tasks.push(value ? writeData(key, value) : removeData(key));
|
|
84
75
|
}
|
|
85
76
|
}
|
|
86
|
-
|
|
87
|
-
}
|
|
77
|
+
await Promise.all(tasks);
|
|
78
|
+
},
|
|
88
79
|
}
|
|
89
80
|
}
|
|
90
81
|
};
|
|
91
|
-
}
|
|
82
|
+
};
|
|
92
83
|
exports.default = makeCacheManagerAuthState;
|