@mtkruto/node 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (815) hide show
  1. package/esm/0_deps.d.ts +1 -1
  2. package/esm/0_deps.js +1 -1
  3. package/esm/0_errors.d.ts +1 -1
  4. package/esm/0_errors.js +1 -1
  5. package/esm/1_utilities.d.ts +1 -1
  6. package/esm/1_utilities.js +1 -1
  7. package/esm/2_connection.d.ts +1 -1
  8. package/esm/2_connection.js +1 -1
  9. package/esm/2_storage.d.ts +1 -1
  10. package/esm/2_storage.js +1 -1
  11. package/esm/2_tl.d.ts +1 -1
  12. package/esm/2_tl.js +1 -1
  13. package/esm/3_errors.d.ts +1 -1
  14. package/esm/3_errors.js +1 -1
  15. package/esm/3_transport.d.ts +1 -1
  16. package/esm/3_transport.js +1 -1
  17. package/esm/3_types.d.ts +5 -1
  18. package/esm/3_types.d.ts.map +1 -1
  19. package/esm/3_types.js +5 -1
  20. package/esm/4_constants.d.ts +1 -1
  21. package/esm/4_constants.js +2 -2
  22. package/esm/4_errors.d.ts +1 -1
  23. package/esm/4_errors.js +1 -1
  24. package/esm/5_client.d.ts +1 -1
  25. package/esm/5_client.js +1 -1
  26. package/esm/client/0_client_abstract.js +1 -1
  27. package/esm/client/0_filters.d.ts +1 -1
  28. package/esm/client/0_filters.js +1 -1
  29. package/esm/client/0_html.d.ts +1 -1
  30. package/esm/client/0_html.js +1 -1
  31. package/esm/client/0_markdown.d.ts +1 -1
  32. package/esm/client/0_markdown.js +1 -1
  33. package/esm/client/0_message.d.ts +1 -1
  34. package/esm/client/0_message.js +1 -1
  35. package/esm/client/0_params.d.ts +31 -9
  36. package/esm/client/0_params.d.ts.map +1 -1
  37. package/esm/client/0_params.js +1 -1
  38. package/esm/client/0_password.js +1 -1
  39. package/esm/client/0_storage_operations.d.ts +1 -1
  40. package/esm/client/0_storage_operations.js +1 -1
  41. package/esm/client/0_update_processor.d.ts +7 -0
  42. package/esm/client/0_update_processor.d.ts.map +1 -0
  43. package/esm/client/0_update_processor.js +1 -0
  44. package/esm/client/0_utilities.d.ts +3 -3
  45. package/esm/client/0_utilities.d.ts.map +1 -1
  46. package/esm/client/0_utilities.js +1 -1
  47. package/esm/client/1_client_encrypted.d.ts +1 -1
  48. package/esm/client/1_client_encrypted.js +1 -1
  49. package/esm/client/1_client_plain.d.ts +1 -1
  50. package/esm/client/1_client_plain.js +1 -1
  51. package/esm/client/1_composer.d.ts +1 -1
  52. package/esm/client/1_composer.js +1 -1
  53. package/esm/client/1_types.d.ts +1 -1
  54. package/esm/client/1_types.js +1 -1
  55. package/esm/client/2_account_manager.d.ts +1 -1
  56. package/esm/client/2_account_manager.js +1 -1
  57. package/esm/client/2_bot_info_manager.d.ts +1 -1
  58. package/esm/client/2_bot_info_manager.js +1 -1
  59. package/esm/client/2_business_connection_manager.d.ts +4 -3
  60. package/esm/client/2_business_connection_manager.d.ts.map +1 -1
  61. package/esm/client/2_business_connection_manager.js +2 -2
  62. package/esm/client/2_file_manager.js +1 -1
  63. package/esm/client/2_gift_manager.d.ts +29 -0
  64. package/esm/client/2_gift_manager.d.ts.map +1 -0
  65. package/esm/client/2_gift_manager.js +62 -0
  66. package/esm/client/2_network_statistics_manager.d.ts +1 -1
  67. package/esm/client/2_network_statistics_manager.js +1 -1
  68. package/esm/client/2_payment_manager.d.ts +4 -3
  69. package/esm/client/2_payment_manager.d.ts.map +1 -1
  70. package/esm/client/2_payment_manager.js +2 -2
  71. package/esm/client/2_reaction_manager.d.ts +4 -3
  72. package/esm/client/2_reaction_manager.d.ts.map +1 -1
  73. package/esm/client/2_reaction_manager.js +2 -2
  74. package/esm/client/2_translations_manager.d.ts +3 -2
  75. package/esm/client/2_translations_manager.d.ts.map +1 -1
  76. package/esm/client/2_translations_manager.js +1 -1
  77. package/esm/client/2_update_manager.d.ts +1 -1
  78. package/esm/client/2_update_manager.js +1 -1
  79. package/esm/client/3_message_manager.d.ts +10 -26
  80. package/esm/client/3_message_manager.d.ts.map +1 -1
  81. package/esm/client/3_message_manager.js +64 -241
  82. package/esm/client/3_video_chat_manager.d.ts +5 -4
  83. package/esm/client/3_video_chat_manager.d.ts.map +1 -1
  84. package/esm/client/3_video_chat_manager.js +5 -2
  85. package/esm/client/4_callback_query_manager.d.ts +4 -3
  86. package/esm/client/4_callback_query_manager.d.ts.map +1 -1
  87. package/esm/client/4_callback_query_manager.js +2 -2
  88. package/esm/client/4_chat_list_manager.d.ts +5 -4
  89. package/esm/client/4_chat_list_manager.d.ts.map +1 -1
  90. package/esm/client/4_chat_list_manager.js +3 -2
  91. package/esm/client/4_chat_manager.d.ts +61 -0
  92. package/esm/client/4_chat_manager.d.ts.map +1 -0
  93. package/esm/client/4_chat_manager.js +293 -0
  94. package/esm/client/4_inline_query_manager.d.ts +4 -3
  95. package/esm/client/4_inline_query_manager.d.ts.map +1 -1
  96. package/esm/client/4_inline_query_manager.js +2 -2
  97. package/esm/client/4_poll_manager.d.ts +4 -3
  98. package/esm/client/4_poll_manager.d.ts.map +1 -1
  99. package/esm/client/4_poll_manager.js +2 -2
  100. package/esm/client/4_story_manager.d.ts +4 -3
  101. package/esm/client/4_story_manager.d.ts.map +1 -1
  102. package/esm/client/4_story_manager.js +2 -2
  103. package/esm/client/5_client.d.ts +44 -7
  104. package/esm/client/5_client.d.ts.map +1 -1
  105. package/esm/client/5_client.js +182 -73
  106. package/esm/connection/0_connection.d.ts +1 -1
  107. package/esm/connection/0_connection.js +1 -1
  108. package/esm/connection/1_connection_tcp.node.d.ts +1 -1
  109. package/esm/connection/1_connection_tcp.node.js +1 -1
  110. package/esm/connection/1_connection_web_socket.js +1 -1
  111. package/esm/mod.d.ts +1 -1
  112. package/esm/mod.js +1 -1
  113. package/esm/storage/0_storage.d.ts +1 -1
  114. package/esm/storage/0_storage.js +1 -1
  115. package/esm/storage/1_utilities.d.ts +1 -1
  116. package/esm/storage/1_utilities.js +1 -1
  117. package/esm/storage/2_storage_indexed_db.d.ts +1 -1
  118. package/esm/storage/2_storage_indexed_db.js +1 -1
  119. package/esm/storage/2_storage_local_storage.node.d.ts +1 -1
  120. package/esm/storage/2_storage_local_storage.node.js +1 -1
  121. package/esm/storage/2_storage_memory.d.ts +1 -1
  122. package/esm/storage/2_storage_memory.js +1 -1
  123. package/esm/storage/2_storage_session_storage.d.ts +1 -1
  124. package/esm/storage/2_storage_session_storage.js +1 -1
  125. package/esm/tl/0_api.d.ts +218 -79
  126. package/esm/tl/0_api.d.ts.map +1 -1
  127. package/esm/tl/0_api.js +362 -159
  128. package/esm/tl/0_tl_raw_reader.d.ts +1 -1
  129. package/esm/tl/0_tl_raw_reader.js +1 -1
  130. package/esm/tl/0_tl_raw_writer.d.ts +1 -1
  131. package/esm/tl/0_tl_raw_writer.js +1 -1
  132. package/esm/tl/1_utilities.d.ts +1 -1
  133. package/esm/tl/1_utilities.js +1 -1
  134. package/esm/tl/2_deserialize.d.ts +1 -1
  135. package/esm/tl/2_deserialize.js +1 -1
  136. package/esm/tl/2_serialize.d.ts +1 -1
  137. package/esm/tl/2_serialize.js +1 -1
  138. package/esm/tl/3_tl_reader.d.ts +1 -1
  139. package/esm/tl/3_tl_reader.js +1 -1
  140. package/esm/tl/3_utilities.d.ts +1 -1
  141. package/esm/tl/3_utilities.js +1 -1
  142. package/esm/tl/4_rpc_result.d.ts +1 -1
  143. package/esm/tl/4_rpc_result.js +1 -1
  144. package/esm/tl/4_tl_writer.d.ts +1 -1
  145. package/esm/tl/4_tl_writer.js +1 -1
  146. package/esm/tl/5_message.d.ts +1 -1
  147. package/esm/tl/5_message.js +1 -1
  148. package/esm/transport/0_obfuscation.js +1 -1
  149. package/esm/transport/0_transport.d.ts +1 -1
  150. package/esm/transport/0_transport.js +1 -1
  151. package/esm/transport/1_transport_abridged.d.ts +1 -1
  152. package/esm/transport/1_transport_abridged.js +1 -1
  153. package/esm/transport/1_transport_intermediate.d.ts +1 -1
  154. package/esm/transport/1_transport_intermediate.js +1 -1
  155. package/esm/transport/2_transport_provider.d.ts +1 -1
  156. package/esm/transport/2_transport_provider.js +1 -1
  157. package/esm/transport/3_transport_provider_tcp.d.ts +1 -1
  158. package/esm/transport/3_transport_provider_tcp.js +1 -1
  159. package/esm/transport/3_transport_provider_web_socket.d.ts +1 -1
  160. package/esm/transport/3_transport_provider_web_socket.js +1 -1
  161. package/esm/types/0_authorization_state.d.ts +1 -1
  162. package/esm/types/0_authorization_state.js +1 -1
  163. package/esm/types/0_birthday.d.ts +1 -1
  164. package/esm/types/0_birthday.js +1 -1
  165. package/esm/types/0_bot_command.d.ts +1 -1
  166. package/esm/types/0_bot_command.js +1 -1
  167. package/esm/types/0_callback_query_answer.d.ts +1 -1
  168. package/esm/types/0_callback_query_answer.js +1 -1
  169. package/esm/types/0_callback_query_question.d.ts +1 -1
  170. package/esm/types/0_callback_query_question.js +1 -1
  171. package/esm/types/0_chat_action.d.ts +1 -1
  172. package/esm/types/0_chat_action.js +1 -1
  173. package/esm/types/0_chat_administrator_rights.d.ts +1 -1
  174. package/esm/types/0_chat_administrator_rights.js +1 -1
  175. package/esm/types/0_chat_member_rights.d.ts +1 -1
  176. package/esm/types/0_chat_member_rights.js +1 -1
  177. package/esm/types/0_chat_photo.d.ts +1 -1
  178. package/esm/types/0_chat_photo.js +1 -1
  179. package/esm/types/0_connection_state.d.ts +1 -1
  180. package/esm/types/0_connection_state.js +1 -1
  181. package/esm/types/0_contact.d.ts +1 -1
  182. package/esm/types/0_contact.js +1 -1
  183. package/esm/types/0_dice.d.ts +1 -1
  184. package/esm/types/0_dice.js +1 -1
  185. package/esm/types/0_failed_invitation.d.ts +1 -1
  186. package/esm/types/0_failed_invitation.js +1 -1
  187. package/esm/types/0_file_source.d.ts +1 -1
  188. package/esm/types/0_file_source.js +1 -1
  189. package/esm/types/0_giveaway_parameters.d.ts +1 -1
  190. package/esm/types/0_giveaway_parameters.js +1 -1
  191. package/esm/types/0_id.d.ts +1 -1
  192. package/esm/types/0_id.js +1 -1
  193. package/esm/types/0_invoice.d.ts +1 -1
  194. package/esm/types/0_invoice.js +1 -1
  195. package/esm/types/0_keyboard_button_poll_type.d.ts +1 -1
  196. package/esm/types/0_keyboard_button_poll_type.js +1 -1
  197. package/esm/types/0_link_preview.d.ts +1 -1
  198. package/esm/types/0_link_preview.js +1 -1
  199. package/esm/types/0_live_stream_channel.d.ts +1 -1
  200. package/esm/types/0_live_stream_channel.js +1 -1
  201. package/esm/types/0_location.d.ts +1 -1
  202. package/esm/types/0_location.js +1 -1
  203. package/esm/types/0_login_url.d.ts +1 -1
  204. package/esm/types/0_login_url.js +1 -1
  205. package/esm/types/0_mask_position.d.ts +1 -1
  206. package/esm/types/0_mask_position.js +1 -1
  207. package/esm/types/0_message_entity.d.ts +1 -1
  208. package/esm/types/0_message_entity.js +1 -1
  209. package/esm/types/0_message_reference.d.ts +1 -1
  210. package/esm/types/0_message_reference.js +1 -1
  211. package/esm/types/0_message_search_filter.d.ts +1 -1
  212. package/esm/types/0_message_search_filter.js +1 -1
  213. package/esm/types/0_mini_app_info.d.ts +1 -1
  214. package/esm/types/0_mini_app_info.js +1 -1
  215. package/esm/types/0_network_statistics_entry.d.ts +1 -1
  216. package/esm/types/0_network_statistics_entry.js +1 -1
  217. package/esm/types/0_opening_hours.d.ts +1 -1
  218. package/esm/types/0_opening_hours.js +1 -1
  219. package/esm/types/0_parse_mode.d.ts +1 -1
  220. package/esm/types/0_parse_mode.js +1 -1
  221. package/esm/types/0_price_tag.d.ts +1 -1
  222. package/esm/types/0_price_tag.js +1 -1
  223. package/esm/types/0_reaction.d.ts +1 -1
  224. package/esm/types/0_reaction.js +1 -1
  225. package/esm/types/0_refunded_payment.d.ts +1 -1
  226. package/esm/types/0_refunded_payment.js +1 -1
  227. package/esm/types/0_restriction_reason.d.ts +1 -1
  228. package/esm/types/0_restriction_reason.js +1 -1
  229. package/esm/types/0_self_destruct_option.d.ts +1 -1
  230. package/esm/types/0_self_destruct_option.js +1 -1
  231. package/esm/types/0_shipping_address.d.ts +1 -1
  232. package/esm/types/0_shipping_address.js +1 -1
  233. package/esm/types/0_story_reference.d.ts +1 -1
  234. package/esm/types/0_story_reference.js +1 -1
  235. package/esm/types/0_switch_inline_query_chosen_chats.d.ts +1 -1
  236. package/esm/types/0_switch_inline_query_chosen_chats.js +1 -1
  237. package/esm/types/0_thumbnail.d.ts +1 -1
  238. package/esm/types/0_thumbnail.js +1 -1
  239. package/esm/types/0_video_chat.d.ts +1 -1
  240. package/esm/types/0_video_chat.js +1 -1
  241. package/esm/types/0_voice.d.ts +1 -1
  242. package/esm/types/0_voice.js +1 -1
  243. package/esm/types/1_animation.d.ts +1 -1
  244. package/esm/types/1_animation.js +1 -1
  245. package/esm/types/1_audio.d.ts +1 -1
  246. package/esm/types/1_audio.js +1 -1
  247. package/esm/types/1_bot_command_scope.d.ts +1 -1
  248. package/esm/types/1_bot_command_scope.js +1 -1
  249. package/esm/types/1_chat_p.d.ts +1 -1
  250. package/esm/types/1_chat_p.js +1 -1
  251. package/esm/types/1_document.d.ts +1 -1
  252. package/esm/types/1_document.js +1 -1
  253. package/esm/types/1_giveaway.d.ts +1 -1
  254. package/esm/types/1_giveaway.js +1 -1
  255. package/esm/types/1_inline_query_result_button.d.ts +1 -1
  256. package/esm/types/1_inline_query_result_button.js +1 -1
  257. package/esm/types/1_input_media.d.ts +1 -1
  258. package/esm/types/1_input_media.js +1 -1
  259. package/esm/types/1_input_story_content.d.ts +1 -1
  260. package/esm/types/1_input_story_content.js +1 -1
  261. package/esm/types/1_keyboard_button.d.ts +1 -1
  262. package/esm/types/1_keyboard_button.js +1 -1
  263. package/esm/types/1_message_content.d.ts +2 -2
  264. package/esm/types/1_message_content.d.ts.map +1 -1
  265. package/esm/types/1_message_content.js +1 -1
  266. package/esm/types/1_message_reaction.d.ts +1 -1
  267. package/esm/types/1_message_reaction.js +1 -1
  268. package/esm/types/1_network_statistics.d.ts +1 -1
  269. package/esm/types/1_network_statistics.js +1 -1
  270. package/esm/types/1_order_info.d.ts +1 -1
  271. package/esm/types/1_order_info.js +1 -1
  272. package/esm/types/1_photo.d.ts +1 -1
  273. package/esm/types/1_photo.js +1 -1
  274. package/esm/types/1_poll_option.d.ts +1 -1
  275. package/esm/types/1_poll_option.js +1 -1
  276. package/esm/types/1_reaction_count.d.ts +1 -1
  277. package/esm/types/1_reaction_count.js +1 -1
  278. package/esm/types/1_reply_quote.d.ts +1 -1
  279. package/esm/types/1_reply_quote.js +1 -1
  280. package/esm/types/1_sticker.d.ts +2 -1
  281. package/esm/types/1_sticker.d.ts.map +1 -1
  282. package/esm/types/1_sticker.js +7 -3
  283. package/esm/types/1_story_privacy.d.ts +1 -1
  284. package/esm/types/1_story_privacy.js +1 -1
  285. package/esm/types/1_story_reaction.d.ts +1 -1
  286. package/esm/types/1_story_reaction.js +1 -1
  287. package/esm/types/1_user.d.ts +1 -1
  288. package/esm/types/1_user.js +1 -1
  289. package/esm/types/1_venue.d.ts +1 -1
  290. package/esm/types/1_venue.js +1 -1
  291. package/esm/types/1_video.d.ts +1 -1
  292. package/esm/types/1_video.js +1 -1
  293. package/esm/types/1_video_note.d.ts +1 -1
  294. package/esm/types/1_video_note.js +1 -1
  295. package/esm/types/2_business_connection.d.ts +1 -1
  296. package/esm/types/2_business_connection.js +1 -1
  297. package/esm/types/2_chat.d.ts +1 -1
  298. package/esm/types/2_chat.js +1 -1
  299. package/esm/types/2_chat_member.d.ts +1 -1
  300. package/esm/types/2_chat_member.js +1 -1
  301. package/esm/types/2_chosen_inline_result.d.ts +1 -1
  302. package/esm/types/2_chosen_inline_result.js +1 -1
  303. package/esm/types/2_forward_header.d.ts +1 -1
  304. package/esm/types/2_forward_header.js +1 -1
  305. package/esm/types/2_game.d.ts +1 -1
  306. package/esm/types/2_game.js +1 -1
  307. package/esm/types/2_gift_upgraded_component.d.ts +95 -0
  308. package/esm/types/2_gift_upgraded_component.d.ts.map +1 -0
  309. package/esm/types/2_gift_upgraded_component.js +88 -0
  310. package/esm/types/2_inactive_chat.d.ts +1 -1
  311. package/esm/types/2_inactive_chat.js +1 -1
  312. package/esm/types/2_inline_keyboard_button.d.ts +1 -1
  313. package/esm/types/2_inline_keyboard_button.js +1 -1
  314. package/esm/types/2_inline_query.d.ts +1 -1
  315. package/esm/types/2_inline_query.js +1 -1
  316. package/esm/types/2_invite_link.d.ts +1 -1
  317. package/esm/types/2_invite_link.js +1 -1
  318. package/esm/types/2_message_interactions.d.ts +1 -1
  319. package/esm/types/2_message_interactions.js +1 -1
  320. package/esm/types/2_message_reaction_count.d.ts +1 -1
  321. package/esm/types/2_message_reaction_count.js +1 -1
  322. package/esm/types/2_message_reactions.d.ts +1 -1
  323. package/esm/types/2_message_reactions.js +1 -1
  324. package/esm/types/2_poll.d.ts +1 -1
  325. package/esm/types/2_poll.js +1 -1
  326. package/esm/types/2_pre_checkout_query.d.ts +1 -1
  327. package/esm/types/2_pre_checkout_query.js +1 -1
  328. package/esm/types/2_reply_to.d.ts +1 -1
  329. package/esm/types/2_reply_to.js +1 -1
  330. package/esm/types/2_story_content.d.ts +1 -1
  331. package/esm/types/2_story_content.js +1 -1
  332. package/esm/types/2_story_interactions.d.ts +1 -1
  333. package/esm/types/2_story_interactions.js +1 -1
  334. package/esm/types/2_story_interactive_area.d.ts +1 -1
  335. package/esm/types/2_story_interactive_area.js +1 -1
  336. package/esm/types/2_successful_payment.d.ts +1 -1
  337. package/esm/types/2_successful_payment.js +1 -1
  338. package/esm/types/3_chat_member_updated.d.ts +1 -1
  339. package/esm/types/3_chat_member_updated.js +1 -1
  340. package/esm/types/3_gift.d.ts +82 -0
  341. package/esm/types/3_gift.d.ts.map +1 -0
  342. package/esm/types/3_gift.js +88 -0
  343. package/esm/types/3_join_request.d.ts +1 -1
  344. package/esm/types/3_join_request.js +1 -1
  345. package/esm/types/3_reply_markup.d.ts +1 -1
  346. package/esm/types/3_reply_markup.js +1 -1
  347. package/esm/types/3_story.d.ts +1 -1
  348. package/esm/types/3_story.js +1 -1
  349. package/esm/types/4_inline_query_result.d.ts +1 -1
  350. package/esm/types/4_inline_query_result.js +1 -1
  351. package/esm/types/4_message.d.ts +2 -1
  352. package/esm/types/4_message.d.ts.map +1 -1
  353. package/esm/types/4_message.js +9 -3
  354. package/esm/types/4_user_gift.d.ts +44 -0
  355. package/esm/types/4_user_gift.d.ts.map +1 -0
  356. package/esm/types/4_user_gift.js +43 -0
  357. package/esm/types/5_callback_query.d.ts +1 -1
  358. package/esm/types/5_callback_query.js +1 -1
  359. package/esm/types/5_chat_list_item.d.ts +1 -1
  360. package/esm/types/5_chat_list_item.js +1 -1
  361. package/esm/types/5_inline_query_answer.d.ts +1 -1
  362. package/esm/types/5_inline_query_answer.js +1 -1
  363. package/esm/types/5_user_gifts.d.ts +32 -0
  364. package/esm/types/5_user_gifts.d.ts.map +1 -0
  365. package/esm/types/5_user_gifts.js +29 -0
  366. package/esm/types/6_update.d.ts +1 -1
  367. package/esm/types/6_update.js +1 -1
  368. package/esm/types/_file_id.d.ts +1 -1
  369. package/esm/types/_file_id.js +1 -1
  370. package/esm/types/_getters.d.ts +1 -1
  371. package/esm/types/_getters.js +1 -1
  372. package/esm/utilities/0_bigint.js +1 -1
  373. package/esm/utilities/0_buffer.d.ts +1 -1
  374. package/esm/utilities/0_buffer.js +1 -1
  375. package/esm/utilities/0_cache_map.d.ts +1 -1
  376. package/esm/utilities/0_cache_map.js +1 -1
  377. package/esm/utilities/0_color.d.ts +1 -1
  378. package/esm/utilities/0_color.js +1 -1
  379. package/esm/utilities/0_env.js +1 -1
  380. package/esm/utilities/0_gunzip.d.ts +1 -1
  381. package/esm/utilities/0_gunzip.js +1 -1
  382. package/esm/utilities/0_hash.js +1 -1
  383. package/esm/utilities/0_misc.d.ts +1 -1
  384. package/esm/utilities/0_misc.js +1 -1
  385. package/esm/utilities/0_mutex.d.ts +1 -1
  386. package/esm/utilities/0_mutex.js +1 -1
  387. package/esm/utilities/0_object.d.ts +1 -1
  388. package/esm/utilities/0_object.js +1 -1
  389. package/esm/utilities/0_part_stream.d.ts +1 -1
  390. package/esm/utilities/0_part_stream.js +1 -1
  391. package/esm/utilities/0_rle.d.ts +1 -1
  392. package/esm/utilities/0_rle.js +1 -1
  393. package/esm/utilities/0_types.d.ts +1 -1
  394. package/esm/utilities/0_types.js +1 -1
  395. package/esm/utilities/0_units.d.ts +1 -1
  396. package/esm/utilities/0_units.js +1 -1
  397. package/esm/utilities/1_auth.js +1 -1
  398. package/esm/utilities/1_base64.d.ts +1 -1
  399. package/esm/utilities/1_base64.js +1 -1
  400. package/esm/utilities/1_crypto.d.ts +1 -1
  401. package/esm/utilities/1_crypto.js +1 -1
  402. package/esm/utilities/1_logger.d.ts +1 -1
  403. package/esm/utilities/1_logger.js +1 -1
  404. package/esm/utilities/1_math.d.ts +1 -1
  405. package/esm/utilities/1_math.js +1 -1
  406. package/esm/utilities/2_queue.d.ts +1 -1
  407. package/esm/utilities/2_queue.js +1 -1
  408. package/package.json +1 -1
  409. package/script/0_deps.d.ts +1 -1
  410. package/script/0_deps.js +1 -1
  411. package/script/0_errors.d.ts +1 -1
  412. package/script/0_errors.js +1 -1
  413. package/script/1_utilities.d.ts +1 -1
  414. package/script/1_utilities.js +1 -1
  415. package/script/2_connection.d.ts +1 -1
  416. package/script/2_connection.js +1 -1
  417. package/script/2_storage.d.ts +1 -1
  418. package/script/2_storage.js +1 -1
  419. package/script/2_tl.d.ts +1 -1
  420. package/script/2_tl.js +1 -1
  421. package/script/3_errors.d.ts +1 -1
  422. package/script/3_errors.js +1 -1
  423. package/script/3_transport.d.ts +1 -1
  424. package/script/3_transport.js +1 -1
  425. package/script/3_types.d.ts +5 -1
  426. package/script/3_types.d.ts.map +1 -1
  427. package/script/3_types.js +5 -1
  428. package/script/4_constants.d.ts +1 -1
  429. package/script/4_constants.js +2 -2
  430. package/script/4_errors.d.ts +1 -1
  431. package/script/4_errors.js +1 -1
  432. package/script/5_client.d.ts +1 -1
  433. package/script/5_client.js +1 -1
  434. package/script/client/0_client_abstract.js +1 -1
  435. package/script/client/0_filters.d.ts +1 -1
  436. package/script/client/0_filters.js +1 -1
  437. package/script/client/0_html.d.ts +1 -1
  438. package/script/client/0_html.js +1 -1
  439. package/script/client/0_markdown.d.ts +1 -1
  440. package/script/client/0_markdown.js +1 -1
  441. package/script/client/0_message.d.ts +1 -1
  442. package/script/client/0_message.js +1 -1
  443. package/script/client/0_params.d.ts +31 -9
  444. package/script/client/0_params.d.ts.map +1 -1
  445. package/script/client/0_params.js +1 -1
  446. package/script/client/0_password.js +1 -1
  447. package/script/client/0_storage_operations.d.ts +1 -1
  448. package/script/client/0_storage_operations.js +1 -1
  449. package/script/client/0_update_processor.d.ts +7 -0
  450. package/script/client/0_update_processor.d.ts.map +1 -0
  451. package/script/client/0_update_processor.js +2 -0
  452. package/script/client/0_utilities.d.ts +3 -3
  453. package/script/client/0_utilities.d.ts.map +1 -1
  454. package/script/client/0_utilities.js +1 -1
  455. package/script/client/1_client_encrypted.d.ts +1 -1
  456. package/script/client/1_client_encrypted.js +1 -1
  457. package/script/client/1_client_plain.d.ts +1 -1
  458. package/script/client/1_client_plain.js +1 -1
  459. package/script/client/1_composer.d.ts +1 -1
  460. package/script/client/1_composer.js +1 -1
  461. package/script/client/1_types.d.ts +1 -1
  462. package/script/client/1_types.js +1 -1
  463. package/script/client/2_account_manager.d.ts +1 -1
  464. package/script/client/2_account_manager.js +1 -1
  465. package/script/client/2_bot_info_manager.d.ts +1 -1
  466. package/script/client/2_bot_info_manager.js +1 -1
  467. package/script/client/2_business_connection_manager.d.ts +4 -3
  468. package/script/client/2_business_connection_manager.d.ts.map +1 -1
  469. package/script/client/2_business_connection_manager.js +2 -2
  470. package/script/client/2_file_manager.js +1 -1
  471. package/script/client/2_gift_manager.d.ts +29 -0
  472. package/script/client/2_gift_manager.d.ts.map +1 -0
  473. package/script/client/2_gift_manager.js +66 -0
  474. package/script/client/2_network_statistics_manager.d.ts +1 -1
  475. package/script/client/2_network_statistics_manager.js +1 -1
  476. package/script/client/2_payment_manager.d.ts +4 -3
  477. package/script/client/2_payment_manager.d.ts.map +1 -1
  478. package/script/client/2_payment_manager.js +2 -2
  479. package/script/client/2_reaction_manager.d.ts +4 -3
  480. package/script/client/2_reaction_manager.d.ts.map +1 -1
  481. package/script/client/2_reaction_manager.js +2 -2
  482. package/script/client/2_translations_manager.d.ts +3 -2
  483. package/script/client/2_translations_manager.d.ts.map +1 -1
  484. package/script/client/2_translations_manager.js +1 -1
  485. package/script/client/2_update_manager.d.ts +1 -1
  486. package/script/client/2_update_manager.js +1 -1
  487. package/script/client/3_message_manager.d.ts +10 -26
  488. package/script/client/3_message_manager.d.ts.map +1 -1
  489. package/script/client/3_message_manager.js +61 -238
  490. package/script/client/3_video_chat_manager.d.ts +5 -4
  491. package/script/client/3_video_chat_manager.d.ts.map +1 -1
  492. package/script/client/3_video_chat_manager.js +5 -2
  493. package/script/client/4_callback_query_manager.d.ts +4 -3
  494. package/script/client/4_callback_query_manager.d.ts.map +1 -1
  495. package/script/client/4_callback_query_manager.js +2 -2
  496. package/script/client/4_chat_list_manager.d.ts +5 -4
  497. package/script/client/4_chat_list_manager.d.ts.map +1 -1
  498. package/script/client/4_chat_list_manager.js +3 -2
  499. package/script/client/4_chat_manager.d.ts +61 -0
  500. package/script/client/4_chat_manager.d.ts.map +1 -0
  501. package/script/client/4_chat_manager.js +297 -0
  502. package/script/client/4_inline_query_manager.d.ts +4 -3
  503. package/script/client/4_inline_query_manager.d.ts.map +1 -1
  504. package/script/client/4_inline_query_manager.js +2 -2
  505. package/script/client/4_poll_manager.d.ts +4 -3
  506. package/script/client/4_poll_manager.d.ts.map +1 -1
  507. package/script/client/4_poll_manager.js +2 -2
  508. package/script/client/4_story_manager.d.ts +4 -3
  509. package/script/client/4_story_manager.d.ts.map +1 -1
  510. package/script/client/4_story_manager.js +2 -2
  511. package/script/client/5_client.d.ts +44 -7
  512. package/script/client/5_client.d.ts.map +1 -1
  513. package/script/client/5_client.js +182 -73
  514. package/script/connection/0_connection.d.ts +1 -1
  515. package/script/connection/0_connection.js +1 -1
  516. package/script/connection/1_connection_tcp.node.d.ts +1 -1
  517. package/script/connection/1_connection_tcp.node.js +1 -1
  518. package/script/connection/1_connection_web_socket.js +1 -1
  519. package/script/mod.d.ts +1 -1
  520. package/script/mod.js +1 -1
  521. package/script/storage/0_storage.d.ts +1 -1
  522. package/script/storage/0_storage.js +1 -1
  523. package/script/storage/1_utilities.d.ts +1 -1
  524. package/script/storage/1_utilities.js +1 -1
  525. package/script/storage/2_storage_indexed_db.d.ts +1 -1
  526. package/script/storage/2_storage_indexed_db.js +1 -1
  527. package/script/storage/2_storage_local_storage.node.d.ts +1 -1
  528. package/script/storage/2_storage_local_storage.node.js +1 -1
  529. package/script/storage/2_storage_memory.d.ts +1 -1
  530. package/script/storage/2_storage_memory.js +1 -1
  531. package/script/storage/2_storage_session_storage.d.ts +1 -1
  532. package/script/storage/2_storage_session_storage.js +1 -1
  533. package/script/tl/0_api.d.ts +218 -79
  534. package/script/tl/0_api.d.ts.map +1 -1
  535. package/script/tl/0_api.js +362 -159
  536. package/script/tl/0_tl_raw_reader.d.ts +1 -1
  537. package/script/tl/0_tl_raw_reader.js +1 -1
  538. package/script/tl/0_tl_raw_writer.d.ts +1 -1
  539. package/script/tl/0_tl_raw_writer.js +1 -1
  540. package/script/tl/1_utilities.d.ts +1 -1
  541. package/script/tl/1_utilities.js +1 -1
  542. package/script/tl/2_deserialize.d.ts +1 -1
  543. package/script/tl/2_deserialize.js +1 -1
  544. package/script/tl/2_serialize.d.ts +1 -1
  545. package/script/tl/2_serialize.js +1 -1
  546. package/script/tl/3_tl_reader.d.ts +1 -1
  547. package/script/tl/3_tl_reader.js +1 -1
  548. package/script/tl/3_utilities.d.ts +1 -1
  549. package/script/tl/3_utilities.js +1 -1
  550. package/script/tl/4_rpc_result.d.ts +1 -1
  551. package/script/tl/4_rpc_result.js +1 -1
  552. package/script/tl/4_tl_writer.d.ts +1 -1
  553. package/script/tl/4_tl_writer.js +1 -1
  554. package/script/tl/5_message.d.ts +1 -1
  555. package/script/tl/5_message.js +1 -1
  556. package/script/transport/0_obfuscation.js +1 -1
  557. package/script/transport/0_transport.d.ts +1 -1
  558. package/script/transport/0_transport.js +1 -1
  559. package/script/transport/1_transport_abridged.d.ts +1 -1
  560. package/script/transport/1_transport_abridged.js +1 -1
  561. package/script/transport/1_transport_intermediate.d.ts +1 -1
  562. package/script/transport/1_transport_intermediate.js +1 -1
  563. package/script/transport/2_transport_provider.d.ts +1 -1
  564. package/script/transport/2_transport_provider.js +1 -1
  565. package/script/transport/3_transport_provider_tcp.d.ts +1 -1
  566. package/script/transport/3_transport_provider_tcp.js +1 -1
  567. package/script/transport/3_transport_provider_web_socket.d.ts +1 -1
  568. package/script/transport/3_transport_provider_web_socket.js +1 -1
  569. package/script/types/0_authorization_state.d.ts +1 -1
  570. package/script/types/0_authorization_state.js +1 -1
  571. package/script/types/0_birthday.d.ts +1 -1
  572. package/script/types/0_birthday.js +1 -1
  573. package/script/types/0_bot_command.d.ts +1 -1
  574. package/script/types/0_bot_command.js +1 -1
  575. package/script/types/0_callback_query_answer.d.ts +1 -1
  576. package/script/types/0_callback_query_answer.js +1 -1
  577. package/script/types/0_callback_query_question.d.ts +1 -1
  578. package/script/types/0_callback_query_question.js +1 -1
  579. package/script/types/0_chat_action.d.ts +1 -1
  580. package/script/types/0_chat_action.js +1 -1
  581. package/script/types/0_chat_administrator_rights.d.ts +1 -1
  582. package/script/types/0_chat_administrator_rights.js +1 -1
  583. package/script/types/0_chat_member_rights.d.ts +1 -1
  584. package/script/types/0_chat_member_rights.js +1 -1
  585. package/script/types/0_chat_photo.d.ts +1 -1
  586. package/script/types/0_chat_photo.js +1 -1
  587. package/script/types/0_connection_state.d.ts +1 -1
  588. package/script/types/0_connection_state.js +1 -1
  589. package/script/types/0_contact.d.ts +1 -1
  590. package/script/types/0_contact.js +1 -1
  591. package/script/types/0_dice.d.ts +1 -1
  592. package/script/types/0_dice.js +1 -1
  593. package/script/types/0_failed_invitation.d.ts +1 -1
  594. package/script/types/0_failed_invitation.js +1 -1
  595. package/script/types/0_file_source.d.ts +1 -1
  596. package/script/types/0_file_source.js +1 -1
  597. package/script/types/0_giveaway_parameters.d.ts +1 -1
  598. package/script/types/0_giveaway_parameters.js +1 -1
  599. package/script/types/0_id.d.ts +1 -1
  600. package/script/types/0_id.js +1 -1
  601. package/script/types/0_invoice.d.ts +1 -1
  602. package/script/types/0_invoice.js +1 -1
  603. package/script/types/0_keyboard_button_poll_type.d.ts +1 -1
  604. package/script/types/0_keyboard_button_poll_type.js +1 -1
  605. package/script/types/0_link_preview.d.ts +1 -1
  606. package/script/types/0_link_preview.js +1 -1
  607. package/script/types/0_live_stream_channel.d.ts +1 -1
  608. package/script/types/0_live_stream_channel.js +1 -1
  609. package/script/types/0_location.d.ts +1 -1
  610. package/script/types/0_location.js +1 -1
  611. package/script/types/0_login_url.d.ts +1 -1
  612. package/script/types/0_login_url.js +1 -1
  613. package/script/types/0_mask_position.d.ts +1 -1
  614. package/script/types/0_mask_position.js +1 -1
  615. package/script/types/0_message_entity.d.ts +1 -1
  616. package/script/types/0_message_entity.js +1 -1
  617. package/script/types/0_message_reference.d.ts +1 -1
  618. package/script/types/0_message_reference.js +1 -1
  619. package/script/types/0_message_search_filter.d.ts +1 -1
  620. package/script/types/0_message_search_filter.js +1 -1
  621. package/script/types/0_mini_app_info.d.ts +1 -1
  622. package/script/types/0_mini_app_info.js +1 -1
  623. package/script/types/0_network_statistics_entry.d.ts +1 -1
  624. package/script/types/0_network_statistics_entry.js +1 -1
  625. package/script/types/0_opening_hours.d.ts +1 -1
  626. package/script/types/0_opening_hours.js +1 -1
  627. package/script/types/0_parse_mode.d.ts +1 -1
  628. package/script/types/0_parse_mode.js +1 -1
  629. package/script/types/0_price_tag.d.ts +1 -1
  630. package/script/types/0_price_tag.js +1 -1
  631. package/script/types/0_reaction.d.ts +1 -1
  632. package/script/types/0_reaction.js +1 -1
  633. package/script/types/0_refunded_payment.d.ts +1 -1
  634. package/script/types/0_refunded_payment.js +1 -1
  635. package/script/types/0_restriction_reason.d.ts +1 -1
  636. package/script/types/0_restriction_reason.js +1 -1
  637. package/script/types/0_self_destruct_option.d.ts +1 -1
  638. package/script/types/0_self_destruct_option.js +1 -1
  639. package/script/types/0_shipping_address.d.ts +1 -1
  640. package/script/types/0_shipping_address.js +1 -1
  641. package/script/types/0_story_reference.d.ts +1 -1
  642. package/script/types/0_story_reference.js +1 -1
  643. package/script/types/0_switch_inline_query_chosen_chats.d.ts +1 -1
  644. package/script/types/0_switch_inline_query_chosen_chats.js +1 -1
  645. package/script/types/0_thumbnail.d.ts +1 -1
  646. package/script/types/0_thumbnail.js +1 -1
  647. package/script/types/0_video_chat.d.ts +1 -1
  648. package/script/types/0_video_chat.js +1 -1
  649. package/script/types/0_voice.d.ts +1 -1
  650. package/script/types/0_voice.js +1 -1
  651. package/script/types/1_animation.d.ts +1 -1
  652. package/script/types/1_animation.js +1 -1
  653. package/script/types/1_audio.d.ts +1 -1
  654. package/script/types/1_audio.js +1 -1
  655. package/script/types/1_bot_command_scope.d.ts +1 -1
  656. package/script/types/1_bot_command_scope.js +1 -1
  657. package/script/types/1_chat_p.d.ts +1 -1
  658. package/script/types/1_chat_p.js +1 -1
  659. package/script/types/1_document.d.ts +1 -1
  660. package/script/types/1_document.js +1 -1
  661. package/script/types/1_giveaway.d.ts +1 -1
  662. package/script/types/1_giveaway.js +1 -1
  663. package/script/types/1_inline_query_result_button.d.ts +1 -1
  664. package/script/types/1_inline_query_result_button.js +1 -1
  665. package/script/types/1_input_media.d.ts +1 -1
  666. package/script/types/1_input_media.js +1 -1
  667. package/script/types/1_input_story_content.d.ts +1 -1
  668. package/script/types/1_input_story_content.js +1 -1
  669. package/script/types/1_keyboard_button.d.ts +1 -1
  670. package/script/types/1_keyboard_button.js +1 -1
  671. package/script/types/1_message_content.d.ts +2 -2
  672. package/script/types/1_message_content.d.ts.map +1 -1
  673. package/script/types/1_message_content.js +1 -1
  674. package/script/types/1_message_reaction.d.ts +1 -1
  675. package/script/types/1_message_reaction.js +1 -1
  676. package/script/types/1_network_statistics.d.ts +1 -1
  677. package/script/types/1_network_statistics.js +1 -1
  678. package/script/types/1_order_info.d.ts +1 -1
  679. package/script/types/1_order_info.js +1 -1
  680. package/script/types/1_photo.d.ts +1 -1
  681. package/script/types/1_photo.js +1 -1
  682. package/script/types/1_poll_option.d.ts +1 -1
  683. package/script/types/1_poll_option.js +1 -1
  684. package/script/types/1_reaction_count.d.ts +1 -1
  685. package/script/types/1_reaction_count.js +1 -1
  686. package/script/types/1_reply_quote.d.ts +1 -1
  687. package/script/types/1_reply_quote.js +1 -1
  688. package/script/types/1_sticker.d.ts +2 -1
  689. package/script/types/1_sticker.d.ts.map +1 -1
  690. package/script/types/1_sticker.js +8 -3
  691. package/script/types/1_story_privacy.d.ts +1 -1
  692. package/script/types/1_story_privacy.js +1 -1
  693. package/script/types/1_story_reaction.d.ts +1 -1
  694. package/script/types/1_story_reaction.js +1 -1
  695. package/script/types/1_user.d.ts +1 -1
  696. package/script/types/1_user.js +1 -1
  697. package/script/types/1_venue.d.ts +1 -1
  698. package/script/types/1_venue.js +1 -1
  699. package/script/types/1_video.d.ts +1 -1
  700. package/script/types/1_video.js +1 -1
  701. package/script/types/1_video_note.d.ts +1 -1
  702. package/script/types/1_video_note.js +1 -1
  703. package/script/types/2_business_connection.d.ts +1 -1
  704. package/script/types/2_business_connection.js +1 -1
  705. package/script/types/2_chat.d.ts +1 -1
  706. package/script/types/2_chat.js +1 -1
  707. package/script/types/2_chat_member.d.ts +1 -1
  708. package/script/types/2_chat_member.js +1 -1
  709. package/script/types/2_chosen_inline_result.d.ts +1 -1
  710. package/script/types/2_chosen_inline_result.js +1 -1
  711. package/script/types/2_forward_header.d.ts +1 -1
  712. package/script/types/2_forward_header.js +1 -1
  713. package/script/types/2_game.d.ts +1 -1
  714. package/script/types/2_game.js +1 -1
  715. package/script/types/2_gift_upgraded_component.d.ts +95 -0
  716. package/script/types/2_gift_upgraded_component.d.ts.map +1 -0
  717. package/script/types/2_gift_upgraded_component.js +91 -0
  718. package/script/types/2_inactive_chat.d.ts +1 -1
  719. package/script/types/2_inactive_chat.js +1 -1
  720. package/script/types/2_inline_keyboard_button.d.ts +1 -1
  721. package/script/types/2_inline_keyboard_button.js +1 -1
  722. package/script/types/2_inline_query.d.ts +1 -1
  723. package/script/types/2_inline_query.js +1 -1
  724. package/script/types/2_invite_link.d.ts +1 -1
  725. package/script/types/2_invite_link.js +1 -1
  726. package/script/types/2_message_interactions.d.ts +1 -1
  727. package/script/types/2_message_interactions.js +1 -1
  728. package/script/types/2_message_reaction_count.d.ts +1 -1
  729. package/script/types/2_message_reaction_count.js +1 -1
  730. package/script/types/2_message_reactions.d.ts +1 -1
  731. package/script/types/2_message_reactions.js +1 -1
  732. package/script/types/2_poll.d.ts +1 -1
  733. package/script/types/2_poll.js +1 -1
  734. package/script/types/2_pre_checkout_query.d.ts +1 -1
  735. package/script/types/2_pre_checkout_query.js +1 -1
  736. package/script/types/2_reply_to.d.ts +1 -1
  737. package/script/types/2_reply_to.js +1 -1
  738. package/script/types/2_story_content.d.ts +1 -1
  739. package/script/types/2_story_content.js +1 -1
  740. package/script/types/2_story_interactions.d.ts +1 -1
  741. package/script/types/2_story_interactions.js +1 -1
  742. package/script/types/2_story_interactive_area.d.ts +1 -1
  743. package/script/types/2_story_interactive_area.js +1 -1
  744. package/script/types/2_successful_payment.d.ts +1 -1
  745. package/script/types/2_successful_payment.js +1 -1
  746. package/script/types/3_chat_member_updated.d.ts +1 -1
  747. package/script/types/3_chat_member_updated.js +1 -1
  748. package/script/types/3_gift.d.ts +82 -0
  749. package/script/types/3_gift.d.ts.map +1 -0
  750. package/script/types/3_gift.js +93 -0
  751. package/script/types/3_join_request.d.ts +1 -1
  752. package/script/types/3_join_request.js +1 -1
  753. package/script/types/3_reply_markup.d.ts +1 -1
  754. package/script/types/3_reply_markup.js +1 -1
  755. package/script/types/3_story.d.ts +1 -1
  756. package/script/types/3_story.js +1 -1
  757. package/script/types/4_inline_query_result.d.ts +1 -1
  758. package/script/types/4_inline_query_result.js +1 -1
  759. package/script/types/4_message.d.ts +2 -1
  760. package/script/types/4_message.d.ts.map +1 -1
  761. package/script/types/4_message.js +10 -3
  762. package/script/types/4_user_gift.d.ts +44 -0
  763. package/script/types/4_user_gift.d.ts.map +1 -0
  764. package/script/types/4_user_gift.js +46 -0
  765. package/script/types/5_callback_query.d.ts +1 -1
  766. package/script/types/5_callback_query.js +1 -1
  767. package/script/types/5_chat_list_item.d.ts +1 -1
  768. package/script/types/5_chat_list_item.js +1 -1
  769. package/script/types/5_inline_query_answer.d.ts +1 -1
  770. package/script/types/5_inline_query_answer.js +1 -1
  771. package/script/types/5_user_gifts.d.ts +32 -0
  772. package/script/types/5_user_gifts.d.ts.map +1 -0
  773. package/script/types/5_user_gifts.js +32 -0
  774. package/script/types/6_update.d.ts +1 -1
  775. package/script/types/6_update.js +1 -1
  776. package/script/types/_file_id.d.ts +1 -1
  777. package/script/types/_file_id.js +1 -1
  778. package/script/types/_getters.d.ts +1 -1
  779. package/script/types/_getters.js +1 -1
  780. package/script/utilities/0_bigint.js +1 -1
  781. package/script/utilities/0_buffer.d.ts +1 -1
  782. package/script/utilities/0_buffer.js +1 -1
  783. package/script/utilities/0_cache_map.d.ts +1 -1
  784. package/script/utilities/0_cache_map.js +1 -1
  785. package/script/utilities/0_color.d.ts +1 -1
  786. package/script/utilities/0_color.js +1 -1
  787. package/script/utilities/0_env.js +1 -1
  788. package/script/utilities/0_gunzip.d.ts +1 -1
  789. package/script/utilities/0_gunzip.js +1 -1
  790. package/script/utilities/0_hash.js +1 -1
  791. package/script/utilities/0_misc.d.ts +1 -1
  792. package/script/utilities/0_misc.js +1 -1
  793. package/script/utilities/0_mutex.d.ts +1 -1
  794. package/script/utilities/0_mutex.js +1 -1
  795. package/script/utilities/0_object.d.ts +1 -1
  796. package/script/utilities/0_object.js +1 -1
  797. package/script/utilities/0_part_stream.d.ts +1 -1
  798. package/script/utilities/0_part_stream.js +1 -1
  799. package/script/utilities/0_rle.d.ts +1 -1
  800. package/script/utilities/0_rle.js +1 -1
  801. package/script/utilities/0_types.d.ts +1 -1
  802. package/script/utilities/0_types.js +1 -1
  803. package/script/utilities/0_units.d.ts +1 -1
  804. package/script/utilities/0_units.js +1 -1
  805. package/script/utilities/1_auth.js +1 -1
  806. package/script/utilities/1_base64.d.ts +1 -1
  807. package/script/utilities/1_base64.js +1 -1
  808. package/script/utilities/1_crypto.d.ts +1 -1
  809. package/script/utilities/1_crypto.js +1 -1
  810. package/script/utilities/1_logger.d.ts +1 -1
  811. package/script/utilities/1_logger.js +1 -1
  812. package/script/utilities/1_math.d.ts +1 -1
  813. package/script/utilities/1_math.js +1 -1
  814. package/script/utilities/2_queue.d.ts +1 -1
  815. package/script/utilities/2_queue.js +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -599,6 +599,7 @@ export interface MessageTypes {
599
599
  successfulPayment: MessageSuccessfulPayment;
600
600
  refundedPayment: MessageRefundedPayment;
601
601
  }
