neo3.network.payloads.address
Node address information.
AddrPayload
— Address payload with list of address information entries.NetworkAddress
— Address properties.
neo3.network.payloads.address.
AddrPayload
(
addresses
)
Address payload with list of address information entries.
__len__
(
)
— Return the length of the object in number of bytes.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.
deserialize_from_bytes
(
data
)
Parse data into an object instance.
data
(bytes | bytearray) — hex escaped bytes.
a deserialized instance of the class.
to_array
(
)
→ bytes
Serialize the object into a bytearray.
__len__
(
)
Return the length of the object in number of bytes.
deserialize
(
reader
)
Deserialize the object from a binary stream.
reader
(BinaryReader) — instance.
serialize
(
writer
)
Serialize the object into a binary stream.
writer
(BinaryWriter) — instance.
neo3.network.payloads.address.
AddressState
(
)
Node state
Used for tracking remote address state.
CONNECTED
(int) — 0x1DEAD
(int) — 0x3NEW
(int) — 0x0POOR
(int) — 0x2
neo3.network.payloads.address.
DisconnectReason
(
)
Reason for disconnecting a node.
Will also be broadcast back to the node when this PR is merged. For now only used internally with logging.
HANDSHAKE_VERACK_ERROR
(int) — 0x5HANDSHAKE_VERSION_ERROR
(int) — 0x4IPFILTER_NOT_ALLOWED
(int) — 0x3MAX_CONNECTIONS_REACHED
(int) — 0x1POOR_PERFORMANCE
(int) — 0x2SHUTTING_DOWN
(int) — 0x6UNKNOWN
(int) — 0x0
neo3.network.payloads.address.
NetworkAddress
(
address
, capabilities=None
, timestamp=None
, state=<AddressState.NEW: 0>
)
Address properties.
ip
(str) — Get ip.is_state_connected
(bool) — Test if state isconnected
.is_state_dead
(bool) — Test if state isdead
.is_state_new
(bool) — Test if state isnew
.is_state_poor
(bool) — Test if state ispoor
.port
(int) — Get port.
__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.set_state_connected
(
)
— Set state attribute toconnected
.set_state_dead
(
)
— Set state attribute todead
.set_state_new
(
)
— Set state attribute tonew
.set_state_poor
(
)
— Set state attribute topoor
.to_array
(
)
(bytes) — Serialize the object into a bytearray.deserialize_from_bytes
(
data
)
(ISerializable_T) — Parse data into an object instance.
deserialize_from_bytes
(
data
)
Parse data into an object instance.
data
(bytes | bytearray) — hex escaped bytes.
a deserialized instance of the class.
to_array
(
)
→ bytes
Serialize the object into a bytearray.
__len__
(
)
Get the total size in bytes of the object.
Note
This size is only for the official properties such that it matches C#. Unofficial properties are not accounted for.
deserialize
(
reader
)
Deserialize the object from a binary stream.
reader
(BinaryReader) — instance.
serialize
(
writer
)
Serialize the object into a binary stream.
writer
(BinaryWriter) — instance.
set_state_connected
(
)
Set state attribute to connected
.
set_state_dead
(
)
Set state attribute to dead
.
set_state_new
(
)
Set state attribute to new
.
set_state_poor
(
)
Set state attribute to poor
.