2022-02-23 23:50:52 +01:00
|
|
|
|
using System;
|
2021-08-09 11:41:50 +02:00
|
|
|
|
using System.Threading.Tasks;
|
2022-03-21 21:25:30 +01:00
|
|
|
|
using TL.Methods;
|
|
|
|
|
|
using Client = WTelegram.Client;
|
2021-08-04 00:40:09 +02:00
|
|
|
|
|
|
|
|
|
|
namespace TL
|
|
|
|
|
|
{
|
2023-07-08 01:34:31 +02:00
|
|
|
|
#pragma warning disable IDE1006
|
2021-08-06 20:17:19 +02:00
|
|
|
|
[TLDef(0x05162463)] //resPQ#05162463 nonce:int128 server_nonce:int128 pq:bytes server_public_key_fingerprints:Vector<long> = ResPQ
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class ResPQ : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 nonce;
|
|
|
|
|
|
public Int128 server_nonce;
|
|
|
|
|
|
public byte[] pq;
|
|
|
|
|
|
public long[] server_public_key_fingerprints;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-20 14:45:39 +02:00
|
|
|
|
[TLDef(0x83C95AEC)] //p_q_inner_data#83c95aec pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 = P_Q_inner_data
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public partial class PQInnerData : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public byte[] pq;
|
|
|
|
|
|
public byte[] p;
|
|
|
|
|
|
public byte[] q;
|
|
|
|
|
|
public Int128 nonce;
|
|
|
|
|
|
public Int128 server_nonce;
|
|
|
|
|
|
public Int256 new_nonce;
|
|
|
|
|
|
}
|
2021-11-09 15:01:59 +01:00
|
|
|
|
[TLDef(0xA9F55F95, inheritBefore = true)] //p_q_inner_data_dc#a9f55f95 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class PQInnerDataDc : PQInnerData
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public int dc;
|
|
|
|
|
|
}
|
2021-11-09 15:01:59 +01:00
|
|
|
|
[TLDef(0x3C6A84D4, inheritBefore = true)] //p_q_inner_data_temp#3c6a84d4 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 expires_in:int = P_Q_inner_data
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class PQInnerDataTemp : PQInnerData
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public int expires_in;
|
|
|
|
|
|
}
|
2021-11-09 15:01:59 +01:00
|
|
|
|
[TLDef(0x56FDDF88, inheritBefore = true)] //p_q_inner_data_temp_dc#56fddf88 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 dc:int expires_in:int = P_Q_inner_data
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class PQInnerDataTempDc : PQInnerData
|
2021-08-20 14:45:39 +02:00
|
|
|
|
{
|
|
|
|
|
|
public int dc;
|
|
|
|
|
|
public int expires_in;
|
|
|
|
|
|
}
|
2021-08-04 00:40:09 +02:00
|
|
|
|
|
2021-08-20 14:45:39 +02:00
|
|
|
|
[TLDef(0x75A3F765)] //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
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class BindAuthKeyInner : IObject
|
2021-08-20 14:45:39 +02:00
|
|
|
|
{
|
|
|
|
|
|
public long nonce;
|
|
|
|
|
|
public long temp_auth_key_id;
|
|
|
|
|
|
public long perm_auth_key_id;
|
|
|
|
|
|
public long temp_session_id;
|
|
|
|
|
|
public DateTime expires_at;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public abstract partial class ServerDHParams : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 nonce;
|
|
|
|
|
|
public Int128 server_nonce;
|
|
|
|
|
|
}
|
2021-11-09 15:01:59 +01:00
|
|
|
|
[TLDef(0x79CB045D, inheritBefore = true)] //server_DH_params_fail#79cb045d nonce:int128 server_nonce:int128 new_nonce_hash:int128 = Server_DH_Params
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class ServerDHParamsFail : ServerDHParams
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 new_nonce_hash;
|
|
|
|
|
|
}
|
2021-11-09 15:01:59 +01:00
|
|
|
|
[TLDef(0xD0E8075C, inheritBefore = true)] //server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:bytes = Server_DH_Params
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class ServerDHParamsOk : ServerDHParams
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public byte[] encrypted_answer;
|
|
|
|
|
|
}
|
2021-08-04 00:40:09 +02:00
|
|
|
|
|
2021-08-06 20:17:19 +02:00
|
|
|
|
[TLDef(0xB5890DBA)] //server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:bytes g_a:bytes server_time:int = Server_DH_inner_data
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class ServerDHInnerData : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 nonce;
|
|
|
|
|
|
public Int128 server_nonce;
|
|
|
|
|
|
public int g;
|
|
|
|
|
|
public byte[] dh_prime;
|
|
|
|
|
|
public byte[] g_a;
|
|
|
|
|
|
public DateTime server_time;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-06 20:17:19 +02:00
|
|
|
|
[TLDef(0x6643B654)] //client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:bytes = Client_DH_Inner_Data
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class ClientDHInnerData : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 nonce;
|
|
|
|
|
|
public Int128 server_nonce;
|
|
|
|
|
|
public long retry_id;
|
|
|
|
|
|
public byte[] g_b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public abstract partial class SetClientDHParamsAnswer : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 nonce;
|
|
|
|
|
|
public Int128 server_nonce;
|
|
|
|
|
|
}
|
2021-11-09 15:01:59 +01:00
|
|
|
|
[TLDef(0x3BCBF734, inheritBefore = true)] //dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class DhGenOk : SetClientDHParamsAnswer
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 new_nonce_hash1;
|
|
|
|
|
|
}
|
2021-11-09 15:01:59 +01:00
|
|
|
|
[TLDef(0x46DC1FB9, inheritBefore = true)] //dh_gen_retry#46dc1fb9 nonce:int128 server_nonce:int128 new_nonce_hash2:int128 = Set_client_DH_params_answer
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class DhGenRetry : SetClientDHParamsAnswer
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 new_nonce_hash2;
|
|
|
|
|
|
}
|
2021-11-09 15:01:59 +01:00
|
|
|
|
[TLDef(0xA69DAE02, inheritBefore = true)] //dh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = Set_client_DH_params_answer
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class DhGenFail : SetClientDHParamsAnswer
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 new_nonce_hash3;
|
|
|
|
|
|
}
|
2021-08-04 00:40:09 +02:00
|
|
|
|
|
2021-09-18 02:11:23 +02:00
|
|
|
|
public enum DestroyAuthKeyRes : uint
|
|
|
|
|
|
{
|
2021-09-30 04:00:38 +02:00
|
|
|
|
///<summary>See <a href="https://corefork.telegram.org/constructor/destroy_auth_key_ok"/></summary>
|
2021-09-18 02:11:23 +02:00
|
|
|
|
Ok = 0xF660E1D4,
|
2021-09-30 04:00:38 +02:00
|
|
|
|
///<summary>See <a href="https://corefork.telegram.org/constructor/destroy_auth_key_none"/></summary>
|
2021-09-18 02:11:23 +02:00
|
|
|
|
None = 0x0A9F2259,
|
2021-09-30 04:00:38 +02:00
|
|
|
|
///<summary>See <a href="https://corefork.telegram.org/constructor/destroy_auth_key_fail"/></summary>
|
2021-09-18 02:11:23 +02:00
|
|
|
|
Fail = 0xEA109B13,
|
|
|
|
|
|
}
|
2021-08-20 14:45:39 +02:00
|
|
|
|
|
|
|
|
|
|
[TLDef(0x62D6B459)] //msgs_ack#62d6b459 msg_ids:Vector<long> = MsgsAck
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class MsgsAck : IObject
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public long[] msg_ids;
|
|
|
|
|
|
}
|
2021-08-20 14:45:39 +02:00
|
|
|
|
|
|
|
|
|
|
[TLDef(0xA7EFF811)] //bad_msg_notification#a7eff811 bad_msg_id:long bad_msg_seqno:int error_code:int = BadMsgNotification
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public partial class BadMsgNotification : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
2021-08-20 14:45:39 +02:00
|
|
|
|
public long bad_msg_id;
|
|
|
|
|
|
public int bad_msg_seqno;
|
|
|
|
|
|
public int error_code;
|
2021-08-04 00:40:09 +02:00
|
|
|
|
}
|
2021-11-09 15:01:59 +01:00
|
|
|
|
[TLDef(0xEDAB447B, inheritBefore = true)] //bad_server_salt#edab447b bad_msg_id:long bad_msg_seqno:int error_code:int new_server_salt:long = BadMsgNotification
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class BadServerSalt : BadMsgNotification
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public long new_server_salt;
|
|
|
|
|
|
}
|
2021-08-20 14:45:39 +02:00
|
|
|
|
|
|
|
|
|
|
[TLDef(0xDA69FB52)] //msgs_state_req#da69fb52 msg_ids:Vector<long> = MsgsStateReq
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class MsgsStateReq : IObject
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public long[] msg_ids;
|
|
|
|
|
|
}
|
2021-08-04 00:40:09 +02:00
|
|
|
|
|
2021-08-20 14:45:39 +02:00
|
|
|
|
[TLDef(0x04DEB57D)] //msgs_state_info#04deb57d req_msg_id:long info:bytes = MsgsStateInfo
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class MsgsStateInfo : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
2021-08-12 11:01:15 +02:00
|
|
|
|
public long req_msg_id;
|
2021-08-20 14:45:39 +02:00
|
|
|
|
public byte[] info;
|
2021-08-04 00:40:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-20 14:45:39 +02:00
|
|
|
|
[TLDef(0x8CC0D131)] //msgs_all_info#8cc0d131 msg_ids:Vector<long> info:bytes = MsgsAllInfo
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class MsgsAllInfo : IObject
|
2021-08-20 14:45:39 +02:00
|
|
|
|
{
|
|
|
|
|
|
public long[] msg_ids;
|
|
|
|
|
|
public byte[] info;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public abstract partial class MsgDetailedInfoBase : IObject
|
2021-10-23 03:36:46 +02:00
|
|
|
|
{
|
2024-03-04 23:54:58 +01:00
|
|
|
|
public virtual long AnswerMsgId => default;
|
|
|
|
|
|
public virtual int Bytes => default;
|
|
|
|
|
|
public virtual int Status => default;
|
2021-10-23 03:36:46 +02:00
|
|
|
|
}
|
2021-08-20 14:45:39 +02:00
|
|
|
|
[TLDef(0x276D3EC6)] //msg_detailed_info#276d3ec6 msg_id:long answer_msg_id:long bytes:int status:int = MsgDetailedInfo
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class MsgDetailedInfo : MsgDetailedInfoBase
|
2021-08-20 14:45:39 +02:00
|
|
|
|
{
|
|
|
|
|
|
public long msg_id;
|
|
|
|
|
|
public long answer_msg_id;
|
|
|
|
|
|
public int bytes;
|
|
|
|
|
|
public int status;
|
2021-10-23 03:36:46 +02:00
|
|
|
|
|
|
|
|
|
|
public override long AnswerMsgId => answer_msg_id;
|
|
|
|
|
|
public override int Bytes => bytes;
|
|
|
|
|
|
public override int Status => status;
|
2021-08-20 14:45:39 +02:00
|
|
|
|
}
|
|
|
|
|
|
[TLDef(0x809DB6DF)] //msg_new_detailed_info#809db6df answer_msg_id:long bytes:int status:int = MsgDetailedInfo
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class MsgNewDetailedInfo : MsgDetailedInfoBase
|
2021-08-20 14:45:39 +02:00
|
|
|
|
{
|
|
|
|
|
|
public long answer_msg_id;
|
|
|
|
|
|
public int bytes;
|
|
|
|
|
|
public int status;
|
2021-10-23 03:36:46 +02:00
|
|
|
|
|
|
|
|
|
|
public override long AnswerMsgId => answer_msg_id;
|
|
|
|
|
|
public override int Bytes => bytes;
|
|
|
|
|
|
public override int Status => status;
|
2021-08-20 14:45:39 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TLDef(0x7D861A08)] //msg_resend_req#7d861a08 msg_ids:Vector<long> = MsgResendReq
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class MsgResendReq : IObject
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public long[] msg_ids;
|
|
|
|
|
|
}
|
2021-08-20 14:45:39 +02:00
|
|
|
|
|
2021-08-06 20:17:19 +02:00
|
|
|
|
[TLDef(0x2144CA19)] //rpc_error#2144ca19 error_code:int error_message:string = RpcError
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class RpcError : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public int error_code;
|
|
|
|
|
|
public string error_message;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public abstract partial class RpcDropAnswer : IObject { }
|
2021-08-06 20:17:19 +02:00
|
|
|
|
[TLDef(0x5E2AD36E)] //rpc_answer_unknown#5e2ad36e = RpcDropAnswer
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class RpcAnswerUnknown : RpcDropAnswer { }
|
2021-08-06 20:17:19 +02:00
|
|
|
|
[TLDef(0xCD78E586)] //rpc_answer_dropped_running#cd78e586 = RpcDropAnswer
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class RpcAnswerDroppedRunning : RpcDropAnswer { }
|
2021-08-06 20:17:19 +02:00
|
|
|
|
[TLDef(0xA43AD8B7)] //rpc_answer_dropped#a43ad8b7 msg_id:long seq_no:int bytes:int = RpcDropAnswer
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class RpcAnswerDropped : RpcDropAnswer
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public long msg_id;
|
|
|
|
|
|
public int seq_no;
|
|
|
|
|
|
public int bytes;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-07 03:44:11 +02:00
|
|
|
|
[TLDef(0x0949D9DC)] //future_salt#0949d9dc valid_since:int valid_until:int salt:long = FutureSalt
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class FutureSalt : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public DateTime valid_since;
|
|
|
|
|
|
public DateTime valid_until;
|
|
|
|
|
|
public long salt;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-10 14:40:41 +02:00
|
|
|
|
[TLDef(0xAE500895)] //future_salts#ae500895 req_msg_id:long now:int salts:vector<future_salt> = FutureSalts
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class FutureSalts : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public long req_msg_id;
|
|
|
|
|
|
public DateTime now;
|
|
|
|
|
|
public FutureSalt[] salts;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-06 20:17:19 +02:00
|
|
|
|
[TLDef(0x347773C5)] //pong#347773c5 msg_id:long ping_id:long = Pong
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class Pong : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public long msg_id;
|
|
|
|
|
|
public long ping_id;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public abstract partial class DestroySessionRes : IObject
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public long session_id;
|
|
|
|
|
|
}
|
2021-08-06 20:17:19 +02:00
|
|
|
|
[TLDef(0xE22045FC)] //destroy_session_ok#e22045fc session_id:long = DestroySessionRes
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class DestroySessionOk : DestroySessionRes { }
|
2021-08-06 20:17:19 +02:00
|
|
|
|
[TLDef(0x62D350C9)] //destroy_session_none#62d350c9 session_id:long = DestroySessionRes
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class DestroySessionNone : DestroySessionRes { }
|
2021-08-04 00:40:09 +02:00
|
|
|
|
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public abstract partial class NewSession : IObject { }
|
2021-08-06 20:17:19 +02:00
|
|
|
|
[TLDef(0x9EC20908)] //new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class NewSessionCreated : NewSession
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
|
|
|
|
|
public long first_msg_id;
|
|
|
|
|
|
public long unique_id;
|
|
|
|
|
|
public long server_salt;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-20 14:45:39 +02:00
|
|
|
|
[TLDef(0x9299359F)] //http_wait#9299359f max_delay:int wait_after:int max_wait:int = HttpWait
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class HttpWait : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
2021-08-20 14:45:39 +02:00
|
|
|
|
public int max_delay;
|
|
|
|
|
|
public int wait_after;
|
|
|
|
|
|
public int max_wait;
|
2021-08-04 00:40:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-20 14:45:39 +02:00
|
|
|
|
[TLDef(0xD433AD73)] //ipPort#d433ad73 ipv4:int port:int = IpPort
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public partial class IpPort : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
2021-08-20 14:45:39 +02:00
|
|
|
|
public int ipv4;
|
|
|
|
|
|
public int port;
|
2021-08-04 00:40:09 +02:00
|
|
|
|
}
|
2021-11-09 15:01:59 +01:00
|
|
|
|
[TLDef(0x37982646, inheritBefore = true)] //ipPortSecret#37982646 ipv4:int port:int secret:bytes = IpPort
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class IpPortSecret : IpPort
|
2021-11-03 03:53:48 +01:00
|
|
|
|
{
|
|
|
|
|
|
public byte[] secret;
|
|
|
|
|
|
}
|
2021-08-04 00:40:09 +02:00
|
|
|
|
|
2021-08-20 14:45:39 +02:00
|
|
|
|
[TLDef(0x4679B65F)] //accessPointRule#4679b65f phone_prefix_rules:bytes dc_id:int ips:vector<IpPort> = AccessPointRule
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class AccessPointRule : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
2021-08-20 14:45:39 +02:00
|
|
|
|
public byte[] phone_prefix_rules;
|
|
|
|
|
|
public int dc_id;
|
|
|
|
|
|
public IpPort[] ips;
|
2021-08-04 00:40:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-20 14:45:39 +02:00
|
|
|
|
[TLDef(0x5A592A6C)] //help.configSimple#5a592a6c date:int expires:int rules:vector<AccessPointRule> = help.ConfigSimple
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class Help_ConfigSimple : IObject
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
2021-08-20 14:45:39 +02:00
|
|
|
|
public DateTime date;
|
|
|
|
|
|
public DateTime expires;
|
|
|
|
|
|
public AccessPointRule[] rules;
|
2021-08-04 00:40:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-09-17 04:53:02 +02:00
|
|
|
|
// ---functions---
|
2021-08-04 00:40:09 +02:00
|
|
|
|
|
2021-11-10 17:26:40 +01:00
|
|
|
|
public static class MTProtoExtensions
|
2021-08-04 00:40:09 +02:00
|
|
|
|
{
|
2021-09-17 04:53:02 +02:00
|
|
|
|
public static Task<ResPQ> ReqPq(this Client client, Int128 nonce)
|
2021-12-16 14:51:47 +01:00
|
|
|
|
=> client.InvokeBare(new ReqPq
|
2021-11-10 02:17:08 +01:00
|
|
|
|
{
|
|
|
|
|
|
nonce = nonce,
|
|
|
|
|
|
});
|
2022-01-21 19:04:33 +01:00
|
|
|
|
|
2021-09-17 04:53:02 +02:00
|
|
|
|
public static Task<ResPQ> ReqPqMulti(this Client client, Int128 nonce)
|
2021-12-16 14:51:47 +01:00
|
|
|
|
=> client.InvokeBare(new ReqPqMulti
|
2021-11-10 02:17:08 +01:00
|
|
|
|
{
|
|
|
|
|
|
nonce = nonce,
|
|
|
|
|
|
});
|
2022-01-21 19:04:33 +01:00
|
|
|
|
|
2021-09-17 04:53:02 +02:00
|
|
|
|
public static Task<ServerDHParams> ReqDHParams(this Client client, Int128 nonce, Int128 server_nonce, byte[] p, byte[] q, long public_key_fingerprint, byte[] encrypted_data)
|
2021-12-16 14:51:47 +01:00
|
|
|
|
=> client.InvokeBare(new ReqDHParams
|
2021-11-10 02:17:08 +01:00
|
|
|
|
{
|
|
|
|
|
|
nonce = nonce,
|
|
|
|
|
|
server_nonce = server_nonce,
|
|
|
|
|
|
p = p,
|
|
|
|
|
|
q = q,
|
|
|
|
|
|
public_key_fingerprint = public_key_fingerprint,
|
|
|
|
|
|
encrypted_data = encrypted_data,
|
|
|
|
|
|
});
|
2022-01-21 19:04:33 +01:00
|
|
|
|
|
2021-09-17 04:53:02 +02:00
|
|
|
|
public static Task<SetClientDHParamsAnswer> SetClientDHParams(this Client client, Int128 nonce, Int128 server_nonce, byte[] encrypted_data)
|
2021-12-16 14:51:47 +01:00
|
|
|
|
=> client.InvokeBare(new SetClientDHParams
|
2021-11-10 02:17:08 +01:00
|
|
|
|
{
|
|
|
|
|
|
nonce = nonce,
|
|
|
|
|
|
server_nonce = server_nonce,
|
|
|
|
|
|
encrypted_data = encrypted_data,
|
|
|
|
|
|
});
|
2022-01-21 19:04:33 +01:00
|
|
|
|
|
2021-09-17 04:53:02 +02:00
|
|
|
|
public static Task<DestroyAuthKeyRes> DestroyAuthKey(this Client client)
|
2021-12-16 14:51:47 +01:00
|
|
|
|
=> client.InvokeBare(new DestroyAuthKey
|
2021-11-10 02:17:08 +01:00
|
|
|
|
{
|
|
|
|
|
|
});
|
2022-01-21 19:04:33 +01:00
|
|
|
|
|
2021-09-17 04:53:02 +02:00
|
|
|
|
public static Task<RpcDropAnswer> RpcDropAnswer(this Client client, long req_msg_id)
|
2021-12-16 14:51:47 +01:00
|
|
|
|
=> client.InvokeBare(new Methods.RpcDropAnswer
|
2021-11-10 02:17:08 +01:00
|
|
|
|
{
|
|
|
|
|
|
req_msg_id = req_msg_id,
|
|
|
|
|
|
});
|
2022-01-21 19:04:33 +01:00
|
|
|
|
|
2021-09-17 04:53:02 +02:00
|
|
|
|
public static Task<FutureSalts> GetFutureSalts(this Client client, int num)
|
2021-12-16 14:51:47 +01:00
|
|
|
|
=> client.Invoke(new GetFutureSalts
|
2021-11-10 02:17:08 +01:00
|
|
|
|
{
|
|
|
|
|
|
num = num,
|
|
|
|
|
|
});
|
2022-01-21 19:04:33 +01:00
|
|
|
|
|
2021-09-17 04:53:02 +02:00
|
|
|
|
public static Task<Pong> Ping(this Client client, long ping_id)
|
2021-12-16 14:51:47 +01:00
|
|
|
|
=> client.Invoke(new Ping
|
2021-11-10 02:17:08 +01:00
|
|
|
|
{
|
|
|
|
|
|
ping_id = ping_id,
|
|
|
|
|
|
});
|
2022-01-21 19:04:33 +01:00
|
|
|
|
|
2021-09-17 04:53:02 +02:00
|
|
|
|
public static Task<Pong> PingDelayDisconnect(this Client client, long ping_id, int disconnect_delay)
|
2021-12-16 14:51:47 +01:00
|
|
|
|
=> client.Invoke(new PingDelayDisconnect
|
2021-11-10 02:17:08 +01:00
|
|
|
|
{
|
|
|
|
|
|
ping_id = ping_id,
|
|
|
|
|
|
disconnect_delay = disconnect_delay,
|
|
|
|
|
|
});
|
2022-01-21 19:04:33 +01:00
|
|
|
|
|
2021-09-17 04:53:02 +02:00
|
|
|
|
public static Task<DestroySessionRes> DestroySession(this Client client, long session_id)
|
2021-12-16 14:51:47 +01:00
|
|
|
|
=> client.InvokeBare(new DestroySession
|
2021-11-10 02:17:08 +01:00
|
|
|
|
{
|
|
|
|
|
|
session_id = session_id,
|
|
|
|
|
|
});
|
2021-08-04 00:40:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-11-10 17:26:40 +01:00
|
|
|
|
|
|
|
|
|
|
namespace TL.Methods
|
|
|
|
|
|
{
|
2023-07-08 01:34:31 +02:00
|
|
|
|
#pragma warning disable IDE1006
|
2021-11-10 17:26:40 +01:00
|
|
|
|
[TLDef(0x60469778)] //req_pq#60469778 nonce:int128 = ResPQ
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class ReqPq : IMethod<ResPQ>
|
2021-11-10 17:26:40 +01:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 nonce;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TLDef(0xBE7E8EF1)] //req_pq_multi#be7e8ef1 nonce:int128 = ResPQ
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class ReqPqMulti : IMethod<ResPQ>
|
2021-11-10 17:26:40 +01:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 nonce;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TLDef(0xD712E4BE)] //req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:bytes q:bytes public_key_fingerprint:long encrypted_data:bytes = Server_DH_Params
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class ReqDHParams : IMethod<ServerDHParams>
|
2021-11-10 17:26:40 +01:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 nonce;
|
|
|
|
|
|
public Int128 server_nonce;
|
|
|
|
|
|
public byte[] p;
|
|
|
|
|
|
public byte[] q;
|
|
|
|
|
|
public long public_key_fingerprint;
|
|
|
|
|
|
public byte[] encrypted_data;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TLDef(0xF5045F1F)] //set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:bytes = Set_client_DH_params_answer
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class SetClientDHParams : IMethod<SetClientDHParamsAnswer>
|
2021-11-10 17:26:40 +01:00
|
|
|
|
{
|
|
|
|
|
|
public Int128 nonce;
|
|
|
|
|
|
public Int128 server_nonce;
|
|
|
|
|
|
public byte[] encrypted_data;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TLDef(0xD1435160)] //destroy_auth_key#d1435160 = DestroyAuthKeyRes
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class DestroyAuthKey : IMethod<DestroyAuthKeyRes> { }
|
2021-11-10 17:26:40 +01:00
|
|
|
|
|
|
|
|
|
|
[TLDef(0x58E4A740)] //rpc_drop_answer#58e4a740 req_msg_id:long = RpcDropAnswer
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class RpcDropAnswer : IMethod<TL.RpcDropAnswer>
|
2021-11-10 17:26:40 +01:00
|
|
|
|
{
|
|
|
|
|
|
public long req_msg_id;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TLDef(0xB921BD04)] //get_future_salts#b921bd04 num:int = FutureSalts
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class GetFutureSalts : IMethod<FutureSalts>
|
2021-11-10 17:26:40 +01:00
|
|
|
|
{
|
|
|
|
|
|
public int num;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TLDef(0x7ABE77EC)] //ping#7abe77ec ping_id:long = Pong
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class Ping : IMethod<Pong>
|
2021-11-10 17:26:40 +01:00
|
|
|
|
{
|
|
|
|
|
|
public long ping_id;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TLDef(0xF3427B8C)] //ping_delay_disconnect#f3427b8c ping_id:long disconnect_delay:int = Pong
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class PingDelayDisconnect : IMethod<Pong>
|
2021-11-10 17:26:40 +01:00
|
|
|
|
{
|
|
|
|
|
|
public long ping_id;
|
|
|
|
|
|
public int disconnect_delay;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TLDef(0xE7512126)] //destroy_session#e7512126 session_id:long = DestroySessionRes
|
2024-03-26 02:30:16 +01:00
|
|
|
|
public sealed partial class DestroySession : IMethod<DestroySessionRes>
|
2021-11-10 17:26:40 +01:00
|
|
|
|
{
|
|
|
|
|
|
public long session_id;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|