@mtkruto/node 0.6.1 → 0.7.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 (113) hide show
  1. package/README.md +76 -1
  2. package/esm/0_deps.d.ts +1 -1
  3. package/esm/0_deps.d.ts.map +1 -1
  4. package/esm/0_deps.js +1 -1
  5. package/esm/1_utilities.d.ts +1 -1
  6. package/esm/1_utilities.d.ts.map +1 -1
  7. package/esm/1_utilities.js +1 -1
  8. package/esm/4_constants.d.ts +1 -1
  9. package/esm/4_constants.js +1 -1
  10. package/esm/client/0_params.d.ts +4 -0
  11. package/esm/client/0_params.d.ts.map +1 -1
  12. package/esm/client/0_utilities.d.ts +2 -2
  13. package/esm/client/0_utilities.d.ts.map +1 -1
  14. package/esm/client/2_account_manager.d.ts +4 -0
  15. package/esm/client/2_account_manager.d.ts.map +1 -1
  16. package/esm/client/2_account_manager.js +34 -0
  17. package/esm/client/5_client.d.ts +16 -1
  18. package/esm/client/5_client.d.ts.map +1 -1
  19. package/esm/client/5_client.js +19 -0
  20. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/mod.d.ts +18 -0
  21. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/mod.d.ts.map +1 -0
  22. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/mod.js +63 -0
  23. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/tgcrypto.d.ts +3 -0
  24. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/tgcrypto.d.ts.map +1 -0
  25. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/tgcrypto.js +301 -0
  26. package/esm/tl/0_api.d.ts +119 -5
  27. package/esm/tl/0_api.d.ts.map +1 -1
  28. package/esm/tl/0_api.js +188 -17
  29. package/esm/transport/0_obfuscation.d.ts.map +1 -1
  30. package/esm/transport/0_obfuscation.js +5 -4
  31. package/esm/transport/0_transport.d.ts +2 -2
  32. package/esm/transport/0_transport.d.ts.map +1 -1
  33. package/esm/transport/0_transport.js +10 -6
  34. package/esm/transport/1_transport_abridged.d.ts.map +1 -1
  35. package/esm/transport/1_transport_abridged.js +6 -8
  36. package/esm/transport/1_transport_intermediate.d.ts.map +1 -1
  37. package/esm/transport/1_transport_intermediate.js +4 -6
  38. package/esm/types/0_switch_inline_query_chosen_chats.d.ts +19 -0
  39. package/esm/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -1
  40. package/esm/types/0_switch_inline_query_chosen_chats.js +19 -0
  41. package/esm/types/2_forward_header.d.ts +19 -0
  42. package/esm/types/2_forward_header.d.ts.map +1 -1
  43. package/esm/types/2_forward_header.js +19 -0
  44. package/esm/utilities/0_env.d.ts.map +1 -1
  45. package/esm/utilities/0_env.js +19 -0
  46. package/esm/utilities/0_gunzip.d.ts +19 -0
  47. package/esm/utilities/0_gunzip.d.ts.map +1 -1
  48. package/esm/utilities/0_gunzip.js +19 -0
  49. package/{script/utilities/0_crypto.d.ts → esm/utilities/1_crypto.d.ts} +9 -5
  50. package/esm/utilities/1_crypto.d.ts.map +1 -0
  51. package/esm/utilities/{0_crypto.js → 1_crypto.js} +41 -21
  52. package/esm/utilities/1_crypto_test.d.ts.map +1 -0
  53. package/package.json +1 -1
  54. package/script/0_deps.d.ts +1 -1
  55. package/script/0_deps.d.ts.map +1 -1
  56. package/script/0_deps.js +2 -5
  57. package/script/1_utilities.d.ts +1 -1
  58. package/script/1_utilities.d.ts.map +1 -1
  59. package/script/1_utilities.js +1 -1
  60. package/script/4_constants.d.ts +1 -1
  61. package/script/4_constants.js +1 -1
  62. package/script/client/0_params.d.ts +4 -0
  63. package/script/client/0_params.d.ts.map +1 -1
  64. package/script/client/0_utilities.d.ts +2 -2
  65. package/script/client/0_utilities.d.ts.map +1 -1
  66. package/script/client/2_account_manager.d.ts +4 -0
  67. package/script/client/2_account_manager.d.ts.map +1 -1
  68. package/script/client/2_account_manager.js +34 -0
  69. package/script/client/5_client.d.ts +16 -1
  70. package/script/client/5_client.d.ts.map +1 -1
  71. package/script/client/5_client.js +19 -0
  72. package/script/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/mod.d.ts +18 -0
  73. package/script/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/mod.d.ts.map +1 -0
  74. package/script/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/mod.js +71 -0
  75. package/script/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/tgcrypto.d.ts +3 -0
  76. package/script/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/tgcrypto.d.ts.map +1 -0
  77. package/script/deps/jsr.io/@roj/tgcrypto/1.0.0/dist/tgcrypto.js +303 -0
  78. package/script/tl/0_api.d.ts +119 -5
  79. package/script/tl/0_api.d.ts.map +1 -1
  80. package/script/tl/0_api.js +188 -17
  81. package/script/transport/0_obfuscation.d.ts.map +1 -1
  82. package/script/transport/0_obfuscation.js +5 -4
  83. package/script/transport/0_transport.d.ts +2 -2
  84. package/script/transport/0_transport.d.ts.map +1 -1
  85. package/script/transport/0_transport.js +10 -6
  86. package/script/transport/1_transport_abridged.d.ts.map +1 -1
  87. package/script/transport/1_transport_abridged.js +6 -8
  88. package/script/transport/1_transport_intermediate.d.ts.map +1 -1
  89. package/script/transport/1_transport_intermediate.js +4 -6
  90. package/script/types/0_switch_inline_query_chosen_chats.d.ts +19 -0
  91. package/script/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -1
  92. package/script/types/0_switch_inline_query_chosen_chats.js +19 -0
  93. package/script/types/2_forward_header.d.ts +19 -0
  94. package/script/types/2_forward_header.d.ts.map +1 -1
  95. package/script/types/2_forward_header.js +19 -0
  96. package/script/utilities/0_env.d.ts.map +1 -1
  97. package/script/utilities/0_env.js +19 -0
  98. package/script/utilities/0_gunzip.d.ts +19 -0
  99. package/script/utilities/0_gunzip.d.ts.map +1 -1
  100. package/script/utilities/0_gunzip.js +19 -0
  101. package/{esm/utilities/0_crypto.d.ts → script/utilities/1_crypto.d.ts} +9 -5
  102. package/script/utilities/1_crypto.d.ts.map +1 -0
  103. package/script/utilities/1_crypto.js +95 -0
  104. package/script/utilities/1_crypto_test.d.ts.map +1 -0
  105. package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts +0 -55
  106. package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.js +0 -167
  107. package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.js +0 -308
  108. package/esm/utilities/0_crypto.d.ts.map +0 -1
  109. package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts +0 -55
  110. package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.js +0 -182
  111. package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.js +0 -310
  112. package/script/utilities/0_crypto.d.ts.map +0 -1
  113. package/script/utilities/0_crypto.js +0 -52
