diff --git a/package-lock.json b/package-lock.json index 69ceec4..97a6181 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,11 @@ "version": "8.0.0", "license": "GPL-3.0", "dependencies": { + "@types/aes-js": "^3.1.4", + "@types/debug": "^4.1.12", + "@types/lodash.debounce": "^4.0.9", + "@types/node": "^24.10.1", + "@types/pako": "^2.0.4", "@typescript/native-preview": "^7.0.0-dev.20251113.1", "aes-js": "3.1.2", "big-integer": "1.6.52", @@ -17,13 +22,6 @@ "lodash.debounce": "4.0.8", "pako": "2.1.0" }, - "devDependencies": { - "@types/aes-js": "^3.1.4", - "@types/debug": "^4.1.12", - "@types/lodash.debounce": "^4.0.9", - "@types/node": "^24.10.1", - "@types/pako": "^2.0.4" - }, "engines": { "node": ">=20" } @@ -31,14 +29,12 @@ "node_modules/@types/aes-js": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/aes-js/-/aes-js-3.1.4.tgz", - "integrity": "sha512-v3D66IptpUqh+pHKVNRxY8yvp2ESSZXe0rTzsGdzUhEwag7ljVfgCllkWv2YgiYXDhWFBrEywll4A5JToyTNFA==", - "dev": true + "integrity": "sha512-v3D66IptpUqh+pHKVNRxY8yvp2ESSZXe0rTzsGdzUhEwag7ljVfgCllkWv2YgiYXDhWFBrEywll4A5JToyTNFA==" }, "node_modules/@types/debug": { "version": "4.1.12", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "dev": true, "dependencies": { "@types/ms": "*" } @@ -46,14 +42,12 @@ "node_modules/@types/lodash": { "version": "4.14.196", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.196.tgz", - "integrity": "sha512-22y3o88f4a94mKljsZcanlNWPzO0uBsBdzLAngf2tp533LzZcQzb6+eZPJ+vCTt+bqF2XnvT9gejTLsAcJAJyQ==", - "dev": true + "integrity": "sha512-22y3o88f4a94mKljsZcanlNWPzO0uBsBdzLAngf2tp533LzZcQzb6+eZPJ+vCTt+bqF2XnvT9gejTLsAcJAJyQ==" }, "node_modules/@types/lodash.debounce": { "version": "4.0.9", "resolved": "https://registry.npmjs.org/@types/lodash.debounce/-/lodash.debounce-4.0.9.tgz", "integrity": "sha512-Ma5JcgTREwpLRwMM+XwBR7DaWe96nC38uCBDFKZWbNKD+osjVzdpnUSwBcqCptrp16sSOLBAUb50Car5I0TCsQ==", - "dev": true, "dependencies": { "@types/lodash": "*" } @@ -61,14 +55,12 @@ "node_modules/@types/ms": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", - "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", - "dev": true + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" }, "node_modules/@types/node": { "version": "24.10.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", - "dev": true, "license": "MIT", "dependencies": { "undici-types": "~7.16.0" @@ -78,7 +70,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/pako/-/pako-2.0.4.tgz", "integrity": "sha512-VWDCbrLeVXJM9fihYodcLiIv0ku+AlOa/TQ1SvYOaBuyrSKgEcro95LJyIsJ4vSo6BXIxOKxiJAat04CmST9Fw==", - "dev": true, "license": "MIT" }, "node_modules/@typescript/native-preview": { @@ -245,7 +236,6 @@ "version": "7.16.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", - "dev": true, "license": "MIT" } } diff --git a/package.json b/package.json index 7416eac..b49eb10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mtproto-nodejs-client", - "version": "8.0.0", + "version": "8.0.1", "type": "module", "description": "Telegram API JS (MTProto) client library for Node.js", "main": "lib/index.js", @@ -26,9 +26,7 @@ "debug": "4.4.3", "leemon": "6.2.0", "lodash.debounce": "4.0.8", - "pako": "2.1.0" - }, - "devDependencies": { + "pako": "2.1.0", "@types/aes-js": "^3.1.4", "@types/debug": "^4.1.12", "@types/lodash.debounce": "^4.0.9", @@ -39,4 +37,4 @@ "type": "git", "url": "git+https://github.com/fedyk/mtproto-nodejs-client.git" } -} +} \ No newline at end of file diff --git a/src/rpc.ts b/src/rpc.ts index 6c16db1..c1dd8a5 100644 --- a/src/rpc.ts +++ b/src/rpc.ts @@ -11,11 +11,24 @@ import { Transport } from "./transport.js"; import { Deserializer } from "./deserializer.js"; import { ModeOfOperationIGE } from "./aes.js"; import { pqPrimeFactorization } from "./pg.js"; -import { SHA1, SHA256, bigIntToBytes, bytesIsEqual, bytesToBigInt, bytesToBytesRaw, concatBytes, getRandomBytes, getRandomInt, intsToLong, longToBytesRaw, xorBytes } from "./common.js" import { Methods, Updates } from "./mtptoto-types.js"; import { RPCError } from "./errors.js"; import { Storage } from "./storage.js"; import { LAYER } from "./config.js"; +import { + SHA1, + SHA256, + bigIntToBytes, + bytesIsEqual, + bytesToBigInt, + bytesToBytesRaw, + concatBytes, + getRandomBytes, + getRandomInt, + intsToLong, + longToBytesRaw, + xorBytes +} from "./common.js" export interface Message { method: string