Update content of files

This commit is contained in:
GitHub Action 2023-12-15 15:14:02 +00:00
parent 1a7a7dbcb4
commit 78cefd6f26
15 changed files with 492 additions and 556 deletions

View file

@ -47,25 +47,31 @@
<p><a href="/api/premium">Telegram Premium</a> users can grant their favorite channels additional features like the ability to post <a href="/api/stories">stories</a> by giving them <strong>boosts</strong>. </p>
<p>Channels level up as they gain more boosts and for each level, they gain additional features. </p>
<p>Schema:</p>
<pre><code><a href='/constructor/stories.canApplyBoostOk'>stories.canApplyBoostOk</a>#c3173587 = <a href='/type/stories.CanApplyBoostResult'>stories.CanApplyBoostResult</a>;
<a href='/constructor/stories.canApplyBoostReplace'>stories.canApplyBoostReplace</a>#712c4655 current_boost:<a href='/type/Peer'>Peer</a> chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; = <a href='/type/stories.CanApplyBoostResult'>stories.CanApplyBoostResult</a>;
<pre><code><a href='/constructor/myBoost'>myBoost</a>#c448415c flags:<a href='/type/%23'>#</a> slot:<a href='/type/int'>int</a> peer:flags.0?<a href='/type/Peer'>Peer</a> date:<a href='/type/int'>int</a> expires:<a href='/type/int'>int</a> cooldown_until_date:flags.1?<a href='/type/int'>int</a> = <a href='/type/MyBoost'>MyBoost</a>;
<a href='/constructor/statsPercentValue'>statsPercentValue</a>#cbce2fe0 part:<a href='/type/double'>double</a> total:<a href='/type/double'>double</a> = <a href='/type/StatsPercentValue'>StatsPercentValue</a>;
<a href='/constructor/stories.boostsStatus'>stories.boostsStatus</a>#66ea1fef flags:<a href='/type/%23'>#</a> my_boost:flags.2?<a href='/constructor/true'>true</a> level:<a href='/type/int'>int</a> current_level_boosts:<a href='/type/int'>int</a> boosts:<a href='/type/int'>int</a> next_level_boosts:flags.0?<a href='/type/int'>int</a> premium_audience:flags.1?<a href='/type/StatsPercentValue'>StatsPercentValue</a> = <a href='/type/stories.BoostsStatus'>stories.BoostsStatus</a>;
<a href='/constructor/premium.myBoosts'>premium.myBoosts</a>#9ae228e2 my_boosts:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MyBoost'>MyBoost</a>&gt; chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/premium.MyBoosts'>premium.MyBoosts</a>;
<a href='/constructor/booster'>booster</a>#e9e6380 user_id:<a href='/type/long'>long</a> expires:<a href='/type/int'>int</a> = <a href='/type/Booster'>Booster</a>;
<a href='/constructor/stories.boostersList'>stories.boostersList</a>#f3dd3d1d flags:<a href='/type/%23'>#</a> count:<a href='/type/int'>int</a> boosters:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Booster'>Booster</a>&gt; next_offset:flags.0?<a href='/type/string'>string</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/stories.BoostersList'>stories.BoostersList</a>;
<a href='/constructor/prepaidGiveaway'>prepaidGiveaway</a>#b2539d54 id:<a href='/type/long'>long</a> months:<a href='/type/int'>int</a> quantity:<a href='/type/int'>int</a> date:<a href='/type/int'>int</a> = <a href='/type/PrepaidGiveaway'>PrepaidGiveaway</a>;
<a href='/constructor/premium.boostsStatus'>premium.boostsStatus</a>#4959427a flags:<a href='/type/%23'>#</a> my_boost:flags.2?<a href='/constructor/true'>true</a> level:<a href='/type/int'>int</a> current_level_boosts:<a href='/type/int'>int</a> boosts:<a href='/type/int'>int</a> gift_boosts:flags.4?<a href='/type/int'>int</a> next_level_boosts:flags.0?<a href='/type/int'>int</a> premium_audience:flags.1?<a href='/type/StatsPercentValue'>StatsPercentValue</a> boost_url:<a href='/type/string'>string</a> prepaid_giveaways:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PrepaidGiveaway'>PrepaidGiveaway</a>&gt; my_boost_slots:flags.2?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; = <a href='/type/premium.BoostsStatus'>premium.BoostsStatus</a>;
<a href='/constructor/boost'>boost</a>#2a1c8c71 flags:<a href='/type/%23'>#</a> gift:flags.1?<a href='/constructor/true'>true</a> giveaway:flags.2?<a href='/constructor/true'>true</a> unclaimed:flags.3?<a href='/constructor/true'>true</a> id:<a href='/type/string'>string</a> user_id:flags.0?<a href='/type/long'>long</a> giveaway_msg_id:flags.2?<a href='/type/int'>int</a> date:<a href='/type/int'>int</a> expires:<a href='/type/int'>int</a> used_gift_slug:flags.4?<a href='/type/string'>string</a> multiplier:flags.5?<a href='/type/int'>int</a> = <a href='/type/Boost'>Boost</a>;
<a href='/constructor/premium.boostsList'>premium.boostsList</a>#86f8613c flags:<a href='/type/%23'>#</a> count:<a href='/type/int'>int</a> boosts:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Boost'>Boost</a>&gt; next_offset:flags.0?<a href='/type/string'>string</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/premium.BoostsList'>premium.BoostsList</a>;
---functions---
<a href='/method/stories.canApplyBoost'>stories.canApplyBoost</a>#db05c1bd peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/stories.CanApplyBoostResult'>stories.CanApplyBoostResult</a>;
<a href='/method/stories.applyBoost'>stories.applyBoost</a>#f29d7c2b peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/premium.getMyBoosts'>premium.getMyBoosts</a>#0be77b4a = <a href='/type/premium.MyBoosts'>premium.MyBoosts</a>;
<a href='/method/premium.applyBoost'>premium.applyBoost</a>#6b7da746 flags:<a href='/type/%23'>#</a> slots:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/premium.MyBoosts'>premium.MyBoosts</a>;
<a href='/method/stories.getBoostsStatus'>stories.getBoostsStatus</a>#4c449472 peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/stories.BoostsStatus'>stories.BoostsStatus</a>;
<a href='/method/premium.getBoostsStatus'>premium.getBoostsStatus</a>#042f1f61 peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/premium.BoostsStatus'>premium.BoostsStatus</a>;
<a href='/method/stories.getBoostersList'>stories.getBoostersList</a>#337ef980 peer:<a href='/type/InputPeer'>InputPeer</a> offset:<a href='/type/string'>string</a> limit:<a href='/type/int'>int</a> = <a href='/type/stories.BoostersList'>stories.BoostersList</a>;</code></pre>
<p>Use <a href="/method/stories.applyBoost">stories.applyBoost</a> to boost a channel: before invoking this method, however, make sure to invoke <a href="/method/stories.canApplyBoost">stories.canApplyBoost</a> to check if a given channel can be boosted. </p>
<a href='/method/premium.getUserBoosts'>premium.getUserBoosts</a>#39854d1f peer:<a href='/type/InputPeer'>InputPeer</a> user_id:<a href='/type/InputUser'>InputUser</a> = <a href='/type/premium.BoostsList'>premium.BoostsList</a>;
<a href='/method/premium.getBoostsList'>premium.getBoostsList</a>#60f67660 flags:<a href='/type/%23'>#</a> gifts:flags.0?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> offset:<a href='/type/string'>string</a> limit:<a href='/type/int'>int</a> = <a href='/type/premium.BoostsList'>premium.BoostsList</a>;</code></pre>
<p>Use <a href="/method/premium.applyBoost">premium.applyBoost</a> to boost a channel: before invoking this method, however, make sure to invoke <a href="/method/stories.canApplyBoost">stories.canApplyBoost</a> to check if a given channel can be boosted. </p>
<p>A <code>PREMIUM_ACCOUNT_REQUIRED</code> error will be returned when calling any of the two methods if the current account does not have a <a href="/api/premium">Telegram Premium</a> subscription.<br>
A <code>BOOST_NOT_MODIFIED</code> RPC error will be returned when calling any of the two methods if the user is already boosting the specified channel. </p>
<p>Furthermore, the result of <a href="/method/stories.canApplyBoost">stories.canApplyBoost</a> can be:</p>

View file

@ -67,10 +67,10 @@
<ul>
<li>Added <a href="/constructor/updateChannelViewForumAsMessages">updateChannelViewForumAsMessages</a> - </li>
<li>Added <a href="/constructor/messageActionGiveawayResults">messageActionGiveawayResults</a> - </li>
<li>Added <a href="/constructor/updatePeerWallpaper">updatePeerWallpaper</a> - </li>
<li>Added <a href="/constructor/updatePeerWallpaper">updatePeerWallpaper</a> - The <a href="/api/wallpaper">wallpaper »</a> of a given peer has changed.</li>
<li>Added <a href="/constructor/storyFwdHeader">storyFwdHeader</a> - Contains info about the original poster of a reposted story.</li>
<li>Added <a href="/constructor/postInteractionCountersMessage">postInteractionCountersMessage</a> - </li>
<li>Added <a href="/constructor/postInteractionCountersStory">postInteractionCountersStory</a> - </li>
<li>Added <a href="/constructor/postInteractionCountersMessage">postInteractionCountersMessage</a> - Interaction counters for a message.</li>
<li>Added <a href="/constructor/postInteractionCountersStory">postInteractionCountersStory</a> - Interaction counters for a story.</li>
<li>Added <a href="/constructor/stats.storyStats">stats.storyStats</a> - Contains <a href="/api/stats">statistics</a> about a <a href="/api/stories">story</a>.</li>
<li>Added <a href="/constructor/publicForwardMessage">publicForwardMessage</a> - Contains info about a forward of a <a href="/api/stories">story</a> as a message.</li>
<li>Added <a href="/constructor/publicForwardStory">publicForwardStory</a> - Contains info about a forward of a <a href="/api/stories">story</a> as a repost by a public channel.</li>
@ -166,7 +166,7 @@
<li>Added <a href="/method/channels.updateColor">channels.updateColor</a> - Update the <a href="/api/colors">accent color and background custom emoji »</a> of a channel.</li>
<li>Added <a href="/method/account.getDefaultBackgroundEmojis">account.getDefaultBackgroundEmojis</a> - Get a set of suggested <a href="/api/custom-emoji">custom emoji stickers</a> that can be used in an <a href="/api/colors">accent color pattern</a>.</li>
<li>Added <a href="/method/premium.getBoostsList">premium.getBoostsList</a> - </li>
<li>Added <a href="/method/premium.getMyBoosts">premium.getMyBoosts</a> - </li>
<li>Added <a href="/method/premium.getMyBoosts">premium.getMyBoosts</a> - Obtain which peers are we currently <a href="/api/boost">boosting</a>, and how many <a href="/api/boost">boost slots</a> we have left.</li>
<li>Added <a href="/method/premium.applyBoost">premium.applyBoost</a> - </li>
<li>Added <a href="/method/premium.getBoostsStatus">premium.getBoostsStatus</a> - </li>
<li>Added <a href="/method/premium.getUserBoosts">premium.getUserBoosts</a> - </li>
@ -210,8 +210,8 @@
<li>Added <a href="/constructor/channelAdminLogEventActionChangeBackgroundEmoji">channelAdminLogEventActionChangeBackgroundEmoji</a> - The <a href="/api/custom-emoji">custom emoji</a> used to generate the pattern of the <a href="/api/colors">background profile color »</a> of a channel was changed.</li>
<li>Added <a href="/constructor/boost">boost</a> - </li>
<li>Added <a href="/constructor/premium.boostsList">premium.boostsList</a> - </li>
<li>Added <a href="/constructor/myBoost">myBoost</a> - </li>
<li>Added <a href="/constructor/premium.myBoosts">premium.myBoosts</a> - </li>
<li>Added <a href="/constructor/myBoost">myBoost</a> - Contains information about a single <a href="/api/boost">boost slot »</a>.</li>
<li>Added <a href="/constructor/premium.myBoosts">premium.myBoosts</a> - A list of peers we are currently <a href="/api/boost">boosting</a>, and how many <a href="/api/boost">boost slots</a> we have left.</li>
<li>Added <a href="/constructor/premium.boostsStatus">premium.boostsStatus</a> - </li>
<li>Added <a href="/constructor/updateBotChatBoost">updateBotChatBoost</a> - </li>
</ul>

View file

@ -4,42 +4,10 @@
<meta charset="utf-8">
<title>myBoost</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
slot
int
 
peer
flags.0?Peer
 
date
int
 
expires…">
<meta property="description" content="Contains information about a single boost slot ».">
<meta property="og:title" content="myBoost">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
slot
int
 
peer
flags.0?Peer
 
date
int
 
expires…">
<meta property="og:description" content="Contains information about a single boost slot ».">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -74,7 +42,8 @@ expires…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/myBoost" >myBoost</a></li></ul></div>
<h1 id="dev_page_title">myBoost</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Contains information about a single <a href="/api/boost">boost slot »</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 167 <b class="caret"></b></a>
@ -105,17 +74,17 @@ expires…">
<tr>
<td><strong>slot</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td><a href="/api/boost">Boost slot ID »</a></td>
</tr>
<tr>
<td><strong>peer</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/Peer">Peer</a></td>
<td> </td>
<td>If set, indicates this slot is currently occupied, i.e. we are <a href="/api/boost">boosting</a> this peer. <br>Note that we can assign multiple boost slots to the same peer.</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>When we started boosting this</td>
</tr>
<tr>
<td><strong>expires</strong></td>
@ -130,7 +99,10 @@ expires…">
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/MyBoost">MyBoost</a></p></div>
<p><a href="/type/MyBoost">MyBoost</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#channel-boosts" id="channel-boosts" name="channel-boosts"><i class="anchor-icon"></i></a><a href="/api/boost">Channel boosts</a></h4>
<p>Telegram Premium users can grant their favorite channels additional features like the ability to post stories by giving them boosts.</p></div>
</div>

View file

@ -4,44 +4,10 @@
<meta charset="utf-8">
<title>postInteractionCountersMessage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
msg_id
int
 
views
int
 
forwards
int
 
reactions
int
 
Type
PostInteractionCounters">
<meta property="description" content="Interaction counters for a message.">
<meta property="og:title" content="postInteractionCountersMessage">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
msg_id
int
 
views
int
 
forwards
int
 
reactions
int
 
Type
PostInteractionCounters">
<meta property="og:description" content="Interaction counters for a message.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -76,7 +42,8 @@ PostInteractionCounters">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/postInteractionCountersMessage" >postInteractionCountersMessage</a></li></ul></div>
<h1 id="dev_page_title">postInteractionCountersMessage</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Interaction counters for a message.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 167 <b class="caret"></b></a>
@ -102,22 +69,22 @@ PostInteractionCounters">
<tr>
<td><strong>msg_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Message ID</td>
</tr>
<tr>
<td><strong>views</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Number of views</td>
</tr>
<tr>
<td><strong>forwards</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Number of forwards to public channels</td>
</tr>
<tr>
<td><strong>reactions</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Number of reactions</td>
</tr>
</tbody>
</table>

View file

@ -4,44 +4,10 @@
<meta charset="utf-8">
<title>postInteractionCountersStory</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
story_id
int
 
views
int
 
forwards
int
 
reactions
int
 
Type
PostInteractionCounters">
<meta property="description" content="Interaction counters for a story.">
<meta property="og:title" content="postInteractionCountersStory">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
story_id
int
 
views
int
 
forwards
int
 
reactions
int
 
