@mtkruto/node 0.1.0 → 0.1.101

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 (241) hide show
  1. package/esm/0_deps.d.ts +4 -3
  2. package/esm/0_deps.js +4 -3
  3. package/esm/4_constants.d.ts +1 -1
  4. package/esm/4_constants.js +1 -1
  5. package/esm/client/0_message.js +3 -9
  6. package/esm/client/3_types.d.ts +2 -0
  7. package/esm/client/4_client.d.ts +19 -3
  8. package/esm/client/4_client.js +209 -68
  9. package/esm/connection/1_connection_web_socket.js +5 -2
  10. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_false.js +1 -0
  11. package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/fnv32.d.ts +2 -0
  12. package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/fnv32.js +24 -0
  13. package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/fnv64.d.ts +2 -0
  14. package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/fnv64.js +27 -0
  15. package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/mod.d.ts +1 -0
  16. package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/mod.js +21 -0
  17. package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/util.d.ts +13 -0
  18. package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/util.js +48 -0
  19. package/esm/deps/deno.land/std@0.203.0/crypto/_wasm/lib/deno_std_wasm_crypto.generated.d.ts +125 -0
  20. package/esm/deps/deno.land/std@0.203.0/crypto/_wasm/lib/deno_std_wasm_crypto.generated.js +3337 -0
  21. package/esm/deps/deno.land/std@0.203.0/crypto/_wasm/mod.d.ts +12 -0
  22. package/esm/deps/deno.land/std@0.203.0/crypto/_wasm/mod.js +39 -0
  23. package/esm/deps/deno.land/std@0.203.0/crypto/crypto.d.ts +157 -0
  24. package/esm/deps/deno.land/std@0.203.0/crypto/crypto.js +266 -0
  25. package/esm/deps/deno.land/std@0.203.0/crypto/keystack.d.ts +4 -0
  26. package/esm/deps/deno.land/std@0.203.0/crypto/keystack.js +6 -0
  27. package/esm/deps/deno.land/std@0.203.0/crypto/mod.d.ts +12 -0
  28. package/esm/deps/deno.land/std@0.203.0/crypto/mod.js +14 -0
  29. package/esm/deps/deno.land/std@0.203.0/crypto/timing_safe_equal.d.ts +28 -0
  30. package/esm/deps/deno.land/std@0.203.0/crypto/timing_safe_equal.js +54 -0
  31. package/esm/deps/deno.land/std@0.203.0/crypto/to_hash_string.d.ts +19 -0
  32. package/esm/deps/deno.land/std@0.203.0/crypto/to_hash_string.js +31 -0
  33. package/esm/deps/deno.land/std@0.203.0/crypto/unstable/keystack.d.ts +46 -0
  34. package/esm/deps/deno.land/std@0.203.0/crypto/unstable/keystack.js +149 -0
  35. package/esm/deps/deno.land/std@0.203.0/encoding/_util.d.ts +1 -0
  36. package/esm/deps/deno.land/std@0.203.0/encoding/_util.js +26 -0
  37. package/esm/deps/deno.land/std@0.203.0/encoding/base64.d.ts +23 -0
  38. package/{script/deps/deno.land/std@0.201.0 → esm/deps/deno.land/std@0.203.0}/encoding/base64.js +23 -18
  39. package/esm/deps/deno.land/std@0.203.0/encoding/base64url.d.ts +24 -0
  40. package/esm/deps/deno.land/std@0.203.0/encoding/base64url.js +80 -0
  41. package/esm/deps/deno.land/std@0.203.0/encoding/hex.d.ts +18 -0
  42. package/esm/deps/deno.land/std@0.203.0/encoding/hex.js +115 -0
  43. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/fmt/colors.js +1 -1
  44. package/{script/deps/deno.land/x/tgcrypto@0.2.1 → esm/deps/deno.land/x/tgcrypto@0.3.3}/mod.d.ts +2 -6
  45. package/esm/deps/deno.land/x/tgcrypto@0.3.3/mod.js +164 -0
  46. package/esm/deps/deno.land/x/tgcrypto@0.3.3/tgcrypto.js +324 -0
  47. package/esm/transport/0_obfuscation.js +1 -1
  48. package/esm/transport/0_transport.js +2 -2
  49. package/esm/types/3_message.js +1 -1
  50. package/esm/utilities/0_bigint.d.ts +1 -0
  51. package/esm/utilities/0_bigint.js +1 -0
  52. package/esm/utilities/0_crypto.d.ts +1 -2
  53. package/esm/utilities/0_crypto.js +3 -12
  54. package/esm/utilities/0_queue.js +1 -1
  55. package/package.json +1 -1
  56. package/script/0_deps.d.ts +4 -3
  57. package/script/0_deps.js +7 -6
  58. package/script/4_constants.d.ts +1 -1
  59. package/script/4_constants.js +1 -1
  60. package/script/client/0_message.js +2 -8
  61. package/script/client/3_types.d.ts +2 -0
  62. package/script/client/4_client.d.ts +19 -3
  63. package/script/client/4_client.js +208 -66
  64. package/script/connection/1_connection_web_socket.js +5 -2
  65. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_false.js +1 -0
  66. package/script/deps/deno.land/std@0.203.0/crypto/_fnv/fnv32.d.ts +2 -0
  67. package/script/deps/deno.land/std@0.203.0/crypto/_fnv/fnv32.js +29 -0
  68. package/script/deps/deno.land/std@0.203.0/crypto/_fnv/fnv64.d.ts +2 -0
  69. package/script/deps/deno.land/std@0.203.0/crypto/_fnv/fnv64.js +32 -0
  70. package/script/deps/deno.land/std@0.203.0/crypto/_fnv/mod.d.ts +1 -0
  71. package/script/deps/deno.land/std@0.203.0/crypto/_fnv/mod.js +25 -0
  72. package/script/deps/deno.land/std@0.203.0/crypto/_fnv/util.d.ts +13 -0
  73. package/script/deps/deno.land/std@0.203.0/crypto/_fnv/util.js +54 -0
  74. package/script/deps/deno.land/std@0.203.0/crypto/_wasm/lib/deno_std_wasm_crypto.generated.d.ts +125 -0
  75. package/script/deps/deno.land/std@0.203.0/crypto/_wasm/lib/deno_std_wasm_crypto.generated.js +3345 -0
  76. package/script/deps/deno.land/std@0.203.0/crypto/_wasm/mod.d.ts +12 -0
  77. package/script/deps/deno.land/std@0.203.0/crypto/_wasm/mod.js +44 -0
  78. package/script/deps/deno.land/std@0.203.0/crypto/crypto.d.ts +157 -0
  79. package/script/deps/deno.land/std@0.203.0/crypto/crypto.js +292 -0
  80. package/script/deps/deno.land/std@0.203.0/crypto/keystack.d.ts +4 -0
  81. package/script/deps/deno.land/std@0.203.0/crypto/keystack.js +22 -0
  82. package/script/deps/deno.land/std@0.203.0/crypto/mod.d.ts +12 -0
  83. package/script/deps/deno.land/std@0.203.0/crypto/mod.js +30 -0
  84. package/script/deps/deno.land/std@0.203.0/crypto/timing_safe_equal.d.ts +28 -0
  85. package/script/deps/deno.land/std@0.203.0/crypto/timing_safe_equal.js +58 -0
  86. package/script/deps/deno.land/std@0.203.0/crypto/to_hash_string.d.ts +19 -0
  87. package/script/deps/deno.land/std@0.203.0/crypto/to_hash_string.js +35 -0
  88. package/script/deps/deno.land/std@0.203.0/crypto/unstable/keystack.d.ts +46 -0
  89. package/script/deps/deno.land/std@0.203.0/crypto/unstable/keystack.js +176 -0
  90. package/script/deps/deno.land/std@0.203.0/encoding/_util.d.ts +1 -0
  91. package/script/deps/deno.land/std@0.203.0/encoding/_util.js +30 -0
  92. package/script/deps/deno.land/std@0.203.0/encoding/base64.d.ts +23 -0
  93. package/{esm/deps/deno.land/std@0.201.0 → script/deps/deno.land/std@0.203.0}/encoding/base64.js +28 -13
  94. package/script/deps/deno.land/std@0.203.0/encoding/base64url.d.ts +24 -0
  95. package/script/deps/deno.land/std@0.203.0/encoding/base64url.js +108 -0
  96. package/script/deps/deno.land/std@0.203.0/encoding/hex.d.ts +18 -0
  97. package/script/deps/deno.land/std@0.203.0/encoding/hex.js +122 -0
  98. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/fmt/colors.js +1 -1
  99. package/{esm/deps/deno.land/x/tgcrypto@0.2.1 → script/deps/deno.land/x/tgcrypto@0.3.3}/mod.d.ts +2 -6
  100. package/script/deps/deno.land/x/tgcrypto@0.3.3/mod.js +177 -0
  101. package/script/deps/deno.land/x/tgcrypto@0.3.3/tgcrypto.js +326 -0
  102. package/script/transport/0_obfuscation.js +1 -1
  103. package/script/transport/0_transport.js +2 -2
  104. package/script/types/3_message.js +1 -1
  105. package/script/utilities/0_bigint.d.ts +1 -0
  106. package/script/utilities/0_bigint.js +1 -0
  107. package/script/utilities/0_crypto.d.ts +1 -2
  108. package/script/utilities/0_crypto.js +2 -11
  109. package/script/utilities/0_queue.js +1 -1
  110. package/esm/deps/deno.land/std@0.201.0/encoding/base64.d.ts +0 -11
  111. package/esm/deps/deno.land/x/tgcrypto@0.2.1/mod.js +0 -81
  112. package/esm/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.js +0 -991
  113. package/script/deps/deno.land/std@0.201.0/encoding/base64.d.ts +0 -11
  114. package/script/deps/deno.land/x/tgcrypto@0.2.1/mod.js +0 -95
  115. package/script/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.js +0 -993
  116. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_constants.d.ts +0 -0
  117. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_constants.js +0 -0
  118. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_diff.d.ts +0 -0
  119. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_diff.js +0 -0
  120. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_format.d.ts +0 -0
  121. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_format.js +0 -0
  122. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert.d.ts +0 -0
  123. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert.js +0 -0
  124. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_almost_equals.d.ts +0 -0
  125. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_almost_equals.js +0 -0
  126. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_array_includes.d.ts +0 -0
  127. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_array_includes.js +0 -0
  128. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_equals.d.ts +0 -0
  129. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_equals.js +0 -0
  130. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_exists.d.ts +0 -0
  131. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_exists.js +0 -0
  132. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_false.d.ts +1 -1
  133. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater.d.ts +0 -0
  134. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater.js +0 -0
  135. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater_or_equal.d.ts +0 -0
  136. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater_or_equal.js +0 -0
  137. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_instance_of.d.ts +0 -0
  138. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_instance_of.js +0 -0
  139. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_is_error.d.ts +0 -0
  140. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_is_error.js +0 -0
  141. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less.d.ts +0 -0
  142. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less.js +0 -0
  143. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less_or_equal.d.ts +0 -0
  144. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less_or_equal.js +0 -0
  145. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_match.d.ts +0 -0
  146. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_match.js +0 -0
  147. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_equals.d.ts +0 -0
  148. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_equals.js +0 -0
  149. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_instance_of.d.ts +0 -0
  150. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_instance_of.js +0 -0
  151. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_match.d.ts +0 -0
  152. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_match.js +0 -0
  153. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_strict_equals.d.ts +0 -0
  154. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_strict_equals.js +0 -0
  155. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_object_match.d.ts +0 -0
  156. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_object_match.js +0 -0
  157. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_rejects.d.ts +0 -0
  158. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_rejects.js +0 -0
  159. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_strict_equals.d.ts +0 -0
  160. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_strict_equals.js +0 -0
  161. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_string_includes.d.ts +0 -0
  162. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_string_includes.js +0 -0
  163. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_throws.d.ts +0 -0
  164. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_throws.js +0 -0
  165. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assertion_error.d.ts +0 -0
  166. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assertion_error.js +0 -0
  167. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/equal.d.ts +0 -0
  168. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/equal.js +0 -0
  169. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/fail.d.ts +0 -0
  170. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/fail.js +0 -0
  171. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/mod.d.ts +0 -0
  172. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/mod.js +0 -0
  173. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unimplemented.d.ts +0 -0
  174. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unimplemented.js +0 -0
  175. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unreachable.d.ts +0 -0
  176. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unreachable.js +0 -0
  177. package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/fmt/colors.d.ts +0 -0
  178. package/esm/deps/deno.land/x/{tgcrypto@0.2.1 → tgcrypto@0.3.3}/tgcrypto.d.ts +0 -0
  179. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_constants.d.ts +0 -0
  180. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_constants.js +0 -0
  181. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_diff.d.ts +0 -0
  182. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_diff.js +0 -0
  183. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_format.d.ts +0 -0
  184. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_format.js +0 -0
  185. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert.d.ts +0 -0
  186. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert.js +0 -0
  187. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_almost_equals.d.ts +0 -0
  188. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_almost_equals.js +0 -0
  189. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_array_includes.d.ts +0 -0
  190. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_array_includes.js +0 -0
  191. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_equals.d.ts +0 -0
  192. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_equals.js +0 -0
  193. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_exists.d.ts +0 -0
  194. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_exists.js +0 -0
  195. package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_false.d.ts +1 -1
  196. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater.d.ts +0 -0
  197. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater.js +0 -0
  198. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater_or_equal.d.ts +0 -0
  199. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater_or_equal.js +0 -0
  200. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_instance_of.d.ts +0 -0
  201. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_instance_of.js +0 -0
  202. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_is_error.d.ts +0 -0
  203. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_is_error.js +0 -0
  204. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less.d.ts +0 -0
  205. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less.js +0 -0
  206. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less_or_equal.d.ts +0 -0
  207. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less_or_equal.js +0 -0
  208. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_match.d.ts +0 -0
  209. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_match.js +0 -0
  210. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_equals.d.ts +0 -0
  211. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_equals.js +0 -0
  212. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_instance_of.d.ts +0 -0
  213. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_instance_of.js +0 -0
  214. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_match.d.ts +0 -0
  215. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_match.js +0 -0
  216. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_strict_equals.d.ts +0 -0
  217. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_strict_equals.js +0 -0
  218. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_object_match.d.ts +0 -0
  219. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_object_match.js +0 -0
  220. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_rejects.d.ts +0 -0
  221. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_rejects.js +0 -0
  222. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_strict_equals.d.ts +0 -0
  223. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_strict_equals.js +0 -0
  224. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_string_includes.d.ts +0 -0
  225. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_string_includes.js +0 -0
  226. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_throws.d.ts +0 -0
  227. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_throws.js +0 -0
  228. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assertion_error.d.ts +0 -0
  229. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assertion_error.js +0 -0
  230. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/equal.d.ts +0 -0
  231. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/equal.js +0 -0
  232. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/fail.d.ts +0 -0
  233. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/fail.js +0 -0
  234. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/mod.d.ts +0 -0
  235. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/mod.js +0 -0
  236. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unimplemented.d.ts +0 -0
  237. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unimplemented.js +0 -0
  238. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unreachable.d.ts +0 -0
  239. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unreachable.js +0 -0
  240. /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/fmt/colors.d.ts +0 -0
  241. /package/script/deps/deno.land/x/{tgcrypto@0.2.1 → tgcrypto@0.3.3}/tgcrypto.d.ts +0 -0
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ // Copyright 2009 The Go Authors. All rights reserved.
3
+ // https://github.com/golang/go/blob/master/LICENSE
4
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
5
+ // This module is browser compatible.
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.decodeHex = exports.decode = exports.encodeHex = exports.encode = void 0;
8
+ const _util_js_1 = require("./_util.js");
9
+ /** Port of the Go
10
+ * [encoding/hex](https://github.com/golang/go/blob/go1.12.5/src/encoding/hex/hex.go)
11
+ * library.
12
+ *
13
+ * This module is browser compatible.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import {
18
+ * decodeHex,
19
+ * encodeHex,
20
+ * } from "https://deno.land/std@$STD_VERSION/encoding/hex.ts";
21
+ *
22
+ * const binary = new TextEncoder().encode("abc");
23
+ * const encoded = encodeHex(binary);
24
+ * console.log(encoded);
25
+ * // => "616263"
26
+ *
27
+ * console.log(decodeHex(encoded));
28
+ * // => Uint8Array(3) [ 97, 98, 99 ]
29
+ * ```
30
+ *
31
+ * @module
32
+ */
33
+ const hexTable = new TextEncoder().encode("0123456789abcdef");
34
+ const textEncoder = new TextEncoder();
35
+ const textDecoder = new TextDecoder();
36
+ function errInvalidByte(byte) {
37
+ return new TypeError(`Invalid byte '${String.fromCharCode(byte)}'`);
38
+ }
39
+ function errLength() {
40
+ return new RangeError("Odd length hex string");
41
+ }
42
+ /** Converts a hex character into its value. */
43
+ function fromHexChar(byte) {
44
+ // '0' <= byte && byte <= '9'
45
+ if (48 <= byte && byte <= 57)
46
+ return byte - 48;
47
+ // 'a' <= byte && byte <= 'f'
48
+ if (97 <= byte && byte <= 102)
49
+ return byte - 97 + 10;
50
+ // 'A' <= byte && byte <= 'F'
51
+ if (65 <= byte && byte <= 70)
52
+ return byte - 65 + 10;
53
+ throw errInvalidByte(byte);
54
+ }
55
+ /**
56
+ * @deprecated (will be removed in 0.210.0) Use a `encodeHex` instead.
57
+ *
58
+ * Encodes `src` into `src.length * 2` bytes.
59
+ */
60
+ function encode(src) {
61
+ const dst = new Uint8Array(src.length * 2);
62
+ for (let i = 0; i < dst.length; i++) {
63
+ const v = src[i];
64
+ dst[i * 2] = hexTable[v >> 4];
65
+ dst[i * 2 + 1] = hexTable[v & 0x0f];
66
+ }
67
+ return dst;
68
+ }
69
+ exports.encode = encode;
70
+ /** Encodes the source into hex string. */
71
+ function encodeHex(src) {
72
+ const u8 = (0, _util_js_1.validateBinaryLike)(src);
73
+ const dst = new Uint8Array(u8.length * 2);
74
+ for (let i = 0; i < dst.length; i++) {
75
+ const v = u8[i];
76
+ dst[i * 2] = hexTable[v >> 4];
77
+ dst[i * 2 + 1] = hexTable[v & 0x0f];
78
+ }
79
+ return textDecoder.decode(dst);
80
+ }
81
+ exports.encodeHex = encodeHex;
82
+ /**
83
+ * @deprecated (will be removed in 0.210.0) Use a `decodeHex` instead.
84
+ *
85
+ * Decodes `src` into `src.length / 2` bytes.
86
+ * If the input is malformed, an error will be thrown.
87
+ */
88
+ function decode(src) {
89
+ const dst = new Uint8Array(src.length / 2);
90
+ for (let i = 0; i < dst.length; i++) {
91
+ const a = fromHexChar(src[i * 2]);
92
+ const b = fromHexChar(src[i * 2 + 1]);
93
+ dst[i] = (a << 4) | b;
94
+ }
95
+ if (src.length % 2 === 1) {
96
+ // Check for invalid char before reporting bad length,
97
+ // since the invalid char (if present) is an earlier problem.
98
+ fromHexChar(src[dst.length * 2]);
99
+ throw errLength();
100
+ }
101
+ return dst;
102
+ }
103
+ exports.decode = decode;
104
+ /** Decodes the given hex string to Uint8Array.
105
+ * If the input is malformed, an error will be thrown. */
106
+ function decodeHex(src) {
107
+ const u8 = textEncoder.encode(src);
108
+ const dst = new Uint8Array(u8.length / 2);
109
+ for (let i = 0; i < dst.length; i++) {
110
+ const a = fromHexChar(u8[i * 2]);
111
+ const b = fromHexChar(u8[i * 2 + 1]);
112
+ dst[i] = (a << 4) | b;
113
+ }
114
+ if (u8.length % 2 === 1) {
115
+ // Check for invalid char before reporting bad length,
116
+ // since the invalid char (if present) is an earlier problem.
117
+ fromHexChar(u8[dst.length * 2]);
118
+ throw errLength();
119
+ }
120
+ return dst;
121
+ }
122
+ exports.decodeHex = decodeHex;
@@ -536,7 +536,7 @@ exports.bgRgb24 = bgRgb24;
536
536
  // https://github.com/chalk/ansi-regex/blob/02fa893d619d3da85411acc8fd4e2eea0e95a9d9/index.js
