teleproto 206.1.2 → 209.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Version.d.ts +1 -1
- package/Version.js +1 -1
- package/crypto/IGE.js +6 -6
- package/package.json +1 -1
- package/tl/AllTLObjects.d.ts +1 -1
- package/tl/AllTLObjects.js +1 -1
- package/tl/api.d.ts +17 -5
- package/tl/apiTl.js +5 -5
package/Version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "
|
|
1
|
+
export declare const version = "209.1.3";
|
package/Version.js
CHANGED
package/crypto/IGE.js
CHANGED
|
@@ -74,13 +74,13 @@ class IGE {
|
|
|
74
74
|
Helpers.generateRandomBytes(blockSize - padding),
|
|
75
75
|
]);
|
|
76
76
|
}
|
|
77
|
-
const iv1 = this.iv.
|
|
78
|
-
const iv2 = this.iv.
|
|
77
|
+
const iv1 = this.iv.subarray(0, blockSize);
|
|
78
|
+
const iv2 = this.iv.subarray(blockSize, 2 * blockSize);
|
|
79
79
|
let prevCipher = iv1;
|
|
80
80
|
let prevPlain = iv2;
|
|
81
81
|
const output = Buffer.alloc(plainText.length);
|
|
82
82
|
for (let i = 0; i < plainText.length; i += blockSize) {
|
|
83
|
-
const plainBlock = plainText.
|
|
83
|
+
const plainBlock = plainText.subarray(i, i + blockSize);
|
|
84
84
|
const xored = this.xorBuffers(plainBlock, prevCipher);
|
|
85
85
|
const encrypted = this.aesEncryptBlock(xored);
|
|
86
86
|
const cipherBlock = this.xorBuffers(encrypted, prevPlain);
|
|
@@ -95,13 +95,13 @@ class IGE {
|
|
|
95
95
|
if (cipherText.length % blockSize !== 0) {
|
|
96
96
|
throw new Error("Cipher text must be multiple of 16 bytes");
|
|
97
97
|
}
|
|
98
|
-
const iv1 = this.iv.
|
|
99
|
-
const iv2 = this.iv.
|
|
98
|
+
const iv1 = this.iv.subarray(0, blockSize);
|
|
99
|
+
const iv2 = this.iv.subarray(blockSize, 2 * blockSize);
|
|
100
100
|
let prevCipher = iv1;
|
|
101
101
|
let prevPlain = iv2;
|
|
102
102
|
const output = Buffer.alloc(cipherText.length);
|
|
103
103
|
for (let i = 0; i < cipherText.length; i += blockSize) {
|
|
104
|
-
const cipherBlock = cipherText.
|
|
104
|
+
const cipherBlock = cipherText.subarray(i, i + blockSize);
|
|
105
105
|
const xored = this.xorBuffers(cipherBlock, prevPlain);
|
|
106
106
|
const decrypted = this.aesDecryptBlock(xored);
|
|
107
107
|
const plainBlock = this.xorBuffers(decrypted, prevCipher);
|
package/package.json
CHANGED
package/tl/AllTLObjects.d.ts
CHANGED
package/tl/AllTLObjects.js
CHANGED
package/tl/api.d.ts
CHANGED
|
@@ -12580,8 +12580,9 @@ export namespace Api {
|
|
|
12580
12580
|
quoteText?: string;
|
|
12581
12581
|
quoteEntities?: Api.TypeMessageEntity[];
|
|
12582
12582
|
quoteOffset?: int;
|
|
12583
|
+
todoItemId?: int;
|
|
12583
12584
|
}> {
|
|
12584
|
-
CONSTRUCTOR_ID:
|
|
12585
|
+
CONSTRUCTOR_ID: 1763137035;
|
|
12585
12586
|
SUBCLASS_OF_ID: 1531810151;
|
|
12586
12587
|
classType: "constructor";
|
|
12587
12588
|
className: "MessageReplyHeader";
|
|
@@ -12598,6 +12599,7 @@ export namespace Api {
|
|
|
12598
12599
|
quoteText?: string;
|
|
12599
12600
|
quoteEntities?: Api.TypeMessageEntity[];
|
|
12600
12601
|
quoteOffset?: int;
|
|
12602
|
+
todoItemId?: int;
|
|
12601
12603
|
}
|
|
12602
12604
|
export class MessageReplyStoryHeader extends VirtualClass<{
|
|
12603
12605
|
peer: Api.TypePeer;
|
|
@@ -14494,8 +14496,9 @@ export namespace Api {
|
|
|
14494
14496
|
quoteEntities?: Api.TypeMessageEntity[];
|
|
14495
14497
|
quoteOffset?: int;
|
|
14496
14498
|
monoforumPeerId?: Api.TypeInputPeer;
|
|
14499
|
+
todoItemId?: int;
|
|
14497
14500
|
}> {
|
|
14498
|
-
CONSTRUCTOR_ID:
|
|
14501
|
+
CONSTRUCTOR_ID: 2258615824;
|
|
14499
14502
|
SUBCLASS_OF_ID: 2356220701;
|
|
14500
14503
|
classType: "constructor";
|
|
14501
14504
|
className: "InputReplyToMessage";
|
|
@@ -14508,6 +14511,7 @@ export namespace Api {
|
|
|
14508
14511
|
quoteEntities?: Api.TypeMessageEntity[];
|
|
14509
14512
|
quoteOffset?: int;
|
|
14510
14513
|
monoforumPeerId?: Api.TypeInputPeer;
|
|
14514
|
+
todoItemId?: int;
|
|
14511
14515
|
}
|
|
14512
14516
|
export class InputReplyToStory extends VirtualClass<{
|
|
14513
14517
|
peer: Api.TypeInputPeer;
|
|
@@ -15999,8 +16003,9 @@ export namespace Api {
|
|
|
15999
16003
|
upgradeStars?: long;
|
|
16000
16004
|
resellMinStars?: long;
|
|
16001
16005
|
title?: string;
|
|
16006
|
+
releasedBy?: Api.TypePeer;
|
|
16002
16007
|
}> {
|
|
16003
|
-
CONSTRUCTOR_ID:
|
|
16008
|
+
CONSTRUCTOR_ID: 2139438098;
|
|
16004
16009
|
SUBCLASS_OF_ID: 3273414923;
|
|
16005
16010
|
classType: "constructor";
|
|
16006
16011
|
className: "StarGift";
|
|
@@ -16021,6 +16026,7 @@ export namespace Api {
|
|
|
16021
16026
|
upgradeStars?: long;
|
|
16022
16027
|
resellMinStars?: long;
|
|
16023
16028
|
title?: string;
|
|
16029
|
+
releasedBy?: Api.TypePeer;
|
|
16024
16030
|
}
|
|
16025
16031
|
export class StarGiftUnique extends VirtualClass<{
|
|
16026
16032
|
// flags: null;
|
|
@@ -16036,8 +16042,9 @@ export namespace Api {
|
|
|
16036
16042
|
availabilityTotal: int;
|
|
16037
16043
|
giftAddress?: string;
|
|
16038
16044
|
resellStars?: long;
|
|
16045
|
+
releasedBy?: Api.TypePeer;
|
|
16039
16046
|
}> {
|
|
16040
|
-
CONSTRUCTOR_ID:
|
|
16047
|
+
CONSTRUCTOR_ID: 4130830510;
|
|
16041
16048
|
SUBCLASS_OF_ID: 3273414923;
|
|
16042
16049
|
classType: "constructor";
|
|
16043
16050
|
className: "StarGiftUnique";
|
|
@@ -16055,6 +16062,7 @@ export namespace Api {
|
|
|
16055
16062
|
availabilityTotal: int;
|
|
16056
16063
|
giftAddress?: string;
|
|
16057
16064
|
resellStars?: long;
|
|
16065
|
+
releasedBy?: Api.TypePeer;
|
|
16058
16066
|
}
|
|
16059
16067
|
export class MessageReportOption extends VirtualClass<{
|
|
16060
16068
|
text: string;
|
|
@@ -20780,14 +20788,18 @@ export namespace Api {
|
|
|
20780
20788
|
export class StarGifts extends VirtualClass<{
|
|
20781
20789
|
hash: int;
|
|
20782
20790
|
gifts: Api.TypeStarGift[];
|
|
20791
|
+
chats: Api.TypeChat[];
|
|
20792
|
+
users: Api.TypeUser[];
|
|
20783
20793
|
}> {
|
|
20784
|
-
CONSTRUCTOR_ID:
|
|
20794
|
+
CONSTRUCTOR_ID: 785918357;
|
|
20785
20795
|
SUBCLASS_OF_ID: 1635309988;
|
|
20786
20796
|
classType: "constructor";
|
|
20787
20797
|
className: "payments.StarGifts";
|
|
20788
20798
|
static fromReader(reader: Reader): StarGifts;
|
|
20789
20799
|
hash: int;
|
|
20790
20800
|
gifts: Api.TypeStarGift[];
|
|
20801
|
+
chats: Api.TypeChat[];
|
|
20802
|
+
users: Api.TypeUser[];
|
|
20791
20803
|
}
|
|
20792
20804
|
export class ConnectedStarRefBots extends VirtualClass<{
|
|
20793
20805
|
count: int;
|
package/tl/apiTl.js
CHANGED
|
@@ -1052,7 +1052,7 @@ help.countriesList#87d0759e countries:Vector<help.Country> hash:int = help.Count
|
|
|
1052
1052
|
messageViews#455b853d flags:# views:flags.0?int forwards:flags.1?int replies:flags.2?MessageReplies = MessageViews;
|
|
1053
1053
|
messages.messageViews#b6c4f543 views:Vector<MessageViews> chats:Vector<Chat> users:Vector<User> = messages.MessageViews;
|
|
1054
1054
|
messages.discussionMessage#a6341782 flags:# messages:Vector<Message> max_id:flags.0?int read_inbox_max_id:flags.1?int read_outbox_max_id:flags.2?int unread_count:int chats:Vector<Chat> users:Vector<User> = messages.DiscussionMessage;
|
|
1055
|
-
messageReplyHeader#
|
|
1055
|
+
messageReplyHeader#6917560b flags:# reply_to_scheduled:flags.2?true forum_topic:flags.3?true quote:flags.9?true reply_to_msg_id:flags.4?int reply_to_peer_id:flags.0?Peer reply_from:flags.5?MessageFwdHeader reply_media:flags.8?MessageMedia reply_to_top_id:flags.1?int quote_text:flags.6?string quote_entities:flags.7?Vector<MessageEntity> quote_offset:flags.10?int todo_item_id:flags.11?int = MessageReplyHeader;
|
|
1056
1056
|
messageReplyStoryHeader#e5af939 peer:Peer story_id:int = MessageReplyHeader;
|
|
1057
1057
|
messageReplies#83d60fc2 flags:# comments:flags.0?true replies:int replies_pts:int recent_repliers:flags.1?Vector<Peer> channel_id:flags.0?long max_id:flags.2?int read_max_id:flags.3?int = MessageReplies;
|
|
1058
1058
|
peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked;
|
|
@@ -1246,7 +1246,7 @@ storyViewPublicForward#9083670b flags:# blocked:flags.0?true blocked_my_stories_
|
|
|
1246
1246
|
storyViewPublicRepost#bd74cf49 flags:# blocked:flags.0?true blocked_my_stories_from:flags.1?true peer_id:Peer story:StoryItem = StoryView;
|
|
1247
1247
|
stories.storyViewsList#59d78fc5 flags:# count:int views_count:int forwards_count:int reactions_count:int views:Vector<StoryView> chats:Vector<Chat> users:Vector<User> next_offset:flags.0?string = stories.StoryViewsList;
|
|
1248
1248
|
stories.storyViews#de9eed1d views:Vector<StoryViews> users:Vector<User> = stories.StoryViews;
|
|
1249
|
-
inputReplyToMessage#
|
|
1249
|
+
inputReplyToMessage#869fbe10 flags:# reply_to_msg_id:int top_msg_id:flags.0?int reply_to_peer_id:flags.1?InputPeer quote_text:flags.2?string quote_entities:flags.3?Vector<MessageEntity> quote_offset:flags.4?int monoforum_peer_id:flags.5?InputPeer todo_item_id:flags.6?int = InputReplyTo;
|
|
1250
1250
|
inputReplyToStory#5881323a peer:InputPeer story_id:int = InputReplyTo;
|
|
1251
1251
|
inputReplyToMonoForum#69d66c45 monoforum_peer_id:InputPeer = InputReplyTo;
|
|
1252
1252
|
exportedStoryLink#3fc9053b link:string = ExportedStoryLink;
|
|
@@ -1387,10 +1387,10 @@ starsSubscription#2e6eab1a flags:# canceled:flags.0?true can_refulfill:flags.1?t
|
|
|
1387
1387
|
messageReactor#4ba3a95a flags:# top:flags.0?true my:flags.1?true anonymous:flags.2?true peer_id:flags.3?Peer count:int = MessageReactor;
|
|
1388
1388
|
starsGiveawayOption#94ce852a flags:# extended:flags.0?true default:flags.1?true stars:long yearly_boosts:int store_product:flags.2?string currency:string amount:long winners:Vector<StarsGiveawayWinnersOption> = StarsGiveawayOption;
|
|
1389
1389
|
starsGiveawayWinnersOption#54236209 flags:# default:flags.0?true users:int per_user_stars:long = StarsGiveawayWinnersOption;
|
|
1390
|
-
starGift#
|
|
1391
|
-
starGiftUnique#
|
|
1390
|
+
starGift#7f853c12 flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int availability_resale:flags.4?long convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int upgrade_stars:flags.3?long resell_min_stars:flags.4?long title:flags.5?string released_by:flags.6?Peer = StarGift;
|
|
1391
|
+
starGiftUnique#f63778ae flags:# id:long title:string slug:string num:int owner_id:flags.0?Peer owner_name:flags.1?string owner_address:flags.2?string attributes:Vector<StarGiftAttribute> availability_issued:int availability_total:int gift_address:flags.3?string resell_stars:flags.4?long released_by:flags.5?Peer = StarGift;
|
|
1392
1392
|
payments.starGiftsNotModified#a388a368 = payments.StarGifts;
|
|
1393
|
-
payments.starGifts#
|
|
1393
|
+
payments.starGifts#2ed82995 hash:int gifts:Vector<StarGift> chats:Vector<Chat> users:Vector<User> = payments.StarGifts;
|
|
1394
1394
|
messageReportOption#7903e3d9 text:string option:bytes = MessageReportOption;
|
|
1395
1395
|
reportResultChooseOption#f0e4e0b6 title:string options:Vector<MessageReportOption> = ReportResult;
|
|
1396
1396
|
reportResultAddComment#6f09ac31 flags:# optional:flags.0?true option:bytes = ReportResult;
|