Skip to content

miniproto.mtproto.codec

MTProto encrypted framing and core service-message body codecs.

  • DecodedEncryptedMessage — Authenticated encrypted MTProto envelope with decrypted body and padding.
  • UnencryptedMessage — Unencrypted MTProto envelope carrying a message ID and raw body.
  • MsgsAck — MTProto msgs_ack body acknowledging received message IDs.
  • MsgsStateReq — MTProto msgs_state_req body requesting message states.
  • MsgsStateInfo — MTProto msgs_state_info body answering a state request.
  • MsgResendReq — MTProto msg_resend_req body requesting retransmission of message IDs.
  • MessageContainerItem — One message entry inside an MTProto message container.
  • MessageContainer — MTProto msg_container body containing ordered message entries.
  • GzipPacked — MTProto gzip_packed service body holding compressed message bytes.
  • Pong — MTProto pong response correlating a server message and ping ID.
  • BadMsgNotification — MTProto notice that a message ID, sequence number, or other field was invalid.
  • BadServerSalt — MTProto bad-message notice that additionally carries a replacement server salt.
  • NewSessionCreated — MTProto notification that establishes a new server session and salt.
  • RpcResult — MTProto rpc_result body containing raw or decoded result data.
  • encode_unencrypted_message — Frame an unencrypted MTProto message with auth_key_id = 0.
  • decode_unencrypted_message — Validate and decode an unencrypted MTProto envelope.
  • encode_encrypted_message — Encrypt and frame one MTProto message using the configured authorization key.
  • decode_encrypted_message — Authenticate, decrypt, and parse one MTProto encrypted envelope.
  • encode_message_body — Encode raw, generated, or built-in MTProto service message bodies.
  • decode_message_body — Decode recognized MTProto service bodies, preserving unknown data as a view.
  • encode_ping — Encode an MTProto ping service body.
  • encode_ping_delay_disconnect — Encode an MTProto ping_delay_disconnect service body.
  • gzip_pack — Compress an encodable MTProto body into a gzip_packed service object.