miniproto.tl.codec.serialize_object
miniproto.tl.codec.serialize_object
Section titled “miniproto.tl.codec.serialize_object”serialize_object(obj: Any, *, boxed: bool = True) -> bytesSerialize a generated TL object using its generated or generic metadata path.
Parameters:
- obj (
Any) – Generated TL object instance. - boxed (
bool) – Include its constructor ID, defaulting toTrue.
Returns:
bytes– TL wire representation of the object.
Raises:
TLCodecError– Ifobjdoes not expose generated TL metadata.