miniproto.session.models.PeerCacheEntry
miniproto.session.models.PeerCacheEntry
Section titled “miniproto.session.models.PeerCacheEntry”PeerCacheEntry(id: int, kind: PeerKind, access_hash: int | None = None, username: str | None = None, phone: str | None = None, updated_at: datetime = _utc_now(), raw: Mapping[str, Any] | None = None) -> NoneDurable peer lookup metadata with a shallow-copied optional raw-field mapping.
raw is copied at its outer mapping level, so nested raw values remain
mutable. phone is hidden from repr and optional access hashes remain
absent for minimal Telegram peers.
Attributes:
- id (
int) – Positive Telegram peer identifier. - kind (
PeerKind) – Peer category used to construct input peers. - access_hash (
int | None) – Optional access hash required for some peer operations. - username (
str | None) – Optional public username. - phone (
str | None) – Optional private phone number, hidden fromrepr. - updated_at (
datetime) – Last-known peer metadata timestamp; aware input retains its timezone. - raw (
Mapping[str, Any] | None) – Optional shallow-copied extra raw fields; nested values remain mutable.
Raises:
ValueError– If the peer ID is not positive.