MultiAddr class
Represents a multiaddress
Constructors
- MultiAddr.new(String _addr)
- Creates a new Multiaddr from a string Format: /protocol1/value1/protocol2/value2 Example: /ip4/127.0.0.1/tcp/1234
Properties
- certhash → String?
-
Returns the certificate hash if present
no setter
-
components
→ List<
(Protocol, String)> -
Returns all protocol/value pairs in this multiaddr
no setter
- dns4 → String?
-
Returns the DNS4 address if present
no setter
- dns6 → String?
-
Returns the DNS6 address if present
no setter
- dnsaddr → String?
-
Returns the DNS address if present
no setter
- hasCircuit → bool
-
Returns true if P2P circuit protocol is present
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasQuicV1 → bool
-
Returns true if QUIC-v1 protocol is present
no setter
- hasUdx → bool
-
Protocol Flag Getters
Returns true if UDX protocol is present
no setter
- hasWebtransport → bool
-
Returns true if WebTransport protocol is present
no setter
- ip → String?
-
Returns the first available IP address (IPv4 or IPv6)
no setter
- ip4 → String?
-
Network Address Getters
Returns the IPv4 address if present
no setter
- ip6 → String?
-
Returns the IPv6 address if present
no setter
- peerId → String?
-
Identity and Path Getters
Returns the peer ID if present
no setter
- port → int?
-
Returns the first available port number (TCP or UDP)
no setter
-
protocols
→ List<
Protocol> -
Returns all protocols in this multiaddr
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sni → String?
-
Returns the SNI value if present
no setter
- tcpPort → int?
-
Port Getters
Returns the TCP port number if present
no setter
-
transports
→ List<
String> -
Returns all transport protocols present in this multiaddr
no setter
- udpPort → int?
-
Returns the UDP port number if present
no setter
- unixPath → String?
-
Returns the Unix path if present
no setter
-
values
→ List<
String> -
Returns all values in this multiaddr
no setter
Methods
-
decapsulate(
String protocol) → MultiAddr? - Decapsulates the last protocol/value pair from this multiaddr
-
encapsulate(
String protocolName, String value) → MultiAddr - Encapsulates this multiaddr with another protocol/value pair
-
equals(
MultiAddr addr) → bool -
hasProtocol(
String protocol) → bool -
isLoopback(
) → bool -
isPrivate(
) → bool -
isPublic(
) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBytes(
) → Uint8List -
toIP(
) → InternetAddress? -
toString(
) → String -
A string representation of this object.
override
-
valueForProtocol(
String protocol) → String?
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override