@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
@@ -107,7 +107,7 @@ class ConnectionWebSocket extends _0_connection_js_1.ConnectionUnframed {
107
107
  this.buffer.push(byte);
108
108
  }
109
109
  if (this.nextResolve != null && this.buffer.length >= this.nextResolve[0]) {
110
- this.nextResolve[1]();
110
+ this.nextResolve[1].resolve();
111
111
  this.nextResolve = null;
112
112
  }
113
113
  release();
@@ -162,7 +162,7 @@ class ConnectionWebSocket extends _0_connection_js_1.ConnectionUnframed {
162
162
  const release = await this.rMutex.acquire();
163
163
  try {
164
164
  if (this.buffer.length < p.length) {
165
- await new Promise((r) => this.nextResolve = [p.length, r]);
165
+ await new Promise((resolve, reject) => this.nextResolve = [p.length, { resolve, reject }]);
166
166
  }
167
167
  p.set(this.buffer.splice(0, p.length));
168
168
  }
@@ -187,6 +187,9 @@ class ConnectionWebSocket extends _0_connection_js_1.ConnectionUnframed {
187
187
  throw new Error("Connection not open");
188
188
  }
189
189
  this.webSocket.close(1000, "method");
190
+ if (this.nextResolve != null) {
191
+ this.nextResolve[1].reject(new Error("Connection not open"));
192
+ }
190
193
  }
191
194
  }
192
195
  exports.ConnectionWebSocket = ConnectionWebSocket;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.assertFalse = void 0;
4
4
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
5
5
  const assertion_error_js_1 = require("./assertion_error.js");
