Expand description
Pure core of opentele2.
This crate holds every Telegram Desktop tdata format and crypto rule
shared by the Python and Node bindings. Its contract:
- Pure: the core transforms bytes and values it is given; it walks no filesystem beyond explicit paths passed by the caller.
- No async: every function is synchronous; there is no runtime dependency such as tokio.
- No network: the core opens no sockets and speaks no
MTPrototransport. - No FFI: bindings live in separate crates; this crate exports a plain
Rust API and forbids
unsafecode.
Every fallible operation returns Result, whose error type Error
carries a stable Error::code that bindings map onto their own
exception types.
The default feature parallel runs the batch entry points over
independent folders on a dedicated rayon pool; without it they run
sequentially with identical results.
Modules§
- api
- The official Telegram client API profiles.
- auth
- The client-independent parts of login, session admin and consistency checks.
- batch
- Batch entry points over independent tdata folders.
- compress
- Gzip compression of
MTProtopayloads (gzip_packed), in pure Rust throughflate2’sminiz_oxidebackend. - crypto
- Telegram Desktop local crypto: auth keys,
prepareAES_oldmtp, AES-256-IGE and thetdatalocal encryption envelope, plus the primitives anMTProtoclient needs: SHA-1, SHA-256, HMAC-SHA256, PBKDF2, AES-256-CTR,pqfactorisation and the operating system’s random source. - devices
- Device fingerprints, picked from weighted catalogs by a seed hash.
- fingerprint
- The pure
initConnectionfingerprint helpers. - kdf
- Passcode key derivation: the PBKDF2 local keys and the Argon2id / scrypt
passcode wraps of the v2
key_datafile. - qt
- Big-endian
QDataStreamvalues as Telegram Desktop writes them. - session
- Session formats of other Telegram libraries, built from tdata accounts.
- tdata
- Telegram Desktop
tdatafolder formats, built on thecrate::tdfcontainer, thecrate::qtstream encoding, and thecrate::cryptoandcrate::kdfprimitives. - tdf
- The
TDF$container that wraps every Telegram Desktoptdatafile.
Enums§
- Config
Failure - What an
Error::BadConfigDatawas raised for: the MTP config checks, and the endpoint, session and self-user checks that report the same code. - Error
- Every failure the core can report.
- KeyData
Failure - What an
Error::KeyDataInvalidwas raised for (crate::tdata::key_dataandcrate::tdata::TData::load). - Magic
Context - What an
Error::InvalidMagicwas raised for. - MapRead
Failure - What an
Error::ReadMapDataFailedwas raised for (MapData.read).
Type Aliases§
- Result
- Result alias used by every fallible operation in the core.