@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.
- package/esm/0_deps.d.ts +4 -3
- package/esm/0_deps.js +4 -3
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/client/0_message.js +3 -9
- package/esm/client/3_types.d.ts +2 -0
- package/esm/client/4_client.d.ts +19 -3
- package/esm/client/4_client.js +209 -68
- package/esm/connection/1_connection_web_socket.js +5 -2
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_false.js +1 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/fnv32.d.ts +2 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/fnv32.js +24 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/fnv64.d.ts +2 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/fnv64.js +27 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/mod.d.ts +1 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/mod.js +21 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/util.d.ts +13 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_fnv/util.js +48 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_wasm/lib/deno_std_wasm_crypto.generated.d.ts +125 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_wasm/lib/deno_std_wasm_crypto.generated.js +3337 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_wasm/mod.d.ts +12 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/_wasm/mod.js +39 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/crypto.d.ts +157 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/crypto.js +266 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/keystack.d.ts +4 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/keystack.js +6 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/mod.d.ts +12 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/mod.js +14 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/timing_safe_equal.d.ts +28 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/timing_safe_equal.js +54 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/to_hash_string.d.ts +19 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/to_hash_string.js +31 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/unstable/keystack.d.ts +46 -0
- package/esm/deps/deno.land/std@0.203.0/crypto/unstable/keystack.js +149 -0
- package/esm/deps/deno.land/std@0.203.0/encoding/_util.d.ts +1 -0
- package/esm/deps/deno.land/std@0.203.0/encoding/_util.js +26 -0
- package/esm/deps/deno.land/std@0.203.0/encoding/base64.d.ts +23 -0
- package/{script/deps/deno.land/std@0.201.0 → esm/deps/deno.land/std@0.203.0}/encoding/base64.js +23 -18
- package/esm/deps/deno.land/std@0.203.0/encoding/base64url.d.ts +24 -0
- package/esm/deps/deno.land/std@0.203.0/encoding/base64url.js +80 -0
- package/esm/deps/deno.land/std@0.203.0/encoding/hex.d.ts +18 -0
- package/esm/deps/deno.land/std@0.203.0/encoding/hex.js +115 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/fmt/colors.js +1 -1
- package/{script/deps/deno.land/x/tgcrypto@0.2.1 → esm/deps/deno.land/x/tgcrypto@0.3.3}/mod.d.ts +2 -6
- package/esm/deps/deno.land/x/tgcrypto@0.3.3/mod.js +164 -0
- package/esm/deps/deno.land/x/tgcrypto@0.3.3/tgcrypto.js +324 -0
- package/esm/transport/0_obfuscation.js +1 -1
- package/esm/transport/0_transport.js +2 -2
- package/esm/types/3_message.js +1 -1
- package/esm/utilities/0_bigint.d.ts +1 -0
- package/esm/utilities/0_bigint.js +1 -0
- package/esm/utilities/0_crypto.d.ts +1 -2
- package/esm/utilities/0_crypto.js +3 -12
- package/esm/utilities/0_queue.js +1 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +4 -3
- package/script/0_deps.js +7 -6
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/client/0_message.js +2 -8
- package/script/client/3_types.d.ts +2 -0
- package/script/client/4_client.d.ts +19 -3
- package/script/client/4_client.js +208 -66
- package/script/connection/1_connection_web_socket.js +5 -2
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_false.js +1 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_fnv/fnv32.d.ts +2 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_fnv/fnv32.js +29 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_fnv/fnv64.d.ts +2 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_fnv/fnv64.js +32 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_fnv/mod.d.ts +1 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_fnv/mod.js +25 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_fnv/util.d.ts +13 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_fnv/util.js +54 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_wasm/lib/deno_std_wasm_crypto.generated.d.ts +125 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_wasm/lib/deno_std_wasm_crypto.generated.js +3345 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_wasm/mod.d.ts +12 -0
- package/script/deps/deno.land/std@0.203.0/crypto/_wasm/mod.js +44 -0
- package/script/deps/deno.land/std@0.203.0/crypto/crypto.d.ts +157 -0
- package/script/deps/deno.land/std@0.203.0/crypto/crypto.js +292 -0
- package/script/deps/deno.land/std@0.203.0/crypto/keystack.d.ts +4 -0
- package/script/deps/deno.land/std@0.203.0/crypto/keystack.js +22 -0
- package/script/deps/deno.land/std@0.203.0/crypto/mod.d.ts +12 -0
- package/script/deps/deno.land/std@0.203.0/crypto/mod.js +30 -0
- package/script/deps/deno.land/std@0.203.0/crypto/timing_safe_equal.d.ts +28 -0
- package/script/deps/deno.land/std@0.203.0/crypto/timing_safe_equal.js +58 -0
- package/script/deps/deno.land/std@0.203.0/crypto/to_hash_string.d.ts +19 -0
- package/script/deps/deno.land/std@0.203.0/crypto/to_hash_string.js +35 -0
- package/script/deps/deno.land/std@0.203.0/crypto/unstable/keystack.d.ts +46 -0
- package/script/deps/deno.land/std@0.203.0/crypto/unstable/keystack.js +176 -0
- package/script/deps/deno.land/std@0.203.0/encoding/_util.d.ts +1 -0
- package/script/deps/deno.land/std@0.203.0/encoding/_util.js +30 -0
- package/script/deps/deno.land/std@0.203.0/encoding/base64.d.ts +23 -0
- package/{esm/deps/deno.land/std@0.201.0 → script/deps/deno.land/std@0.203.0}/encoding/base64.js +28 -13
- package/script/deps/deno.land/std@0.203.0/encoding/base64url.d.ts +24 -0
- package/script/deps/deno.land/std@0.203.0/encoding/base64url.js +108 -0
- package/script/deps/deno.land/std@0.203.0/encoding/hex.d.ts +18 -0
- package/script/deps/deno.land/std@0.203.0/encoding/hex.js +122 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/fmt/colors.js +1 -1
- package/{esm/deps/deno.land/x/tgcrypto@0.2.1 → script/deps/deno.land/x/tgcrypto@0.3.3}/mod.d.ts +2 -6
- package/script/deps/deno.land/x/tgcrypto@0.3.3/mod.js +177 -0
- package/script/deps/deno.land/x/tgcrypto@0.3.3/tgcrypto.js +326 -0
- package/script/transport/0_obfuscation.js +1 -1
- package/script/transport/0_transport.js +2 -2
- package/script/types/3_message.js +1 -1
- package/script/utilities/0_bigint.d.ts +1 -0
- package/script/utilities/0_bigint.js +1 -0
- package/script/utilities/0_crypto.d.ts +1 -2
- package/script/utilities/0_crypto.js +2 -11
- package/script/utilities/0_queue.js +1 -1
- package/esm/deps/deno.land/std@0.201.0/encoding/base64.d.ts +0 -11
- package/esm/deps/deno.land/x/tgcrypto@0.2.1/mod.js +0 -81
- package/esm/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.js +0 -991
- package/script/deps/deno.land/std@0.201.0/encoding/base64.d.ts +0 -11
- package/script/deps/deno.land/x/tgcrypto@0.2.1/mod.js +0 -95
- package/script/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.js +0 -993
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_constants.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_constants.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_diff.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_diff.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_format.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_format.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_almost_equals.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_almost_equals.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_array_includes.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_array_includes.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_equals.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_equals.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_exists.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_exists.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_false.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater_or_equal.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater_or_equal.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_instance_of.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_instance_of.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_is_error.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_is_error.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less_or_equal.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less_or_equal.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_match.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_match.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_equals.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_equals.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_instance_of.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_instance_of.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_match.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_match.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_strict_equals.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_strict_equals.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_object_match.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_object_match.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_rejects.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_rejects.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_strict_equals.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_strict_equals.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_string_includes.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_string_includes.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_throws.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_throws.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assertion_error.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assertion_error.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/equal.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/equal.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/fail.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/fail.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/mod.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/mod.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unimplemented.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unimplemented.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unreachable.d.ts +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unreachable.js +0 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.203.0}/fmt/colors.d.ts +0 -0
- package/esm/deps/deno.land/x/{tgcrypto@0.2.1 → tgcrypto@0.3.3}/tgcrypto.d.ts +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_constants.d.ts +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_constants.js +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_diff.d.ts +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_diff.js +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_format.d.ts +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/_format.js +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert.d.ts +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert.js +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_almost_equals.d.ts +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_almost_equals.js +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_array_includes.d.ts +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_array_includes.js +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_equals.d.ts +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_equals.js +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_exists.d.ts +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_exists.js +0 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_false.d.ts +1 -1
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_greater_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_less_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.203.0}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/x/{tgcrypto@0.2.1 → tgcrypto@0.3.3}/tgcrypto.d.ts +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { fnv32, fnv32a } from "./fnv32.js";
|
|
4
|
+
import { fnv64, fnv64a } from "./fnv64.js";
|
|
5
|
+
export function fnv(name, buf) {
|
|
6
|
+
if (!buf) {
|
|
7
|
+
throw new TypeError("no data provided for hashing");
|
|
8
|
+
}
|
|
9
|
+
switch (name) {
|
|
10
|
+
case "FNV32":
|
|
11
|
+
return fnv32(buf);
|
|
12
|
+
case "FNV64":
|
|
13
|
+
return fnv64(buf);
|
|
14
|
+
case "FNV32A":
|
|
15
|
+
return fnv32a(buf);
|
|
16
|
+
case "FNV64A":
|
|
17
|
+
return fnv64a(buf);
|
|
18
|
+
default:
|
|
19
|
+
throw new TypeError(`unsupported fnv digest: ${name}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -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,48 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
export function swap32(val) {
|
|
4
|
+
return (((val & 0xff) << 24) |
|
|
5
|
+
((val & 0xff00) << 8) |
|
|
6
|
+
((val >> 8) & 0xff00) |
|
|
7
|
+
((val >> 24) & 0xff));
|
|
8
|
+
}
|
|
9
|
+
function n16(n) {
|
|
10
|
+
return n & 0xffff;
|
|
11
|
+
}
|
|
12
|
+
function n32(n) {
|
|
13
|
+
return n >>> 0;
|
|
14
|
+
}
|
|
15
|
+
function add32WithCarry(a, b) {
|
|
16
|
+
const added = n32(a) + n32(b);
|
|
17
|
+
return [n32(added), added > 0xffffffff ? 1 : 0];
|
|
18
|
+
}
|
|
19
|
+
function mul32WithCarry(a, b) {
|
|
20
|
+
const al = n16(a);
|
|
21
|
+
const ah = n16(a >>> 16);
|
|
22
|
+
const bl = n16(b);
|
|
23
|
+
const bh = n16(b >>> 16);
|
|
24
|
+
const [t, tc] = add32WithCarry(al * bh, ah * bl);
|
|
25
|
+
const [n, nc] = add32WithCarry(al * bl, n32(t << 16));
|
|
26
|
+
const carry = nc + (tc << 16) + n16(t >>> 16) + ah * bh;
|
|
27
|
+
return [n, carry];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* mul32 performs 32-bit multiplication, a * b
|
|
31
|
+
* @param a
|
|
32
|
+
* @param b
|
|
33
|
+
*/
|
|
34
|
+
export function mul32(a, b) {
|
|
35
|
+
// https://stackoverflow.com/a/28151933
|
|
36
|
+
const al = n16(a);
|
|
37
|
+
const ah = a - al;
|
|
38
|
+
return n32(n32(ah * b) + al * b);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* mul64 performs 64-bit multiplication with two 32-bit words
|
|
42
|
+
* @param [ah, al]
|
|
43
|
+
* @param [bh, bl]
|
|
44
|
+
*/
|
|
45
|
+
export function mul64([ah, al], [bh, bl]) {
|
|
46
|
+
const [n, c] = mul32WithCarry(al, bl);
|
|
47
|
+
return [n32(mul32(al, bh) + mul32(ah, bl) + c), n];
|
|
48
|
+
}
|
|
@@ -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
|
+
}
|