602
+ export declare function isMessageType<T extends keyof MessageTypes>(message: Message, type: T): message is MessageTypes[T];
602
603
  export declare function assertMessageType<T extends keyof MessageTypes>(message: Message, type: T): MessageTypes[T];
603
604
  /** Any type of message. */
604
605
  export type Message = MessageText | MessageLink | MessagePhoto | MessageDocument | MessageVideo | MessageSticker | MessageAnimation | MessageVoice | MessageAudio | MessageDice | MessageVideoNote | MessageContact | MessageGame | MessagePoll | MessageInvoice | MessageVenue | MessageLocation | MessageNewChatMembers | MessageLeftChatMember | MessageNewChatTitle | MessageNewChatPhoto | MessageDeletedChatPhoto | MessageGroupCreated | MessageSupergroupCreated | MessageChannelCreated | MessageAutoDeleteTimerChanged | MessageChatMigratedTo | MessageChatMigratedFrom | MessagePinnedMessage | MessageUserShared | MessageWriteAccessAllowed | MessageForumTopicCreated | MessageForumTopicEdited | MessageForumTopicClosed | MessageForumTopicReopened | MessageVideoChatScheduled | MessageVideoChatStarted | MessageVideoChatEnded | MessageGiveaway | MessageUnsupported | MessageSuccessfulPayment | MessageRefundedPayment;
