AddrInfo class

Represents a peer with its addresses

Constructors

AddrInfo(PeerId id, List<MultiAddr> addrs)
Creates a new AddrInfo with the given peer ID and addresses
AddrInfo.withId(PeerId id)
Creates a new AddrInfo with the given peer ID and no addresses

Properties

addrs → List<MultiAddr>
The list of addresses for this peer
final
hashCode → int
The hash code for this object.
no setteroverride
id → PeerId
The peer ID
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

fromMultiaddr(MultiAddr addr) → AddrInfo
mergeAddrInfos(AddrInfo prevAi, AddrInfo newAi) → AddrInfo?
Creates a new AddrInfo by merging the addresses of two AddrInfo objects Returns null if no new addresses were added