EventualSyftMessage(address[, msg_id])

EventualSyftMessageWithoutReply(address[, ...])

ImmediateSyftMessage(address[, msg_id])

ImmediateSyftMessageWithReply(reply_to, address)

ImmediateSyftMessageWithoutReply(address[, ...])

SignedEventualSyftMessageWithoutReply(...[, ...])

SignedImmediateSyftMessageWithReply(address, ...)


SignedMessage(address, obj_type, signature, ...)

SignedMessages are :class:`SyftMessage`s that have been signed by someone.

SyftMessage(address[, msg_id])

SyftMessages are an abstraction that represents information that is sent between a Client and a Node.

SyftMessageWithReply(address[, msg_id])

SyftMessageWithoutReply(address[, msg_id])

class syft.core.common.message.SyftMessage(address, msg_id=None)[source]

Bases: syft.core.common.message.AbstractMessage

SyftMessages are an abstraction that represents information that is sent between a Client and a Node. In Syft’s decentralized setup, we can easily see why SyftMessages are so important. This class cannot be used as-is: to get some useful objects, we need to derive from it. For instance, Action`s inherit from :class:`SyftMessage. There are many types of SyftMessage which boil down to whether or not they are Sync or Async, and whether or not they expect a response.


the Address to which the message needs to be delivered.


It’s important for all messages to be able to prove who they were sent from. This method endows every message with the ability for someone to “sign” (with a hash of the message) as the sender of the message so that someone else, at a later date, can verify the sender.


signing_key – The key to use to sign the SyftMessage.


A SignedMessage

class syft.core.common.message.SignedMessage(address, obj_type, signature, verify_key, message, msg_id=None)[source]

Bases: syft.core.common.message.SyftMessage

SignedMessages are SyftMessage`s that have been signed by someone. In addition to what has a :class:`SyftMessage, they have a signature, a verify key and a is_valid() property that is here to check that the message was really signed and sent by the verify key owner.


the string representation of the type of the original message.




the signature of the message.




the signer’s public key with which the signature can be verified.




the serialized original message.

static get_protobuf_schema()[source]

Return the type of protobuf object which stores a class of this type

As a part of serialization and deserialization, we need the ability to lookup the protobuf object type directly from the object type. This static method allows us to do this.

Importantly, this method is also used to create the reverse lookup ability within the metaclass of Serializable. In the metaclass, it calls this method and then it takes whatever type is returned from this method and adds an attribute to it with the type of this class attached to it. See the MetaSerializable class for details.


the type of protobuf object which corresponds to this class.