miniproto.mtproto
miniproto.mtproto
Section titled “miniproto.mtproto”Public MTProto message framing, service-body, and state APIs.
Public objects
Section titled “Public objects”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.DecodedEncryptedMessage— Authenticated encrypted MTProto envelope with decrypted body and padding.GzipPacked— MTProtogzip_packedservice body holding compressed message bytes.MessageContainer— MTProtomsg_containerbody containing ordered message entries.MessageContainerItem— One message entry inside an MTProto message container.MsgResendReq— MTProtomsg_resend_reqbody requesting retransmission of message IDs.MsgsAck— MTProtomsgs_ackbody acknowledging received message IDs.MsgsStateInfo— MTProtomsgs_state_infobody answering a state request.MsgsStateReq— MTProtomsgs_state_reqbody requesting message states.NewSessionCreated— MTProto notification that establishes a new server session and salt.Pong— MTProtopongresponse correlating a server message and ping ID.RpcErrorBody— Decoded MTProtorpc_errorresult body.RpcResult— MTProtorpc_resultbody containing raw or decoded result data.decode_encrypted_message— Authenticate, decrypt, and parse one MTProto encrypted envelope.decode_message_body— Decode recognized MTProto service bodies, preserving unknown data as a view.decode_unencrypted_message— Validate and decode an unencrypted MTProto envelope.encode_encrypted_message— Encrypt and frame one MTProto message using the configured authorization key.encode_message_body— Encode raw, generated, or built-in MTProto service message bodies.encode_unencrypted_message— Frame an unencrypted MTProto message withauth_key_id = 0.gzip_pack— Compress an encodable MTProto body into agzip_packedservice object.MTProtoState— Track one authorization key’s MTProto session, timing, and acknowledgement state.