miniproto_native::mtproto::mtproto_encode_message_with_ack
Provenance
Section titled “Provenance”- Rust visibility:
restricted - Source:
rust/miniproto/src/mtproto.rs - Python exposure:
miniproto._native.mtproto_encode_message_with_ack(confirmed from adjacent PyO3 attributes)
Signature
Section titled “Signature”fn mtproto_encode_message_with_ack(py: _, auth_key: _, server_salt: u64, session_id: u64, msg_id: i64, seq_no: i32, body: _, client_to_server: bool, padding: _) -> _Arguments
Section titled “Arguments”py: Python token for detaching large encryption operations.auth_key: 256-byte authorization key for the envelope.server_salt: Unsigned 64-bit server salt.session_id: Unsigned 64-bit session identifier.msg_id: Signed MTProto message identifier.seq_no: Message sequence number.body: Four-byte-aligned TL body.client_to_server: Selects the directional MTProto key schedule.padding: Explicit MTProto padding, or None to generate it.
mtproto_encode_message_with_ack
Section titled “mtproto_encode_message_with_ack”fn mtproto_encode_message_with_ack(py: Python<'_>, auth_key: std::borrow::Cow<'_, [u8]>, server_salt: u64, session_id: u64, msg_id: i64, seq_no: i32, body: std::borrow::Cow<'_, [u8]>, client_to_server: bool, padding: Option<std::borrow::Cow<'_, [u8]>>) -> PyResult<(Vec<u8>, u32)>Defined in rust/miniproto/src/mtproto.rs:158-182
Encodes one envelope and returns the receipt token derived with its message key.
Arguments
Section titled “Arguments”py: Python token for detaching large encryption operations.auth_key: 256-byte authorization key for the envelope.server_salt: Unsigned 64-bit server salt.session_id: Unsigned 64-bit session identifier.msg_id: Signed MTProto message identifier.seq_no: Message sequence number.body: Four-byte-aligned TL body.client_to_server: Selects the directional MTProto key schedule.padding: Explicit MTProto padding, or None to generate it.