@mtkruto/node 0.0.973 → 0.0.974
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/esm/client/0_message.js +6 -2
- package/esm/constants.d.ts +1 -1
- package/esm/constants.js +1 -1
- package/esm/tl/0_tl_raw_writer.js +1 -1
- package/package.json +1 -1
- package/script/client/0_message.js +6 -2
- package/script/constants.d.ts +1 -1
- package/script/constants.js +1 -1
- package/script/tl/0_tl_raw_writer.js +1 -1
package/esm/client/0_message.js
CHANGED
|
@@ -20,8 +20,12 @@ export function getMessageId(lastMsgId) {
|
|
|
20
20
|
return newMsgId;
|
|
21
21
|
}
|
|
22
22
|
export function packUnencryptedMessage(data, messageId) {
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const writer = new TLRawWriter();
|
|
24
|
+
writer.writeInt64(0n); // auth key
|
|
25
|
+
writer.writeInt64(messageId);
|
|
26
|
+
writer.writeInt32(data.length);
|
|
27
|
+
writer.write(data);
|
|
28
|
+
return writer.buffer;
|
|
25
29
|
}
|
|
26
30
|
export function unpackUnencryptedMessage(buffer) {
|
|
27
31
|
const reader = new TLRawReader(buffer);
|
package/esm/constants.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const PUBLIC_KEYS: PublicKeys;
|
|
|
5
5
|
export declare const VECTOR_CONSTRUCTOR = 481674261;
|
|
6
6
|
export declare const INITIAL_DC: DC;
|
|
7
7
|
export declare const LAYER = 160;
|
|
8
|
-
export declare const APP_VERSION = "MTKruto 0.0.
|
|
8
|
+
export declare const APP_VERSION = "MTKruto 0.0.974";
|
|
9
9
|
export declare const DEVICE_MODEL: string;
|
|
10
10
|
export declare const LANG_CODE: string;
|
|
11
11
|
export declare const LANG_PACK = "";
|
package/esm/constants.js
CHANGED
|
@@ -54,7 +54,7 @@ export const PUBLIC_KEYS = Object.freeze([
|
|
|
54
54
|
export const VECTOR_CONSTRUCTOR = 0x1CB5C415;
|
|
55
55
|
export const INITIAL_DC = "2-test";
|
|
56
56
|
export const LAYER = 160;
|
|
57
|
-
export const APP_VERSION = "MTKruto 0.0.
|
|
57
|
+
export const APP_VERSION = "MTKruto 0.0.974";
|
|
58
58
|
// @ts-ignore: lib
|
|
59
59
|
export const DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
|
|
60
60
|
export const LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
|
@@ -16,7 +16,7 @@ export class TLRawWriter {
|
|
|
16
16
|
return this;
|
|
17
17
|
}
|
|
18
18
|
writeInt24(int, signed = true) {
|
|
19
|
-
this.write(bufferFromBigInt(int, 24 /
|
|
19
|
+
this.write(bufferFromBigInt(int, 24 / 8, true, signed));
|
|
20
20
|
return this;
|
|
21
21
|
}
|
|
22
22
|
writeInt32(int, signed = true) {
|
package/package.json
CHANGED
|
@@ -24,8 +24,12 @@ function getMessageId(lastMsgId) {
|
|
|
24
24
|
}
|
|
25
25
|
exports.getMessageId = getMessageId;
|
|
26
26
|
function packUnencryptedMessage(data, messageId) {
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const writer = new _0_tl_raw_writer_js_1.TLRawWriter();
|
|
28
|
+
writer.writeInt64(0n); // auth key
|
|
29
|
+
writer.writeInt64(messageId);
|
|
30
|
+
writer.writeInt32(data.length);
|
|
31
|
+
writer.write(data);
|
|
32
|
+
return writer.buffer;
|
|
29
33
|
}
|
|
30
34
|
exports.packUnencryptedMessage = packUnencryptedMessage;
|
|
31
35
|
function unpackUnencryptedMessage(buffer) {
|
package/script/constants.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const PUBLIC_KEYS: PublicKeys;
|
|
|
5
5
|
export declare const VECTOR_CONSTRUCTOR = 481674261;
|
|
6
6
|
export declare const INITIAL_DC: DC;
|
|
7
7
|
export declare const LAYER = 160;
|
|
8
|
-
export declare const APP_VERSION = "MTKruto 0.0.
|
|
8
|
+
export declare const APP_VERSION = "MTKruto 0.0.974";
|
|
9
9
|
export declare const DEVICE_MODEL: string;
|
|
10
10
|
export declare const LANG_CODE: string;
|
|
11
11
|
export declare const LANG_PACK = "";
|
package/script/constants.js
CHANGED
|
@@ -80,7 +80,7 @@ exports.PUBLIC_KEYS = Object.freeze([
|
|
|
80
80
|
exports.VECTOR_CONSTRUCTOR = 0x1CB5C415;
|
|
81
81
|
exports.INITIAL_DC = "2-test";
|
|
82
82
|
exports.LAYER = 160;
|
|
83
|
-
exports.APP_VERSION = "MTKruto 0.0.
|
|
83
|
+
exports.APP_VERSION = "MTKruto 0.0.974";
|
|
84
84
|
// @ts-ignore: lib
|
|
85
85
|
exports.DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
|
|
86
86
|
exports.LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
|
@@ -19,7 +19,7 @@ class TLRawWriter {
|
|
|
19
19
|
return this;
|
|
20
20
|
}
|
|
21
21
|
writeInt24(int, signed = true) {
|
|
22
|
-
this.write((0, _0_buffer_js_1.bufferFromBigInt)(int, 24 /
|
|
22
|
+
this.write((0, _0_buffer_js_1.bufferFromBigInt)(int, 24 / 8, true, signed));
|
|
23
23
|
return this;
|
|
24
24
|
}
|
|
25
25
|
writeInt32(int, signed = true) {
|