Type
PostInteractionCounters">
<meta property="og:description" content="Interaction counters for a story.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -76,7 +42,8 @@ PostInteractionCounters">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/postInteractionCountersStory" >postInteractionCountersStory</a></li></ul></div>
<h1 id="dev_page_title">postInteractionCountersStory</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Interaction counters for a story.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 167 <b class="caret"></b></a>
@ -102,22 +69,22 @@ PostInteractionCounters">
<tr>
<td><strong>story_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Story ID</td>
</tr>
<tr>
<td><strong>views</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Number of views</td>
</tr>
<tr>
<td><strong>forwards</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Number of forwards and reposts to public chats and channels</td>
</tr>
<tr>
<td><strong>reactions</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Number of reactions</td>
</tr>
</tbody>
</table>

View file

@ -4,38 +4,10 @@
<meta charset="utf-8">
<title>premium.myBoosts</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
my_boosts
Vector&lt;MyBoost&gt;
 
chats
Vector&lt;Chat&gt;
 
users
Vector&lt;User&gt;
 
Type
premium.MyBoosts">
<meta property="description" content="A list of peers we are currently boosting, and how many boost slots we have left.">
<meta property="og:title" content="premium.myBoosts">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
my_boosts
Vector&lt;MyBoost&gt;
 
chats
Vector&lt;Chat&gt;
 
users
Vector&lt;User&gt;
 
Type
premium.MyBoosts">
<meta property="og:description" content="A list of peers we are currently boosting, and how many boost slots we have left.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -70,7 +42,8 @@ premium.MyBoosts">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/premium.myBoosts" >premium.myBoosts</a></li></ul></div>
<h1 id="dev_page_title">premium.myBoosts</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>A list of peers we are currently <a href="/api/boost">boosting</a>, and how many <a href="/api/boost">boost slots</a> we have left.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 167 <b class="caret"></b></a>
@ -96,22 +69,25 @@ premium.MyBoosts">
<tr>
<td><strong>my_boosts</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/MyBoost">MyBoost</a>&gt;</td>
<td> </td>
<td>Info about boosted peers and remaining boost slots.</td>
</tr>
<tr>
<td><strong>chats</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/Chat">Chat</a>&gt;</td>
<td> </td>
<td>Referenced chats</td>
</tr>
<tr>
<td><strong>users</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/User">User</a>&gt;</td>
<td> </td>
<td>Referenced users</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/premium.MyBoosts">premium.MyBoosts</a></p></div>
<p><a href="/type/premium.MyBoosts">premium.MyBoosts</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#channel-boosts" id="channel-boosts" name="channel-boosts"><i class="anchor-icon"></i></a><a href="/api/boost">Channel boosts</a></h4>
<p>Telegram Premium users can grant their favorite channels additional features like the ability to post stories by giving them boosts.</p></div>
</div>

View file

@ -4,32 +4,10 @@
<meta charset="utf-8">
<title>updatePeerWallpaper</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
wallpaper_overridden
flags.1?true
 
peer
Peer…">
<meta property="description" content="The wallpaper » of a given peer has changed.">
<meta property="og:title" content="updatePeerWallpaper">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
wallpaper_overridden
flags.1?true
 
peer
Peer…">
<meta property="og:description" content="The wallpaper » of a given peer has changed.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -64,7 +42,8 @@ Peer…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/updatePeerWallpaper" >updatePeerWallpaper</a></li></ul></div>
<h1 id="dev_page_title">updatePeerWallpaper</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>The <a href="/api/wallpaper">wallpaper »</a> of a given peer has changed.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 167 <b class="caret"></b></a>
@ -100,7 +79,7 @@ Peer…">
<tr>
<td><strong>peer</strong></td>
<td style="text-align: center;"><a href="/type/Peer">Peer</a></td>
<td> </td>
<td>The peer where the wallpaper has changed.</td>
</tr>
<tr>
<td><strong>wallpaper</strong></td>

View file

@ -4,16 +4,10 @@
<meta charset="utf-8">
<title>premium.getMyBoosts</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
This constructor does not require any parameters.
Result
premium.MyBoosts">
<meta property="description" content="Obtain which peers are we currently boosting, and how many boost slots we have left.">
<meta property="og:title" content="premium.getMyBoosts">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
This constructor does not require any parameters.
Result
premium.MyBoosts">
<meta property="og:description" content="Obtain which peers are we currently boosting, and how many boost slots we have left.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -48,7 +42,8 @@ premium.MyBoosts">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/premium.getMyBoosts" >premium.getMyBoosts</a></li></ul></div>
<h1 id="dev_page_title">premium.getMyBoosts</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Obtain which peers are we currently <a href="/api/boost">boosting</a>, and how many <a href="/api/boost">boost slots</a> we have left.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 167 <b class="caret"></b></a>
@ -66,7 +61,10 @@ premium.MyBoosts">
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
<p><a href="/type/premium.MyBoosts">premium.MyBoosts</a></p></div>
<p><a href="/type/premium.MyBoosts">premium.MyBoosts</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#channel-boosts" id="channel-boosts" name="channel-boosts"><i class="anchor-icon"></i></a><a href="/api/boost">Channel boosts</a></h4>
<p>Telegram Premium users can grant their favorite channels additional features like the ability to post stories by giving them boosts.</p></div>
</div>

View file

@ -533,6 +533,68 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-accent-colors-" id="working-with-accent-colors-" name="working-with-accent-colors-"><i class="anchor-icon"></i></a>Working with <a href="/api/colors">accent colors »</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/help.getPeerColors">help.getPeerColors</a></td>
<td>Get the set of <a href="/api/colors">accent color palettes »</a> that can be used for message accents.</td>
</tr>
<tr>
<td><a href="/method/help.getPeerProfileColors">help.getPeerProfileColors</a></td>
<td>Get the set of <a href="/api/colors">accent color palettes »</a> that can be used in profile page backgrounds.</td>
</tr>
<tr>
<td><a href="/method/account.updateColor">account.updateColor</a></td>
<td>Update the <a href="/api/colors">accent color and background custom emoji »</a> of the current account.</td>
</tr>
<tr>
<td><a href="/method/channels.updateColor">channels.updateColor</a></td>
<td>Update the <a href="/api/colors">accent color and background custom emoji »</a> of a channel.</td>
</tr>
<tr>
<td><a href="/method/account.getDefaultBackgroundEmojis">account.getDefaultBackgroundEmojis</a></td>
<td>Get a set of suggested <a href="/api/custom-emoji">custom emoji stickers</a> that can be used in an <a href="/api/colors">accent color pattern</a>.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-boosts-" id="working-with-boosts-" name="working-with-boosts-"><i class="anchor-icon"></i></a>Working with <a href="/api/boost">boosts »</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/premium.getBoostsList">premium.getBoostsList</a></td>
<td> </td>
</tr>
<tr>
<td><a href="/method/premium.getMyBoosts">premium.getMyBoosts</a></td>
<td>Obtain which peers are we currently <a href="/api/boost">boosting</a>, and how many <a href="/api/boost">boost slots</a> we have left.</td>
</tr>
<tr>
<td><a href="/method/premium.applyBoost">premium.applyBoost</a></td>
<td> </td>
</tr>
<tr>
<td><a href="/method/premium.getBoostsStatus">premium.getBoostsStatus</a></td>
<td> </td>
</tr>
<tr>
<td><a href="/method/premium.getUserBoosts">premium.getUserBoosts</a></td>
<td> </td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-channels-supergroups-geogroups" id="working-with-channels-supergroups-geogroups" name="working-with-channels-supergroups-geogroups"><i class="anchor-icon"></i></a>Working with <a href="/api/channel">channels/supergroups/geogroups</a></h3>
<table class="table">
<thead>
@ -1325,6 +1387,45 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-statistics" id="working-with-statistics" name="working-with-statistics"><i class="anchor-icon"></i></a>Working with <a href="/api/stats">statistics</a></h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/stats.loadAsyncGraph">stats.loadAsyncGraph</a></td>
<td>Load <a href="/api/stats">channel statistics graph</a> asynchronously</td>
</tr>
<tr>
<td><a href="/method/stats.getBroadcastStats">stats.getBroadcastStats</a></td>
<td>Get <a href="/api/stats">channel statistics</a></td>
</tr>
<tr>
<td><a href="/method/stats.getMessagePublicForwards">stats.getMessagePublicForwards</a></td>
<td>Obtains a list of messages, indicating to which other public channels was a channel message forwarded. <br>Will return a list of <a href="/constructor/message">messages</a> with <code>peer_id</code> equal to the public channel to which this message was forwarded.</td>
</tr>
<tr>
<td><a href="/method/stats.getMegagroupStats">stats.getMegagroupStats</a></td>
<td>Get <a href="/api/stats">supergroup statistics</a></td>
</tr>
<tr>
<td><a href="/method/stats.getMessageStats">stats.getMessageStats</a></td>
<td>Get <a href="/api/stats">message statistics</a></td>
</tr>
<tr>
<td><a href="/method/stats.getStoryStats">stats.getStoryStats</a></td>
<td>Get <a href="/api/stats">statistics</a> for a certain <a href="/api/stories">story</a>.</td>
</tr>
<tr>
<td><a href="/method/stats.getStoryPublicForwards">stats.getStoryPublicForwards</a></td>
<td>Obtain forwards of a <a href="/api/stories">story</a> as a message to public chats and reposts by public channels.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-stickers-" id="working-with-stickers-" name="working-with-stickers-"><i class="anchor-icon"></i></a>Working with <a href="/api/stickers">stickers »</a></h3>
<table class="table">
<thead>
@ -1447,6 +1548,10 @@ Look for updates of telegram&#39;s terms of service…">
<td>Search for stickersets</td>
</tr>
<tr>
<td><a href="/method/messages.searchEmojiStickerSets">messages.searchEmojiStickerSets</a></td>
<td>Search for <a href="/api/custom-emoji">custom emoji stickersets »</a></td>
</tr>
<tr>
<td><a href="/method/messages.uninstallStickerSet">messages.uninstallStickerSet</a></td>
<td>Uninstall a stickerset</td>
</tr>
@ -2705,37 +2810,6 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-statistics" id="working-with-statistics" name="working-with-statistics"><i class="anchor-icon"></i></a>Working with statistics</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/method/stats.loadAsyncGraph">stats.loadAsyncGraph</a></td>
<td>Load <a href="/api/stats">channel statistics graph</a> asynchronously</td>
</tr>
<tr>
<td><a href="/method/stats.getBroadcastStats">stats.getBroadcastStats</a></td>
<td>Get <a href="/api/stats">channel statistics</a></td>
</tr>
<tr>
<td><a href="/method/stats.getMessagePublicForwards">stats.getMessagePublicForwards</a></td>
<td>Obtains a list of messages, indicating to which other public channels was a channel message forwarded. <br>Will return a list of <a href="/constructor/message">messages</a> with <code>peer_id</code> equal to the public channel to which this message was forwarded.</td>
</tr>
<tr>
<td><a href="/method/stats.getMegagroupStats">stats.getMegagroupStats</a></td>
<td>Get <a href="/api/stats">supergroup statistics</a></td>
</tr>
<tr>
<td><a href="/method/stats.getMessageStats">stats.getMessageStats</a></td>
<td>Get <a href="/api/stats">message statistics</a></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#working-with-the-attachment-menu--of-mini-bot-apps-" id="working-with-the-attachment-menu--of-mini-bot-apps-" name="working-with-the-attachment-menu--of-mini-bot-apps-"><i class="anchor-icon"></i></a>Working with the <a href="/bots/webapps#launching-mini-apps-from-the-attachment-menu">attachment menu »</a> of <a href="/bots/webapps">mini bot apps »</a></h3>
<table class="table">
<thead>
@ -2999,65 +3073,13 @@ Look for updates of telegram&#39;s terms of service…">
<td> </td>
</tr>
<tr>
<td><a href="/method/account.updateColor">account.updateColor</a></td>
<td>Update the <a href="/api/colors">accent color and background custom emoji »</a> of the current account.</td>
</tr>
<tr>
<td><a href="/method/channels.updateColor">channels.updateColor</a></td>
<td>Update the <a href="/api/colors">accent color and background custom emoji »</a> of a channel.</td>
</tr>
<tr>
<td><a href="/method/account.getDefaultBackgroundEmojis">account.getDefaultBackgroundEmojis</a></td>
<td>Get a set of suggested <a href="/api/custom-emoji">custom emoji stickers</a> that can be used in an <a href="/api/colors">accent color pattern</a>.</td>
</tr>
<tr>
<td><a href="/method/premium.getBoostsList">premium.getBoostsList</a></td>
<td> </td>
</tr>
<tr>
<td><a href="/method/premium.getMyBoosts">premium.getMyBoosts</a></td>
<td> </td>
</tr>
<tr>
<td><a href="/method/premium.applyBoost">premium.applyBoost</a></td>
<td> </td>
</tr>
<tr>
<td><a href="/method/premium.getBoostsStatus">premium.getBoostsStatus</a></td>
<td> </td>
</tr>
<tr>
<td><a href="/method/premium.getUserBoosts">premium.getUserBoosts</a></td>
<td> </td>
</tr>
<tr>
<td><a href="/method/channels.toggleViewForumAsMessages">channels.toggleViewForumAsMessages</a></td>
<td> </td>
</tr>
<tr>
<td><a href="/method/messages.searchEmojiStickerSets">messages.searchEmojiStickerSets</a></td>
<td>Search for <a href="/api/custom-emoji">custom emoji stickersets »</a></td>
</tr>
<tr>
<td><a href="/method/channels.getChannelRecommendations">channels.getChannelRecommendations</a></td>
<td> </td>
</tr>
<tr>
<td><a href="/method/stats.getStoryStats">stats.getStoryStats</a></td>
<td>Get <a href="/api/stats">statistics</a> for a certain <a href="/api/stories">story</a>.</td>
</tr>
<tr>
<td><a href="/method/stats.getStoryPublicForwards">stats.getStoryPublicForwards</a></td>
<td>Obtain forwards of a <a href="/api/stories">story</a> as a message to public chats and reposts by public channels.</td>
</tr>
<tr>
<td><a href="/method/help.getPeerColors">help.getPeerColors</a></td>
<td>Get the set of <a href="/api/colors">accent color palettes »</a> that can be used for message accents.</td>
</tr>
<tr>
<td><a href="/method/help.getPeerProfileColors">help.getPeerProfileColors</a></td>
<td>Get the set of <a href="/api/colors">accent color palettes »</a> that can be used in profile page backgrounds.</td>
</tr>
</tbody>
</table></div>

View file

