miniproto.mtproto.codec
miniproto.mtproto.codec
Section titled “miniproto.mtproto.codec”MTProto encrypted framing and core service-message body codecs.
Public objects
Section titled “Public objects”DecodedEncryptedMessage— Authenticated encrypted MTProto envelope with decrypted body and padding.UnencryptedMessage— Unencrypted MTProto envelope carrying a message ID and raw body.MsgsAck— MTProtomsgs_ackbody acknowledging received message IDs.MsgsStateReq— MTProtomsgs_state_reqbody requesting message states.MsgsStateInfo— MTProtomsgs_state_infobody answering a state request.MsgResendReq— MTProtomsg_resend_reqbody requesting retransmission of message IDs.MessageContainerItem— One message entry inside an MTProto message container.MessageContainer— MTProtomsg_containerbody containing ordered message entries.GzipPacked— MTProtogzip_packedservice body holding compressed message bytes.Pong— MTProtopongresponse 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— MTProtorpc_resultbody containing raw or decoded result data.encode_unencrypted_message— Frame an unencrypted MTProto message withauth_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 MTProtopingservice body.encode_ping_delay_disconnect— Encode an MTProtoping_delay_disconnectservice body.gzip_pack— Compress an encodable MTProto body into agzip_packedservice object.