6
+ /** Make an assertion, error will be thrown if `expr` have truthy value. */
6
7
  function assertFalse(expr, msg = "") {
7
8
  if (expr) {
8
9
  throw new assertion_error_js_1.AssertionError(msg);
@@ -0,0 +1,2 @@
1
+ export declare const fnv32: (data: Uint8Array) => ArrayBuffer;
2
+ export declare const fnv32a: (data: Uint8Array) => ArrayBuffer;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ // Ported from Go:
3
+ // https://github.com/golang/go/tree/go1.13.10/src/hash/fnv/fnv.go
4
+ // Copyright 2011 The Go Authors. All rights reserved. BSD license.
5
+ // https://github.com/golang/go/blob/master/LICENSE
6
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
7
+ // This module is browser compatible.
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.fnv32a = exports.fnv32 = void 0;
10
+ const util_js_1 = require("./util.js");
11
+ const prime32 = 16777619;
12
+ const fnv32 = (data) => {
13
+ let hash = 2166136261;
14
+ data.forEach((c) => {
15
+ hash = (0, util_js_1.mul32)(hash, prime32);
16
+ hash ^= c;
17
+ });
18
+ return Uint32Array.from([(0, util_js_1.swap32)(hash)]).buffer;
19
+ };
20
+ exports.fnv32 = fnv32;
21
+ const fnv32a = (data) => {
22
+ let hash = 2166136261;
23
+ data.forEach((c) => {
24
+ hash ^= c;
25
+ hash = (0, util_js_1.mul32)(hash, prime32);
26
+ });
27
+ return Uint32Array.from([(0, util_js_1.swap32)(hash)]).buffer;
28
+ };
29
+ exports.fnv32a = fnv32a;
@@ -0,0 +1,2 @@
1
+ export declare const fnv64: (data: Uint8Array) => ArrayBuffer;
2
+ export declare const fnv64a: (data: Uint8Array) => ArrayBuffer;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ // Ported from Go:
3
+ // https://github.com/golang/go/tree/go1.13.10/src/hash/fnv/fnv.go
4
+ // Copyright 2011 The Go Authors. All rights reserved. BSD license.
5
+ // https://github.com/golang/go/blob/master/LICENSE
6
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
7
+ // This module is browser compatible.
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.fnv64a = exports.fnv64 = void 0;
10
+ const util_js_1 = require("./util.js");
11
+ const prime64Lo = 435;
12
+ const prime64Hi = 256;
13
+ const fnv64 = (data) => {
14
+ let hashLo = 2216829733;
15
+ let hashHi = 3421674724;
16
+ data.forEach((c) => {
17
+ [hashHi, hashLo] = (0, util_js_1.mul64)([hashHi, hashLo], [prime64Hi, prime64Lo]);
18
+ hashLo ^= c;
19
+ });
20
+ return new Uint32Array([(0, util_js_1.swap32)(hashHi >>> 0), (0, util_js_1.swap32)(hashLo >>> 0)]).buffer;
21
+ };
22
+ exports.fnv64 = fnv64;
23
+ const fnv64a = (data) => {
24
+ let hashLo = 2216829733;
25
+ let hashHi = 3421674724;
26
+ data.forEach((c) => {
27
+ hashLo ^= c;
28
+ [hashHi, hashLo] = (0, util_js_1.mul64)([hashHi, hashLo], [prime64Hi, prime64Lo]);
29
+ });
30
+ return new Uint32Array([(0, util_js_1.swap32)(hashHi >>> 0), (0, util_js_1.swap32)(hashLo >>> 0)]).buffer;
31
+ };
32
+ exports.fnv64a = fnv64a;
@@ -0,0 +1 @@
1
+ export declare function fnv(name: string, buf?: Uint8Array): ArrayBuffer;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
3
+ // This module is browser compatible.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.fnv = void 0;
6
+ const fnv32_js_1 = require("./fnv32.js");
7
+ const fnv64_js_1 = require("./fnv64.js");
8
+ function fnv(name, buf) {
9
+ if (!buf) {
10
+ throw new TypeError("no data provided for hashing");
11
+ }
12
+ switch (name) {
13
+ case "FNV32":
14
+ return (0, fnv32_js_1.fnv32)(buf);
15
+ case "FNV64":
16
+ return (0, fnv64_js_1.fnv64)(buf);
17
+ case "FNV32A":
18
+ return (0, fnv32_js_1.fnv32a)(buf);
19
+ case "FNV64A":
20
+ return (0, fnv64_js_1.fnv64a)(buf);
21
+ default:
22
+ throw new TypeError(`unsupported fnv digest: ${name}`);
23
+ }
24
+ }
25
+ exports.fnv = fnv;
@@ -0,0 +1,13 @@
1
+ export declare function swap32(val: number): number;
2
+ /**
3
+ * mul32 performs 32-bit multiplication, a * b
4
+ * @param a
5
+ * @param b
6
+ */
7
+ export declare function mul32(a: number, b: number): number;
8
+ /**
9
+ * mul64 performs 64-bit multiplication with two 32-bit words
10
+ * @param [ah, al]
11
+ * @param [bh, bl]
12
+ */
13
+ export declare function mul64([ah, al]: [number, number], [bh, bl]: [number, number]): [number, number];
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
3
+ // This module is browser compatible.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.mul64 = exports.mul32 = exports.swap32 = void 0;
6
+ function swap32(val) {
7
+ return (((val & 0xff) << 24) |
8
+ ((val & 0xff00) << 8) |
9
+ ((val >> 8) & 0xff00) |
10
+ ((val >> 24) & 0xff));
11
+ }
12
+ exports.swap32 = swap32;
13
+ function n16(n) {
14
+ return n & 0xffff;
15
+ }
16
+ function n32(n) {
17
+ return n >>> 0;
18
+ }
19
+ function add32WithCarry(a, b) {
20
+ const added = n32(a) + n32(b);
21
+ return [n32(added), added > 0xffffffff ? 1 : 0];
22
+ }
23
+ function mul32WithCarry(a, b) {
24
+ const al = n16(a);
25
+ const ah = n16(a >>> 16);
26
+ const bl = n16(b);
27
+ const bh = n16(b >>> 16);
28
+ const [t, tc] = add32WithCarry(al * bh, ah * bl);
29
+ const [n, nc] = add32WithCarry(al * bl, n32(t << 16));
30
+ const carry = nc + (tc << 16) + n16(t >>> 16) + ah * bh;
31
+ return [n, carry];
32
+ }
33
+ /**
34
+ * mul32 performs 32-bit multiplication, a * b
35
+ * @param a
36
+ * @param b
37
+ */
38
+ function mul32(a, b) {
39
+ // https://stackoverflow.com/a/28151933
40
+ const al = n16(a);
41
+ const ah = a - al;
42
+ return n32(n32(ah * b) + al * b);
43
+ }
44
+ exports.mul32 = mul32;
45
+ /**
46
+ * mul64 performs 64-bit multiplication with two 32-bit words
47
+ * @param [ah, al]
48
+ * @param [bh, bl]
49
+ */
50
+ function mul64([ah, al], [bh, bl]) {
51
+ const [n, c] = mul32WithCarry(al, bl);
52
+ return [n32(mul32(al, bh) + mul32(ah, bl) + c), n];
53
+ }
54
+ exports.mul64 = mul64;
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Returns the digest of the given `data` using the given hash `algorithm`.
3
+ *
4
+ * `length` will usually be left `undefined` to use the default length for
5
+ * the algorithm. For algorithms with variable-length output, it can be used
6
+ * to specify a non-negative integer number of bytes.
7
+ *
8
+ * An error will be thrown if `algorithm` is not a supported hash algorithm or
9
+ * `length` is not a supported length for the algorithm.
10
+ * @param {string} algorithm
11
+ * @param {Uint8Array} data
12
+ * @param {number | undefined} length
13
+ * @returns {Uint8Array}
14
+ */
15
+ export function digest(algorithm: string, data: Uint8Array, length: number | undefined): Uint8Array;
16
+ /** Instantiates an instance of the Wasm module returning its functions.
17
+ * @remarks It is safe to call this multiple times and once successfully
18
+ * loaded it will always return a reference to the same object.
19
+ */
20
+ export function instantiate(): {
21
+ digest: typeof digest;
22
+ DigestContext: typeof DigestContext;
23
+ };
24
+ /** Instantiates an instance of the Wasm module along with its exports.
25
+ * @remarks It is safe to call this multiple times and once successfully
26
+ * loaded it will always return a reference to the same object.
27
+ * @returns {{
28
+ * instance: WebAssembly.Instance;
29
+ * exports: { digest: typeof digest; DigestContext : typeof DigestContext }
30
+ * }}
31
+ */
32
+ export function instantiateWithInstance(): {
33
+ instance: WebAssembly.Instance;
34
+ exports: {
35
+ digest: typeof digest;
36
+ DigestContext: typeof DigestContext;
37
+ };
38
+ };
39
+ /** Gets if the Wasm module has been instantiated. */
40
+ export function isInstantiated(): boolean;
41
+ /**
42
+ * A context for incrementally computing a digest using a given hash algorithm.
43
+ */
44
+ export class DigestContext {
45
+ static __wrap(ptr: any): any;
46
+ /**
47
+ * Creates a new context incrementally computing a digest using the given
48
+ * hash algorithm.
49
+ *
50
+ * An error will be thrown if `algorithm` is not a supported hash algorithm.
51
+ * @param {string} algorithm
52
+ */
53
+ constructor(algorithm: string);
54
+ __destroy_into_raw(): number | undefined;
55
+ ptr: number | undefined;
56
+ free(): void;
57
+ /**
58
+ * Update the digest's internal state with the additional input `data`.
59
+ *
60
+ * If the `data` array view is large, it will be split into subarrays (via
61
+ * JavaScript bindings) which will be processed sequentially in order to
62
+ * limit the amount of memory that needs to be allocated in the Wasm heap.
63
+ * @param {Uint8Array} data
64
+ */
65
+ update(data: Uint8Array): void;
66
+ /**
67
+ * Returns the digest of the input data so far. This may be called repeatedly
68
+ * without side effects.
69
+ *
70
+ * `length` will usually be left `undefined` to use the default length for
71
+ * the algorithm. For algorithms with variable-length output, it can be used
72
+ * to specify a non-negative integer number of bytes.
73
+ *
74
+ * An error will be thrown if `algorithm` is not a supported hash algorithm or
75
+ * `length` is not a supported length for the algorithm.
76
+ * @param {number | undefined} length
77
+ * @returns {Uint8Array}
78
+ */
79
+ digest(length: number | undefined): Uint8Array;
80
+ /**
81
+ * Returns the digest of the input data so far, and resets this context to
82
+ * its initial state, as though it has not yet been provided with any input
83
+ * data. (It will still use the same algorithm.)
84
+ *
85
+ * `length` will usually be left `undefined` to use the default length for
86
+ * the algorithm. For algorithms with variable-length output, it can be used
87
+ * to specify a non-negative integer number of bytes.
88
+ *
89
+ * An error will be thrown if `algorithm` is not a supported hash algorithm or
90
+ * `length` is not a supported length for the algorithm.
91
+ * @param {number | undefined} length
92
+ * @returns {Uint8Array}
93
+ */
94
+ digestAndReset(length: number | undefined): Uint8Array;
95
+ /**
96
+ * Returns the digest of the input data so far, and then drops the context
97
+ * from memory on the Wasm side. This context must no longer be used, and any
98
+ * further method calls will result in null pointer errors being thrown.
99
+ * https://github.com/rustwasm/wasm-bindgen/blob/bf39cfd8/crates/backend/src/codegen.rs#L186
100
+ *
101
+ * `length` will usually be left `undefined` to use the default length for
102
+ * the algorithm. For algorithms with variable-length output, it can be used
103
+ * to specify a non-negative integer number of bytes.
104
+ *
105
+ * An error will be thrown if `algorithm` is not a supported hash algorithm or
106
+ * `length` is not a supported length for the algorithm.
107
+ * @param {number | undefined} length
108
+ * @returns {Uint8Array}
109
+ */
110
+ digestAndDrop(length: number | undefined): Uint8Array;
111
+ /**
112
+ * Resets this context to its initial state, as though it has not yet been
113
+ * provided with any input data. (It will still use the same algorithm.)
114
+ */
115
+ reset(): void;
116
+ /**
117
+ * Returns a new `DigestContext` that is a copy of this one, i.e., using the
118
+ * same algorithm and with a copy of the same internal state.
119
+ *
120
+ * This may be a more efficient option for computing multiple digests that
121
+ * start with a common prefix.
122
+ * @returns {DigestContext}
123
+ */
124
+ clone(): DigestContext;
125
+ }