@@ -1 +1 @@
1
- {"version":3,"file":"4_message.d.ts","sourceRoot":"","sources":["../../src/types/4_message.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAA6C,YAAY,EAAmB,MAAM,mBAAmB,CAAC;AAC7G,OAAO,EAAE,GAAG,EAAU,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAoB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAoB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAwB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAA0B,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAA4B,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,SAAS,EAAsB,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAkB,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AACtD,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAA4B,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,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Kruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -19,6 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.isMessageType = isMessageType;
22
23
  exports.assertMessageType = assertMessageType;
23
24
  exports.constructMessage = constructMessage;
24
25
  const _0_deps_js_1 = require("../0_deps.js");
@@ -97,12 +98,18 @@ const keys = {
97
98
  successfulPayment: ["successfulPayment"],
98
99
  refundedPayment: ["refundedPayment"],
99
100
  };
100
- function assertMessageType(message, type) {
101
+ function isMessageType(message, type) {
101
102
  for (const key of keys[type]) {
102
103
  if (!(key in message) || message[key] === undefined) {
103
- (0, _0_deps_js_1.unreachable)();
104
+ return false;
104
105
  }
105
106
  }
107
+ return true;
108
+ }
109
+ function assertMessageType(message, type) {
110
+ if (!isMessageType(message, type)) {
111
+ (0, _0_deps_js_1.unreachable)();
112
+ }
106
113
  return message;
107
114
  }
108
115
  async function getSender(message_, getEntity) {
@@ -0,0 +1,44 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2025 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 { Api } from "../2_tl.js";
21
+ import { MessageEntity } from "./0_message_entity.js";
22
+ import { User } from "./1_user.js";
23
+ import { Gift } from "./3_gift.js";
24
+ /** A gift claimed by a user. */
25
+ export interface UserGift {
26
+ /** The time when the gift was claimed. */
27
+ date: Date;
28
+ /** The gift. */
29
+ gift: Gift;
30
+ /** Whether the gift is publicly visible. */
31
+ public: boolean;
32
+ /** The user who sent the gift. */
33
+ fromUser?: User;
34
+ /** A message shared when the gift was sent. */
35
+ message?: string;
36
+ /** The entities of the message. */
37
+ entities?: MessageEntity[];
38
+ /** The identifier of the service message announcing the receival of the gift. */
39
+ messageId?: number;
40
+ /** The amount of stars the gift would be worth. */
41
+ convertionStars?: number;
42
+ }
43
+ export declare function constructUserGift(userGift: Api.UserStarGift, user?: Api.user): UserGift;
44
+ //# sourceMappingURL=4_user_gift.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"4_user_gift.d.ts","sourceRoot":"","sources":["../../src/types/4_user_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAA0B,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,gCAAgC;AAChC,MAAM,WAAW,QAAQ;IACvB,0CAA0C;IAC1C,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,4CAA4C;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE,GAAG,CAAC,IAAI,GAAG,QAAQ,CAmBvF"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
+ *
6
+ * This file is part of MTKruto.
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.constructUserGift = constructUserGift;
23
+ const _1_utilities_js_1 = require("../1_utilities.js");
24
+ const _0_message_entity_js_1 = require("./0_message_entity.js");
25
+ const _1_user_js_1 = require("./1_user.js");
26
+ const _3_gift_js_1 = require("./3_gift.js");
27
+ function constructUserGift(userGift, user) {
28
+ const gift = (0, _3_gift_js_1.constructGift)(userGift.gift);
29
+ const date = (0, _1_utilities_js_1.fromUnixTimestamp)(userGift.date);
30
+ const public_ = !!userGift.unsaved;
31
+ const fromUser = user ? (0, _1_user_js_1.constructUser)(user) : undefined;
32
+ const message = userGift.message?.text;
33
+ const entities = userGift.message ? userGift.message.entities.map(_0_message_entity_js_1.constructMessageEntity).filter((v) => !!v) : undefined;
34
+ const messageId = userGift.msg_id;
35
+ const conversionStars = userGift.convert_stars;
36
+ return (0, _1_utilities_js_1.cleanObject)({
37
+ date,
38
+ gift,
39
+ public: public_,
40
+ fromUser,
41
+ message,
42
+ entities,
43
+ messageId,
44
+ conversionStars,
45
+ });
46
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -0,0 +1,32 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2025 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 { Api } from "../2_tl.js";
21
+ import { UserGift } from "./4_user_gift.js";
22
+ /** Gifts claimed by a user. */
23
+ export interface UserGifts {
24
+ /** The number of all gifts claimed by the user. */
25
+ all: number;
26
+ /** Offset of the results. */
27
+ offset?: string;
28
+ /** Gifts claimed by the user. */
29
+ gifts: UserGift[];
30
+ }
31
+ export declare function constructUserGifts(userGifts: Api.payments_UserStarGifts): UserGifts;
32
+ //# sourceMappingURL=5_user_gifts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"5_user_gifts.d.ts","sourceRoot":"","sources":["../../src/types/5_user_gifts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAqB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE/D,+BAA+B;AAC/B,MAAM,WAAW,SAAS;IACxB,mDAAmD;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,GAAG,CAAC,sBAAsB,GAAG,SAAS,CAMnF"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
+ *
6
+ * This file is part of MTKruto.
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.constructUserGifts = constructUserGifts;
23
+ const _1_utilities_js_1 = require("../1_utilities.js");
24
+ const _2_tl_js_1 = require("../2_tl.js");
25
+ const _4_user_gift_js_1 = require("./4_user_gift.js");
26
+ function constructUserGifts(userGifts) {
27
+ return (0, _1_utilities_js_1.cleanObject)({
28
+ all: userGifts.count,
29
+ offset: userGifts.next_offset,
30
+ gifts: userGifts.gifts.map((v) => [v, v.from_id ? userGifts.users.find((u) => (0, _2_tl_js_1.is)("user", u) && u.id == v.from_id) : undefined]).map((v) => (0, _4_user_gift_js_1.constructUserGift)(v[0], v[1])),
31
+ });
32
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -31,7 +31,7 @@ exports.getRandomId = getRandomId;
31
31
  exports.gcd = gcd;
32
32
  /**
33
33
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
34
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
34
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
35
35
  *
36
36
  * This file is part of MTKruto.
37
37
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -27,7 +27,7 @@ exports.getString = getString;
27
27
  exports.getNumber = getNumber;
28
28
  /**
29
29
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
30
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
30
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
31
31
  *
32
32
  * This file is part of MTKruto.
33
33
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -27,7 +27,7 @@ exports.sha256 = sha256;
27
27
  exports.sha1 = sha1;
28
28
  /**
29
29
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
30
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
30
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
31
31
  *
32
32
  * This file is part of MTKruto.
33
33
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.rsaPad = rsaPad;
27
27
  /**
28
28
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
29
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
29
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
30
30
  *
31
31
  * This file is part of MTKruto.
32
32
  *