ferogram_mtproto/lib.rs
1// Copyright (c) Ankit Chaubey <ankitchaubey.dev@gmail.com>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3//
4// ferogram: async Telegram MTProto client in Rust
5// https://github.com/ankit-chaubey/ferogram
6//
7//
8// If you use or modify this code, keep this notice at the top of your file
9// and include the LICENSE-MIT or LICENSE-APACHE file from this repository:
10// https://github.com/ankit-chaubey/ferogram
11
12#![cfg_attr(docsrs, feature(doc_cfg))]
13#![doc(html_root_url = "https://docs.rs/ferogram-mtproto/0.4.6")]
14//! MTProto session and transport abstractions.
15//!
16//! This crate handles:
17//! * Message framing (sequence numbers, message IDs)
18//! * Plaintext transport (for initial handshake / key exchange)
19//! * Encrypted transport skeleton (requires a crypto backend)
20//!
21//! It is intentionally transport-agnostic: bring your own TCP/WebSocket.
22
23#![deny(unsafe_code)]
24#![warn(missing_docs)]
25
26pub mod authentication;
27pub mod bind_temp_key;
28pub mod encrypted;
29pub mod message;
30pub mod session;
31pub mod transport;
32
33pub use authentication::{Finished, finish, step1, step2, step3};
34pub use bind_temp_key::{encrypt_bind_inner, gen_msg_id, serialize_bind_temp_auth_key};
35pub use encrypted::{DecryptedMessage, EncryptedSession, SeenMsgIds, new_seen_msg_ids};
36pub use message::{Message, MessageId};
37pub use session::Session;