NetworkAddress class

Network address structure for Bitcoin protocol

Constructors

NetworkAddress({int timestamp = 0, required int services, required List<int> ip, required int port})
NetworkAddress.deserialize(Uint8List data, int offset, {bool includeTimestamp = false})
Deserialize address from bytes
factory
NetworkAddress.ipv4(String ipv4, int port, {int services = ServiceFlags.nodeNetwork})
Create IPv4 address (mapped to IPv6)
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
ip List<int>
final
ipString String
Get IP address as string
no setter
isIPv4 bool
Check if this is an IPv4 address
no setter
isLocalhost bool
Check if this is a localhost address
no setter
isZero bool
Check if this is a zero/invalid address
no setter
port int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
services int
final
timestamp int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize({bool includeTimestamp = false}) Uint8List
Serialize address to bytes (with optional timestamp)
toString() String
A string representation of this object.
override

Operators

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