MsgVersion class

Bitcoin version message for protocol negotiation

Inheritance

Constructors

MsgVersion({int protocolVersion = 70016, int services = ServiceFlags.none, int? timestamp, NetworkAddress? addrReceiver, NetworkAddress? addrSender, int? nonce, String userAgent = '/bsv-p2p-dart:0.1.0/', int startHeight = 0, bool relay = false})

Properties

addrReceiver NetworkAddress
getter/setter pair
addrSender NetworkAddress
getter/setter pair
command String
Get the command string for this message type
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
maxPayloadLength int
Get maximum payload length for this message type
no setteroverride
nonce int
getter/setter pair
protocolVersion int
getter/setter pair
relay bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
services int
getter/setter pair
startHeight int
getter/setter pair
timestamp int
getter/setter pair
userAgent String
getter/setter pair

Methods

decode(Uint8List data, int protocolVersion, MessageEncoding encoding) → void
Decode message from bytes
override
encode(int protocolVersion, MessageEncoding encoding) Uint8List
Encode message to bytes
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize(int protocolVersion, BitcoinNetwork network) Uint8List
Serialize complete message with header
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

deserialize(Uint8List data, int protocolVersion, MessageEncoding encoding) MsgVersion
Factory method for deserialization
registerWithFactory() → void
Register this message type with the factory