package/esm/tl/0_api.js CHANGED
@@ -182,8 +182,8 @@ const map = new Map([
182
182
  [0x94BD38ED, "messageActionPinMessage"],
183
183
  [0x9FBAB604, "messageActionHistoryClear"],
184
184
  [0x92A72876, "messageActionGameScore"],
185
- [0x8F31B327, "messageActionPaymentSentMe"],
186
- [0x96163F56, "messageActionPaymentSent"],
185
+ [0xFFA00CCC, "messageActionPaymentSentMe"],
186
+ [0xC624B16E, "messageActionPaymentSent"],
187
187
  [0x80E11A7F, "messageActionPhoneCall"],
188
188
  [0x4792929B, "messageActionScreenshotTaken"],
189
189
  [0xFAE69F56, "messageActionCustomAction"],
@@ -214,7 +214,7 @@ const map = new Map([
214
214
  [0x41B3E202, "messageActionPaymentRefunded"],
215
215
  [0x45D5B021, "messageActionGiftStars"],
216
216
  [0xB00C47A2, "messageActionPrizeStars"],
217
- [0x9BB3EF44, "messageActionStarGift"],
217
+ [0x08557637, "messageActionStarGift"],
218
218
  [0xD58A08C6, "dialog"],
219
219
  [0x71BD134C, "dialogFolder"],
220
220
  [0x2331B22D, "photoEmpty"],
@@ -511,6 +511,7 @@ const map = new Map([
511
511
  [0xAEE69D68, "inputPrivacyKeyVoiceMessages"],
512
512
  [0x3823CC40, "inputPrivacyKeyAbout"],
513
513
  [0xD65A11CC, "inputPrivacyKeyBirthday"],
514
+ [0xE1732341, "inputPrivacyKeyStarGiftsAutoSave"],
514
515
  [0xBC2EAB30, "privacyKeyStatusTimestamp"],
515
516
  [0x500E6DFA, "privacyKeyChatInvite"],
516
517
  [0x3D662B7B, "privacyKeyPhoneCall"],
@@ -522,6 +523,7 @@ const map = new Map([
522
523
  [0x0697F414, "privacyKeyVoiceMessages"],
523
524
  [0xA486B761, "privacyKeyAbout"],
524
525
  [0x2000A518, "privacyKeyBirthday"],
526
+ [0x2CA4FDF8, "privacyKeyStarGiftsAutoSave"],
525
527
  [0x0D09E07B, "inputPrivacyValueAllowContacts"],
526
528
  [0x184B35CE, "inputPrivacyValueAllowAll"],
527
529
  [0x131CC67F, "inputPrivacyValueAllowUsers"],
@@ -532,6 +534,8 @@ const map = new Map([
532
534
  [0xE94F0F86, "inputPrivacyValueDisallowChatParticipants"],
533
535
  [0x2F453E49, "inputPrivacyValueAllowCloseFriends"],
534
536
  [0x77CDC9F1, "inputPrivacyValueAllowPremium"],
537
+ [0x5A4FCCE5, "inputPrivacyValueAllowBots"],
538
+ [0xC4E57915, "inputPrivacyValueDisallowBots"],
535
539
  [0xFFFE1BAC, "privacyValueAllowContacts"],
536
540
  [0x65427B82, "privacyValueAllowAll"],
537
541
  [0xB8905FB2, "privacyValueAllowUsers"],
@@ -542,6 +546,8 @@ const map = new Map([
542
546
  [0x41C87565, "privacyValueDisallowChatParticipants"],
543
547
  [0xF7E8D89B, "privacyValueAllowCloseFriends"],
544
548
  [0xECE9814B, "privacyValueAllowPremium"],
549
+ [0x21461B5D, "privacyValueAllowBots"],
550
+ [0xF6A5F82F, "privacyValueDisallowBots"],
545
551
  [0x50A04E45, "account.privacyRules"],
546
552
  [0xB8D0AFDF, "accountDaysTTL"],
547
553
  [0x6C37C15C, "documentAttributeImageSize"],
@@ -589,7 +595,7 @@ const map = new Map([
589
595
  [0x6E153F16, "messages.stickerSet"],
590
596
  [0xD3F924EB, "messages.stickerSetNotModified"],
591
597
  [0xC27AC8C7, "botCommand"],
592
- [0x82437E74, "botInfo"],
598
+ [0x36607333, "botInfo"],
593
599
  [0xA2FA4880, "keyboardButton"],
594
600
  [0x258AFF05, "keyboardButtonUrl"],
595
601
  [0x35BBDB6B, "keyboardButtonCallback"],
@@ -796,7 +802,7 @@ const map = new Map([
796
802
  [0xFAF7E8C9, "phoneCallDiscardReasonBusy"],
797
803
  [0x7D748D04, "dataJSON"],
798
804
  [0xCB296BF8, "labeledPrice"],
799
- [0x5DB95A15, "invoice"],
805
+ [0x049EE584, "invoice"],
800
806
  [0xEA02C27E, "paymentCharge"],
801
807
  [0x1E8CAAEB, "postAddress"],
802
808
  [0x909C3F94, "paymentRequestedInfo"],
@@ -1406,7 +1412,7 @@ const map = new Map([
1406
1412
  [0x23E91BA3, "botPreviewMedia"],
1407
1413
  [0x0CA71D64, "bots.previewInfo"],
1408
1414
  [0x05416D58, "starsSubscriptionPricing"],
1409
- [0x538ECF18, "starsSubscription"],
1415
+ [0x2E6EAB1A, "starsSubscription"],
1410
1416
  [0x4BA3A95A, "messageReactor"],
1411
1417
  [0x94CE852A, "starsGiveawayOption"],
1412
1418
  [0x54236209, "starsGiveawayWinnersOption"],
@@ -1419,6 +1425,9 @@ const map = new Map([
1419
1425
  [0xF0E4E0B6, "reportResultChooseOption"],
1420
1426
  [0x6F09AC31, "reportResultAddComment"],
1421
1427
  [0x8DB33C4B, "reportResultReported"],
1428
+ [0x8ECF0511, "messages.botPreparedInlineMessage"],
1429
+ [0xFF57708D, "messages.preparedInlineMessage"],
1430
+ [0xC99B1950, "botAppSettings"],
1422
1431
  ]);
1423
1432
  export const getTypeName = map.get.bind(map);
1424
1433
  export const flags = Symbol();
@@ -1667,10 +1676,10 @@ const enums = new Map([
1667
1676
  ["NotifyPeer", ["notifyPeer", "notifyUsers", "notifyChats", "notifyBroadcasts", "notifyForumTopic"]],
1668
1677
  ["SendMessageAction", ["sendMessageTypingAction", "sendMessageCancelAction", "sendMessageRecordVideoAction", "sendMessageUploadVideoAction", "sendMessageRecordAudioAction", "sendMessageUploadAudioAction", "sendMessageUploadPhotoAction", "sendMessageUploadDocumentAction", "sendMessageGeoLocationAction", "sendMessageChooseContactAction", "sendMessageGamePlayAction", "sendMessageRecordRoundAction", "sendMessageUploadRoundAction", "speakingInGroupCallAction", "sendMessageHistoryImportAction", "sendMessageChooseStickerAction", "sendMessageEmojiInteraction", "sendMessageEmojiInteractionSeen"]],
1669
1678
  ["contacts.Found", ["contacts.found"]],
1670
- ["InputPrivacyKey", ["inputPrivacyKeyStatusTimestamp", "inputPrivacyKeyChatInvite", "inputPrivacyKeyPhoneCall", "inputPrivacyKeyPhoneP2P", "inputPrivacyKeyForwards", "inputPrivacyKeyProfilePhoto", "inputPrivacyKeyPhoneNumber", "inputPrivacyKeyAddedByPhone", "inputPrivacyKeyVoiceMessages", "inputPrivacyKeyAbout", "inputPrivacyKeyBirthday"]],
1671
- ["PrivacyKey", ["privacyKeyStatusTimestamp", "privacyKeyChatInvite", "privacyKeyPhoneCall", "privacyKeyPhoneP2P", "privacyKeyForwards", "privacyKeyProfilePhoto", "privacyKeyPhoneNumber", "privacyKeyAddedByPhone", "privacyKeyVoiceMessages", "privacyKeyAbout", "privacyKeyBirthday"]],
1672
- ["InputPrivacyRule", ["inputPrivacyValueAllowContacts", "inputPrivacyValueAllowAll", "inputPrivacyValueAllowUsers", "inputPrivacyValueDisallowContacts", "inputPrivacyValueDisallowAll", "inputPrivacyValueDisallowUsers", "inputPrivacyValueAllowChatParticipants", "inputPrivacyValueDisallowChatParticipants", "inputPrivacyValueAllowCloseFriends", "inputPrivacyValueAllowPremium"]],
1673
- ["PrivacyRule", ["privacyValueAllowContacts", "privacyValueAllowAll", "privacyValueAllowUsers", "privacyValueDisallowContacts", "privacyValueDisallowAll", "privacyValueDisallowUsers", "privacyValueAllowChatParticipants", "privacyValueDisallowChatParticipants", "privacyValueAllowCloseFriends", "privacyValueAllowPremium"]],
1679
+ ["InputPrivacyKey", ["inputPrivacyKeyStatusTimestamp", "inputPrivacyKeyChatInvite", "inputPrivacyKeyPhoneCall", "inputPrivacyKeyPhoneP2P", "inputPrivacyKeyForwards", "inputPrivacyKeyProfilePhoto", "inputPrivacyKeyPhoneNumber", "inputPrivacyKeyAddedByPhone", "inputPrivacyKeyVoiceMessages", "inputPrivacyKeyAbout", "inputPrivacyKeyBirthday", "inputPrivacyKeyStarGiftsAutoSave"]],
1680
+ ["PrivacyKey", ["privacyKeyStatusTimestamp", "privacyKeyChatInvite", "privacyKeyPhoneCall", "privacyKeyPhoneP2P", "privacyKeyForwards", "privacyKeyProfilePhoto", "privacyKeyPhoneNumber", "privacyKeyAddedByPhone", "privacyKeyVoiceMessages", "privacyKeyAbout", "privacyKeyBirthday", "privacyKeyStarGiftsAutoSave"]],
1681
+ ["InputPrivacyRule", ["inputPrivacyValueAllowContacts", "inputPrivacyValueAllowAll", "inputPrivacyValueAllowUsers", "inputPrivacyValueDisallowContacts", "inputPrivacyValueDisallowAll", "inputPrivacyValueDisallowUsers", "inputPrivacyValueAllowChatParticipants", "inputPrivacyValueDisallowChatParticipants", "inputPrivacyValueAllowCloseFriends", "inputPrivacyValueAllowPremium", "inputPrivacyValueAllowBots", "inputPrivacyValueDisallowBots"]],
1682
+ ["PrivacyRule", ["privacyValueAllowContacts", "privacyValueAllowAll", "privacyValueAllowUsers", "privacyValueDisallowContacts", "privacyValueDisallowAll", "privacyValueDisallowUsers", "privacyValueAllowChatParticipants", "privacyValueDisallowChatParticipants", "privacyValueAllowCloseFriends", "privacyValueAllowPremium", "privacyValueAllowBots", "privacyValueDisallowBots"]],
1674
1683
  ["account.PrivacyRules", ["account.privacyRules"]],
1675
1684
  ["AccountDaysTTL", ["accountDaysTTL"]],
1676
1685
  ["DocumentAttribute", ["documentAttributeImageSize", "documentAttributeAnimated", "documentAttributeSticker", "documentAttributeVideo", "documentAttributeAudio", "documentAttributeFilename", "documentAttributeHasStickers", "documentAttributeCustomEmoji"]],
@@ -2156,6 +2165,9 @@ const enums = new Map([
2156
2165
  ["payments.UserStarGifts", ["payments.userStarGifts"]],
2157
2166
  ["MessageReportOption", ["messageReportOption"]],
2158
2167
  ["ReportResult", ["reportResultChooseOption", "reportResultAddComment", "reportResultReported"]],
2168
+ ["messages.BotPreparedInlineMessage", ["messages.botPreparedInlineMessage"]],
2169
+ ["messages.PreparedInlineMessage", ["messages.preparedInlineMessage"]],
2170
+ ["BotAppSettings", ["botAppSettings"]],
2159
2171
  ]);
2160
2172
  const types = new Map([
2161
2173
  [
@@ -4080,7 +4092,7 @@ const types = new Map([
4080
4092
  [
4081
4093
  "messageActionPaymentSentMe",
4082
4094
  [
4083
- 0x8F31B327,
4095
+ 0xFFA00CCC,
4084
4096
  [
4085
4097
  ["flags", flags, "#"],
4086
4098
  ["recurring_init", "true", "flags.2?true"],
@@ -4091,13 +4103,14 @@ const types = new Map([
4091
4103
  ["info", "PaymentRequestedInfo", "flags.0?PaymentRequestedInfo"],
4092
4104
  ["shipping_option_id", "string", "flags.1?string"],
4093
4105
  ["charge", "PaymentCharge", "PaymentCharge"],
4106
+ ["subscription_until_date", "number", "flags.4?int"],
4094
4107
  ],
4095
4108
  ],
4096
4109
  ],
4097
4110
  [
4098
4111
  "messageActionPaymentSent",
4099
4112
  [
4100
- 0x96163F56,
4113
+ 0xC624B16E,
4101
4114
  [
4102
4115
  ["flags", flags, "#"],
4103
4116
  ["recurring_init", "true", "flags.2?true"],
@@ -4105,6 +4118,7 @@ const types = new Map([
4105
4118
  ["currency", "string", "string"],
4106
4119
  ["total_amount", "bigint", "long"],
4107
4120
  ["invoice_slug", "string", "flags.0?string"],
4121
+ ["subscription_until_date", "number", "flags.4?int"],
4108
4122
  ],
4109
4123
  ],
4110
4124
  ],
@@ -4441,7 +4455,7 @@ const types = new Map([
4441
4455
  [
4442
4456
  "messageActionStarGift",
4443
4457
  [
4444
- 0x9BB3EF44,
4458
+ 0x08557637,
4445
4459
  [
4446
4460
  ["flags", flags, "#"],
4447
4461
  ["name_hidden", "true", "flags.0?true"],
@@ -4449,7 +4463,7 @@ const types = new Map([
4449
4463
  ["converted", "true", "flags.3?true"],
4450
4464
  ["gift", "StarGift", "StarGift"],
4451
4465
  ["message", "TextWithEntities", "flags.1?TextWithEntities"],
4452
- ["convert_stars", "bigint", "long"],
4466
+ ["convert_stars", "bigint", "flags.4?long"],
4453
4467
  ],
4454
4468
  ],
4455
4469
  ],
@@ -4885,6 +4899,7 @@ const types = new Map([
4885
4899
  ["flags2", flags, "#"],
4886
4900
  ["sponsored_enabled", "true", "flags2.7?true"],
4887
4901
  ["can_view_revenue", "true", "flags2.9?true"],
4902
+ ["bot_can_manage_emoji_status", "true", "flags2.10?true"],
4888
4903
  ["id", "bigint", "long"],
4889
4904
  ["about", "string", "flags.1?string"],
4890
4905
  ["settings", "PeerSettings", "PeerSettings"],
@@ -7641,6 +7656,13 @@ const types = new Map([
7641
7656
  [],
7642
7657
  ],
7643
7658
  ],
7659
+ [
7660
+ "inputPrivacyKeyStarGiftsAutoSave",
7661
+ [
7662
+ 0xE1732341,
7663
+ [],
7664
+ ],
7665
+ ],
7644
7666
  [
7645
7667
  "privacyKeyStatusTimestamp",
7646
7668
  [
@@ -7718,6 +7740,13 @@ const types = new Map([
7718
7740
  [],
7719
7741
  ],
7720
7742
  ],
7743
+ [
7744
+ "privacyKeyStarGiftsAutoSave",
7745
+ [
7746
+ 0x2CA4FDF8,
7747
+ [],
7748
+ ],
7749
+ ],
7721
7750
  [
7722
7751
  "inputPrivacyValueAllowContacts",
7723
7752
  [
@@ -7796,6 +7825,20 @@ const types = new Map([
7796
7825
  [],
7797
7826
  ],
7798
7827
  ],
7828
+ [
7829
+ "inputPrivacyValueAllowBots",
7830
+ [
7831
+ 0x5A4FCCE5,
7832
+ [],
7833
+ ],
7834
+ ],
7835
+ [
7836
+ "inputPrivacyValueDisallowBots",
7837
+ [
7838
+ 0xC4E57915,
7839
+ [],
7840
+ ],
7841
+ ],
7799
7842
  [
7800
7843
  "privacyValueAllowContacts",
7801
7844
  [
@@ -7874,6 +7917,20 @@ const types = new Map([
7874
7917
  [],
7875
7918
  ],
7876
7919
  ],
7920
+ [
7921
+ "privacyValueAllowBots",
7922
+ [
7923
+ 0x21461B5D,
7924
+ [],
7925
+ ],
7926
+ ],
7927
+ [
7928
+ "privacyValueDisallowBots",
7929
+ [
7930
+ 0xF6A5F82F,
7931
+ [],
7932
+ ],
7933
+ ],
7877
7934
  [
7878
7935
  "account.privacyRules",
7879
7936
  [
@@ -8421,7 +8478,7 @@ const types = new Map([
8421
8478
  [
8422
8479
  "botInfo",
8423
8480
  [
8424
- 0x82437E74,
8481
+ 0x36607333,
8425
8482
  [
8426
8483
  ["flags", flags, "#"],
8427
8484
  ["has_preview_medias", "true", "flags.6?true"],
@@ -8432,6 +8489,7 @@ const types = new Map([
8432
8489
  ["commands", ["BotCommand"], "flags.2?Vector<BotCommand>"],
8433
8490
  ["menu_button", "BotMenuButton", "flags.3?BotMenuButton"],
8434
8491
  ["privacy_policy_url", "string", "flags.7?string"],
8492
+ ["app_settings", "BotAppSettings", "flags.8?BotAppSettings"],
8435
8493
  ],
8436
8494
  ],
8437
8495
  ],
@@ -10630,7 +10688,7 @@ const types = new Map([
10630
10688
  [
10631
10689
  "invoice",
10632
10690
  [
10633
- 0x5DB95A15,
10691
+ 0x049EE584,
10634
10692
  [
10635
10693
  ["flags", flags, "#"],
10636
10694
  ["test", "true", "flags.0?true"],
@@ -10647,6 +10705,7 @@ const types = new Map([
10647
10705
  ["max_tip_amount", "bigint", "flags.8?long"],
10648
10706
  ["suggested_tip_amounts", ["bigint"], "flags.8?Vector<long>"],
10649
10707
  ["terms_url", "string", "flags.10?string"],
10708
+ ["subscription_period", "number", "flags.11?int"],
10650
10709
  ],
10651
10710
  ],
10652
10711
  ],
@@ -14559,6 +14618,7 @@ const types = new Map([
14559
14618
  [
14560
14619
  ["flags", flags, "#"],
14561
14620
  ["fullsize", "true", "flags.1?true"],
14621
+ ["fullscreen", "true", "flags.2?true"],
14562
14622
  ["query_id", "bigint", "flags.0?long"],
14563
14623
  ["url", "string", "string"],
14564
14624
  ],
@@ -17426,17 +17486,21 @@ const types = new Map([
17426
17486
  [
17427
17487
  "starsSubscription",
17428
17488
  [
17429
- 0x538ECF18,
17489
+ 0x2E6EAB1A,
17430
17490
  [
17431
17491
  ["flags", flags, "#"],
17432
17492
  ["canceled", "true", "flags.0?true"],
17433
17493
  ["can_refulfill", "true", "flags.1?true"],
17434
17494
  ["missing_balance", "true", "flags.2?true"],
17495
+ ["bot_canceled", "true", "flags.7?true"],
17435
17496
  ["id", "string", "string"],
17436
17497
  ["peer", "Peer", "Peer"],
17437
17498
  ["until_date", "number", "int"],
17438
17499
  ["pricing", "StarsSubscriptionPricing", "StarsSubscriptionPricing"],
17439
17500
  ["chat_invite_hash", "string", "flags.3?string"],
17501
+ ["title", "string", "flags.4?string"],
17502
+ ["photo", "WebDocument", "flags.5?WebDocument"],
17503
+ ["invoice_slug", "string", "flags.6?string"],
17440
17504
  ],
17441
17505
  ],
17442
17506
  ],
@@ -17491,6 +17555,7 @@ const types = new Map([
17491
17555
  ["flags", flags, "#"],
17492
17556
  ["limited", "true", "flags.0?true"],
17493
17557
  ["sold_out", "true", "flags.1?true"],
17558
+ ["birthday", "true", "flags.2?true"],
17494
17559
  ["id", "bigint", "long"],
17495
17560
  ["sticker", "Document", "Document"],
17496
17561
  ["stars", "bigint", "long"],
@@ -17587,6 +17652,43 @@ const types = new Map([
17587
17652
  [],
17588
17653
  ],
17589
17654
  ],
17655
+ [
17656
+ "messages.botPreparedInlineMessage",
17657
+ [
17658
+ 0x8ECF0511,
17659
+ [
17660
+ ["id", "string", "string"],
17661
+ ["expire_date", "number", "int"],
17662
+ ],
17663
+ ],
17664
+ ],
17665
+ [
17666
+ "messages.preparedInlineMessage",
17667
+ [
17668
+ 0xFF57708D,
17669
+ [
17670
+ ["query_id", "bigint", "long"],
17671
+ ["result", "BotInlineResult", "BotInlineResult"],
17672
+ ["peer_types", ["InlineQueryPeerType"], "Vector<InlineQueryPeerType>"],
17673
+ ["cache_time", "number", "int"],
17674
+ ["users", ["User"], "Vector<User>"],
17675
+ ],
17676
+ ],
17677
+ ],
17678
+ [
17679
+ "botAppSettings",
17680
+ [
17681
+ 0xC99B1950,
17682
+ [
17683
+ ["flags", flags, "#"],
17684
+ ["placeholder_path", Uint8Array, "flags.0?bytes"],
17685
+ ["background_color", "number", "flags.1?int"],
17686
+ ["background_dark_color", "number", "flags.2?int"],
17687
+ ["header_color", "number", "flags.3?int"],
17688
+ ["header_dark_color", "number", "flags.4?int"],
17689
+ ],
17690
+ ],
17691
+ ],
17590
17692
  [
17591
17693
  "req_pq_multi",
17592
17694
  [
@@ -21304,6 +21406,7 @@ const types = new Map([
21304
21406
  ["from_bot_menu", "true", "flags.4?true"],
21305
21407
  ["silent", "true", "flags.5?true"],
21306
21408
  ["compact", "true", "flags.7?true"],
21409
+ ["fullscreen", "true", "flags.8?true"],
21307
21410
  ["peer", "InputPeer", "InputPeer"],
21308
21411
  ["bot", "InputUser", "InputUser"],
21309
21412
  ["url", "string", "flags.1?string"],
@@ -21339,6 +21442,7 @@ const types = new Map([
21339
21442
  ["from_switch_webview", "true", "flags.1?true"],
21340
21443
  ["from_side_menu", "true", "flags.2?true"],
21341
21444
  ["compact", "true", "flags.7?true"],
21445
+ ["fullscreen", "true", "flags.8?true"],
21342
21446
  ["bot", "InputUser", "InputUser"],
21343
21447
  ["url", "string", "flags.3?string"],
21344
21448
  ["start_param", "string", "flags.4?string"],
@@ -21560,6 +21664,7 @@ const types = new Map([
21560
21664
  ["flags", flags, "#"],
21561
21665
  ["write_allowed", "true", "flags.0?true"],
21562
21666
  ["compact", "true", "flags.7?true"],
21667
+ ["fullscreen", "true", "flags.8?true"],
21563
21668
  ["peer", "InputPeer", "InputPeer"],
21564
21669
  ["app", "InputBotApp", "InputBotApp"],
21565
21670
  ["start_param", "string", "flags.1?string"],
@@ -21864,6 +21969,7 @@ const types = new Map([
21864
21969
  [
21865
21970
  ["flags", flags, "#"],
21866
21971
  ["compact", "true", "flags.7?true"],
21972
+ ["fullscreen", "true", "flags.8?true"],
21867
21973
  ["peer", "InputPeer", "InputPeer"],
21868
21974
  ["bot", "InputUser", "InputUser"],
21869
21975
  ["start_param", "string", "flags.1?string"],
@@ -21947,6 +22053,28 @@ const types = new Map([
21947
22053
  ],
21948
22054
  ],
21949
22055
  ],
22056
+ [
22057
+ "messages.savePreparedInlineMessage",
22058
+ [
22059
+ 0xF21F7F2F,
22060
+ [
22061
+ ["flags", flags, "#"],
22062
+ ["result", "InputBotInlineResult", "InputBotInlineResult"],
22063
+ ["user_id", "InputUser", "InputUser"],
22064
+ ["peer_types", ["InlineQueryPeerType"], "flags.0?Vector<InlineQueryPeerType>"],
22065
+ ],
22066
+ ],
22067
+ ],
22068
+ [
22069
+ "messages.getPreparedInlineMessage",
22070
+ [
22071
+ 0x857EBDB8,
22072
+ [
22073
+ ["bot", "InputUser", "InputUser"],
22074
+ ["id", "string", "string"],
22075
+ ],
22076
+ ],
22077
+ ],
21950
22078
  [
21951
22079
  "updates.getState",
21952
22080
  [
@@ -23237,6 +23365,37 @@ const types = new Map([
23237
23365
  ],
23238
23366
  ],
23239
23367
  ],
23368
+ [
23369
+ "bots.updateUserEmojiStatus",
23370
+ [
23371
+ 0xED9F30C5,
23372
+ [
23373
+ ["user_id", "InputUser", "InputUser"],
23374
+ ["emoji_status", "EmojiStatus", "EmojiStatus"],
23375
+ ],
23376
+ ],
23377
+ ],
23378
+ [
23379
+ "bots.toggleUserEmojiStatusPermission",
23380
+ [
23381
+ 0x06DE6392,
23382
+ [
23383
+ ["bot", "InputUser", "InputUser"],
23384
+ ["enabled", "boolean", "Bool"],
23385
+ ],
23386
+ ],
23387
+ ],
23388
+ [
23389
+ "bots.checkDownloadFileParams",
23390
+ [
23391
+ 0x50077589,
23392
+ [
23393
+ ["bot", "InputUser", "InputUser"],
23394
+ ["file_name", "string", "string"],
23395
+ ["url", "string", "string"],
23396
+ ],
23397
+ ],
23398
+ ],
23240
23399
  [
23241
23400
  "payments.getPaymentForm",
23242
23401
  [
@@ -23585,6 +23744,18 @@ const types = new Map([
23585
23744
  ],
23586
23745
  ],
23587
23746
  ],
23747
+ [
23748
+ "payments.botCancelStarsSubscription",
23749
+ [
23750
+ 0x6DFA0622,
23751
+ [
23752
+ ["flags", flags, "#"],
23753
+ ["restore", "true", "flags.0?true"],
23754
+ ["user_id", "InputUser", "InputUser"],
23755
+ ["charge_id", "string", "string"],
23756
+ ],
23757
+ ],
23758
+ ],
23588
23759
  [
23589
23760
  "stickers.createStickerSet",
23590
23761
  [
@@ -1 +1 @@
1
- {"version":3,"file":"0_obfuscation.d.ts","sourceRoot":"","sources":["../../src/transport/0_obfuscation.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAoB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;;;GAuCtF"}
1
+ {"version":3,"file":"0_obfuscation.d.ts","sourceRoot":"","sources":["../../src/transport/0_obfuscation.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAoB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;;;GA0CtF"}
@@ -40,13 +40,14 @@ export async function getObfuscationParameters(protocol, connection) {
40
40
  }
41
41
  const encryptKey = init.slice(8, 8 + 32);
42
42
  const encryptIv = init.slice(40, 40 + 16);
43
- const encryptionCTR = new CTR(encryptKey, encryptIv);
44
- const encryptedInit = new Uint8Array(init);
45
- encryptionCTR.call(encryptedInit);
43
+ const importedEncryptedKey = await CTR.importKey(encryptKey);
44
+ const encryptionCTR = new CTR(importedEncryptedKey, encryptIv);
45
+ const encryptedInit = await encryptionCTR.call(init);
46
46
  const initRev = new Uint8Array(init).reverse();
47
47
  const decryptKey = initRev.slice(8, 8 + 32);
48
48
  const decryptIv = initRev.slice(40, 40 + 16);
49
- const decryptionCTR = new CTR(decryptKey, decryptIv);
49
+ const importedDecryptKey = await CTR.importKey(decryptKey);
50
+ const decryptionCTR = new CTR(importedDecryptKey, decryptIv);
50
51
  await connection.write(concat([init.subarray(0, 56), encryptedInit.subarray(56, 56 + 8)]));
51
52
  return { encryptionCTR, decryptionCTR };
52
53
  }
@@ -23,8 +23,8 @@ export declare abstract class Transport {
23
23
  encryptionCTR: CTR;
24
24
  decryptionCTR: CTR;
25
25
  } | null;
26
- protected encrypt(buffer: Uint8Array): void;
27
- protected decrypt(buffer: Uint8Array): void;
26
+ protected encrypt(buffer: Uint8Array): Promise<Uint8Array>;
27
+ protected decrypt(buffer: Uint8Array): Promise<Uint8Array>;
28
28
  abstract get initialized(): boolean;
29
29
  abstract initialize(): MaybePromise<void>;
30
30
  abstract receive(): MaybePromise<Uint8Array>;
@@ -1 +1 @@
1
- {"version":3,"file":"0_transport.d.ts","sourceRoot":"","sources":["../../src/transport/0_transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,8BAAsB,SAAS;IAC7B,SAAS,CAAC,qBAAqB,EAAE;QAAE,aAAa,EAAE,GAAG,CAAC;QAAC,aAAa,EAAE,GAAG,CAAA;KAAE,GAAG,IAAI,CAAQ;IAE1F,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU;IAMpC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU;IAMpC,QAAQ,KAAK,WAAW,IAAI,OAAO,CAAC;IACpC,QAAQ,CAAC,UAAU,IAAI,YAAY,CAAC,IAAI,CAAC;IACzC,QAAQ,CAAC,OAAO,IAAI,YAAY,CAAC,UAAU,CAAC;IAC5C,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC;IACrD,YAAY,IAAI,YAAY,CAAC,IAAI,CAAC;CAOnC"}
1
+ {"version":3,"file":"0_transport.d.ts","sourceRoot":"","sources":["../../src/transport/0_transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,8BAAsB,SAAS;IAC7B,SAAS,CAAC,qBAAqB,EAAE;QAAE,aAAa,EAAE,GAAG,CAAC;QAAC,aAAa,EAAE,GAAG,CAAA;KAAE,GAAG,IAAI,CAAQ;cAE1E,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;cAQhD,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAQhE,QAAQ,KAAK,WAAW,IAAI,OAAO,CAAC;IACpC,QAAQ,CAAC,UAAU,IAAI,YAAY,CAAC,IAAI,CAAC;IACzC,QAAQ,CAAC,OAAO,IAAI,YAAY,CAAC,UAAU,CAAC;IAC5C,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC;IACrD,YAAY,IAAI,YAAY,CAAC,IAAI,CAAC;CAKnC"}
@@ -26,20 +26,24 @@ export class Transport {
26
26
  value: null
27
27
  });
28
28
  }
29
- encrypt(buffer) {
29
+ async encrypt(buffer) {
30
30
  if (this.obfuscationParameters) {
31
- this.obfuscationParameters.encryptionCTR.call(buffer);
31
+ return await this.obfuscationParameters.encryptionCTR.call(buffer);
32
+ }
33
+ else {
34
+ return buffer;
32
35
  }
33
36
  }
34
- decrypt(buffer) {
37
+ async decrypt(buffer) {
35
38
  if (this.obfuscationParameters) {
36
- this.obfuscationParameters.decryptionCTR.call(buffer);
39
+ return await this.obfuscationParameters.decryptionCTR.call(buffer);
40
+ }
41
+ else {
42
+ return buffer;
37
43
  }
38
44
  }
39
45
  deinitialize() {
40
46
  if (this.obfuscationParameters) {
41
- this.obfuscationParameters.encryptionCTR.destroy();
42
- this.obfuscationParameters.decryptionCTR.destroy();
43
47
  this.obfuscationParameters = null;
44
48
  }
45
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"1_transport_abridged.d.ts","sourceRoot":"","sources":["../../src/transport/1_transport_abridged.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAAa,iBAAkB,SAAQ,SAAU,YAAW,SAAS;;gBAKvD,UAAU,EAAE,UAAU,EAAE,UAAU,UAAQ;IAMhD,UAAU;IAWV,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IA2B9B,IAAI,CAAC,MAAM,EAAE,UAAU;IAepB,YAAY;IAKrB,IAAI,WAAW,IAAI,OAAO,CAEzB;CACF"}
1
+ {"version":3,"file":"1_transport_abridged.d.ts","sourceRoot":"","sources":["../../src/transport/1_transport_abridged.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAAa,iBAAkB,SAAQ,SAAU,YAAW,SAAS;;gBAKvD,UAAU,EAAE,UAAU,EAAE,UAAU,UAAQ;IAMhD,UAAU;IAWV,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IA0B9B,IAAI,CAAC,MAAM,EAAE,UAAU;IAcpB,YAAY;IAKrB,IAAI,WAAW,IAAI,OAAO,CAEzB;CACF"}
@@ -57,24 +57,23 @@ export class TransportAbridged extends Transport {
57
57
  async receive() {
58
58
  let length;
59
59
  {
60
- const buffer = new Uint8Array(1);
60
+ let buffer = new Uint8Array(1);
61
61
  await __classPrivateFieldGet(this, _TransportAbridged_connection, "f").read(buffer);
62
- this.decrypt(buffer);
62
+ buffer = await this.decrypt(buffer);
63
63
  if (buffer[0] < 0x7F) {
64
64
  length = buffer[0];
65
65
  }
66
66
  else {
67
- const buffer = new Uint8Array(3);
67
+ let buffer = new Uint8Array(3);
68
68
  await __classPrivateFieldGet(this, _TransportAbridged_connection, "f").read(buffer);
69
- this.decrypt(buffer);
69
+ buffer = await this.decrypt(buffer);
70
70
  length = Number(bigIntFromBuffer(buffer, true, true));
71
71
  }
72
72
  }
73
73
  length *= 4;
74
74
  const buffer = new Uint8Array(length);
75
75
  await __classPrivateFieldGet(this, _TransportAbridged_connection, "f").read(buffer);
76
- this.decrypt(buffer);
77
- return buffer;
76
+ return await this.decrypt(buffer);
78
77
  }
79
78
  async send(buffer) {
80
79
  if (!this.initialized) {
@@ -84,8 +83,7 @@ export class TransportAbridged extends Transport {
84
83
  const header = new Uint8Array([bufferLength >= 0x7F ? 0x7F : bufferLength]);
85
84
  const length = bufferLength >= 0x7F ? bufferFromBigInt(bufferLength, 3) : new Uint8Array();
86
85
  const data = concat([header, length, buffer]);
87
- this.encrypt(data);
88
- await __classPrivateFieldGet(this, _TransportAbridged_connection, "f").write(data);
86
+ await __classPrivateFieldGet(this, _TransportAbridged_connection, "f").write(await this.encrypt(data));
89
87
  }
90
88
  deinitialize() {
91
89
  super.deinitialize();
@@ -1 +1 @@
1
- {"version":3,"file":"1_transport_intermediate.d.ts","sourceRoot":"","sources":["../../src/transport/1_transport_intermediate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAAa,qBAAsB,SAAQ,SAAU,YAAW,SAAS;;gBAK3D,UAAU,EAAE,UAAU,EAAE,UAAU,UAAQ;IAMhD,UAAU;IAaV,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IAiB9B,IAAI,CAAC,MAAM,EAAE,UAAU;IAYpB,YAAY;IAKrB,IAAI,WAAW,IAAI,OAAO,CAEzB;CACF"}
1
+ {"version":3,"file":"1_transport_intermediate.d.ts","sourceRoot":"","sources":["../../src/transport/1_transport_intermediate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAAa,qBAAsB,SAAQ,SAAU,YAAW,SAAS;;gBAK3D,UAAU,EAAE,UAAU,EAAE,UAAU,UAAQ;IAMhD,UAAU;IAaV,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IAiB9B,IAAI,CAAC,MAAM,EAAE,UAAU;IAWpB,YAAY;IAKrB,IAAI,WAAW,IAAI,OAAO,CAEzB;CACF"}
@@ -59,16 +59,15 @@ export class TransportIntermediate extends Transport {
59
59
  async receive() {
60
60
  let length;
61
61
  {
62
- const buffer = new Uint8Array(4);
62
+ let buffer = new Uint8Array(4);
63
63
  await __classPrivateFieldGet(this, _TransportIntermediate_connection, "f").read(buffer);
64
- this.decrypt(buffer);
64
+ buffer = await this.decrypt(buffer);
65
65
  const dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength);
66
66
  length = dataView.getUint32(0, true);
67
67
  }
68
68
  const buffer = new Uint8Array(length);
69
69
  await __classPrivateFieldGet(this, _TransportIntermediate_connection, "f").read(buffer);
70
- this.decrypt(buffer);
71
- return buffer;
70
+ return await this.decrypt(buffer);
72
71
  }
73
72
  async send(buffer) {
74
73
  if (!this.initialized) {
@@ -76,8 +75,7 @@ export class TransportIntermediate extends Transport {
76
75
  }
77
76
  const length = bufferFromBigInt(buffer.length, 4);
78
77
  const data = concat([length, buffer]);
79
- this.encrypt(data);
80
- await __classPrivateFieldGet(this, _TransportIntermediate_connection, "f").write(data);
78
+ await __classPrivateFieldGet(this, _TransportIntermediate_connection, "f").write(await this.encrypt(data));
81
79
  }
82
80
  deinitialize() {
83
81
  super.deinitialize();
@@ -1,3 +1,22 @@
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
+ */
1
20
  export interface SwitchInlineQueryChosenChats {
2
21
  /** The query to type into the user's message box once switched to inline. */
3
22
  query: string;
@@ -1 +1 @@
1
- {"version":3,"file":"0_switch_inline_query_chosen_chats.d.ts","sourceRoot":"","sources":["../../src/types/0_switch_inline_query_chosen_chats.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
1
+ {"version":3,"file":"0_switch_inline_query_chosen_chats.d.ts","sourceRoot":"","sources":["../../src/types/0_switch_inline_query_chosen_chats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,4BAA4B;IAC3C,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}