@mtkruto/node 0.0.999 → 0.1.100

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 (85) hide show
  1. package/esm/0_deps.d.ts +1 -1
  2. package/esm/0_deps.js +1 -1
  3. package/esm/3_errors.d.ts +1531 -0
  4. package/esm/3_errors.js +1531 -0
  5. package/esm/4_constants.d.ts +1 -1
  6. package/esm/4_constants.js +1 -1
  7. package/esm/4_errors.d.ts +25 -0
  8. package/esm/4_errors.js +64 -0
  9. package/esm/client/2_client_plain.js +1 -1
  10. package/esm/client/4_client.d.ts +2 -1
  11. package/esm/client/4_client.js +24 -41
  12. package/esm/deps/deno.land/x/{tgcrypto@0.1.3 → tgcrypto@0.3.2}/mod.d.ts +2 -6
  13. package/esm/deps/deno.land/x/tgcrypto@0.3.2/mod.js +158 -0
  14. package/esm/deps/deno.land/x/tgcrypto@0.3.2/tgcrypto.d.ts +2 -0
  15. package/esm/deps/deno.land/x/tgcrypto@0.3.2/tgcrypto.js +308 -0
  16. package/esm/mod.d.ts +3 -2
  17. package/esm/mod.js +3 -2
  18. package/esm/tl/2_types.d.ts +1 -1
  19. package/esm/tl/2_types.js +1 -2
  20. package/esm/tl/3_functions.d.ts +1 -1
  21. package/esm/tl/3_functions.js +1 -2
  22. package/esm/transport/0_obfuscation.js +1 -1
  23. package/esm/transport/0_transport.js +2 -2
  24. package/esm/types/0__file_id.js +0 -1
  25. package/esm/types/1_bot_command_scope.d.ts +1 -1
  26. package/esm/types/1_bot_command_scope.js +1 -1
  27. package/esm/types/1_chat.d.ts +1 -1
  28. package/esm/types/1_chat.js +1 -1
  29. package/esm/types/1_sticker.d.ts +1 -1
  30. package/esm/types/1_sticker.js +1 -1
  31. package/esm/types/1_user.d.ts +1 -1
  32. package/esm/types/1_user.js +1 -1
  33. package/esm/types/2_inline_keyboard_button.d.ts +1 -1
  34. package/esm/types/3_message.d.ts +12 -12
  35. package/esm/types/3_message.js +12 -12
  36. package/esm/types/5_inline_query_result.d.ts +1 -1
  37. package/esm/types/5_inline_query_result.js +1 -1
  38. package/esm/utilities/0_crypto.d.ts +1 -2
  39. package/esm/utilities/0_crypto.js +5 -12
  40. package/package.json +1 -1
  41. package/script/0_deps.d.ts +1 -1
  42. package/script/0_deps.js +3 -4
  43. package/script/3_errors.d.ts +1531 -0
  44. package/script/3_errors.js +2053 -0
  45. package/script/4_constants.d.ts +1 -1
  46. package/script/4_constants.js +1 -1
  47. package/script/4_errors.d.ts +25 -0
  48. package/script/4_errors.js +88 -0
  49. package/script/client/2_client_plain.js +1 -1
  50. package/script/client/4_client.d.ts +2 -1
  51. package/script/client/4_client.js +24 -41
  52. package/script/deps/deno.land/x/{tgcrypto@0.1.3 → tgcrypto@0.3.2}/mod.d.ts +2 -6
  53. package/script/deps/deno.land/x/tgcrypto@0.3.2/mod.js +171 -0
  54. package/script/deps/deno.land/x/tgcrypto@0.3.2/tgcrypto.d.ts +2 -0
  55. package/script/deps/deno.land/x/tgcrypto@0.3.2/tgcrypto.js +310 -0
  56. package/script/mod.d.ts +3 -2
  57. package/script/mod.js +16 -3
  58. package/script/tl/2_types.d.ts +1 -1
  59. package/script/tl/2_types.js +0 -1
  60. package/script/tl/3_functions.d.ts +1 -1
  61. package/script/tl/3_functions.js +0 -1
  62. package/script/transport/0_obfuscation.js +1 -1
  63. package/script/transport/0_transport.js +2 -2
  64. package/script/types/0__file_id.js +0 -1
  65. package/script/types/1_bot_command_scope.d.ts +1 -1
  66. package/script/types/1_bot_command_scope.js +1 -1
  67. package/script/types/1_chat.d.ts +1 -1
  68. package/script/types/1_chat.js +1 -1
  69. package/script/types/1_sticker.d.ts +1 -1
  70. package/script/types/1_sticker.js +1 -1
  71. package/script/types/1_user.d.ts +1 -1
  72. package/script/types/1_user.js +1 -1
  73. package/script/types/2_inline_keyboard_button.d.ts +1 -1
  74. package/script/types/3_message.d.ts +12 -12
  75. package/script/types/3_message.js +12 -12
  76. package/script/types/5_inline_query_result.d.ts +1 -1
  77. package/script/types/5_inline_query_result.js +1 -1
  78. package/script/utilities/0_crypto.d.ts +1 -2
  79. package/script/utilities/0_crypto.js +4 -11
  80. package/esm/deps/deno.land/x/tgcrypto@0.1.3/mod.js +0 -68
  81. package/esm/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.d.ts +0 -2
  82. package/esm/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.js +0 -1078
  83. package/script/deps/deno.land/x/tgcrypto@0.1.3/mod.js +0 -82
  84. package/script/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.d.ts +0 -2
  85. package/script/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.js +0 -1080
