Skip to content

packages.fetchai.protocols.default.serialization

Serialization module for default protocol.

DefaultSerializer Objects

class DefaultSerializer(Serializer)

Serialization for the 'default' protocol.

encode

 | @staticmethod
 | encode(msg: Message) -> bytes

Encode a 'Default' message into bytes.

Arguments:

  • msg: the message object.

Returns:

the bytes.

decode

 | @staticmethod
 | decode(obj: bytes) -> Message

Decode bytes into a 'Default' message.

Arguments:

  • obj: the bytes object.

Returns:

the 'Default' message.

Back to top