miniproto.invoke
miniproto.invoke
Section titled “miniproto.invoke”Prepare, send, decode, retry, and persist low-level Telegram RPC state.
Public objects
Section titled “Public objects”TELEGRAM_LAYER— Public attributeminiproto.invoke.TELEGRAM_LAYER.INIT_CONNECTION_ENVELOPES— Public attributeminiproto.invoke.INIT_CONNECTION_ENVELOPES.RawSender— Minimal connected sender capability required by the RPC invocation layer.SenderFactory— Public attributeminiproto.invoke.SenderFactory.wrap_raw_request— Wrap a raw request for transmission.sender_needs_init— Return whethersenderstill needs its first init-connection envelope.mark_sender_initialized— Mark a sender as initialized when it permits dynamic state attributes.decode_rpc_response— Decode and validate an RPC result, translating Telegram error bodies.decode_result_payload— Decode bytes or gzip-packed RPC results while leaving decoded values unchanged.validate_result_type— Raise when a concrete TL response does not match the request result contract.result_type_for_request— Return a raw request class’s declared TLRESULT_TYPE, when available.is_retryable_request— Determine whether retrying this request is protocol-safe.should_retry_rpc_error— Return whether a classified server-side RPC failure is transient enough to retry.should_sleep_for_flood_wait— Return whether a flood wait is short enough for automatic sleeping.MethodFloodWaitCache— Bounded client-local cache for Telegram’s method-scoped flood waits.method_name_for_request— Return the innermost wrapped request class’s Telegram-qualified method name.load_session_record— Load current structured or legacy session data into aSessionRecord.build_sender_from_session— Build a sender for the session DC, or — with overrides — a media DC.clear_invalid_auth_key— Atomically clear an unusable persisted authorization key and user identity.wrap_transport_failure— Translate a transport exception to the RPC-level error exposed to callers.