Skip to content

miniproto.session.models.SessionRecord

SessionRecord(version: int = SESSION_RECORD_VERSION, dc_id: int | None = None, auth_key: AuthKey | None = None, dc_options: tuple[DCOption, ...] = (), user: UserIdentity | None = None, update_state: UpdateState = UpdateState(), peers: tuple[PeerCacheEntry, ...] = (), metadata: Mapping[str, Any] = dict()) -> None

Complete versioned session state with frozen, shallow collection snapshots.

Attributes:

Default update state is empty, while every other optional domain remains absent or empty until the client obtains it.

Raises:

  • ValueError – If the version is unsupported or configured DC is invalid.