Represents a packet of data that can be transmitted as part of the p2p xud protocol. Packets are serialized using protobuf, optionally encrypted, and transmitted to peers. Each packet represents a discrete chunk of information that either sends data to or requests data from a peer.
Create a packet from a deserialized packet message.
a deserialized object containing a packet header and optional body
Create a packet from a packet body.
the id of the requesting packet to set on the header if this packet is a response
Calculating the packet checksum using its JSON representation hash first 4 bytes.
Serialize this packet to binary Buffer.
Buffer representation of the packet
Generated using TypeDoc