537
537
  const ANSI_PATTERN = new RegExp([
538
538
  "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
539
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))",
539
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TXZcf-nq-uy=><~]))",
540
540
  ].join("|"), "g");
541
541
  /**
542
542
  * @deprecated (will be removed in 1.0.0) Use `stripAnsiCode` instead.
@@ -16,18 +16,14 @@ export declare function ige256Encrypt(data: Uint8Array, key: Uint8Array, iv: Uin
16
16
  */
17
17
  export declare function ige256Decrypt(data: Uint8Array, key: Uint8Array, iv: Uint8Array): Uint8Array;
18
18
  /**
19
- * Performs CTR-256 encryption.
19
+ * Performs CTR-256 encryption/decryption.
20
20
  *
21
21
  * @param data The data, larger than a byte
22
22
  * @param key 32-byte encryption key
23
23
  * @param iv 16-byte initialization vector
24
24
  * @param state 1-byte state
25
25
  */
26
- export declare function ctr256Encrypt(data: Uint8Array, key: Uint8Array, iv: Uint8Array, state: Uint8Array): [Uint8Array, Uint8Array];
27
- /**
28
- * Alias of `ctr256Encrypt`
29
- */
30
- export declare function ctr256Decrypt(data: Uint8Array, key: Uint8Array, iv: Uint8Array, state: Uint8Array): [Uint8Array, Uint8Array];
26
+ export declare function ctr256(data: Uint8Array, key: Uint8Array, iv: Uint8Array, state: Uint8Array): void;
31
27
  /**
32
28
  * Performs CBC-256 encryption.
33
29
  *
@@ -0,0 +1,177 @@
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.ctr256 = 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
+ function checkIgeParams(data, key, iv) {
16
+ if (data.length == 0) {
17
+ throw new TypeError("data must not be empty");
18
+ }
19
+ else if (data.length % 16 != 0) {
20
+ throw new TypeError("data must consist of a number of bytes that is divisible by 16");
21
+ }
22
+ else if (key.length != 32) {
23
+ throw new TypeError("key must be 32 bytes");
24
+ }
25
+ else if (iv.length != 32) {
26
+ throw new TypeError("iv must be 32 bytes");
27
+ }
28
+ }
29
+ /**
30
+ * Performs IGE-256 encryption.
31
+ *
32
+ * @param data The unencrypted data, larger than a byte, divisible by 16
33
+ * @param key 32-byte encryption key
34
+ * @param iv 32-byte initialization vector
35
+ */
36
+ function ige256Encrypt(data, key, iv) {
37
+ checkIgeParams(data, key, iv);
38
+ const out = module_._malloc(data.length);
39
+ const datap = module_._malloc(data.length);
40
+ module_.HEAPU8.set(data, datap);
41
+ module_.ccall("ige256_encrypt", "void", ["pointer", "pointer", "number", "array", "array"], [datap, out, data.length, key, iv]);
42
+ try {
43
+ return module_.HEAPU8.slice(out, out + data.length);
44
+ }
45
+ finally {
46
+ module_._free(out);
47
+ module_._free(datap);
48
+ }
49
+ }
50
+ exports.ige256Encrypt = ige256Encrypt;
51
+ /**
52
+ * Performs IGE-256 decryption.
53
+ *
54
+ * @param data The encrypted data, larger than a byte, divisible by 16
55
+ * @param key 32-byte encryption key
56
+ * @param iv 32-byte initialization vector
57
+ */
58
+ function ige256Decrypt(data, key, iv) {
59
+ checkIgeParams(data, key, iv);
60
+ const out = module_._malloc(data.length);
61
+ const datap = module_._malloc(data.length);
62
+ module_.HEAPU8.set(data, datap);
63
+ module_.ccall("ige256_decrypt", "void", ["pointer", "pointer", "number", "array", "array"], [datap, out, data.length, key, iv]);
64
+ try {
65
+ return module_.HEAPU8.slice(out, out + data.length);
66
+ }
67
+ finally {
68
+ module_._free(out);
69
+ module_._free(datap);
70
+ }
71
+ }
72
+ exports.ige256Decrypt = ige256Decrypt;
73
+ function checkCtrParams(data, key, iv, state) {
74
+ if (data.length == 0) {
75
+ throw new TypeError("data must not be empty");
76
+ }
77
+ else if (key.length != 32) {
78
+ throw new TypeError("key must be 32 bytes");
79
+ }
80
+ else if (iv.length != 16) {
81
+ throw new TypeError("iv must be 16 bytes");
82
+ }
83
+ else if (state.length != 1) {
84
+ throw new TypeError("state must be 1 byte");
85
+ }
86
+ }
87
+ /**
88
+ * Performs CTR-256 encryption/decryption.
89
+ *
90
+ * @param data The data, larger than a byte
91
+ * @param key 32-byte encryption key
92
+ * @param iv 16-byte initialization vector
93
+ * @param state 1-byte state
94
+ */
95
+ function ctr256(data, key, iv, state) {
96
+ checkCtrParams(data, key, iv, state);
97
+ const datap = module_._malloc(data.length);
98
+ module_.HEAPU8.set(data, datap);
99
+ const ivp = module_._malloc(iv.length);
100
+ module_.HEAPU8.set(iv, ivp);
101
+ const statep = module_._malloc(state.length);
102
+ module_.HEAPU8.set(state, statep);
103
+ module_.ccall("ctr256", "void", ["pointer", "number", "array", "pointer", "pointer"], [datap, data.length, key, ivp, statep]);
104
+ data.set(module_.HEAPU8.slice(datap, datap + data.length));
105
+ iv.set(module_.HEAPU8.slice(ivp, ivp + iv.length));
106
+ state.set(module_.HEAPU8.slice(statep, statep + state.length));
107
+ module_._free(datap);
108
+ module_._free(ivp);
109
+ module_._free(statep);
110
+ }
111
+ exports.ctr256 = ctr256;
112
+ function checkCbcParams(data, key, iv) {
113
+ if (data.length == 0) {
114
+ throw new TypeError("data must not be empty");
115
+ }
116
+ else if (data.length % 16 != 0) {
117
+ throw new TypeError("data must consist of a number of bytes that is divisible by 16");
118
+ }
119
+ else if (key.length != 32) {
120
+ throw new TypeError("key must be 32 bytes");
121
+ }
122
+ else if (iv.length != 16) {
123
+ throw new TypeError("iv must be 16 bytes");
124
+ }
125
+ }
126
+ /**
127
+ * Performs CBC-256 encryption.
128
+ *
129
+ * @param data The unencrypted data, larger than a byte, divisible by 16
130
+ * @param key 32-byte encryption key
131
+ * @param iv 16-byte initialization vector
132
+ */
133
+ function cbc256Encrypt(data, key, iv) {
134
+ checkCbcParams(data, key, iv);
135
+ const datap = module_._malloc(data.length);
136
+ module_.HEAPU8.set(data, datap);
137
+ module_.ccall("cbc256_encrypt", "void", ["pointer", "number", "array", "array"], [datap, data.length, key, iv]);
138
+ try {
139
+ return module_.HEAPU8.slice(datap, datap + data.length);
140
+ }
141
+ finally {
142
+ module_._free(datap);
143
+ }
144
+ }
145
+ exports.cbc256Encrypt = cbc256Encrypt;
146
+ /**
147
+ * Performs CBC-256 decryption.
148
+ *
149
+ * @param data The encrypted data, larger than a byte, divisible by 16
150
+ * @param key 32-byte encryption key
151
+ * @param iv 16-byte initialization vector
152
+ */
153
+ function cbc256Decrypt(data, key, iv) {
154
+ checkCbcParams(data, key, iv);
155
+ const datap = module_._malloc(data.length);
156
+ module_.HEAPU8.set(data, datap);
157
+ module_.ccall("cbc256_decrypt", "void", ["pointer", "number", "array", "array"], [datap, data.length, key, iv]);
158
+ try {
159
+ return module_.HEAPU8.slice(datap, datap + data.length);
160
+ }
161
+ finally {
162
+ module_._free(datap);
163
+ }
164
+ }
165
+ exports.cbc256Decrypt = cbc256Decrypt;
166
+ function factorize(pq) {
167
+ const pqp = module_._malloc(16);
168
+ module_.ccall("factorize", "void", ["number", "pointer"], [pq, pqp]);
169
+ try {
170
+ const pqp_ = module_.HEAP64.slice(pqp / 8, pqp / 8 + 2);
171
+ return [pqp_[0], pqp_[1]];
172
+ }
173
+ finally {
174
+ module_._free(pqp);
175
+ }
176
+ }
177
+ exports.factorize = factorize;