@mtkruto/node 0.0.975 → 0.0.976
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/3_client.d.ts +4 -0
- package/esm/client/3_client.js +7 -0
- package/esm/constants.d.ts +1 -1
- package/esm/constants.js +1 -1
- package/package.json +1 -1
- package/script/client/3_client.d.ts +4 -0
- package/script/client/3_client.js +7 -0
- package/script/constants.d.ts +1 -1
- package/script/constants.js +1 -1
package/esm/client/3_client.d.ts
CHANGED
|
@@ -132,6 +132,10 @@ export declare class Client extends ClientAbstract {
|
|
|
132
132
|
* [2]: https://core.telegram.org/method/updates.getState
|
|
133
133
|
*/
|
|
134
134
|
authorize(params?: string | types.AuthExportedAuthorization | AuthorizeUserParams): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Same as calling `.connect()` followed by `.authorize(params)`.
|
|
137
|
+
*/
|
|
138
|
+
start(params?: string | types.AuthExportedAuthorization | AuthorizeUserParams): Promise<void>;
|
|
135
139
|
private receiveLoop;
|
|
136
140
|
private pingLoop;
|
|
137
141
|
private lastMsgId;
|
package/esm/client/3_client.js
CHANGED
|
@@ -473,6 +473,13 @@ export class Client extends ClientAbstract {
|
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
+
/**
|
|
477
|
+
* Same as calling `.connect()` followed by `.authorize(params)`.
|
|
478
|
+
*/
|
|
479
|
+
async start(params) {
|
|
480
|
+
await this.connect();
|
|
481
|
+
await this.authorize(params);
|
|
482
|
+
}
|
|
476
483
|
async receiveLoop() {
|
|
477
484
|
if (!this.auth) {
|
|
478
485
|
throw new Error("Not connected");
|
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.976";
|
|
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.976";
|
|
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];
|
package/package.json
CHANGED
|
@@ -132,6 +132,10 @@ export declare class Client extends ClientAbstract {
|
|
|
132
132
|
* [2]: https://core.telegram.org/method/updates.getState
|
|
133
133
|
*/
|
|
134
134
|
authorize(params?: string | types.AuthExportedAuthorization | AuthorizeUserParams): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Same as calling `.connect()` followed by `.authorize(params)`.
|
|
137
|
+
*/
|
|
138
|
+
start(params?: string | types.AuthExportedAuthorization | AuthorizeUserParams): Promise<void>;
|
|
135
139
|
private receiveLoop;
|
|
136
140
|
private pingLoop;
|
|
137
141
|
private lastMsgId;
|
|
@@ -499,6 +499,13 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
+
/**
|
|
503
|
+
* Same as calling `.connect()` followed by `.authorize(params)`.
|
|
504
|
+
*/
|
|
505
|
+
async start(params) {
|
|
506
|
+
await this.connect();
|
|
507
|
+
await this.authorize(params);
|
|
508
|
+
}
|
|
502
509
|
async receiveLoop() {
|
|
503
510
|
if (!this.auth) {
|
|
504
511
|
throw new Error("Not connected");
|
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.976";
|
|
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.976";
|
|
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];
|