@@ -1,82 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.factorize = exports.cbc256Decrypt = exports.cbc256Encrypt = exports.ctr256Decrypt = exports.ctr256Encrypt = exports.ige256Decrypt = exports.ige256Encrypt = exports.init = void 0;
7
- const tgcrypto_js_1 = __importDefault(require("./tgcrypto.js"));
8
- // deno-lint-ignore no-explicit-any
9
- let module_;
10
- const promise = (0, tgcrypto_js_1.default)().then((v) => module_ = v);
11
- async function init() {
12
- await promise;
13
- }
14
- exports.init = init;
15
- /**
16
- * Performs IGE-256 encryption.
17
- *
18
- * @param data The unencrypted data, larger than a byte, divisible by 16
19
- * @param key 32-byte encryption key
20
- * @param iv 32-byte initialization vector
21
- */
22
- function ige256Encrypt(data, key, iv) {
23
- return module_.ige256Encrypt(data, key, iv);
24
- }
25
- exports.ige256Encrypt = ige256Encrypt;
26
- /**
27
- * Performs IGE-256 decryption.
28
- *
29
- * @param data The encrypted data, larger than a byte, divisible by 16
30
- * @param key 32-byte encryption key
31
- * @param iv 32-byte initialization vector
32
- */
33
- function ige256Decrypt(data, key, iv) {
34
- return module_.ige256Decrypt(data, key, iv);
35
- }
36
- exports.ige256Decrypt = ige256Decrypt;
37
- /**
38
- * Performs CTR-256 encryption.
39
- *
40
- * @param data The data, larger than a byte
41
- * @param key 32-byte encryption key
42
- * @param iv 16-byte initialization vector
43
- * @param state 1-byte state
44
- */
45
- function ctr256Encrypt(data, key, iv, state) {
46
- return module_.ctr256Encrypt(data, key, iv, state);
47
- }
48
- exports.ctr256Encrypt = ctr256Encrypt;
49
- /**
50
- * Alias of `ctr256Encrypt`
51
- */
52
- function ctr256Decrypt(data, key, iv, state) {
53
- return module_.ctr256Decrypt(data, key, iv, state);
54
- }
55
- exports.ctr256Decrypt = ctr256Decrypt;
56
- /**
57
- * Performs CBC-256 encryption.
58
- *
59
- * @param data The unencrypted data, larger than a byte, divisible by 16
60
- * @param key 32-byte encryption key
61
- * @param iv 16-byte initialization vector
62
- */
63
- function cbc256Encrypt(data, key, iv) {
64
- return module_.cbc256Encrypt(data, key, iv);
65
- }
66
- exports.cbc256Encrypt = cbc256Encrypt;
67
- /**
68
- * Performs CBC-256 decryption.
69
- *
70
- * @param data The encrypted data, larger than a byte, divisible by 16
71
- * @param key 32-byte encryption key
72
- * @param iv 16-byte initialization vector
73
- */
74
- function cbc256Decrypt(data, key, iv) {
75
- return module_.cbc256Decrypt(data, key, iv);
76
- }
77
- exports.cbc256Decrypt = cbc256Decrypt;
78
- function factorize(pq) {
79
- const vector = module_.factorize(pq);
80
- return [vector.get(0), vector.get(1)];
81
- }
82
- exports.factorize = factorize;
@@ -1,2 +0,0 @@
1
- export default Module;
2
- declare function Module(Module?: {}): any;