miniproto.session
miniproto.session
Section titled “miniproto.session”Public session models, storage backends, and portable string codecs.
Public objects
Section titled “Public objects”AuthKey— Validated non-empty MTProto authorization key bound to a positive DC.DCOption— One validated Telegram data-centre endpoint and optional transport secret.PeerCacheEntry— Durable peer lookup metadata with a shallow-copied optional raw-field mapping.SessionRecord— Complete versioned session state with frozen, shallow collection snapshots.UpdateState— Monotonic Telegram update cursors and their latest server timestamp.UserIdentity— Durable Telegram user identity with optional private contact metadata.session_record_from_mapping— Construct a validated record from a decoded canonical mapping.session_record_to_mapping— Serialize a typed record to the canonical storage-compatible mapping.EncryptedSQLiteSessionStorage— Thread-safe SQLite persistence with per-domain authenticated encryption.InMemorySessionStorage— Thread-safe in-process storage that snapshots all values by serialization.SessionStorage— Async session persistence contract with atomic synchronous transforms.SessionString— A bearer-secret string whose representation is always redacted.SessionStringFormat— Public attributeminiproto.session.strings.SessionStringFormat.export_session_string— Export a typed or decoded session record in a portable bearer format.import_session_string— Import a native, Telethon v1, or Pyrogram string into a validated record.