@mtkruto/node 0.1.303 → 0.1.500
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 +6 -5
- package/esm/0_deps.js +7 -6
- package/esm/1_utilities.d.ts +2 -0
- package/esm/1_utilities.js +2 -0
- package/esm/3_types.d.ts +6 -1
- package/esm/3_types.js +6 -1
- package/esm/client/0_markdown.d.ts +19 -0
- package/esm/client/0_markdown.js +19 -1
- package/esm/client/0_message.js +11 -11
- package/esm/client/0_params.d.ts +12 -1
- package/esm/client/0_password.js +14 -6
- package/esm/client/0_types.d.ts +18 -7
- package/esm/client/0_utilities.d.ts +19 -2
- package/esm/client/0_utilities.js +2 -45
- package/esm/client/1_client_plain.js +6 -6
- package/esm/client/1_file_manager.d.ts +3 -21
- package/esm/client/1_file_manager.js +244 -104
- package/esm/client/2_message_manager.d.ts +4 -1
- package/esm/client/2_message_manager.js +166 -23
- package/esm/client/3_callback_query_manager.d.ts +2 -1
- package/esm/client/3_callback_query_manager.js +33 -5
- package/esm/client/3_inline_query_manager.d.ts +3 -2
- package/esm/client/3_inline_query_manager.js +20 -4
- package/esm/client/3_story_manager.js +4 -6
- package/esm/client/4_client.d.ts +41 -4
- package/esm/client/4_client.js +120 -49
- package/esm/connection/1_connection_web_socket.js +3 -3
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_almost_equals.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_array_includes.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_equals.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_exists.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_false.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_greater.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_greater_or_equal.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_instance_of.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_is_error.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_less.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_less_or_equal.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_match.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_equals.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_instance_of.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_match.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_strict_equals.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_object_match.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_rejects.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_strict_equals.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_string_includes.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_throws.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assertion_error.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/equal.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/fail.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/mod.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/unimplemented.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/unreachable.js +1 -0
- package/esm/deps/deno.land/std@0.223.0/bytes/concat.d.ts +13 -0
- package/esm/deps/deno.land/std@0.223.0/bytes/concat.js +27 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/encoding/base64.d.ts +8 -2
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/encoding/base64.js +19 -2
- package/{script/deps/deno.land/std@0.221.0 → esm/deps/deno.land/std@0.223.0}/media_types/_util.d.ts +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/_util.js +1 -1
- package/{script/deps/deno.land/x/tgcrypto@0.4.0 → esm/deps/deno.land/x/tgcrypto@0.4.1}/mod.d.ts +14 -2
- package/esm/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/mod.js +56 -42
- package/esm/storage/0_storage.d.ts +10 -0
- package/esm/storage/0_storage.js +42 -0
- package/esm/tl/0_tl_raw_writer.js +3 -2
- package/esm/transport/0_obfuscation.js +4 -3
- package/esm/transport/0_transport.d.ts +1 -1
- package/esm/transport/0_transport.js +7 -0
- package/esm/transport/1_transport_abridged.js +4 -2
- package/esm/transport/1_transport_intermediate.js +4 -2
- package/esm/types/0_callback_query_answer.d.ts +30 -0
- package/esm/types/0_callback_query_answer.js +26 -0
- package/esm/types/0_callback_query_question.d.ts +49 -0
- package/esm/types/0_callback_query_question.js +31 -0
- package/esm/types/0_file_source.d.ts +2 -2
- package/esm/types/0_self_destruct_option.d.ts +25 -0
- package/esm/types/0_self_destruct_option.js +39 -0
- package/esm/types/1_input_media.d.ts +108 -0
- package/esm/types/{1_input_message_content.d.ts → 1_message_content.d.ts} +6 -6
- package/esm/types/1_message_content.js +20 -0
- package/esm/types/1_photo.d.ts +4 -0
- package/esm/types/1_photo.js +12 -26
- package/esm/types/4_inline_query_result.d.ts +52 -49
- package/esm/types/4_inline_query_result.js +225 -44
- package/esm/types/5_inline_query_answer.d.ts +31 -0
- package/esm/types/5_inline_query_answer.js +28 -0
- package/esm/types/_file_id.d.ts +5 -0
- package/esm/types/_file_id.js +32 -1
- package/esm/utilities/0_buffer.d.ts +0 -1
- package/esm/utilities/0_buffer.js +0 -13
- package/esm/utilities/0_crypto.d.ts +3 -3
- package/esm/utilities/0_crypto.js +23 -20
- package/esm/utilities/0_part_stream.d.ts +29 -0
- package/esm/utilities/0_part_stream.js +65 -0
- package/esm/utilities/0_units.d.ts +25 -0
- package/esm/utilities/0_units.js +25 -0
- package/esm/utilities/1_auth.js +5 -5
- package/esm/utilities/1_misc.d.ts +1 -0
- package/esm/utilities/1_misc.js +17 -2
- package/package.json +1 -1
- package/script/0_deps.d.ts +6 -5
- package/script/0_deps.js +11 -7
- package/script/1_utilities.d.ts +2 -0
- package/script/1_utilities.js +2 -0
- package/script/3_types.d.ts +6 -1
- package/script/3_types.js +6 -1
- package/script/client/0_markdown.d.ts +19 -0
- package/script/client/0_markdown.js +19 -1
- package/script/client/0_message.js +9 -9
- package/script/client/0_params.d.ts +12 -1
- package/script/client/0_password.js +13 -5
- package/script/client/0_types.d.ts +18 -7
- package/script/client/0_utilities.d.ts +19 -2
- package/script/client/0_utilities.js +3 -70
- package/script/client/1_client_plain.js +4 -4
- package/script/client/1_file_manager.d.ts +3 -21
- package/script/client/1_file_manager.js +266 -103
- package/script/client/2_message_manager.d.ts +4 -1
- package/script/client/2_message_manager.js +164 -21
- package/script/client/3_callback_query_manager.d.ts +2 -1
- package/script/client/3_callback_query_manager.js +30 -2
- package/script/client/3_inline_query_manager.d.ts +3 -2
- package/script/client/3_inline_query_manager.js +18 -2
- package/script/client/3_story_manager.js +3 -5
- package/script/client/4_client.d.ts +41 -4
- package/script/client/4_client.js +119 -48
- package/script/connection/1_connection_web_socket.js +1 -1
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_almost_equals.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_array_includes.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_equals.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_exists.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_false.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_greater.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_greater_or_equal.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_instance_of.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_is_error.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_less.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_less_or_equal.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_match.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_equals.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_instance_of.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_match.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_strict_equals.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_object_match.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_rejects.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_strict_equals.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_string_includes.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_throws.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assertion_error.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/equal.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/fail.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/mod.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/unimplemented.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/unreachable.js +1 -0
- package/script/deps/deno.land/std@0.223.0/bytes/concat.d.ts +13 -0
- package/script/deps/deno.land/std@0.223.0/bytes/concat.js +31 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/encoding/base64.d.ts +8 -2
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/encoding/base64.js +19 -2
- package/{esm/deps/deno.land/std@0.221.0 → script/deps/deno.land/std@0.223.0}/media_types/_util.d.ts +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/_util.js +2 -1
- package/{esm/deps/deno.land/x/tgcrypto@0.4.0 → script/deps/deno.land/x/tgcrypto@0.4.1}/mod.d.ts +14 -2
- package/script/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/mod.js +61 -43
- package/script/storage/0_storage.d.ts +10 -0
- package/script/storage/0_storage.js +42 -0
- package/script/tl/0_tl_raw_writer.js +2 -1
- package/script/transport/0_obfuscation.js +3 -2
- package/script/transport/0_transport.d.ts +1 -1
- package/script/transport/0_transport.js +7 -0
- package/script/transport/1_transport_abridged.js +3 -1
- package/script/transport/1_transport_intermediate.js +3 -1
- package/script/types/0_callback_query_answer.d.ts +30 -0
- package/script/types/0_callback_query_answer.js +30 -0
- package/script/types/0_callback_query_question.d.ts +49 -0
- package/script/types/0_callback_query_question.js +35 -0
- package/script/types/0_file_source.d.ts +2 -2
- package/script/types/0_self_destruct_option.d.ts +25 -0
- package/script/types/0_self_destruct_option.js +43 -0
- package/script/types/1_input_media.d.ts +108 -0
- package/script/types/{1_input_message_content.d.ts → 1_message_content.d.ts} +6 -6
- package/script/types/1_message_content.js +21 -0
- package/script/types/1_photo.d.ts +4 -0
- package/script/types/1_photo.js +14 -27
- package/script/types/4_inline_query_result.d.ts +52 -49
- package/script/types/4_inline_query_result.js +224 -42
- package/script/types/5_inline_query_answer.d.ts +31 -0
- package/script/types/5_inline_query_answer.js +32 -0
- package/script/types/_file_id.d.ts +5 -0
- package/script/types/_file_id.js +33 -1
- package/script/utilities/0_buffer.d.ts +0 -1
- package/script/utilities/0_buffer.js +1 -15
- package/script/utilities/0_crypto.d.ts +3 -3
- package/script/utilities/0_crypto.js +22 -19
- package/script/utilities/0_part_stream.d.ts +29 -0
- package/script/utilities/0_part_stream.js +69 -0
- package/script/utilities/0_units.d.ts +25 -0
- package/script/utilities/0_units.js +28 -0
- package/script/utilities/1_auth.js +3 -3
- package/script/utilities/1_misc.d.ts +1 -0
- package/script/utilities/1_misc.js +19 -3
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_diff.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/fmt/colors.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/_db.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/_db.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/content_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/content_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/extensions_by_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/extensions_by_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/format_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/format_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/get_charset.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/get_charset.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/parse_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/parse_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/type_by_extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/type_by_extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/normalize_string.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/tgcrypto.d.ts +0 -0
- /package/esm/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/tgcrypto.js +0 -0
- /package/esm/types/{1_input_message_content.js → 1_input_media.js} +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_diff.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/fmt/colors.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/_db.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/_db.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/content_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/content_type.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/extension.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/extensions_by_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/extensions_by_type.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/format_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/format_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/get_charset.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/get_charset.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/parse_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/parse_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/type_by_extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/type_by_extension.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/normalize_string.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/join.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.223.0}/path/windows/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/tgcrypto.d.ts +0 -0
- /package/script/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/tgcrypto.js +0 -0
- /package/script/types/{1_input_message_content.js → 1_input_media.js} +0 -0
|
@@ -6,16 +6,16 @@ export async function init() {
|
|
|
6
6
|
await promise;
|
|
7
7
|
}
|
|
8
8
|
function checkIgeParams(data, key, iv) {
|
|
9
|
-
if (data.
|
|
9
|
+
if (data.byteLength == 0) {
|
|
10
10
|
throw new TypeError("data must not be empty");
|
|
11
11
|
}
|
|
12
|
-
else if (data.
|
|
12
|
+
else if (data.byteLength % 16 != 0) {
|
|
13
13
|
throw new TypeError("data must consist of a number of bytes that is divisible by 16");
|
|
14
14
|
}
|
|
15
|
-
else if (key.
|
|
15
|
+
else if (key.byteLength != 32) {
|
|
16
16
|
throw new TypeError("key must be 32 bytes");
|
|
17
17
|
}
|
|
18
|
-
else if (iv.
|
|
18
|
+
else if (iv.byteLength != 32) {
|
|
19
19
|
throw new TypeError("iv must be 32 bytes");
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -28,12 +28,12 @@ function checkIgeParams(data, key, iv) {
|
|
|
28
28
|
*/
|
|
29
29
|
export function ige256Encrypt(data, key, iv) {
|
|
30
30
|
checkIgeParams(data, key, iv);
|
|
31
|
-
const out = module_._malloc(data.
|
|
32
|
-
const datap = module_._malloc(data.
|
|
31
|
+
const out = module_._malloc(data.byteLength);
|
|
32
|
+
const datap = module_._malloc(data.byteLength);
|
|
33
33
|
module_.HEAPU8.set(data, datap);
|
|
34
|
-
module_.ccall("ige256_encrypt", "void", ["pointer", "pointer", "number", "array", "array"], [datap, out, data.
|
|
34
|
+
module_.ccall("ige256_encrypt", "void", ["pointer", "pointer", "number", "array", "array"], [datap, out, data.byteLength, key, iv]);
|
|
35
35
|
try {
|
|
36
|
-
return module_.HEAPU8.slice(out, out + data.
|
|
36
|
+
return module_.HEAPU8.slice(out, out + data.byteLength);
|
|
37
37
|
}
|
|
38
38
|
finally {
|
|
39
39
|
module_._free(out);
|
|
@@ -49,31 +49,53 @@ export function ige256Encrypt(data, key, iv) {
|
|
|
49
49
|
*/
|
|
50
50
|
export function ige256Decrypt(data, key, iv) {
|
|
51
51
|
checkIgeParams(data, key, iv);
|
|
52
|
-
const out = module_._malloc(data.
|
|
53
|
-
const datap = module_._malloc(data.
|
|
52
|
+
const out = module_._malloc(data.byteLength);
|
|
53
|
+
const datap = module_._malloc(data.byteLength);
|
|
54
54
|
module_.HEAPU8.set(data, datap);
|
|
55
|
-
module_.ccall("ige256_decrypt", "void", ["pointer", "pointer", "number", "array", "array"], [datap, out, data.
|
|
55
|
+
module_.ccall("ige256_decrypt", "void", ["pointer", "pointer", "number", "array", "array"], [datap, out, data.byteLength, key, iv]);
|
|
56
56
|
try {
|
|
57
|
-
return module_.HEAPU8.slice(out, out + data.
|
|
57
|
+
return module_.HEAPU8.slice(out, out + data.byteLength);
|
|
58
58
|
}
|
|
59
59
|
finally {
|
|
60
60
|
module_._free(out);
|
|
61
61
|
module_._free(datap);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function checkCtrParams(data, key
|
|
65
|
-
if (data.
|
|
64
|
+
function checkCtrParams(data, key) {
|
|
65
|
+
if (data.byteLength == 0) {
|
|
66
66
|
throw new TypeError("data must not be empty");
|
|
67
67
|
}
|
|
68
|
-
else if (key.
|
|
68
|
+
else if (key.byteLength != 32) {
|
|
69
69
|
throw new TypeError("key must be 32 bytes");
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
}
|
|
72
|
+
export function createCtr256State(iv) {
|
|
73
|
+
if (iv.byteLength != 16) {
|
|
72
74
|
throw new TypeError("iv must be 16 bytes");
|
|
73
75
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
const state = {
|
|
77
|
+
ivp: module_._malloc(16),
|
|
78
|
+
statep: module_._malloc(1),
|
|
79
|
+
};
|
|
80
|
+
module_.HEAPU8.set(iv, state.ivp);
|
|
81
|
+
module_.HEAPU8[state.statep] = 0;
|
|
82
|
+
return state;
|
|
83
|
+
}
|
|
84
|
+
export function destroyCtr256State(state) {
|
|
85
|
+
module_._free(state.ivp);
|
|
86
|
+
module_._free(state.statep);
|
|
87
|
+
}
|
|
88
|
+
export function __getCtr256StateValues(state) {
|
|
89
|
+
return {
|
|
90
|
+
iv: module_.HEAPU8.slice(state.ivp, state.ivp + 16),
|
|
91
|
+
state: module_.HEAPU8.slice(state.statep, state.statep + 1),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export function __settCtr256StateState(state, state_) {
|
|
95
|
+
if (state_.byteLength != 1) {
|
|
96
|
+
throw new Error("state_ must be 1 byte");
|
|
76
97
|
}
|
|
98
|
+
module_.HEAPU8.set(state_, state.statep);
|
|
77
99
|
}
|
|
78
100
|
/**
|
|
79
101
|
* Performs CTR-256 encryption/decryption.
|
|
@@ -81,35 +103,27 @@ function checkCtrParams(data, key, iv, state) {
|
|
|
81
103
|
* @param data The data, larger than a byte
|
|
82
104
|
* @param key 32-byte encryption key
|
|
83
105
|
* @param iv 16-byte initialization vector
|
|
84
|
-
* @param state
|
|
106
|
+
* @param state Result of `createCtr256State()`
|
|
85
107
|
*/
|
|
86
|
-
export function ctr256(data, key,
|
|
87
|
-
checkCtrParams(data, key
|
|
88
|
-
const datap = module_._malloc(data.
|
|
108
|
+
export function ctr256(data, key, state) {
|
|
109
|
+
checkCtrParams(data, key);
|
|
110
|
+
const datap = module_._malloc(data.byteLength);
|
|
89
111
|
module_.HEAPU8.set(data, datap);
|
|
90
|
-
|
|
91
|
-
module_.HEAPU8.
|
|
92
|
-
const statep = module_._malloc(state.length);
|
|
93
|
-
module_.HEAPU8.set(state, statep);
|
|
94
|
-
module_.ccall("ctr256", "void", ["pointer", "number", "array", "pointer", "pointer"], [datap, data.length, key, ivp, statep]);
|
|
95
|
-
data.set(module_.HEAPU8.slice(datap, datap + data.length));
|
|
96
|
-
iv.set(module_.HEAPU8.slice(ivp, ivp + iv.length));
|
|
97
|
-
state.set(module_.HEAPU8.slice(statep, statep + state.length));
|
|
112
|
+
module_.ccall("ctr256", "void", ["pointer", "number", "array", "pointer", "pointer"], [datap, data.byteLength, key, state.ivp, state.statep]);
|
|
113
|
+
data.set(module_.HEAPU8.slice(datap, datap + data.byteLength));
|
|
98
114
|
module_._free(datap);
|
|
99
|
-
module_._free(ivp);
|
|
100
|
-
module_._free(statep);
|
|
101
115
|
}
|
|
102
116
|
function checkCbcParams(data, key, iv) {
|
|
103
|
-
if (data.
|
|
117
|
+
if (data.byteLength == 0) {
|
|
104
118
|
throw new TypeError("data must not be empty");
|
|
105
119
|
}
|
|
106
|
-
else if (data.
|
|
120
|
+
else if (data.byteLength % 16 != 0) {
|
|
107
121
|
throw new TypeError("data must consist of a number of bytes that is divisible by 16");
|
|
108
122
|
}
|
|
109
|
-
else if (key.
|
|
123
|
+
else if (key.byteLength != 32) {
|
|
110
124
|
throw new TypeError("key must be 32 bytes");
|
|
111
125
|
}
|
|
112
|
-
else if (iv.
|
|
126
|
+
else if (iv.byteLength != 16) {
|
|
113
127
|
throw new TypeError("iv must be 16 bytes");
|
|
114
128
|
}
|
|
115
129
|
}
|
|
@@ -122,11 +136,11 @@ function checkCbcParams(data, key, iv) {
|
|
|
122
136
|
*/
|
|
123
137
|
export function cbc256Encrypt(data, key, iv) {
|
|
124
138
|
checkCbcParams(data, key, iv);
|
|
125
|
-
const datap = module_._malloc(data.
|
|
139
|
+
const datap = module_._malloc(data.byteLength);
|
|
126
140
|
module_.HEAPU8.set(data, datap);
|
|
127
|
-
module_.ccall("cbc256_encrypt", "void", ["pointer", "number", "array", "array"], [datap, data.
|
|
141
|
+
module_.ccall("cbc256_encrypt", "void", ["pointer", "number", "array", "array"], [datap, data.byteLength, key, iv]);
|
|
128
142
|
try {
|
|
129
|
-
return module_.HEAPU8.slice(datap, datap + data.
|
|
143
|
+
return module_.HEAPU8.slice(datap, datap + data.byteLength);
|
|
130
144
|
}
|
|
131
145
|
finally {
|
|
132
146
|
module_._free(datap);
|
|
@@ -141,11 +155,11 @@ export function cbc256Encrypt(data, key, iv) {
|
|
|
141
155
|
*/
|
|
142
156
|
export function cbc256Decrypt(data, key, iv) {
|
|
143
157
|
checkCbcParams(data, key, iv);
|
|
144
|
-
const datap = module_._malloc(data.
|
|
158
|
+
const datap = module_._malloc(data.byteLength);
|
|
145
159
|
module_.HEAPU8.set(data, datap);
|
|
146
|
-
module_.ccall("cbc256_decrypt", "void", ["pointer", "number", "array", "array"], [datap, data.
|
|
160
|
+
module_.ccall("cbc256_decrypt", "void", ["pointer", "number", "array", "array"], [datap, data.byteLength, key, iv]);
|
|
147
161
|
try {
|
|
148
|
-
return module_.HEAPU8.slice(datap, datap + data.
|
|
162
|
+
return module_.HEAPU8.slice(datap, datap + data.byteLength);
|
|
149
163
|
}
|
|
150
164
|
finally {
|
|
151
165
|
module_._free(datap);
|
|
@@ -60,6 +60,10 @@ export declare const K: {
|
|
|
60
60
|
customEmojiDocument: (id: bigint) => StorageKeyPart[];
|
|
61
61
|
businessConnections: () => StorageKeyPart[];
|
|
62
62
|
businessConnection: (id: string) => StorageKeyPart[];
|
|
63
|
+
inlineQueryAnswers: () => StorageKeyPart[];
|
|
64
|
+
inlineQueryAnswer: (userId: number, chatId: number, query: string, offset: string) => StorageKeyPart[];
|
|
65
|
+
callbackQueryAnswers: () => StorageKeyPart[];
|
|
66
|
+
callbackQueryAnswer: (chatId: number, messageId: number, question: string) => StorageKeyPart[];
|
|
63
67
|
};
|
|
64
68
|
messages: {
|
|
65
69
|
P: (string: string) => string;
|
|
@@ -149,6 +153,10 @@ export declare abstract class Storage {
|
|
|
149
153
|
getCustomEmojiDocument(id: bigint): Promise<[types.Document, Date] | null>;
|
|
150
154
|
setBusinessConnection(id: string, connection: types.BotBusinessConnection | null): Promise<void>;
|
|
151
155
|
getBusinessConnection(id: string): Promise<types.BotBusinessConnection | null>;
|
|
156
|
+
setInlineQueryAnswer(userId: number, chatId: number, query: string, offset: string, results: types.messages.BotResults, date: Date): Promise<void>;
|
|
157
|
+
getInlineQueryAnswer(userId: number, chatId: number, query: string, offset: string): Promise<[types.messages.BotResults, Date] | null>;
|
|
158
|
+
setCallbackQueryAnswer(chatId: number, messageId: number, question: string, answer: types.messages.BotCallbackAnswer): Promise<void>;
|
|
159
|
+
getCallbackQueryAnswer(chatId: number, messageId: number, question: string): Promise<[types.messages.BotCallbackAnswer, Date] | null>;
|
|
152
160
|
setUpdate(boxId: bigint, update: enums.Update): Promise<void>;
|
|
153
161
|
deleteUpdates(): Promise<void>;
|
|
154
162
|
getFirstUpdate(boxId: bigint): Promise<[readonly StorageKeyPart[], enums.Update] | null>;
|
|
@@ -157,6 +165,8 @@ export declare abstract class Storage {
|
|
|
157
165
|
deleteFiles(): Promise<void>;
|
|
158
166
|
deleteCustomEmojiDocuments(): Promise<void>;
|
|
159
167
|
deleteBusinessConnections(): Promise<void>;
|
|
168
|
+
deleteInlineQueryAnswers(): Promise<void>;
|
|
169
|
+
deleteCallbackQueryAnswers(): Promise<void>;
|
|
160
170
|
deleteStickerSetNames(): Promise<void>;
|
|
161
171
|
deletePeers(): Promise<void>;
|
|
162
172
|
deleteUsernames(): Promise<void>;
|
package/esm/storage/0_storage.js
CHANGED
|
@@ -73,6 +73,10 @@ export const K = {
|
|
|
73
73
|
customEmojiDocument: (id) => [...K.cache.customEmojiDocuments(), id],
|
|
74
74
|
businessConnections: () => [K.cache.P("businessConnections")],
|
|
75
75
|
businessConnection: (id) => [...K.cache.businessConnections(), id],
|
|
76
|
+
inlineQueryAnswers: () => [K.cache.P("inlineQueryResults")],
|
|
77
|
+
inlineQueryAnswer: (userId, chatId, query, offset) => [...K.cache.inlineQueryAnswers(), userId, chatId, query, offset],
|
|
78
|
+
callbackQueryAnswers: () => [K.cache.P("callbackQueryAnswers")],
|
|
79
|
+
callbackQueryAnswer: (chatId, messageId, question) => [...K.cache.callbackQueryAnswers(), chatId, messageId, question],
|
|
76
80
|
},
|
|
77
81
|
messages: {
|
|
78
82
|
P: (string) => `messages.${string}`,
|
|
@@ -401,6 +405,32 @@ export class Storage {
|
|
|
401
405
|
return null;
|
|
402
406
|
}
|
|
403
407
|
}
|
|
408
|
+
async setInlineQueryAnswer(userId, chatId, query, offset, results, date) {
|
|
409
|
+
await this.set(K.cache.inlineQueryAnswer(userId, chatId, query, offset), [this.isMemoryStorage ? results : rleEncode(results[serialize]()), date]);
|
|
410
|
+
}
|
|
411
|
+
async getInlineQueryAnswer(userId, chatId, query, offset) {
|
|
412
|
+
const peer_ = await this.get(K.cache.inlineQueryAnswer(userId, chatId, query, offset));
|
|
413
|
+
if (peer_ != null) {
|
|
414
|
+
const [obj_, date] = peer_;
|
|
415
|
+
return [await this.getTlObject(obj_), date];
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
return null;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
async setCallbackQueryAnswer(chatId, messageId, question, answer) {
|
|
422
|
+
await this.set(K.cache.callbackQueryAnswer(chatId, messageId, question), [this.isMemoryStorage ? answer : rleEncode(answer[serialize]()), new Date()]);
|
|
423
|
+
}
|
|
424
|
+
async getCallbackQueryAnswer(chatId, messageId, question) {
|
|
425
|
+
const peer_ = await this.get(K.cache.callbackQueryAnswer(chatId, messageId, question));
|
|
426
|
+
if (peer_ != null) {
|
|
427
|
+
const [obj_, date] = peer_;
|
|
428
|
+
return [await this.getTlObject(obj_), date];
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
return null;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
404
434
|
async setUpdate(boxId, update) {
|
|
405
435
|
await this.setTlObject(K.updates.update(boxId, __classPrivateFieldGet(this, _Storage_instances, "m", _Storage_getUpdateId).call(this, update)), update);
|
|
406
436
|
}
|
|
@@ -448,6 +478,16 @@ export class Storage {
|
|
|
448
478
|
await this.set(key, null);
|
|
449
479
|
}
|
|
450
480
|
}
|
|
481
|
+
async deleteInlineQueryAnswers() {
|
|
482
|
+
for await (const [key] of await this.getMany({ prefix: K.cache.inlineQueryAnswers() })) {
|
|
483
|
+
await this.set(key, null);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
async deleteCallbackQueryAnswers() {
|
|
487
|
+
for await (const [key] of await this.getMany({ prefix: K.cache.callbackQueryAnswers() })) {
|
|
488
|
+
await this.set(key, null);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
451
491
|
async deleteStickerSetNames() {
|
|
452
492
|
for await (const [key] of await this.getMany({ prefix: K.cache.stickerSetNames() })) {
|
|
453
493
|
await this.set(key, null);
|
|
@@ -472,6 +512,8 @@ export class Storage {
|
|
|
472
512
|
this.deleteFiles(),
|
|
473
513
|
this.deleteCustomEmojiDocuments(),
|
|
474
514
|
this.deleteBusinessConnections(),
|
|
515
|
+
this.deleteInlineQueryAnswers(),
|
|
516
|
+
this.deleteCallbackQueryAnswers(),
|
|
475
517
|
this.deleteStickerSetNames(),
|
|
476
518
|
this.deletePeers(),
|
|
477
519
|
this.deleteUsernames(),
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import {
|
|
20
|
+
import { concat } from "../0_deps.js";
|
|
21
|
+
import { bufferFromBigInt } from "../1_utilities.js";
|
|
21
22
|
export class TLRawWriter {
|
|
22
23
|
constructor() {
|
|
23
24
|
Object.defineProperty(this, "_buffer", {
|
|
@@ -31,7 +32,7 @@ export class TLRawWriter {
|
|
|
31
32
|
return this._buffer;
|
|
32
33
|
}
|
|
33
34
|
write(buffer) {
|
|
34
|
-
this._buffer = concat(this._buffer, buffer);
|
|
35
|
+
this._buffer = concat([this._buffer, buffer]);
|
|
35
36
|
return this;
|
|
36
37
|
}
|
|
37
38
|
writeInt24(int, signed = true) {
|
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import * as dntShim from "../_dnt.shims.js";
|
|
21
|
-
import {
|
|
21
|
+
import { concat } from "../0_deps.js";
|
|
22
|
+
import { bufferFromBigInt, CTR } from "../1_utilities.js";
|
|
22
23
|
export async function getObfuscationParameters(protocol, connection) {
|
|
23
24
|
let init;
|
|
24
25
|
while (true) {
|
|
25
|
-
init = concat(dntShim.crypto.getRandomValues(new Uint8Array(56)), bufferFromBigInt(protocol, 4, false), dntShim.crypto.getRandomValues(new Uint8Array(4)));
|
|
26
|
+
init = concat([dntShim.crypto.getRandomValues(new Uint8Array(56)), bufferFromBigInt(protocol, 4, false), dntShim.crypto.getRandomValues(new Uint8Array(4))]);
|
|
26
27
|
if (init[0] == 0xEF) {
|
|
27
28
|
continue;
|
|
28
29
|
}
|
|
@@ -46,6 +47,6 @@ export async function getObfuscationParameters(protocol, connection) {
|
|
|
46
47
|
const decryptKey = initRev.slice(8, 8 + 32);
|
|
47
48
|
const decryptIv = initRev.slice(40, 40 + 16);
|
|
48
49
|
const decryptionCTR = new CTR(decryptKey, decryptIv);
|
|
49
|
-
await connection.write(concat(init.subarray(0, 56), encryptedInit.subarray(56, 56 + 8)));
|
|
50
|
+
await connection.write(concat([init.subarray(0, 56), encryptedInit.subarray(56, 56 + 8)]));
|
|
50
51
|
return { encryptionCTR, decryptionCTR };
|
|
51
52
|
}
|
|
@@ -29,5 +29,5 @@ export declare abstract class Transport {
|
|
|
29
29
|
abstract initialize(): MaybePromise<void>;
|
|
30
30
|
abstract receive(): MaybePromise<Uint8Array>;
|
|
31
31
|
abstract send(buffer: Uint8Array): MaybePromise<void>;
|
|
32
|
-
|
|
32
|
+
deinitialize(): MaybePromise<void>;
|
|
33
33
|
}
|
|
@@ -36,4 +36,11 @@ export class Transport {
|
|
|
36
36
|
this.obfuscationParameters.decryptionCTR.call(buffer);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
deinitialize() {
|
|
40
|
+
if (this.obfuscationParameters) {
|
|
41
|
+
this.obfuscationParameters.encryptionCTR.destroy();
|
|
42
|
+
this.obfuscationParameters.decryptionCTR.destroy();
|
|
43
|
+
this.obfuscationParameters = null;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
39
46
|
}
|
|
@@ -29,7 +29,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
29
29
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
30
30
|
};
|
|
31
31
|
var _TransportAbridged_initialized, _TransportAbridged_connection, _TransportAbridged_obfuscated;
|
|
32
|
-
import {
|
|
32
|
+
import { concat } from "../0_deps.js";
|
|
33
|
+
import { bufferFromBigInt } from "../1_utilities.js";
|
|
33
34
|
import { getObfuscationParameters } from "./0_obfuscation.js";
|
|
34
35
|
import { Transport } from "./0_transport.js";
|
|
35
36
|
export class TransportAbridged extends Transport {
|
|
@@ -85,11 +86,12 @@ export class TransportAbridged extends Transport {
|
|
|
85
86
|
const bufferLength = buffer.length / 4;
|
|
86
87
|
const header = new Uint8Array([bufferLength >= 0x7F ? 0x7F : bufferLength]);
|
|
87
88
|
const length = bufferLength >= 0x7F ? bufferFromBigInt(bufferLength, 3) : new Uint8Array();
|
|
88
|
-
const data = concat(header, length, buffer);
|
|
89
|
+
const data = concat([header, length, buffer]);
|
|
89
90
|
this.encrypt(data);
|
|
90
91
|
await __classPrivateFieldGet(this, _TransportAbridged_connection, "f").write(data);
|
|
91
92
|
}
|
|
92
93
|
deinitialize() {
|
|
94
|
+
super.deinitialize();
|
|
93
95
|
__classPrivateFieldSet(this, _TransportAbridged_initialized, false, "f");
|
|
94
96
|
}
|
|
95
97
|
get initialized() {
|
|
@@ -29,7 +29,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
29
29
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
30
30
|
};
|
|
31
31
|
var _TransportIntermediate_connection, _TransportIntermediate_initialized, _TransportIntermediate_obfuscated;
|
|
32
|
-
import {
|
|
32
|
+
import { concat } from "../0_deps.js";
|
|
33
|
+
import { bufferFromBigInt } from "../1_utilities.js";
|
|
33
34
|
import { getObfuscationParameters } from "./0_obfuscation.js";
|
|
34
35
|
import { Transport } from "./0_transport.js";
|
|
35
36
|
export class TransportIntermediate extends Transport {
|
|
@@ -74,11 +75,12 @@ export class TransportIntermediate extends Transport {
|
|
|
74
75
|
throw new Error("Transport not initialized");
|
|
75
76
|
}
|
|
76
77
|
const length = bufferFromBigInt(buffer.length, 4);
|
|
77
|
-
const data = concat(length, buffer);
|
|
78
|
+
const data = concat([length, buffer]);
|
|
78
79
|
this.encrypt(data);
|
|
79
80
|
await __classPrivateFieldGet(this, _TransportIntermediate_connection, "f").write(data);
|
|
80
81
|
}
|
|
81
82
|
deinitialize() {
|
|
83
|
+
super.deinitialize();
|
|
82
84
|
__classPrivateFieldSet(this, _TransportIntermediate_initialized, false, "f");
|
|
83
85
|
}
|
|
84
86
|
get initialized() {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
import { types } from "../2_tl.js";
|
|
21
|
+
/** An answer to a callback query. */
|
|
22
|
+
export interface CallbackQueryAnswer {
|
|
23
|
+
/** Whether the answer should be shown as an alert. */
|
|
24
|
+
alert: boolean;
|
|
25
|
+
/** The text of the answer. */
|
|
26
|
+
text: string;
|
|
27
|
+
/** A potential URL that is to be opened. */
|
|
28
|
+
url: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function constructCallbackQueryAnswer(answer: types.messages.BotCallbackAnswer): CallbackQueryAnswer;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
export function constructCallbackQueryAnswer(answer) {
|
|
21
|
+
return {
|
|
22
|
+
alert: !!answer.alert,
|
|
23
|
+
text: answer.message ?? "",
|
|
24
|
+
url: answer.url ?? "",
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* A reference to a button for opening the bot's game.
|
|
22
|
+
* @unlisted
|
|
23
|
+
*/
|
|
24
|
+
export interface CallbackQueryQuestionGame {
|
|
25
|
+
type: "game";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A reference to a password confirmation button.
|
|
29
|
+
* @unlisted
|
|
30
|
+
*/
|
|
31
|
+
export interface CallbackQueryQuestionPassword {
|
|
32
|
+
type: "password";
|
|
33
|
+
/** The target button's callback data. */
|
|
34
|
+
data: string;
|
|
35
|
+
/** The account's password. */
|
|
36
|
+
password: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A reference to a usual button.
|
|
40
|
+
* @unlisted
|
|
41
|
+
*/
|
|
42
|
+
export interface CallbackQueryQuestionButton {
|
|
43
|
+
type: "button";
|
|
44
|
+
/** The target button's callback data. */
|
|
45
|
+
data: string;
|
|
46
|
+
}
|
|
47
|
+
/** A reference to a button that is to be clicked by a user. */
|
|
48
|
+
export type CallbackQueryQuestion = CallbackQueryQuestionGame | CallbackQueryQuestionPassword | CallbackQueryQuestionButton;
|
|
49
|
+
export declare function validateCallbackQueryQuestion(q: CallbackQueryQuestion): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
import { InputError } from "../0_errors.js";
|
|
21
|
+
export function validateCallbackQueryQuestion(q) {
|
|
22
|
+
if (!["game", "password", "button"].includes(q.type)) {
|
|
23
|
+
throw new InputError("Got invalid callback query question type.");
|
|
24
|
+
}
|
|
25
|
+
if (q.type == "password" && (typeof q.password !== "string" || !q.password)) {
|
|
26
|
+
throw new InputError("Got empty password.");
|
|
27
|
+
}
|
|
28
|
+
if ((q.type == "button" || q.type == "password") && (typeof q.data !== "string" || !q.data)) {
|
|
29
|
+
throw new InputError("Got empty button data.");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
/**
|
|
21
|
-
* Source to a file. Can be a file ID, a file path, URL, or a `Uint8Array`, unless otherwise noted.
|
|
21
|
+
* Source to a file. Can be a file ID, a file path, URL, a `Uint8Array`, a potentially async `Uint8Array` iterator, or a readable stream of `Uint8Array`, unless otherwise noted.
|
|
22
22
|
* @unlisted
|
|
23
23
|
*/
|
|
24
|
-
export type FileSource = string | URL | Uint8Array
|
|
24
|
+
export type FileSource = string | URL | Uint8Array | Iterable<Uint8Array> | AsyncIterable<Uint8Array> | ReadableStream<Uint8Array>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
/** @unlisted */
|
|
21
|
+
export type SelfDestructAfterOpen = "afterOpen";
|
|
22
|
+
/** @unlisted */
|
|
23
|
+
export type SelfDestructAfterSeconds = number;
|
|
24
|
+
export type SelfDestructOption = SelfDestructAfterOpen | SelfDestructAfterSeconds;
|
|
25
|
+
export declare function selfDestructOptionToInt(option: SelfDestructOption): number;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
import { InputError } from "../0_errors.js";
|
|
21
|
+
export function selfDestructOptionToInt(option) {
|
|
22
|
+
if (option == "afterOpen") {
|
|
23
|
+
return 2147483647;
|
|
24
|
+
}
|
|
25
|
+
else if (typeof option === "number") {
|
|
26
|
+
if (option == 0) {
|
|
27
|
+
throw new InputError("Self destruct option cannot be zero.");
|
|
28
|
+
}
|
|
29
|
+
else if (option < 0) {
|
|
30
|
+
throw new InputError("Self destruct option cannot be negative.");
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return option;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
throw new InputError("Invalid self destruct option.");
|
|
38
|
+
}
|
|
39
|
+
}
|