Skip to content

miniproto.mtproto.quick_ack.quick_ack_token

miniproto.mtproto.quick_ack.quick_ack_token

Section titled “miniproto.mtproto.quick_ack.quick_ack_token”
quick_ack_token(auth_key: bytes, encrypted_packet: bytes) -> int

Derive Telegram’s high-bit-set quick-ACK token for an encrypted packet.

Parameters:

  • auth_key (bytes) – MTProto authorization key used for the packet.
  • encrypted_packet (bytes) – Complete encrypted MTProto packet bytes.

Returns:

  • int – The 32-bit quick-ACK token computed by the available native or fallback codec.

Raises:

  • ValueError – The selected native or fallback codec rejects the authorization key or packet framing.