@ -53,9 +53,9 @@
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
<!-- start req_pq_multi -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 BC E9 0E 00 70 87 7B 65
0010 | 14 00 00 00 F1 8E 7E BE 48 18 19 9E 5C 2C 90 29
0020 | E8 89 4B 0B D5 DC 68 77</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 D4 0D 08 00 6A 6A 7C 65
0010 | 14 00 00 00 F1 8E 7E BE A3 F9 DF BC 14 FB 38 31
0020 | B9 1F 91 84 F5 17 A5 CB</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
<table class="table">
@ -77,7 +77,7 @@
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>BCE90E0070877B65</code></td>
<td><code>D40D08006A6A7C65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -95,7 +95,7 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4818199E5C2C9029E8894B0BD5DC6877</code></td>
<td><code>A3F9DFBC14FB3831B91F9184F517A5CB</code></td>
<td>Random number</td>
</tr>
</tbody>
@ -104,11 +104,11 @@
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
<!-- start resPQ -->
<p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 08 DD 83 70 87 7B 65
0010 | 70 00 00 00 63 24 16 05 48 18 19 9E 5C 2C 90 29
0020 | E8 89 4B 0B D5 DC 68 77 21 63 DE 11 E0 8D 2D 57
0030 | A8 BF 45 B5 09 21 F8 F9 08 21 84 3C 19 01 A8 7C
0040 | 41 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 B4 20 0C 6B 6A 7C 65
0010 | A4 00 00 00 63 24 16 05 A3 F9 DF BC 14 FB 38 31
0020 | B9 1F 91 84 F5 17 A5 CB 22 08 F3 18 07 8C 56 C7
0030 | 1F E3 AB 73 DC 6F 63 87 08 28 50 63 DF 5B 0F 88
0040 | 3B 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
0050 | 35 5F C3 0B 21 6B E8 6C 02 2B B4 C3 85 FD 64 DE
0060 | 85 1D 9D D0</code></pre>
<p>Payload (de)serialization:</p>
@ -132,13 +132,13 @@
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>0108DD8370877B65</code></td>
<td><code>01B4200C6B6A7C65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>70000000</code> (112 in decimal)</td>
<td><code>A4000000</code> (164 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4818199E5C2C9029E8894B0BD5DC6877</code></td>
<td><code>A3F9DFBC14FB3831B91F9184F517A5CB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>2163DE11E08D2D57A8BF45B50921F8F9</code></td>
<td><code>2208F318078C56C71FE3AB73DC6F6387</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>0821843C1901A87C41000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2415121378277096513</td>
<td><code>08285063DF5B0F883B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2904931570610571323</td>
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
</tr>
<tr>
@ -208,22 +208,22 @@
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p &lt; q.</h5>
<!-- start pq -->
<pre><code>pq = 2415121378277096513</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2415121378277096513 = 1407495223 * 1715900231</code></p>
<pre><code>p = 1407495223
q = 1715900231</code></pre>
<pre><code>pq = 2904931570610571323</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2904931570610571323 = 1477267739 * 1966421857</code></p>
<pre><code>p = 1477267739
q = 1966421857</code></pre>
<!-- end pq -->
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
<!-- start p_q_inner_data_dc -->
<p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 95 5F F5 A9 08 21 84 3C 19 01 A8 7C 41 00 00 00
0010 | 04 53 E4 AC 37 00 00 00 04 66 46 8F 47 00 00 00
0020 | 48 18 19 9E 5C 2C 90 29 E8 89 4B 0B D5 DC 68 77
0030 | 21 63 DE 11 E0 8D 2D 57 A8 BF 45 B5 09 21 F8 F9
0040 | 40 8B 78 A5 3C 89 B6 79 C2 21 EB AA C7 9F 11 58
0050 | CE C5 16 05 E9 AB A5 68 18 D0 8E 2C AD 7E C4 3E
<pre><code>0000 | 95 5F F5 A9 08 28 50 63 DF 5B 0F 88 3B 00 00 00
0010 | 04 58 0D 51 1B 00 00 00 04 75 35 37 61 00 00 00
0020 | A3 F9 DF BC 14 FB 38 31 B9 1F 91 84 F5 17 A5 CB
0030 | 22 08 F3 18 07 8C 56 C7 1F E3 AB 73 DC 6F 63 87
0040 | 8B B3 68 90 89 D5 01 20 41 BC 2B F1 33 42 04 0D
0050 | D0 22 74 8B 69 94 E4 5F BA 8D 05 4C 37 2A 17 1D
0060 | 02 00 00 00</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>p_q_inner_data_dc#a9f55f95 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data;</code></pre>
@ -246,37 +246,37 @@ q = 1715900231</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>0821843C1901A87C41000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2415121378277096513</td>
<td><code>08285063DF5B0F883B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2904931570610571323</td>
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>p</td>
<td>16, 8</td>
<td><code>0453E4AC37000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1407495223</td>
<td><code>04580D511B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1477267739</td>
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>q</td>
<td>24, 8</td>
<td><code>0466468F47000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1715900231</td>
<td><code>0475353761000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1966421857</td>
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>nonce</td>
<td>32, 16</td>
<td><code>4818199E5C2C9029E8894B0BD5DC6877</code></td>
<td><code>A3F9DFBC14FB3831B91F9184F517A5CB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>2163DE11E08D2D57A8BF45B50921F8F9</code></td>
<td><code>2208F318078C56C71FE3AB73DC6F6387</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>408B78A53C89B679C221EBAAC79F1158</code> <code>CEC51605E9ABA56818D08E2CAD7EC43E</code></td>
<td><code>8BB3689089D5012041BC2BF13342040D</code> <code>D022748B6994E45FBA8D054C372A171D</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1715900231</code></pre>
<p>The serialization of <em>P_Q_inner_data</em> produces <strong>data</strong>, which is used to generate <strong>encrypted_data</strong> as specified in <a href="/mtproto/auth_key">step 4.1</a>.<br>
These are the inputs to the algorithm specified in <a href="/mtproto/auth_key">step 4.1</a>:</p>
<!-- start p_q_inner_data_input -->
<pre><code>data = 955FF5A90821843C1901A87C410000000453E4AC370000000466468F470000004818199E5C2C9029E8894B0BD5DC68772163DE11E08D2D57A8BF45B50921F8F9408B78A53C89B679C221EBAAC79F1158CEC51605E9ABA56818D08E2CAD7EC43E02000000
random_padding_bytes = FC7FE25DCA34F6F776A62D270F12B49390B74D47CB5D762700D0EB0B1CFF80FAA086F815EB3A17D08A4D97CC4C254462C3E3178B174CA396D36894233C02854A516189341FA6E5A6CD17E341F7110F1534373DC251209E3D3E35F9BD</code></pre>
<pre><code>data = 955FF5A908285063DF5B0F883B00000004580D511B0000000475353761000000A3F9DFBC14FB3831B91F9184F517A5CB2208F318078C56C71FE3AB73DC6F63878BB3689089D5012041BC2BF13342040DD022748B6994E45FBA8D054C372A171D02000000
random_padding_bytes = A43148B960CD64D79815D35801672A3BA7EBF5071D371C0F11E57FAF7EE5D03BC4102CCC5D3010739086844CEA73B90C59B7F6E84F4B3A6AC4FE20119E582D61DEFABC672E934A412133DFDE64C30FE780F86C5EEFFE222F13235BB3</code></pre>
<!-- end p_q_inner_data_input -->
<p>And this is the output:</p>
<!-- start p_q_inner_data_output -->
<pre><code>encrypted_data = 360B4B89BD69432AEAD228B673E7588B601A3CB1181B4A3DC121020A50AEE9AC411912F33F6E3706A01F642CFEC900F65DBFC579C4D1DC8383EBED5A4C94F4814BEA615196A7607D283E52879437F4C9C6E4B7D9E203BB38DB07EAB2C170DB605C2825ADD7812CF97A7EB8E1A6C1EFBCBCA7349B524D16DB6773506A5521147FF791F52E4DE29846C9A12EAF6CC965B2B5221EA56E1CF5CE558ECEB777827EEDCF49C1083C19A2060CC5F7DAEC806E0BFC1EF4B9C3374A8ADE2802FB3CCDEE0426231B1D537389468AD1F53C93175EB112F1629880F71FFC1ED48BDF9EA219BC301279A0BC7BC9BC74237525A94C86B2E9B369B7D0D6EB7E4620E0D1738FBC27</code></pre>
<pre><code>encrypted_data = AC3ABFEEF3C664DF20ACC33131DC75A32414A12AC3085808CD18D260339C4742CECCD8CD9FB0C0062F64A55C28841CFB17AFDEA359A688A4205403205A2CA4B39341359E950DEF104D4CC32B259F9C379F8A87D8B4285F02E0FA5A551D68C246BB1CC85B73B690996605471BC3056ECB2520F07275F3ECDFF45CCAF90697DC8717CCB72C984EB0358CC07752C8C8F5A1E8C395D5EC8AB36EE8470B76043BC6AEA1CD4563A4EB0EE4E87C929B514E342D4D48FF9DEF500159BD6F1739EA0C8D021B7492B798C8F01C3FA6C003A9EBA9E49CF763E29553DF16685EC7E73CCC072394121DAB302309D2618B770A729B5A6D117D9F56DC7B58D1A79698FE309BF1D2</code></pre>
<!-- end p_q_inner_data_output -->
<p>The length of the final string is 256 bytes.</p>
<h5><a class="anchor" href="#5-send-req-dh-params-query-with-generated-encrypted-data" id="5-send-req-dh-params-query-with-generated-encrypted-data" name="5-send-req-dh-params-query-with-generated-encrypted-data"><i class="anchor-icon"></i></a>5) Send req_DH_params query with generated <code>encrypted_data</code></h5>
<!-- start req_DH_params -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C0 E9 0E 00 70 87 7B 65
0010 | 40 01 00 00 BE E4 12 D7 48 18 19 9E 5C 2C 90 29
0020 | E8 89 4B 0B D5 DC 68 77 21 63 DE 11 E0 8D 2D 57
0030 | A8 BF 45 B5 09 21 F8 F9 04 53 E4 AC 37 00 00 00
0040 | 04 66 46 8F 47 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 36 0B 4B 89 BD 69 43 2A EA D2 28 B6
0060 | 73 E7 58 8B 60 1A 3C B1 18 1B 4A 3D C1 21 02 0A
0070 | 50 AE E9 AC 41 19 12 F3 3F 6E 37 06 A0 1F 64 2C
0080 | FE C9 00 F6 5D BF C5 79 C4 D1 DC 83 83 EB ED 5A
0090 | 4C 94 F4 81 4B EA 61 51 96 A7 60 7D 28 3E 52 87
00A0 | 94 37 F4 C9 C6 E4 B7 D9 E2 03 BB 38 DB 07 EA B2
00B0 | C1 70 DB 60 5C 28 25 AD D7 81 2C F9 7A 7E B8 E1
00C0 | A6 C1 EF BC BC A7 34 9B 52 4D 16 DB 67 73 50 6A
00D0 | 55 21 14 7F F7 91 F5 2E 4D E2 98 46 C9 A1 2E AF
00E0 | 6C C9 65 B2 B5 22 1E A5 6E 1C F5 CE 55 8E CE B7
00F0 | 77 82 7E ED CF 49 C1 08 3C 19 A2 06 0C C5 F7 DA
0100 | EC 80 6E 0B FC 1E F4 B9 C3 37 4A 8A DE 28 02 FB
0110 | 3C CD EE 04 26 23 1B 1D 53 73 89 46 8A D1 F5 3C
0120 | 93 17 5E B1 12 F1 62 98 80 F7 1F FC 1E D4 8B DF
0130 | 9E A2 19 BC 30 12 79 A0 BC 7B C9 BC 74 23 75 25
0140 | A9 4C 86 B2 E9 B3 69 B7 D0 D6 EB 7E 46 20 E0 D1
0150 | 73 8F BC 27</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C0 86 06 00 6B 6A 7C 65
0010 | 40 01 00 00 BE E4 12 D7 A3 F9 DF BC 14 FB 38 31
0020 | B9 1F 91 84 F5 17 A5 CB 22 08 F3 18 07 8C 56 C7
0030 | 1F E3 AB 73 DC 6F 63 87 04 58 0D 51 1B 00 00 00
0040 | 04 75 35 37 61 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 AC 3A BF EE F3 C6 64 DF 20 AC C3 31
0060 | 31 DC 75 A3 24 14 A1 2A C3 08 58 08 CD 18 D2 60
0070 | 33 9C 47 42 CE CC D8 CD 9F B0 C0 06 2F 64 A5 5C
0080 | 28 84 1C FB 17 AF DE A3 59 A6 88 A4 20 54 03 20
0090 | 5A 2C A4 B3 93 41 35 9E 95 0D EF 10 4D 4C C3 2B
00A0 | 25 9F 9C 37 9F 8A 87 D8 B4 28 5F 02 E0 FA 5A 55
00B0 | 1D 68 C2 46 BB 1C C8 5B 73 B6 90 99 66 05 47 1B
00C0 | C3 05 6E CB 25 20 F0 72 75 F3 EC DF F4 5C CA F9
00D0 | 06 97 DC 87 17 CC B7 2C 98 4E B0 35 8C C0 77 52
00E0 | C8 C8 F5 A1 E8 C3 95 D5 EC 8A B3 6E E8 47 0B 76
00F0 | 04 3B C6 AE A1 CD 45 63 A4 EB 0E E4 E8 7C 92 9B
0100 | 51 4E 34 2D 4D 48 FF 9D EF 50 01 59 BD 6F 17 39
0110 | EA 0C 8D 02 1B 74 92 B7 98 C8 F0 1C 3F A6 C0 03
0120 | A9 EB A9 E4 9C F7 63 E2 95 53 DF 16 68 5E C7 E7
0130 | 3C CC 07 23 94 12 1D AB 30 23 09 D2 61 8B 77 0A
0140 | 72 9B 5A 6D 11 7D 9F 56 DC 7B 58 D1 A7 96 98 FE
0150 | 30 9B F1 D2</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;</code></pre>
<table class="table">
@ -345,7 +345,7 @@ random_padding_bytes = FC7FE25DCA34F6F776A62D270F12B49390B74D47CB5D762700D0EB0B1
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>C0E90E0070877B65</code></td>
<td><code>C08606006B6A7C65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -363,25 +363,25 @@ random_padding_bytes = FC7FE25DCA34F6F776A62D270F12B49390B74D47CB5D762700D0EB0B1
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4818199E5C2C9029E8894B0BD5DC6877</code></td>
<td><code>A3F9DFBC14FB3831B91F9184F517A5CB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>2163DE11E08D2D57A8BF45B50921F8F9</code></td>
<td><code>2208F318078C56C71FE3AB73DC6F6387</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>0453E4AC37000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1407495223</td>
<td><code>04580D511B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1477267739</td>
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
<td>q</td>
<td>64, 8</td>
<td><code>0466468F47000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1715900231</td>
<td><code>0475353761000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1966421857</td>
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
</tr>
<tr>
@ -393,7 +393,7 @@ random_padding_bytes = FC7FE25DCA34F6F776A62D270F12B49390B74D47CB5D762700D0EB0B1
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE000100360B4B89BD69432AEAD228B6</code> <code>73E7588B601A3CB1181B4A3DC121020A</code> <code>50AEE9AC411912F33F6E3706A01F642C</code> <code>FEC900F65DBFC579C4D1DC8383EBED5A</code> <code>4C94F4814BEA615196A7607D283E5287</code> <code>9437F4C9C6E4B7D9E203BB38DB07EAB2</code> <code>C170DB605C2825ADD7812CF97A7EB8E1</code> <code>A6C1EFBCBCA7349B524D16DB6773506A</code> <code>5521147FF791F52E4DE29846C9A12EAF</code> <code>6CC965B2B5221EA56E1CF5CE558ECEB7</code> <code>77827EEDCF49C1083C19A2060CC5F7DA</code> <code>EC806E0BFC1EF4B9C3374A8ADE2802FB</code> <code>3CCDEE0426231B1D537389468AD1F53C</code> <code>93175EB112F1629880F71FFC1ED48BDF</code> <code>9EA219BC301279A0BC7BC9BC74237525</code> <code>A94C86B2E9B369B7D0D6EB7E4620E0D1</code><br> <code>738FBC27</code></td>
<td><code>FE000100AC3ABFEEF3C664DF20ACC331</code> <code>31DC75A32414A12AC3085808CD18D260</code> <code>339C4742CECCD8CD9FB0C0062F64A55C</code> <code>28841CFB17AFDEA359A688A420540320</code> <code>5A2CA4B39341359E950DEF104D4CC32B</code> <code>259F9C379F8A87D8B4285F02E0FA5A55</code> <code>1D68C246BB1CC85B73B690996605471B</code> <code>C3056ECB2520F07275F3ECDFF45CCAF9</code> <code>0697DC8717CCB72C984EB0358CC07752</code> <code>C8C8F5A1E8C395D5EC8AB36EE8470B76</code> <code>043BC6AEA1CD4563A4EB0EE4E87C929B</code> <code>514E342D4D48FF9DEF500159BD6F1739</code> <code>EA0C8D021B7492B798C8F01C3FA6C003</code> <code>A9EBA9E49CF763E29553DF16685EC7E7</code> <code>3CCC072394121DAB302309D2618B770A</code> <code>729B5A6D117D9F56DC7B58D1A79698FE</code><br> <code>309BF1D2</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = FC7FE25DCA34F6F776A62D270F12B49390B74D47CB5D762700D0EB0B1
<h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5>
<!-- start server_DH_params_ok -->
<p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C0 0D 4C 71 87 7B 65
0010 | 7C 02 00 00 5C 07 E8 D0 48 18 19 9E 5C 2C 90 29
0020 | E8 89 4B 0B D5 DC 68 77 21 63 DE 11 E0 8D 2D 57
0030 | A8 BF 45 B5 09 21 F8 F9 FE 50 02 00 F0 D0 8A 47
0040 | 22 FF 05 36 FE 0D 0E 80 20 11 96 F1 1B 6D B2 DE
0050 | 79 7A 95 A0 B6 BE 47 BC 61 DE 85 5D AF 73 85 83
0060 | 35 29 20 FD 79 C6 49 61 41 29 CB 11 86 46 38 E7
0070 | CD 7C 81 E6 23 0B 96 B1 AF 97 9A 47 81 83 7A D9
0080 | 8A 03 CC 2A 06 38 C1 ED 76 4F 6B C8 46 0D 55 7E
0090 | 2C 07 B1 D7 E4 21 23 43 A0 7E 1E 2A B6 EA 56 1C
00A0 | 47 6C C4 A3 D2 BF 61 CD 1A 3E 40 18 2D AE B5 C4
00B0 | B6 BA B7 01 01 D6 D7 B2 F6 BF 27 F4 C2 F7 30 D6
00C0 | 94 0E E8 4D 10 4A 63 7C EA 1F 65 AE 2C 5C 43 2E
00D0 | F7 36 A2 1C 97 FF D6 61 D9 0B 82 56 10 DC 54 DB
00E0 | AC 19 E7 C2 76 F2 3D B2 F3 9E 88 9D E2 2D DF C4
00F0 | C5 D6 42 D8 E3 07 88 6C F3 B0 9A F0 0E 26 D9 39
0100 | 8A 40 4C 10 AF 42 22 F4 31 AC E2 28 EE 70 96 BE
0110 | 5E 5C 6B 1E 6C 82 89 7E D3 E0 94 FB CD 38 E6 95
0120 | D9 BA 71 5B 98 8A 76 E1 8B 02 A5 3C 6D 45 8E 3B
0130 | A1 8A 67 65 7E F2 26 B3 F6 6E 13 99 B0 93 F1 6C
0140 | CD 27 4A 86 C7 94 86 93 73 D6 C1 B9 07 9D E7 D1
0150 | 06 B0 75 D5 FD 9A 9B 81 B8 3D 63 9E 8F 75 37 40
0160 | 07 F0 21 3C 2B 19 02 95 B9 4D D8 90 6C BB 9A C4
0170 | C1 04 B9 9C F9 5B A9 55 64 FA EE 23 A0 A2 F6 3A
0180 | 01 E6 CD 5B 23 0B 59 B7 A2 9F AA 95 04 D8 38 0F
0190 | 50 D2 D9 C4 7A 97 1F 22 9A B0 8F C1 1C 41 2E 38
01A0 | ED A7 C0 09 53 31 5A 3F 07 4E 3C 92 37 CC EF BF
01B0 | 5B 0E 09 15 C2 15 41 DA B5 D5 DA 2C A2 0F 1F 32
01C0 | 02 DF 6E 8C D0 FB 73 83 C8 32 00 5A 3F A5 5A B3
01D0 | 0C B0 A3 E3 E6 5C 8C BF EF 6E A4 C1 EE 9F EE F0
01E0 | B3 DB F6 FA 61 33 21 58 86 4C 65 5A 00 EC CA F5
01F0 | 40 3D 71 AA 29 0D D7 09 CB AF D2 E8 E3 0B 98 A3
0200 | F6 A7 96 74 4F B9 F0 8A 97 A0 67 4F 3B A6 F3 81
0210 | 49 15 01 FA E7 E1 55 DB 22 28 F7 DB 00 C8 B9 7E
0220 | 70 34 C7 B8 78 C0 9C 52 E5 90 78 5B AE DF B3 05
0230 | 75 BA 43 B8 5F 9B 3D 17 15 C0 CC 58 85 80 AB 01
0240 | 30 B8 B1 9F 3B B5 96 5D 69 2B BE 51 E0 2F 36 71
0250 | 37 16 09 93 1B 11 DE EC 45 1B D9 D8 95 A5 BC CE
0260 | D7 AB 08 60 3F C0 A5 55 27 6B 77 38 62 77 B5 C9
0270 | 74 95 4C 43 D8 75 6A F9 6C 4F 93 84 C2 A4 1B A3
0280 | C7 E8 EB 07 D1 95 51 DA 87 FF 63 65</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 B0 1F B8 6B 6A 7C 65
0010 | AC 02 00 00 5C 07 E8 D0 A3 F9 DF BC 14 FB 38 31
0020 | B9 1F 91 84 F5 17 A5 CB 22 08 F3 18 07 8C 56 C7
0030 | 1F E3 AB 73 DC 6F 63 87 FE 50 02 00 24 AA 35 C7
0040 | F4 85 84 C7 3B A0 B1 FF FE 29 A6 49 98 C6 55 48
0050 | A4 CE D7 54 04 8B A1 20 90 7A DB 95 9C 37 D9 14
0060 | C2 B8 F4 5F FE AA 4B 35 02 CF 9F 65 BD CD 4F 52
0070 | BA B6 69 0B C0 5C BE A8 29 B4 90 46 63 65 6E 7A
0080 | 5A 35 DE E6 DD F6 91 9B 29 FB AF F0 9E 07 2D 44
0090 | E4 49 22 90 23 C2 AF 2B E0 DF B9 F3 3D A0 C6 9F
00A0 | 84 32 82 00 F3 1B 86 9E D6 62 95 D5 D6 66 E0 B7
00B0 | 8D 89 4B 9B 14 B6 0B 85 40 36 D9 08 64 00 9A 68
00C0 | 54 DC 27 8E 40 35 12 C1 6B A8 36 99 11 34 CD A5
00D0 | C5 48 DF 56 19 3A 54 82 FD 8A 7F 5B F2 0B 56 AF
00E0 | 05 D2 C0 20 1E C8 00 0E 34 6B 37 1C DF 44 82 D0
00F0 | 97 66 39 28 01 8D 7C 75 C0 4B 0C C2 BE 39 53 34
0100 | 4D 87 B9 FD 7D C2 44 3B EC CD 79 B5 EE 53 54 2A
0110 | D0 17 15 D7 E3 29 DC F9 AE 4F 11 F1 EC AB F7 B1
0120 | 86 0A 3F 97 A3 5F 53 96 84 84 CA EF C2 8C 0E D0
0130 | EC 26 19 29 43 BB A7 EC B1 C8 84 D4 38 21 C8 71
0140 | C1 C8 A8 74 E4 E4 91 70 B5 73 FA 52 AA 27 78 BD
0150 | 1A CE 8E 46 4F 1B C8 FC CE ED A5 5F 2D 2A 26 64
0160 | 24 0D 74 2E 11 E9 39 57 1F C5 24 70 97 81 D1 37
0170 | 5D DC 8F 5F 0F C0 7F DA D8 3A 5A 84 F9 A7 F3 C1
0180 | 81 98 05 5F 8E E6 4E BA 19 37 5C F6 57 76 47 8E
0190 | 25 80 D4 4F 2A C4 20 19 71 D2 5C F6 EC C7 6C DB
01A0 | 45 A7 E4 CC FB 11 C2 4A E8 2A B5 5F E6 35 C0 8C
01B0 | 07 4F 83 0F A8 E7 FC 9E 8B 1A BC DE C6 AC F9 24
01C0 | E2 AB DB 8E EA 23 44 81 0E 8C 9F 8F 0F 2D 8A C1
01D0 | D4 97 BD 43 35 E6 DA B0 86 38 2A 5D E6 53 E7 57
01E0 | 0B 16 68 DF 02 8F D1 FE 93 CD D4 5A D0 E0 46 3A
01F0 | 70 E3 7B 2F 0B 66 D2 99 73 8E 3E 6A 06 41 4B B9
0200 | 17 DF FC E2 EA CE A9 3B 24 D3 38 2E 6D 21 D3 13
0210 | DB 38 A3 2D 0D FD C0 65 0A 17 85 9F 4C 5E C3 60
0220 | 9F 24 85 3B 5A C2 C7 FE 21 13 AE 12 76 64 FE 15
0230 | 96 D8 8F 0C 3E DD EB 9E C6 F3 50 00 B9 8E 45 4F
0240 | 63 9C 00 BE A9 7A 5F BA 1A 81 0D 3E F6 EB 18 CD
0250 | 11 44 A2 01 DE 48 51 28 D2 93 75 8F 08 B6 7D B5
0260 | 0B 77 41 6B E9 60 80 C1 A2 14 20 4E F1 09 4B 58
0270 | BC 12 85 66 E4 0F AA 33 2E 31 F8 1D 50 2E 48 DF
0280 | 47 49 87 2A CE DD DB 1A D8 00 D0 F5</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
<table class="table">
@ -464,13 +464,13 @@ random_padding_bytes = FC7FE25DCA34F6F776A62D270F12B49390B74D47CB5D762700D0EB0B1
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01C00D4C71877B65</code></td>
<td><code>01B01FB86B6A7C65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>7C020000</code> (636 in decimal)</td>
<td><code>AC020000</code> (684 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = FC7FE25DCA34F6F776A62D270F12B49390B74D47CB5D762700D0EB0B1
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4818199E5C2C9029E8894B0BD5DC6877</code></td>
<td><code>A3F9DFBC14FB3831B91F9184F517A5CB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>2163DE11E08D2D57A8BF45B50921F8F9</code></td>
<td><code>2208F318078C56C71FE3AB73DC6F6387</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200F0D08A4722FF0536FE0D0E80</code> <code>201196F11B6DB2DE797A95A0B6BE47BC</code> <code>61DE855DAF738583352920FD79C64961</code> <code>4129CB11864638E7CD7C81E6230B96B1</code> <code>AF979A4781837AD98A03CC2A0638C1ED</code> <code>764F6BC8460D557E2C07B1D7E4212343</code> <code>A07E1E2AB6EA561C476CC4A3D2BF61CD</code> <code>1A3E40182DAEB5C4B6BAB70101D6D7B2</code> <code>F6BF27F4C2F730D6940EE84D104A637C</code> <code>EA1F65AE2C5C432EF736A21C97FFD661</code> <code>D90B825610DC54DBAC19E7C276F23DB2</code> <code>F39E889DE22DDFC4C5D642D8E307886C</code> <code>F3B09AF00E26D9398A404C10AF4222F4</code> <code>31ACE228EE7096BE5E5C6B1E6C82897E</code> <code>D3E094FBCD38E695D9BA715B988A76E1</code> <code>8B02A53C6D458E3BA18A67657EF226B3</code> <code>F66E1399B093F16CCD274A86C7948693</code> <code>73D6C1B9079DE7D106B075D5FD9A9B81</code> <code>B83D639E8F75374007F0213C2B190295</code> <code>B94DD8906CBB9AC4C104B99CF95BA955</code> <code>64FAEE23A0A2F63A01E6CD5B230B59B7</code> <code>A29FAA9504D8380F50D2D9C47A971F22</code> <code>9AB08FC11C412E38EDA7C00953315A3F</code> <code>074E3C9237CCEFBF5B0E0915C21541DA</code> <code>B5D5DA2CA20F1F3202DF6E8CD0FB7383</code> <code>C832005A3FA55AB30CB0A3E3E65C8CBF</code> <code>EF6EA4C1EE9FEEF0B3DBF6FA61332158</code> <code>864C655A00ECCAF5403D71AA290DD709</code> <code>CBAFD2E8E30B98A3F6A796744FB9F08A</code> <code>97A0674F3BA6F381491501FAE7E155DB</code> <code>2228F7DB00C8B97E7034C7B878C09C52</code> <code>E590785BAEDFB30575BA43B85F9B3D17</code> <code>15C0CC588580AB0130B8B19F3BB5965D</code> <code>692BBE51E02F3671371609931B11DEEC</code> <code>451BD9D895A5BCCED7AB08603FC0A555</code> <code>276B77386277B5C974954C43D8756AF9</code> <code>6C4F9384C2A41BA3C7E8EB07D19551DA</code><br> <code>87FF6365</code></td>
<td><code>FE50020024AA35C7F48584C73BA0B1FF</code> <code>FE29A64998C65548A4CED754048BA120</code> <code>907ADB959C37D914C2B8F45FFEAA4B35</code> <code>02CF9F65BDCD4F52BAB6690BC05CBEA8</code> <code>29B4904663656E7A5A35DEE6DDF6919B</code> <code>29FBAFF09E072D44E449229023C2AF2B</code> <code>E0DFB9F33DA0C69F84328200F31B869E</code> <code>D66295D5D666E0B78D894B9B14B60B85</code> <code>4036D90864009A6854DC278E403512C1</code> <code>6BA836991134CDA5C548DF56193A5482</code> <code>FD8A7F5BF20B56AF05D2C0201EC8000E</code> <code>346B371CDF4482D097663928018D7C75</code> <code>C04B0CC2BE3953344D87B9FD7DC2443B</code> <code>ECCD79B5EE53542AD01715D7E329DCF9</code> <code>AE4F11F1ECABF7B1860A3F97A35F5396</code> <code>8484CAEFC28C0ED0EC26192943BBA7EC</code> <code>B1C884D43821C871C1C8A874E4E49170</code> <code>B573FA52AA2778BD1ACE8E464F1BC8FC</code> <code>CEEDA55F2D2A2664240D742E11E93957</code> <code>1FC524709781D1375DDC8F5F0FC07FDA</code> <code>D83A5A84F9A7F3C18198055F8EE64EBA</code> <code>19375CF65776478E2580D44F2AC42019</code> <code>71D25CF6ECC76CDB45A7E4CCFB11C24A</code> <code>E82AB55FE635C08C074F830FA8E7FC9E</code> <code>8B1ABCDEC6ACF924E2ABDB8EEA234481</code> <code>0E8C9F8F0F2D8AC1D497BD4335E6DAB0</code> <code>86382A5DE653E7570B1668DF028FD1FE</code> <code>93CDD45AD0E0463A70E37B2F0B66D299</code> <code>738E3E6A06414BB917DFFCE2EACEA93B</code> <code>24D3382E6D21D313DB38A32D0DFDC065</code> <code>0A17859F4C5EC3609F24853B5AC2C7FE</code> <code>2113AE127664FE1596D88F0C3EDDEB9E</code> <code>C6F35000B98E454F639C00BEA97A5FBA</code> <code>1A810D3EF6EB18CD1144A201DE485128</code> <code>D293758F08B67DB50B77416BE96080C1</code> <code>A214204EF1094B58BC128566E40FAA33</code> <code>2E31F81D502E48DF4749872ACEDDDB1A</code><br> <code>D800D0F5</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = FC7FE25DCA34F6F776A62D270F12B49390B74D47CB5D762700D0EB0B1
<!-- end server_DH_params_ok -->
<p>Decrypt <code>encrypted_answer</code> using the reverse of the process specified in <a href="/mtproto/auth_key#6-server-responds-with">step 6</a>:</p>
<!-- start server_DH_inner_data_input -->
<pre><code>encrypted_answer = F0D08A4722FF0536FE0D0E80201196F11B6DB2DE797A95A0B6BE47BC61DE855DAF738583352920FD79C649614129CB11864638E7CD7C81E6230B96B1AF979A4781837AD98A03CC2A0638C1ED764F6BC8460D557E2C07B1D7E4212343A07E1E2AB6EA561C476CC4A3D2BF61CD1A3E40182DAEB5C4B6BAB70101D6D7B2F6BF27F4C2F730D6940EE84D104A637CEA1F65AE2C5C432EF736A21C97FFD661D90B825610DC54DBAC19E7C276F23DB2F39E889DE22DDFC4C5D642D8E307886CF3B09AF00E26D9398A404C10AF4222F431ACE228EE7096BE5E5C6B1E6C82897ED3E094FBCD38E695D9BA715B988A76E18B02A53C6D458E3BA18A67657EF226B3F66E1399B093F16CCD274A86C794869373D6C1B9079DE7D106B075D5FD9A9B81B83D639E8F75374007F0213C2B190295B94DD8906CBB9AC4C104B99CF95BA95564FAEE23A0A2F63A01E6CD5B230B59B7A29FAA9504D8380F50D2D9C47A971F229AB08FC11C412E38EDA7C00953315A3F074E3C9237CCEFBF5B0E0915C21541DAB5D5DA2CA20F1F3202DF6E8CD0FB7383C832005A3FA55AB30CB0A3E3E65C8CBFEF6EA4C1EE9FEEF0B3DBF6FA61332158864C655A00ECCAF5403D71AA290DD709CBAFD2E8E30B98A3F6A796744FB9F08A97A0674F3BA6F381491501FAE7E155DB2228F7DB00C8B97E7034C7B878C09C52E590785BAEDFB30575BA43B85F9B3D1715C0CC588580AB0130B8B19F3BB5965D692BBE51E02F3671371609931B11DEEC451BD9D895A5BCCED7AB08603FC0A555276B77386277B5C974954C43D8756AF96C4F9384C2A41BA3C7E8EB07D19551DA87FF6365
tmp_aes_key = EFEE3DDE87871EE456FFE7D49BDDFC35B6A602DCD88104DE3B916E7B78D9B0C5
tmp_aes_iv = 78AA7B8D5CAF102BF3DBF0B6CD90720A6FDF35903B4A8448368D1587408B78A5</code></pre>
<pre><code>encrypted_answer = 24AA35C7F48584C73BA0B1FFFE29A64998C65548A4CED754048BA120907ADB959C37D914C2B8F45FFEAA4B3502CF9F65BDCD4F52BAB6690BC05CBEA829B4904663656E7A5A35DEE6DDF6919B29FBAFF09E072D44E449229023C2AF2BE0DFB9F33DA0C69F84328200F31B869ED66295D5D666E0B78D894B9B14B60B854036D90864009A6854DC278E403512C16BA836991134CDA5C548DF56193A5482FD8A7F5BF20B56AF05D2C0201EC8000E346B371CDF4482D097663928018D7C75C04B0CC2BE3953344D87B9FD7DC2443BECCD79B5EE53542AD01715D7E329DCF9AE4F11F1ECABF7B1860A3F97A35F53968484CAEFC28C0ED0EC26192943BBA7ECB1C884D43821C871C1C8A874E4E49170B573FA52AA2778BD1ACE8E464F1BC8FCCEEDA55F2D2A2664240D742E11E939571FC524709781D1375DDC8F5F0FC07FDAD83A5A84F9A7F3C18198055F8EE64EBA19375CF65776478E2580D44F2AC4201971D25CF6ECC76CDB45A7E4CCFB11C24AE82AB55FE635C08C074F830FA8E7FC9E8B1ABCDEC6ACF924E2ABDB8EEA2344810E8C9F8F0F2D8AC1D497BD4335E6DAB086382A5DE653E7570B1668DF028FD1FE93CDD45AD0E0463A70E37B2F0B66D299738E3E6A06414BB917DFFCE2EACEA93B24D3382E6D21D313DB38A32D0DFDC0650A17859F4C5EC3609F24853B5AC2C7FE2113AE127664FE1596D88F0C3EDDEB9EC6F35000B98E454F639C00BEA97A5FBA1A810D3EF6EB18CD1144A201DE485128D293758F08B67DB50B77416BE96080C1A214204EF1094B58BC128566E40FAA332E31F81D502E48DF4749872ACEDDDB1AD800D0F5
tmp_aes_key = EB56B5D7AE697745E5572776F1075214F9206AD96DBDADF4E293175DDB0530BB
tmp_aes_iv = EF2C8E5C6AC6B536278D043D7738E00CB5D4179AD995A4B22FC488D78BB36890</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = F9BD98069687178F2F1C67C205DE9E858EE691FEBA0D89B54818199E5C2C9029E8894B0BD5DC68772163DE11E08D2D57A8BF45B50921F8F903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100BEEA8F4FA6CD228E02ED03752538DD1B13AF61A1A38A281493D0239E2794D323CC95812974E782DFAA060B5D185FEBA4EA142759FC8EF4915D456D3C4085EE262E28027569FD5440D0D6108604454FC236A7141DEDF3AFFC9E6E3CFF43D9C9B56579E71BF3B5B2900D7CDBCE7F00EEC964218769737E1C6FE8036AB36F0FD5467E39EEE972AA4C246B265B76617F7D235C0BA43EE6149B4413F8F05E9D03AAF49F6A3F256F5B84AB5ECF210226F47BBFF1E47069BC1D296BF374811BFAE88AD65E9122EB7E8F503C17C4C0489A1A30B569F90EDAD26C318FDBA389E931F5182AEC21733FC8A664DC6231E9B8381306D34B0EF7EC1D1985DA1066B97FB8FEADF771877B65E0E1CD79A6DF0D6E
answer = BA0D89B54818199E5C2C9029E8894B0BD5DC68772163DE11E08D2D57A8BF45B50921F8F903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100BEEA8F4FA6CD228E02ED03752538DD1B13AF61A1A38A281493D0239E2794D323CC95812974E782DFAA060B5D185FEBA4EA142759FC8EF4915D456D3C4085EE262E28027569FD5440D0D6108604454FC236A7141DEDF3AFFC9E6E3CFF43D9C9B56579E71BF3B5B2900D7CDBCE7F00EEC964218769737E1C6FE8036AB36F0FD5467E39EEE972AA4C246B265B76617F7D235C0BA43EE6149B4413F8F05E9D03AAF49F6A3F256F5B84AB5ECF210226F47BBFF1E47069BC1D296BF374811BFAE88AD65E9122EB7E8F503C17C4C0489A1A30B569F90EDAD26C318FDBA389E931F5182AEC21733FC8A664DC6231E9B8381306D34B0EF7EC1D1985DA1066B97FB8FEADF771877B65E0E1CD79A6DF0D6E</code></pre>
<pre><code>answer_with_hash = 60B194F5C0A3149F83DBFDD68CF8DD4AB20D0373BA0D89B5A3F9DFBC14FB3831B91F9184F517A5CB2208F318078C56C71FE3AB73DC6F638703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001001C87879FA90D4C306CE54CEC83751A31E8C660B69278DCCE85B4F0ACEBA6C5E9B9782C6D8EF7A02C34935B3C802BCA7403DF7D08F01830FEF4725D7FB68B35422E277E28402F056ECCC8F16BEDD5AE45E24BF278F4A212481AE67C8F215A6CAF63B0381B31775A1B1AB8AC8F79394AE0FD9DF026E2687A4328D60CD31B5C91D2AF4F1FC79000129F1685CFBBFA25E2F122313D9EFE6A63D74E8B12200A1B11A44B5EA52A5FA1C5C05CFC4083FC5C0D99E8199B85574504460731D89F5DB7DE1054A8BA49D1A4639E923812CB95F397C5589F4BCA8F33ECAA28ED1FC31D9293AFA1CB0763A8ECBF85804DF3C3E9C5F21357DCFD8FBB23541443B48A2FA2A791406B6A7C65933B1E4043D8E02A
answer = BA0D89B5A3F9DFBC14FB3831B91F9184F517A5CB2208F318078C56C71FE3AB73DC6F638703000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001001C87879FA90D4C306CE54CEC83751A31E8C660B69278DCCE85B4F0ACEBA6C5E9B9782C6D8EF7A02C34935B3C802BCA7403DF7D08F01830FEF4725D7FB68B35422E277E28402F056ECCC8F16BEDD5AE45E24BF278F4A212481AE67C8F215A6CAF63B0381B31775A1B1AB8AC8F79394AE0FD9DF026E2687A4328D60CD31B5C91D2AF4F1FC79000129F1685CFBBFA25E2F122313D9EFE6A63D74E8B12200A1B11A44B5EA52A5FA1C5C05CFC4083FC5C0D99E8199B85574504460731D89F5DB7DE1054A8BA49D1A4639E923812CB95F397C5589F4BCA8F33ECAA28ED1FC31D9293AFA1CB0763A8ECBF85804DF3C3E9C5F21357DCFD8FBB23541443B48A2FA2A791406B6A7C65933B1E4043D8E02A</code></pre>
<!-- end server_DH_inner_data_output -->
<!-- start server_DH_inner_data -->
<p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | BA 0D 89 B5 48 18 19 9E 5C 2C 90 29 E8 89 4B 0B
0010 | D5 DC 68 77 21 63 DE 11 E0 8D 2D 57 A8 BF 45 B5
0020 | 09 21 F8 F9 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 A3 F9 DF BC 14 FB 38 31 B9 1F 91 84
0010 | F5 17 A5 CB 22 08 F3 18 07 8C 56 C7 1F E3 AB 73
0020 | DC 6F 63 87 03 00 00 00 FE 00 01 00 C7 1C AE B9
0030 | C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23
0040 | 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A
0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E
@ -532,23 +532,23 @@ answer = BA0D89B54818199E5C2C9029E8894B0BD5DC68772163DE11E08D2D57A8BF45B50921F8F
0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6
0110 | 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0
0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
0130 | BE EA 8F 4F A6 CD 22 8E 02 ED 03 75 25 38 DD 1B
0140 | 13 AF 61 A1 A3 8A 28 14 93 D0 23 9E 27 94 D3 23
0150 | CC 95 81 29 74 E7 82 DF AA 06 0B 5D 18 5F EB A4
0160 | EA 14 27 59 FC 8E F4 91 5D 45 6D 3C 40 85 EE 26
0170 | 2E 28 02 75 69 FD 54 40 D0 D6 10 86 04 45 4F C2
0180 | 36 A7 14 1D ED F3 AF FC 9E 6E 3C FF 43 D9 C9 B5
0190 | 65 79 E7 1B F3 B5 B2 90 0D 7C DB CE 7F 00 EE C9
01A0 | 64 21 87 69 73 7E 1C 6F E8 03 6A B3 6F 0F D5 46
01B0 | 7E 39 EE E9 72 AA 4C 24 6B 26 5B 76 61 7F 7D 23
01C0 | 5C 0B A4 3E E6 14 9B 44 13 F8 F0 5E 9D 03 AA F4
01D0 | 9F 6A 3F 25 6F 5B 84 AB 5E CF 21 02 26 F4 7B BF
01E0 | F1 E4 70 69 BC 1D 29 6B F3 74 81 1B FA E8 8A D6
01F0 | 5E 91 22 EB 7E 8F 50 3C 17 C4 C0 48 9A 1A 30 B5
0200 | 69 F9 0E DA D2 6C 31 8F DB A3 89 E9 31 F5 18 2A
0210 | EC 21 73 3F C8 A6 64 DC 62 31 E9 B8 38 13 06 D3
0220 | 4B 0E F7 EC 1D 19 85 DA 10 66 B9 7F B8 FE AD F7
0230 | 71 87 7B 65</code></pre>
0130 | 1C 87 87 9F A9 0D 4C 30 6C E5 4C EC 83 75 1A 31
0140 | E8 C6 60 B6 92 78 DC CE 85 B4 F0 AC EB A6 C5 E9
0150 | B9 78 2C 6D 8E F7 A0 2C 34 93 5B 3C 80 2B CA 74
0160 | 03 DF 7D 08 F0 18 30 FE F4 72 5D 7F B6 8B 35 42
0170 | 2E 27 7E 28 40 2F 05 6E CC C8 F1 6B ED D5 AE 45
0180 | E2 4B F2 78 F4 A2 12 48 1A E6 7C 8F 21 5A 6C AF
0190 | 63 B0 38 1B 31 77 5A 1B 1A B8 AC 8F 79 39 4A E0
01A0 | FD 9D F0 26 E2 68 7A 43 28 D6 0C D3 1B 5C 91 D2
01B0 | AF 4F 1F C7 90 00 12 9F 16 85 CF BB FA 25 E2 F1
01C0 | 22 31 3D 9E FE 6A 63 D7 4E 8B 12 20 0A 1B 11 A4
01D0 | 4B 5E A5 2A 5F A1 C5 C0 5C FC 40 83 FC 5C 0D 99
01E0 | E8 19 9B 85 57 45 04 46 07 31 D8 9F 5D B7 DE 10
01F0 | 54 A8 BA 49 D1 A4 63 9E 92 38 12 CB 95 F3 97 C5
0200 | 58 9F 4B CA 8F 33 EC AA 28 ED 1F C3 1D 92 93 AF
0210 | A1 CB 07 63 A8 EC BF 85 80 4D F3 C3 E9 C5 F2 13
0220 | 57 DC FD 8F BB 23 54 14 43 B4 8A 2F A2 A7 91 40
0230 | 6B 6A 7C 65</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
<table class="table">
@ -570,13 +570,13 @@ answer = BA0D89B54818199E5C2C9029E8894B0BD5DC68772163DE11E08D2D57A8BF45B50921F8F
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>4818199E5C2C9029E8894B0BD5DC6877</code></td>
<td><code>A3F9DFBC14FB3831B91F9184F517A5CB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>2163DE11E08D2D57A8BF45B50921F8F9</code></td>
<td><code>2208F318078C56C71FE3AB73DC6F6387</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B54818199E5C2C9029E8894B0BD5DC68772163DE11E08D2D57A8BF45B50921F8F
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE000100BEEA8F4FA6CD228E02ED0375</code> <code>2538DD1B13AF61A1A38A281493D0239E</code> <code>2794D323CC95812974E782DFAA060B5D</code> <code>185FEBA4EA142759FC8EF4915D456D3C</code> <code>4085EE262E28027569FD5440D0D61086</code> <code>04454FC236A7141DEDF3AFFC9E6E3CFF</code> <code>43D9C9B56579E71BF3B5B2900D7CDBCE</code> <code>7F00EEC964218769737E1C6FE8036AB3</code> <code>6F0FD5467E39EEE972AA4C246B265B76</code> <code>617F7D235C0BA43EE6149B4413F8F05E</code> <code>9D03AAF49F6A3F256F5B84AB5ECF2102</code> <code>26F47BBFF1E47069BC1D296BF374811B</code> <code>FAE88AD65E9122EB7E8F503C17C4C048</code> <code>9A1A30B569F90EDAD26C318FDBA389E9</code> <code>31F5182AEC21733FC8A664DC6231E9B8</code> <code>381306D34B0EF7EC1D1985DA1066B97F</code><br> <code>B8FEADF7</code></td>
<td><code>FE0001001C87879FA90D4C306CE54CEC</code> <code>83751A31E8C660B69278DCCE85B4F0AC</code> <code>EBA6C5E9B9782C6D8EF7A02C34935B3C</code> <code>802BCA7403DF7D08F01830FEF4725D7F</code> <code>B68B35422E277E28402F056ECCC8F16B</code> <code>EDD5AE45E24BF278F4A212481AE67C8F</code> <code>215A6CAF63B0381B31775A1B1AB8AC8F</code> <code>79394AE0FD9DF026E2687A4328D60CD3</code> <code>1B5C91D2AF4F1FC79000129F1685CFBB</code> <code>FA25E2F122313D9EFE6A63D74E8B1220</code> <code>0A1B11A44B5EA52A5FA1C5C05CFC4083</code> <code>FC5C0D99E8199B85574504460731D89F</code> <code>5DB7DE1054A8BA49D1A4639E923812CB</code> <code>95F397C5589F4BCA8F33ECAA28ED1FC3</code> <code>1D9293AFA1CB0763A8ECBF85804DF3C3</code> <code>E9C5F21357DCFD8FBB23541443B48A2F</code><br> <code>A2A79140</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>71877B65</code> (1702594417 in decimal)</td>
<td><code>6B6A7C65</code> (1702652523 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B54818199E5C2C9029E8894B0BD5DC68772163DE11E08D2D57A8BF45B50921F8F
<h5><a class="anchor" href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" id="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" name="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message"><i class="anchor-icon"></i></a>7) Client computes random 2048-bit number <em>b</em> (using a sufficient amount of entropy) and sends the server a message</h5>
<p>First, generate a secure random 2048-bit number b:</p>
<!-- start b -->
<pre><code>b = FD476005C83A2F611E443D33E6B624647F64D0C12E076CF16EFB55B909BBDEE4636D91C13C5BCA57BBEB4C8B5BA22ED412B1CD636E172DD6C763487A69FA48DE4D6E9E79053CF86FF737EDB80F1929E611FCF2DC721F4389B77E5D69CCFF9B6C44BB6EEC9A1F45BDC20B6070BAD4BDF8531F4AC8722B5C1FF7083D23E96926844509E8B8AB925CF57D259608D1F24604191DC45CDB76A27F57EE2BB122C9AB668A0448C703AF957B11E3872DA861A21776D40C4B702403AD0FED89F7B39EB8A102CF2BA909126A7AAB3CB72379C5B3DBFCB5302F0BFDF57C8833531CCFFBBEF19D1C4BE37CD63AADC32A50BAA0CE1604ECB1EED3F5BC48E59C00DA324451A8F8</code></pre>
<pre><code>b = 58D7795558A0A384A02A3EE8B446C9C88E5A2C50678AD2FC0C11CFADE7C454D323A5DA6A741CC3491AC4BD8D53469064AC8C63F182D6F336EE4786DB0BAAB023CF7AD84FF501A499A056A258CE41B2E1F08D4D83910F22551DFEEBE229F7DE82FA557EEB5232034434E8AA82DFDB9128BF70CE82805D584248610B8533E16367EA9B509FEA883549FC8E616884E89FA772D02E754B72607C4893291AEBE6623402B9B5351356A8193CE3AC86F600A3287A34CC3834450B728439C6F9388EC92AC61F9740E03519925A49F0F94A9E40D0204D42D863C8185DE0234CBC5051DDC6579604A887199DDF28372C6B2840ED16A3415D338D8188C355383AB98B248CB1</code></pre>
<!-- end b -->
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
<!-- start g_b -->
<pre><code>g_b = 6B4CFDDF0D0E1FD06B16991EF8A85A2D1F4D3CED7D9E83A65A9FD0DA1CE34C7473A4B01F3213F643F1BD63199F776C6A14F73F304627C7724F18A7AE3687B9542288A6BAFD51C7F14459E46C311FB3B7E2E5CB3D7EB5B3DA0FA373B280C1557D4119A4F2C9EBC4AD229C6CDAE0D62A72AF2F5356D0AF8B1F427A487C7D5E7C23006910E3E9BEC75DED1C4C15FB16246FE1B02EBD5BCE620F0A68A7F0425D4E1D17E1CF86EF43A05E68D94C0F4C0B11EBC657953989D20AAB9571B5E113BEDD0B9C952DE481553C133D4CFDD84E4A027D54AF8728CF1824E153D17D1DAF08A8FB69C7929AF8DAE0A33F8371468D565142254850ACDEA2F4FF36BB1F7BBAD5CCF4</code></pre>
<pre><code>g_b = 13A51030ED32B30A9C9913D3306C8EC9225E8D7EE8BC39A34CB78B5618B0EFB8ACC22C50E323BAC7D5A04C992EE139532E1DD08BF962A8551416A84F7D1BE83AD64E67C8BAF5FC127733E5B45E07813C1B593AC49229ECC14EEBFD226C8E99DAA145F078BE404319551C6DC3EE01F9EC6C10692A0907B194E30C9F16041AEBBA0FF45AE362F7EE176D106D649BF048D7D6F0556907CA7E31EC2950FC9B05C98832FAF870CD4058F8BB6EDBEBA94B15981487FDDE5D55524135F3991F887A710A97BF75C5C9686B8C0E3C5BD92BD1024EC327BAD77CF204607F3765A92B9BDC6CC3039D59690D76EC18197ED14FEE89FBEA498167AB6ECC2BE1C53CB2FF70EF20</code></pre>
<!-- end g_b -->
<h6>7.1) generation of encrypted_data</h6>
<!-- start client_DH_inner_data -->
<p>Generated payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 54 B6 43 66 48 18 19 9E 5C 2C 90 29 E8 89 4B 0B
0010 | D5 DC 68 77 21 63 DE 11 E0 8D 2D 57 A8 BF 45 B5
0020 | 09 21 F8 F9 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 6B 4C FD DF 0D 0E 1F D0 6B 16 99 1E F8 A8 5A 2D
0040 | 1F 4D 3C ED 7D 9E 83 A6 5A 9F D0 DA 1C E3 4C 74
0050 | 73 A4 B0 1F 32 13 F6 43 F1 BD 63 19 9F 77 6C 6A
0060 | 14 F7 3F 30 46 27 C7 72 4F 18 A7 AE 36 87 B9 54
0070 | 22 88 A6 BA FD 51 C7 F1 44 59 E4 6C 31 1F B3 B7
0080 | E2 E5 CB 3D 7E B5 B3 DA 0F A3 73 B2 80 C1 55 7D
0090 | 41 19 A4 F2 C9 EB C4 AD 22 9C 6C DA E0 D6 2A 72
00A0 | AF 2F 53 56 D0 AF 8B 1F 42 7A 48 7C 7D 5E 7C 23
00B0 | 00 69 10 E3 E9 BE C7 5D ED 1C 4C 15 FB 16 24 6F
00C0 | E1 B0 2E BD 5B CE 62 0F 0A 68 A7 F0 42 5D 4E 1D
00D0 | 17 E1 CF 86 EF 43 A0 5E 68 D9 4C 0F 4C 0B 11 EB
00E0 | C6 57 95 39 89 D2 0A AB 95 71 B5 E1 13 BE DD 0B
00F0 | 9C 95 2D E4 81 55 3C 13 3D 4C FD D8 4E 4A 02 7D
0100 | 54 AF 87 28 CF 18 24 E1 53 D1 7D 1D AF 08 A8 FB
0110 | 69 C7 92 9A F8 DA E0 A3 3F 83 71 46 8D 56 51 42
0120 | 25 48 50 AC DE A2 F4 FF 36 BB 1F 7B BA D5 CC F4</code></pre>
<pre><code>0000 | 54 B6 43 66 A3 F9 DF BC 14 FB 38 31 B9 1F 91 84
0010 | F5 17 A5 CB 22 08 F3 18 07 8C 56 C7 1F E3 AB 73
0020 | DC 6F 63 87 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 13 A5 10 30 ED 32 B3 0A 9C 99 13 D3 30 6C 8E C9
0040 | 22 5E 8D 7E E8 BC 39 A3 4C B7 8B 56 18 B0 EF B8
0050 | AC C2 2C 50 E3 23 BA C7 D5 A0 4C 99 2E E1 39 53
0060 | 2E 1D D0 8B F9 62 A8 55 14 16 A8 4F 7D 1B E8 3A
0070 | D6 4E 67 C8 BA F5 FC 12 77 33 E5 B4 5E 07 81 3C
0080 | 1B 59 3A C4 92 29 EC C1 4E EB FD 22 6C 8E 99 DA
0090 | A1 45 F0 78 BE 40 43 19 55 1C 6D C3 EE 01 F9 EC
00A0 | 6C 10 69 2A 09 07 B1 94 E3 0C 9F 16 04 1A EB BA
00B0 | 0F F4 5A E3 62 F7 EE 17 6D 10 6D 64 9B F0 48 D7
00C0 | D6 F0 55 69 07 CA 7E 31 EC 29 50 FC 9B 05 C9 88
00D0 | 32 FA F8 70 CD 40 58 F8 BB 6E DB EB A9 4B 15 98
00E0 | 14 87 FD DE 5D 55 52 41 35 F3 99 1F 88 7A 71 0A
00F0 | 97 BF 75 C5 C9 68 6B 8C 0E 3C 5B D9 2B D1 02 4E
0100 | C3 27 BA D7 7C F2 04 60 7F 37 65 A9 2B 9B DC 6C
0110 | C3 03 9D 59 69 0D 76 EC 18 19 7E D1 4F EE 89 FB
0120 | EA 49 81 67 AB 6E CC 2B E1 C5 3C B2 FF 70 EF 20</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;</code></pre>
<table class="table">
@ -658,19 +658,19 @@ answer = BA0D89B54818199E5C2C9029E8894B0BD5DC68772163DE11E08D2D57A8BF45B50921F8F
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>4818199E5C2C9029E8894B0BD5DC6877</code></td>
<td><code>A3F9DFBC14FB3831B91F9184F517A5CB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>2163DE11E08D2D57A8BF45B50921F8F9</code></td>
<td><code>2208F318078C56C71FE3AB73DC6F6387</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE0001006B4CFDDF0D0E1FD06B16991E</code> <code>F8A85A2D1F4D3CED7D9E83A65A9FD0DA</code> <code>1CE34C7473A4B01F3213F643F1BD6319</code> <code>9F776C6A14F73F304627C7724F18A7AE</code> <code>3687B9542288A6BAFD51C7F14459E46C</code> <code>311FB3B7E2E5CB3D7EB5B3DA0FA373B2</code> <code>80C1557D4119A4F2C9EBC4AD229C6CDA</code> <code>E0D62A72AF2F5356D0AF8B1F427A487C</code> <code>7D5E7C23006910E3E9BEC75DED1C4C15</code> <code>FB16246FE1B02EBD5BCE620F0A68A7F0</code> <code>425D4E1D17E1CF86EF43A05E68D94C0F</code> <code>4C0B11EBC657953989D20AAB9571B5E1</code> <code>13BEDD0B9C952DE481553C133D4CFDD8</code> <code>4E4A027D54AF8728CF1824E153D17D1D</code> <code>AF08A8FB69C7929AF8DAE0A33F837146</code> <code>8D565142254850ACDEA2F4FF36BB1F7B</code><br> <code>BAD5CCF4</code></td>
<td><code>FE00010013A51030ED32B30A9C9913D3</code> <code>306C8EC9225E8D7EE8BC39A34CB78B56</code> <code>18B0EFB8ACC22C50E323BAC7D5A04C99</code> <code>2EE139532E1DD08BF962A8551416A84F</code> <code>7D1BE83AD64E67C8BAF5FC127733E5B4</code> <code>5E07813C1B593AC49229ECC14EEBFD22</code> <code>6C8E99DAA145F078BE404319551C6DC3</code> <code>EE01F9EC6C10692A0907B194E30C9F16</code> <code>041AEBBA0FF45AE362F7EE176D106D64</code> <code>9BF048D7D6F0556907CA7E31EC2950FC</code> <code>9B05C98832FAF870CD4058F8BB6EDBEB</code> <code>A94B15981487FDDE5D55524135F3991F</code> <code>887A710A97BF75C5C9686B8C0E3C5BD9</code> <code>2BD1024EC327BAD77CF204607F3765A9</code> <code>2B9BDC6CC3039D59690D76EC18197ED1</code> <code>4FEE89FBEA498167AB6ECC2BE1C53CB2</code><br> <code>FF70EF20</code></td>
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
</tr>
<tr>
@ -684,47 +684,47 @@ answer = BA0D89B54818199E5C2C9029E8894B0BD5DC68772163DE11E08D2D57A8BF45B50921F8F
<!-- end client_DH_inner_data -->
<p>The serialization of <em>Client_DH_Inner_Data</em> produces a string <strong>data</strong>. This is used to generate <strong>encrypted_data</strong> as specified in <a href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message">step 6</a>, using the following inputs:</p>
<!-- start client_DH_inner_data_input -->
<pre><code>data = 54B643664818199E5C2C9029E8894B0BD5DC68772163DE11E08D2D57A8BF45B50921F8F90000000000000000FE0001006B4CFDDF0D0E1FD06B16991EF8A85A2D1F4D3CED7D9E83A65A9FD0DA1CE34C7473A4B01F3213F643F1BD63199F776C6A14F73F304627C7724F18A7AE3687B9542288A6BAFD51C7F14459E46C311FB3B7E2E5CB3D7EB5B3DA0FA373B280C1557D4119A4F2C9EBC4AD229C6CDAE0D62A72AF2F5356D0AF8B1F427A487C7D5E7C23006910E3E9BEC75DED1C4C15FB16246FE1B02EBD5BCE620F0A68A7F0425D4E1D17E1CF86EF43A05E68D94C0F4C0B11EBC657953989D20AAB9571B5E113BEDD0B9C952DE481553C133D4CFDD84E4A027D54AF8728CF1824E153D17D1DAF08A8FB69C7929AF8DAE0A33F8371468D565142254850ACDEA2F4FF36BB1F7BBAD5CCF4
padding = 7F32A4D59B81B5D712AC5517
tmp_aes_key = EFEE3DDE87871EE456FFE7D49BDDFC35B6A602DCD88104DE3B916E7B78D9B0C5
tmp_aes_iv = 78AA7B8D5CAF102BF3DBF0B6CD90720A6FDF35903B4A8448368D1587408B78A5</code></pre>
<pre><code>data = 54B64366A3F9DFBC14FB3831B91F9184F517A5CB2208F318078C56C71FE3AB73DC6F63870000000000000000FE00010013A51030ED32B30A9C9913D3306C8EC9225E8D7EE8BC39A34CB78B5618B0EFB8ACC22C50E323BAC7D5A04C992EE139532E1DD08BF962A8551416A84F7D1BE83AD64E67C8BAF5FC127733E5B45E07813C1B593AC49229ECC14EEBFD226C8E99DAA145F078BE404319551C6DC3EE01F9EC6C10692A0907B194E30C9F16041AEBBA0FF45AE362F7EE176D106D649BF048D7D6F0556907CA7E31EC2950FC9B05C98832FAF870CD4058F8BB6EDBEBA94B15981487FDDE5D55524135F3991F887A710A97BF75C5C9686B8C0E3C5BD92BD1024EC327BAD77CF204607F3765A92B9BDC6CC3039D59690D76EC18197ED14FEE89FBEA498167AB6ECC2BE1C53CB2FF70EF20
padding = EC8C4D09C7D09BA70C37BDE7
tmp_aes_key = EB56B5D7AE697745E5572776F1075214F9206AD96DBDADF4E293175DDB0530BB
tmp_aes_iv = EF2C8E5C6AC6B536278D043D7738E00CB5D4179AD995A4B22FC488D78BB36890</code></pre>
<!-- end client_DH_inner_data_input -->
<p>Process:</p>
<pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16)
encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre>
<p>Output:</p>
<!-- start client_DH_inner_data_output -->
<pre><code>encrypted_data = 49E40621EE5D525449EB79599EE5567F19A7DAF16C5391E199B92A269A2600E19A187637874B9128A5F7A18BF9BFC4560D84CD1F592D599608DBD40E161BE0580F3B1753B123F7D777D798EEA7EF75B79BD9BE36956D7B7A8831FB9B02A5E68EF259FCC16F3A8034A4E1AB1F7239C9A905BEB960813714FC9C3B6F5DE03D876E7F004515D9DF7FD99AB2142BC0C84545D5AC90E1519E32494C6E60F9D97DD02625B2700F6B1253856055AEEB6AA40007D6DA4BFB37A657D2ABEAF4B57433EDB992ED9014DDDA1CBA2AB7CF2A7F08A39AFD213E1CBC9FBD79F039CF36FF95F57DC301E116C93A87B2FF5806E6D472BC508E25566B6C6F0D6279CA5249613DAD6E16E1AD92F42F15E785B319C8CEEF67C60D659415A4529689DA00BBFA3A2F0612434D27FE013C81CC03D140330FA8DA0740D22C1745E20D2FD32750D5E7CD1606110C1131A250B9FEA42866E5E39E7687</code></pre>
<pre><code>encrypted_data = 078AD611511052247ACDD3FDDCC07A14923AF8289F8B999FD83BC274E3E36354B8568F2814561BE7344B53A3217BAC7708AD4C0E986BB5E539935177E421A1D1D588A86DA64D5BEFD678F2367AB9DC29BA14EDB405988B8418E8EB661ED2C33469857E64CB5AC8FCC209B54B7DAAFD36386888825E0AA0CB0F725FA0948688521835E4456CE14446AB510528DF8EF0FE3AF6F40F6021B39656C72E4AFB35A76150E10196CF5E174DF6CDDB460AE1C983A5B17A946E931D80CE7FE12B4AE2FE80AF95BAB642288E533CB8020FDC4B1C31918E0E75FDE0C9E68959629D6DA2D895F9E1015CD40BAC5C46AB71141F5C62613C031516DDE7804712FE7860646C36FB3861842D024A8D62BBD170493354541150F20744793101FC4C00FB3098E5A869BA6C35C904FDF3205E5608921D93B581537526CEEF22AD7560A014CE2EB7E455E0317198BE5DE89343AF18EBB6C451A4</code></pre>
<!-- end client_DH_inner_data_output -->
<p>The length of the final string is 336 bytes.</p>
<h6>7.2) set_client_DH_params query</h6>
<!-- start set_client_DH_params -->
<p>Sent payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 60 11 0F 00 71 87 7B 65
0010 | 78 01 00 00 1F 5F 04 F5 48 18 19 9E 5C 2C 90 29
0020 | E8 89 4B 0B D5 DC 68 77 21 63 DE 11 E0 8D 2D 57
0030 | A8 BF 45 B5 09 21 F8 F9 FE 50 01 00 49 E4 06 21
0040 | EE 5D 52 54 49 EB 79 59 9E E5 56 7F 19 A7 DA F1
0050 | 6C 53 91 E1 99 B9 2A 26 9A 26 00 E1 9A 18 76 37
0060 | 87 4B 91 28 A5 F7 A1 8B F9 BF C4 56 0D 84 CD 1F
0070 | 59 2D 59 96 08 DB D4 0E 16 1B E0 58 0F 3B 17 53
0080 | B1 23 F7 D7 77 D7 98 EE A7 EF 75 B7 9B D9 BE 36
0090 | 95 6D 7B 7A 88 31 FB 9B 02 A5 E6 8E F2 59 FC C1
00A0 | 6F 3A 80 34 A4 E1 AB 1F 72 39 C9 A9 05 BE B9 60
00B0 | 81 37 14 FC 9C 3B 6F 5D E0 3D 87 6E 7F 00 45 15
00C0 | D9 DF 7F D9 9A B2 14 2B C0 C8 45 45 D5 AC 90 E1
00D0 | 51 9E 32 49 4C 6E 60 F9 D9 7D D0 26 25 B2 70 0F
00E0 | 6B 12 53 85 60 55 AE EB 6A A4 00 07 D6 DA 4B FB
00F0 | 37 A6 57 D2 AB EA F4 B5 74 33 ED B9 92 ED 90 14
0100 | DD DA 1C BA 2A B7 CF 2A 7F 08 A3 9A FD 21 3E 1C
0110 | BC 9F BD 79 F0 39 CF 36 FF 95 F5 7D C3 01 E1 16
0120 | C9 3A 87 B2 FF 58 06 E6 D4 72 BC 50 8E 25 56 6B
0130 | 6C 6F 0D 62 79 CA 52 49 61 3D AD 6E 16 E1 AD 92
0140 | F4 2F 15 E7 85 B3 19 C8 CE EF 67 C6 0D 65 94 15
0150 | A4 52 96 89 DA 00 BB FA 3A 2F 06 12 43 4D 27 FE
0160 | 01 3C 81 CC 03 D1 40 33 0F A8 DA 07 40 D2 2C 17
0170 | 45 E2 0D 2F D3 27 50 D5 E7 CD 16 06 11 0C 11 31
0180 | A2 50 B9 FE A4 28 66 E5 E3 9E 76 87</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 C4 86 06 00 6B 6A 7C 65
0010 | 78 01 00 00 1F 5F 04 F5 A3 F9 DF BC 14 FB 38 31
0020 | B9 1F 91 84 F5 17 A5 CB 22 08 F3 18 07 8C 56 C7
0030 | 1F E3 AB 73 DC 6F 63 87 FE 50 01 00 07 8A D6 11
0040 | 51 10 52 24 7A CD D3 FD DC C0 7A 14 92 3A F8 28
0050 | 9F 8B 99 9F D8 3B C2 74 E3 E3 63 54 B8 56 8F 28
0060 | 14 56 1B E7 34 4B 53 A3 21 7B AC 77 08 AD 4C 0E
0070 | 98 6B B5 E5 39 93 51 77 E4 21 A1 D1 D5 88 A8 6D
0080 | A6 4D 5B EF D6 78 F2 36 7A B9 DC 29 BA 14 ED B4
0090 | 05 98 8B 84 18 E8 EB 66 1E D2 C3 34 69 85 7E 64
00A0 | CB 5A C8 FC C2 09 B5 4B 7D AA FD 36 38 68 88 82
00B0 | 5E 0A A0 CB 0F 72 5F A0 94 86 88 52 18 35 E4 45
00C0 | 6C E1 44 46 AB 51 05 28 DF 8E F0 FE 3A F6 F4 0F
00D0 | 60 21 B3 96 56 C7 2E 4A FB 35 A7 61 50 E1 01 96
00E0 | CF 5E 17 4D F6 CD DB 46 0A E1 C9 83 A5 B1 7A 94
00F0 | 6E 93 1D 80 CE 7F E1 2B 4A E2 FE 80 AF 95 BA B6
0100 | 42 28 8E 53 3C B8 02 0F DC 4B 1C 31 91 8E 0E 75
0110 | FD E0 C9 E6 89 59 62 9D 6D A2 D8 95 F9 E1 01 5C
0120 | D4 0B AC 5C 46 AB 71 14 1F 5C 62 61 3C 03 15 16
0130 | DD E7 80 47 12 FE 78 60 64 6C 36 FB 38 61 84 2D
0140 | 02 4A 8D 62 BB D1 70 49 33 54 54 11 50 F2 07 44
0150 | 79 31 01 FC 4C 00 FB 30 98 E5 A8 69 BA 6C 35 C9
0160 | 04 FD F3 20 5E 56 08 92 1D 93 B5 81 53 75 26 CE
0170 | EF 22 AD 75 60 A0 14 CE 2E B7 E4 55 E0 31 71 98
0180 | BE 5D E8 93 43 AF 18 EB B6 C4 51 A4</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;</code></pre>
<table class="table">
@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>60110F0071877B65</code></td>
<td><code>C48606006B6A7C65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4818199E5C2C9029E8894B0BD5DC6877</code></td>
<td><code>A3F9DFBC14FB3831B91F9184F517A5CB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>2163DE11E08D2D57A8BF45B50921F8F9</code></td>
<td><code>2208F318078C56C71FE3AB73DC6F6387</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE50010049E40621EE5D525449EB7959</code> <code>9EE5567F19A7DAF16C5391E199B92A26</code> <code>9A2600E19A187637874B9128A5F7A18B</code> <code>F9BFC4560D84CD1F592D599608DBD40E</code> <code>161BE0580F3B1753B123F7D777D798EE</code> <code>A7EF75B79BD9BE36956D7B7A8831FB9B</code> <code>02A5E68EF259FCC16F3A8034A4E1AB1F</code> <code>7239C9A905BEB960813714FC9C3B6F5D</code> <code>E03D876E7F004515D9DF7FD99AB2142B</code> <code>C0C84545D5AC90E1519E32494C6E60F9</code> <code>D97DD02625B2700F6B1253856055AEEB</code> <code>6AA40007D6DA4BFB37A657D2ABEAF4B5</code> <code>7433EDB992ED9014DDDA1CBA2AB7CF2A</code> <code>7F08A39AFD213E1CBC9FBD79F039CF36</code> <code>FF95F57DC301E116C93A87B2FF5806E6</code> <code>D472BC508E25566B6C6F0D6279CA5249</code> <code>613DAD6E16E1AD92F42F15E785B319C8</code> <code>CEEF67C60D659415A4529689DA00BBFA</code> <code>3A2F0612434D27FE013C81CC03D14033</code> <code>0FA8DA0740D22C1745E20D2FD32750D5</code> <code>E7CD1606110C1131A250B9FEA42866E5</code><br> <code>E39E7687</code></td>
<td><code>FE500100078AD611511052247ACDD3FD</code> <code>DCC07A14923AF8289F8B999FD83BC274</code> <code>E3E36354B8568F2814561BE7344B53A3</code> <code>217BAC7708AD4C0E986BB5E539935177</code> <code>E421A1D1D588A86DA64D5BEFD678F236</code> <code>7AB9DC29BA14EDB405988B8418E8EB66</code> <code>1ED2C33469857E64CB5AC8FCC209B54B</code> <code>7DAAFD36386888825E0AA0CB0F725FA0</code> <code>948688521835E4456CE14446AB510528</code> <code>DF8EF0FE3AF6F40F6021B39656C72E4A</code> <code>FB35A76150E10196CF5E174DF6CDDB46</code> <code>0AE1C983A5B17A946E931D80CE7FE12B</code> <code>4AE2FE80AF95BAB642288E533CB8020F</code> <code>DC4B1C31918E0E75FDE0C9E68959629D</code> <code>6DA2D895F9E1015CD40BAC5C46AB7114</code> <code>1F5C62613C031516DDE7804712FE7860</code> <code>646C36FB3861842D024A8D62BBD17049</code> <code>3354541150F20744793101FC4C00FB30</code> <code>98E5A869BA6C35C904FDF3205E560892</code> <code>1D93B581537526CEEF22AD7560A014CE</code> <code>2EB7E455E0317198BE5DE89343AF18EB</code><br> <code>B6C451A4</code></td>
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
</tr>
</tbody>
@ -785,17 +785,17 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<h5><a class="anchor" href="#8-auth-key-generation" id="8-auth-key-generation" name="8-auth-key-generation"><i class="anchor-icon"></i></a>8) Auth key generation</h5>
<p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p>
<!-- start auth_key -->
<pre><code>auth_key = BFF2E21820423265E03F1DA0234D96AB746C6C5630C3B44798C0313CEA1F4066A3789D40E1555DEBD559EF505F1F8FF6ACD0B532E3070B9FD49EE552541992B0C91E64EE41AD20146143711DB787566CFA46ED99E0FA2C3B93780F41FE73C2B5E89FEDCD43A3B879647CDB0E3D666A1AE9050FD8CFAE9ED16F61D3F8A9274C08EDA7D8255F3F76A0F70EA15EA12D06DA7E757B30C0F3CFD244AC6CB1D44DE29DA73CB32CB1FF8FC7CD5F707F010975A6E595F335D75D8E55CA029095E2A9EE29B2D0ED4D2B6A9D758C126AE130F39E854CE09F017B0C69B59B55231149762B55F69B00D2E1A0F3FF6CCD2FFA08D75BE83F2A69BDB6A731D2A25A162AA0769965</code></pre>
<pre><code>auth_key = BA5447B4F2C8C247A3CA92FB50B156E0EEA43FC767C51F8371ACB5344EEA4EEE6E19D01CDD2B0A326B6D2C6ED9893C74AB7A177847B859E4F221A0C4A9E9B0C43274CED8F319367E479AC21019644E58D9E18B67556EDCCB2D62AD49162B591E929A3B1BF87205661D375D74710C9487F1A87EB7D77C93DA2236FDB75ECDC176990C9A6AFF3C3AF889FF79F0276681378B1C7E814CE0ACBD74E35DE2EBF2BA7D6FE05394012D97C464A5B3DDF8DB990E066C53D66E14626AD1A6D68498582700C9D91A9A16D80E0D0D37602B16985D97885AFCFB323F12482F6981EBF80471F95442463245058ADA5D48A3B051F4EBE42EBB2425CAEEB82DF6FB6E8DE7606F15</code></pre>
<!-- end auth_key -->
<h5><a class="anchor" href="#9-final-server-reply" id="9-final-server-reply" name="9-final-server-reply"><i class="anchor-icon"></i></a>9) Final server reply</h5>
<p>The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:</p>
<!-- start dh_gen_ok -->
<p>Received payload (excluding transport headers/trailers):</p>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 48 26 16 72 87 7B 65
0010 | 44 00 00 00 34 F7 CB 3B 48 18 19 9E 5C 2C 90 29
0020 | E8 89 4B 0B D5 DC 68 77 21 63 DE 11 E0 8D 2D 57
0030 | A8 BF 45 B5 09 21 F8 F9 78 8D 89 FB D4 EC C6 A9
0040 | 66 3E A2 0F 01 88 7A D7</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 BC 5E 03 6C 6A 7C 65
0010 | 7C 00 00 00 34 F7 CB 3B A3 F9 DF BC 14 FB 38 31
0020 | B9 1F 91 84 F5 17 A5 CB 22 08 F3 18 07 8C 56 C7
0030 | 1F E3 AB 73 DC 6F 63 87 6F 75 C0 E4 F2 16 1B 9D
0040 | 42 4E 14 F6 F7 72 EC DE</code></pre>
<p>Payload (de)serialization:</p>
<pre><code>dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;</code></pre>
<table class="table">
@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>0148261672877B65</code></td>
<td><code>01BC5E036C6A7C65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>44000000</code> (68 in decimal)</td>
<td><code>7C000000</code> (124 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4818199E5C2C9029E8894B0BD5DC6877</code></td>
<td><code>A3F9DFBC14FB3831B91F9184F517A5CB</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>2163DE11E08D2D57A8BF45B50921F8F9</code></td>
<td><code>2208F318078C56C71FE3AB73DC6F6387</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>788D89FBD4ECC6A9663EA20F01887AD7</code></td>
<td><code>6F75C0E4F2161B9D424E14F6F772ECDE</code></td>
<td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td>
</tr>
</tbody>

View file

@ -8,14 +8,14 @@
Constructor
Description
myBoost
 ">
Contains information about a single boost slot ».">
<meta property="og:title" content="MyBoost">
<meta property="og:image" content="">
<meta property="og:description" content="Constructors
Constructor
Description
myBoost
 ">
Contains information about a single boost slot ».">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -74,7 +74,7 @@ myBoost
<tbody>
<tr>
<td><a href="/constructor/myBoost">myBoost</a></td>
<td> </td>
<td>Contains information about a single <a href="/api/boost">boost slot »</a>.</td>
</tr>
</tbody>
</table></div>

View file

@ -8,18 +8,16 @@
Constructor
Description
postInteractionCountersMessage
 
postInteractionCountersStory
 ">
Interaction counters for a message.
postInteractionCountersStory…">
<meta property="og:title" content="PostInteractionCounters">
<meta property="og:image" content="">
<meta property="og:description" content="Constructors
Constructor
Description
postInteractionCountersMessage
 
postInteractionCountersStory
 ">
Interaction counters for a message.
postInteractionCountersStory…">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -79,11 +77,11 @@ postInteractionCountersStory
<tbody>
<tr>
<td><a href="/constructor/postInteractionCountersMessage">postInteractionCountersMessage</a></td>
<td> </td>
<td>Interaction counters for a message.</td>
</tr>
<tr>
<td><a href="/constructor/postInteractionCountersStory">postInteractionCountersStory</a></td>
<td> </td>
<td>Interaction counters for a story.</td>
</tr>
</tbody>
</table></div>

View file

@ -662,7 +662,7 @@
</tr>
<tr>
<td><a href="/constructor/updatePeerWallpaper">updatePeerWallpaper</a></td>
<td> </td>
<td>The <a href="/api/wallpaper">wallpaper »</a> of a given peer has changed.</td>
</tr>
</tbody>
</table></div>

View file

@ -4,30 +4,10 @@
<meta charset="utf-8">
<title>Premium.MyBoosts</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Constructors
Constructor
Description
premium.myBoosts
 
Methods
Method
Description
premium.getMyBoosts
 
premium.applyBoost…">
<meta property="description" content="A list of peers we are currently boosting, and how many boost slots we have left.">
<meta property="og:title" content="Premium.MyBoosts">
<meta property="og:image" content="">
<meta property="og:description" content="Constructors
Constructor
Description
premium.myBoosts
 
Methods
Method
Description
premium.getMyBoosts
 
premium.applyBoost…">
<meta property="og:description" content="A list of peers we are currently boosting, and how many boost slots we have left.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -62,7 +42,8 @@ premium.applyBoost…">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/premium.MyBoosts" >Premium.MyBoosts</a></li></ul></div>
<h1 id="dev_page_title">Premium.MyBoosts</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>A list of peers we are currently <a href="/api/boost">boosting</a>, and how many <a href="/api/boost">boost slots</a> we have left.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 167 <b class="caret"></b></a>
@ -91,7 +72,7 @@ premium.applyBoost…">
<tbody>
<tr>
<td><a href="/constructor/premium.myBoosts">premium.myBoosts</a></td>
<td> </td>
<td>A list of peers we are currently <a href="/api/boost">boosting</a>, and how many <a href="/api/boost">boost slots</a> we have left.</td>
</tr>
</tbody>
</table>
@ -106,14 +87,17 @@ premium.applyBoost…">
<tbody>
<tr>
<td><a href="/method/premium.getMyBoosts">premium.getMyBoosts</a></td>
<td> </td>
<td>Obtain which peers are we currently <a href="/api/boost">boosting</a>, and how many <a href="/api/boost">boost slots</a> we have left.</td>
</tr>
<tr>
<td><a href="/method/premium.applyBoost">premium.applyBoost</a></td>
<td> </td>
</tr>
</tbody>
</table></div>
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#channel-boosts" id="channel-boosts" name="channel-boosts"><i class="anchor-icon"></i></a><a href="/api/boost">Channel boosts</a></h4>
<p>Telegram Premium users can grant their favorite channels additional features like the ability to post stories by giving them boosts.</p></div>
</div>

View file

@ -401,6 +401,7 @@ var Ads = {
}
},
onBlur: function(value) {
options.onBlur && options.onBlur(field, options.getDataOpts);
options.onEnter && options.onEnter(field, value);
},
onEnter: function(value) {
@ -496,6 +497,7 @@ var NewAd = {
field: selectData.field,
c_field: selectData.c_field,
},
onBlur: NewAd.onLocationSelectBlur,
onUpdate: NewAd.onSelectUpdate,
onChange: NewAd.onLocationSelectChange
});
@ -527,10 +529,14 @@ var NewAd = {
state.targetTypeField.fieldEl().on('change.curPage', NewAd.onTargetTypeChange);
state.pictureCheckbox = state.$form.field('picture');
state.pictureCheckbox.on('change.curPage', NewAd.onPictureChange);
state.intersectTopicsCheckbox = state.$form.field('intersect_topics');
state.intersectTopicsCheckbox.on('change.curPage', NewAd.onIntersectTopicsChange);
state.excludePoliticCheckbox = state.$form.field('exclude_politic');
state.excludePoliticCheckbox.on('change.curPage', NewAd.onExcludePoliticChange);
state.onlyPoliticCheckbox = state.$form.field('only_politic');
state.onlyPoliticCheckbox.on('change.curPage', NewAd.onOnlyPoliticChange);
state.deviceField = state.$form.field('device');
state.deviceField.on('ddchange.curPage', NewAd.onDeviceChange);
state.confirmedCheckbox = state.$form.field('confirmed');
state.confirmedCheckbox.on('change.curPage', NewAd.onConfirmedChange);
NewAd.updateAdPreview(state.$form, state.previewData);
@ -567,8 +573,10 @@ var NewAd = {
state.targetTypeField.fieldEl().off('.curPage');
state.confirmedCheckbox.off('.curPage');
state.pictureCheckbox.off('.curPage');
state.intersectTopicsCheckbox.off('.curPage');
state.excludePoliticCheckbox.off('.curPage');
state.onlyPoliticCheckbox.off('.curPage');
state.deviceField.off('.curPage');
for (var i = 0; i < state.selectList.length; i++) {
var selectData = state.selectList[i];
if (selectData.location_search) {
@ -597,6 +605,10 @@ var NewAd = {
var $form = $(this.form);
NewAd.adPostCheck($form);
},
onIntersectTopicsChange: function() {
NewAd.updateAdTargetOverview();
NewAd.saveDraftAuto(true);
},
onExcludePoliticChange: function() {
if ($(this).prop('checked')) {
Aj.state.onlyPoliticCheckbox.prop('checked', false);
@ -660,6 +672,13 @@ var NewAd = {
Ads.hideFieldError(buttonField);
NewAd.adPostCheck($form);
},
onDeviceChange: function() {
var $form = $(this).parents('form');
var devideField = $form.field('devide');
Ads.hideFieldError(devideField);
NewAd.updateAdTargetOverview();
NewAd.saveDraftAuto(true);
},
adPostCheck: function($form, try_index) {
var textField = $form.field('text');
var promoteUrlField = $form.field('promote_url');
@ -667,6 +686,7 @@ var NewAd = {
var websiteNameField = $form.field('website_name');
var websitePhotoField = $form.field('website_photo');
var cpmField = $form.field('cpm');
var deviceField = $form.field('device');
var text = textField.value();
var promote_url = promoteUrlField.value();
var button = buttonField.data('value');
@ -674,6 +694,7 @@ var NewAd = {
var website_photo = websitePhotoField.value();
var $formGroup = promoteUrlField.fieldEl().parents('.form-group');
var $cpmFormGroup = cpmField.fieldEl().parents('.form-group');
var device = deviceField.data('value');
if (!text && !promote_url) {
return false;
}
@ -683,7 +704,8 @@ var NewAd = {
promote_url: promote_url,
button: button,
website_name: website_name,
website_photo: website_photo
website_photo: website_photo,
device: device
};
if (Aj.state.adId) {
params.ad_id = Aj.state.adId;
@ -912,6 +934,17 @@ var NewAd = {
});
return false;
},
onLocationSelectBlur: function(field, opts) {
var $form = Aj.state.$form;
var $cFieldEl = $form.field(opts.c_field);
var c_value = $cFieldEl.data('value');
if (c_value.join) {
if (c_value.length > 1) {
Ads.hideFieldError($cFieldEl);
return false;
}
}
},
onLocationSelectChange: function(field, value, valueFull) {
var $fieldEl = Aj.state.$form.field(field);
Ads.hideFieldError($fieldEl);
@ -919,11 +952,12 @@ var NewAd = {
onSelectUpdate: function(field, value, valueFull) {
var $fieldEl = Aj.state.$form.field(field);
if (field == 'user_topics') {
var has_user_topics = $fieldEl.data('value').length > 0;
if (has_user_topics) {
Aj.state.onlyPoliticCheckbox.prop('checked', false);
var user_topics_cnt = $fieldEl.data('value').length;
if (user_topics_cnt > 1) {
$('.js-intersect-topics-wrap', Aj.state.$form).slideShow();
} else {
$('.js-intersect-topics-wrap', Aj.state.$form).slideHide();
}
Aj.state.onlyPoliticCheckbox.prop('disabled', has_user_topics);
}
var selOpts = $fieldEl.data('selOpts');
var paired_field = selOpts.pairedField;
@ -1192,6 +1226,18 @@ var NewAd = {
updateAdTargetOverview: function() {
var len = {}, lang_params = {}, need_outside_cb = false;
var target_type = Aj.state.$form.field('target_type').value();
var joinTargets = function(list, or, repeat) {
var lk = or ? 'WEB_AD_TARGET_OR' : 'WEB_AD_TARGET_AND';
if (repeat && list.length > 2) {
var last_item = list.pop();
return l(lk, {item1: joinTargets(list, or, repeat), item2: last_item});
}
if (list.length > 1) {
var last_item = list.pop();
list[list.length - 1] = l(lk, {item1: list[list.length - 1], item2: last_item});
}
return list.join(', ');
};
for (var i = 0; i < Aj.state.selectList.length; i++) {
var selectData = Aj.state.selectList[i];
var field = selectData.field;
@ -1208,16 +1254,16 @@ var NewAd = {
need_outside_cb = true;
}
}
if (list.length > 1) {
var last_item = list.pop();
list[list.length - 1] = l('WEB_AD_TARGET_AND', {item1: list[list.length - 1], item2: last_item});
}
lang_params[field] = list.join(', ');
var list_or = (field == 'langs' || field == 'topics' || field == 'countries' || field == 'locations' || field == 'user_langs' || field == 'user_topics' && !Aj.state.intersectTopicsCheckbox.prop('checked') || field == 'user_channels' || field == 'audiences')
lang_params[field] = joinTargets(list, list_or);
} else {
lang_params[field] = '';
}
Ads.hideFieldError($field);
}
len.device = Aj.state.$form.field('device').data('value');
lang_params.device = '<span class="value" dir="auto">' + Aj.state.$form.field('device').html() + '</span>';
var overview = '';
if (target_type == 'channels') {
if ((len.langs || len.topics) && len.channels) {
@ -1270,27 +1316,33 @@ var NewAd = {
if (len.user_topics > 0) {
user_targets.push(l('WEB_AD_TARGET_USER_TOPICS', lang_params));
}
if (len.user_channels > 0) {
user_targets.push(l('WEB_AD_TARGET_USER_CHANNELS', lang_params));
}
if (len.audiences > 0) {
user_targets.push(l('WEB_AD_TARGET_AUDIENCES', lang_params));
}
if (user_targets.length > 1) {
var last_user_target = user_targets.pop();
user_targets[user_targets.length - 1] = l('WEB_AD_TARGET_AND', {item1: user_targets[user_targets.length - 1], item2: last_user_target});
if (len.device) {
user_targets.push(l('WEB_AD_TARGET_DEVICE', lang_params));
}
user_targets = joinTargets(user_targets, false, true);
if (Aj.state.onlyPoliticCheckbox.prop('checked')) {
overview += '<div class="pr-form-info-block plus">' + l('WEB_AD_TARGET_USERS_ONLY_POLITIC', {target: user_targets.join(', ')}) + '</div>';
overview += '<div class="pr-form-info-block plus">' + l('WEB_AD_TARGET_USERS_ONLY_POLITIC', {target: user_targets}) + '</div>';
} else {
overview += '<div class="pr-form-info-block plus">' + l('WEB_AD_TARGET_USERS', {target: user_targets.join(', ')}) + '</div>';
overview += '<div class="pr-form-info-block plus">' + l('WEB_AD_TARGET_USERS', {target: user_targets}) + '</div>';
}
if (len.exclude_user_topics > 0) {
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_USER_EXCLUDE_TOPICS', lang_params) + '</div>';
}
if (Aj.state.excludePoliticCheckbox.prop('checked')) {
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_EXCLUDE_POLITIC') + '</div>';
if (len.exclude_user_channels > 0) {
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_USER_EXCLUDE_CHANNELS', lang_params) + '</div>';
}
if (len.exclude_audiences > 0) {
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_EXCLUDE_AUDIENCES', lang_params) + '</div>';
}
if (Aj.state.excludePoliticCheckbox.prop('checked')) {
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_EXCLUDE_POLITIC') + '</div>';
}
}
$('.js-exclude-outside').addClass('hide');
} else {
@ -1312,7 +1364,8 @@ var NewAd = {
$form.field('cpm').value(),
$form.field('views_per_user').value(),
$form.field('budget').value(),
$form.field('target_type').value()
$form.field('target_type').value(),
$form.field('device').data('value')
];
if ($form.field('picture').prop('checked')) {
values.push('picture');
@ -1322,6 +1375,9 @@ var NewAd = {
var vals = $form.field(selectData.field).data('value') || [];
values.push(vals.join(';'));
}
if ($form.field('intersect_topics').prop('checked')) {
values.push('intersect_topics');
}
if ($form.field('exclude_politic').prop('checked')) {
values.push('exclude_politic');
}
@ -1367,6 +1423,7 @@ var NewAd = {
var views_per_user = $form.field('views_per_user').value();
var budget = Ads.amountFieldValue($form, 'budget');
var target_type = $form.field('target_type').value();
var device = $form.field('device').data('value');
if (!title.length) {
$form.field('title').focus();
@ -1400,7 +1457,8 @@ var NewAd = {
cpm: cpm,
views_per_user: views_per_user,
budget: budget,
target_type: target_type
target_type: target_type,
device: device
};
if ($form.field('picture').prop('checked')) {
params.picture = 1;
@ -1410,6 +1468,9 @@ var NewAd = {
var values = $form.field(selectData.field).data('value') || [];
params[selectData.field] = values.join(';');
}
if ($form.field('intersect_topics').prop('checked')) {
params.intersect_topics = 1;
}
if ($form.field('exclude_politic').prop('checked')) {
params.exclude_politic = 1;
}
@ -1465,6 +1526,7 @@ var NewAd = {
var views_per_user = $form.field('views_per_user').value();
var budget = Ads.amountFieldValue($form, 'budget');
var target_type = $form.field('target_type').value();
var device = $form.field('device').data('value');
var curFormData = NewAd.getFormData($form);
if (Aj.state.initFormData == curFormData) {
@ -1482,7 +1544,8 @@ var NewAd = {
cpm: cpm,
views_per_user: views_per_user,
budget: budget,
target_type: target_type
target_type: target_type,
device: device
};
if ($form.field('picture').prop('checked')) {
params.picture = 1;
@ -1492,6 +1555,9 @@ var NewAd = {
var values = $form.field(selectData.field).data('value') || [];
params[selectData.field] = values.join(';');
}
if ($form.field('intersect_topics').prop('checked')) {
params.intersect_topics = 1;
}
if ($form.field('exclude_politic').prop('checked')) {
params.exclude_politic = 1;
}
@ -1534,6 +1600,7 @@ var NewAd = {
$form.field('exclude_politic').prop('checked', false);
$form.field('only_politic').prop('checked', false);
$form.field('exclude_outside').prop('checked', false);
$form.field('device').trigger('selectval', ['']);
Aj.state.titleField.focusAndSelect();
NewAd.updateAdPreview(Aj.state.$form, false);
var curFormData = NewAd.getFormData($form);