Skip to content
module

neo3.network.payloads.version

Payload containing node information.

Classes
class

neo3.network.payloads.version.VersionPayload(nonce, user_agent, capabilities)

Bases
neo3.core.serialization.ISerializable

A payload carrying node handshake data.

Attributes
  • capabilities (A list of services a node offers. See) ref:capabilities <library-network-capabilities>
  • magic Reference nodes will disconnect if the value doesn't match with their local settings.
  • nonce A unique identifier for the node.
  • timestamp The UTC time when the node connected
  • user_agent A node client description i.e. "NEO-MAMBA-V001"
  • version Protocol version of the node
Methods
  • __len__() Get the total size in bytes of the object.
  • deserialize(reader) Deserialize the object from a binary stream.
  • serialize(writer) Serialize the object into a binary stream.
  • to_array() (bytes) Serialize the object into a bytearray.
  • deserialize_from_bytes(data) (ISerializable_T) Parse data into an object instance.
classmethod

deserialize_from_bytes(data)

Parse data into an object instance.

Parameters
  • data (bytes | bytearray) hex escaped bytes.
Returns (ISerializable_T)

a deserialized instance of the class.

method

to_array() → bytes

Serialize the object into a bytearray.

method

__len__()

Get the total size in bytes of the object.

method

deserialize(reader)

Deserialize the object from a binary stream.

Parameters
  • reader (BinaryReader) instance.
method

serialize(writer)

Serialize the object into a binary stream.

Parameters
  • writer (BinaryWriter) instance.