mtproto v57.3.1-beta MTProto.State

:notifier - pid of the process where MTProto client sends notifications; :socket - TCP socket; :packet_buffer - gluing incomplete TCP packets into fully one; :session_id - MTProto session ID, generated for every client instance (process);

:auth_state authentication state, can be one of these values:

  • :connected - when client only connected to the telegram server;
  • :req_pq - first request to the server in authorization flow, requests P and Q numbers;
  • :req_dh_params - second request to the server, for getting DH data;
  • :dh_gen - last request to the server, to check new_nonce_hashN;
  • :encrypted - authorized state of the client, when it has auth_key, auth_key_hash and server_salt.

:auth_params - for storing authentication params between steps, used AuthParams struct; :auth_key - authentication key, see MTProto docs for details; :auth_key_hash - authentication key hash; :server_salt - telegram server salt; :msg_seqno - used for storing message sequence number, for using in MTProto packets; :msg_ids - list of message IDs, using for server acks; :dc_options - list of telegram datacenters; :dc - current datacenter ID; :reconnect - reconnect state, see MTProto.DC for details.