1 // Core types (no need to gen) 2 3 int ? = Int; 4 long ? = Long; 5 double ? = Double; 6 string ? = String; 7 8 vector {t:Type} # [ t ] = Vector t; 9 10 int128 4*[ int ] = Int128; 11 int256 8*[ int ] = Int256; 12 13 /////////////////////////////// 14 /// Authorization key creation 15 /////////////////////////////// 16 17 resPQ#05162463 nonce:int128 server_nonce:int128 pq:string server_public_key_fingerprints:Vector<long> = ResPQ; 18 19 p_q_inner_data#83c95aec pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 = P_Q_inner_data; 20 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; 21 p_q_inner_data_temp#3c6a84d4 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 expires_in:int = P_Q_inner_data; 22 p_q_inner_data_temp_dc#56fddf88 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int expires_in:int = P_Q_inner_data; 23 24 bind_auth_key_inner#75a3f765 nonce:long temp_auth_key_id:long perm_auth_key_id:long temp_session_id:long expires_at:int = BindAuthKeyInner; 25 26 server_DH_params_fail#79cb045d nonce:int128 server_nonce:int128 new_nonce_hash:int128 = Server_DH_Params; 27 server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params; 28 29 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; 30 31 client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data; 32 33 dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer; 34 dh_gen_retry#46dc1fb9 nonce:int128 server_nonce:int128 new_nonce_hash2:int128 = Set_client_DH_params_answer; 35 dh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = Set_client_DH_params_answer; 36 37 destroy_auth_key_ok#f660e1d4 = DestroyAuthKeyRes; 38 destroy_auth_key_none#0a9f2259 = DestroyAuthKeyRes; 39 destroy_auth_key_fail#ea109b13 = DestroyAuthKeyRes; 40 41 ---functions--- 42 43 req_pq#60469778 nonce:int128 = ResPQ; 44 req_pq_multi#be7e8ef1 nonce:int128 = ResPQ; 45 46 req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params; 47 48 set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer; 49 50 destroy_auth_key#d1435160 = DestroyAuthKeyRes; 51 52 /////////////////////////////// 53 ////////////// System messages 54 /////////////////////////////// 55 56 ---types--- 57 58 msgs_ack#62d6b459 msg_ids:Vector<long> = MsgsAck; 59 60 bad_msg_notification#a7eff811 bad_msg_id:long bad_msg_seqno:int error_code:int = BadMsgNotification; 61 bad_server_salt#edab447b bad_msg_id:long bad_msg_seqno:int error_code:int new_server_salt:long = BadMsgNotification; 62 63 msgs_state_req#da69fb52 msg_ids:Vector<long> = MsgsStateReq; 64 msgs_state_info#04deb57d req_msg_id:long info:string = MsgsStateInfo; 65 msgs_all_info#8cc0d131 msg_ids:Vector<long> info:string = MsgsAllInfo; 66 67 msg_detailed_info#276d3ec6 msg_id:long answer_msg_id:long bytes:int status:int = MsgDetailedInfo; 68 msg_new_detailed_info#809db6df answer_msg_id:long bytes:int status:int = MsgDetailedInfo; 69 70 msg_resend_req#7d861a08 msg_ids:Vector<long> = MsgResendReq; 71 72 //rpc_result#f35c6d01 req_msg_id:long result:Object = RpcResult; // parsed manually 73 74 rpc_error#2144ca19 error_code:int error_message:string = RpcError; 75 76 rpc_answer_unknown#5e2ad36e = RpcDropAnswer; 77 rpc_answer_dropped_running#cd78e586 = RpcDropAnswer; 78 rpc_answer_dropped#a43ad8b7 msg_id:long seq_no:int bytes:int = RpcDropAnswer; 79 80 future_salt#0949d9dc valid_since:int valid_until:int salt:long = FutureSalt; 81 future_salts#ae500895 req_msg_id:long now:int salts:vector<future_salt> = FutureSalts; 82 83 pong#347773c5 msg_id:long ping_id:long = Pong; 84 85 destroy_session_ok#e22045fc session_id:long = DestroySessionRes; 86 destroy_session_none#62d350c9 session_id:long = DestroySessionRes; 87 88 new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession; 89 90 //message msg_id:long seqno:int bytes:int body:Object = Message; // parsed manually 91 //msg_container#73f1f8dc messages:vector<message> = MessageContainer; // parsed manually 92 //msg_copy#e06046b2 orig_message:Message = MessageCopy; // parsed manually, not used - use msg_container 93 //gzip_packed#3072cfa1 packed_data:string = Object; // parsed manually 94 95 http_wait#9299359f max_delay:int wait_after:int max_wait:int = HttpWait; 96 97 //ipPort ipv4:int port:int = IpPort; 98 //help.configSimple#d997c3c5 date:int expires:int dc_id:int ip_port_list:Vector<ipPort> = help.ConfigSimple; 99 100 ipPort#d433ad73 ipv4:int port:int = IpPort; 101 ipPortSecret#37982646 ipv4:int port:int secret:bytes = IpPort; 102 accessPointRule#4679b65f phone_prefix_rules:string dc_id:int ips:vector<IpPort> = AccessPointRule; 103 help.configSimple#5a592a6c date:int expires:int rules:vector<AccessPointRule> = help.ConfigSimple; 104 105 tlsClientHello blocks:vector<TlsBlock> = TlsClientHello; 106 107 tlsBlockString data:string = TlsBlock; 108 tlsBlockRandom length:int = TlsBlock; 109 tlsBlockZero length:int = TlsBlock; 110 tlsBlockDomain = TlsBlock; 111 tlsBlockGrease seed:int = TlsBlock; 112 tlsBlockPublicKey = TlsBlock; 113 tlsBlockScope entries:Vector<TlsBlock> = TlsBlock; 114 115 ---functions--- 116 117 rpc_drop_answer#58e4a740 req_msg_id:long = RpcDropAnswer; 118 119 get_future_salts#b921bd04 num:int = FutureSalts; 120 121 ping#7abe77ec ping_id:long = Pong; 122 ping_delay_disconnect#f3427b8c ping_id:long disconnect_delay:int = Pong; 123 124 destroy_session#e7512126 session_id:long = DestroySessionRes;