Libp2p class
Factory functions for creating options
Constructors
- Libp2p()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
addrsFactory(
AddrsFactory factory) → Option -
ambientAutoNATv2Config(
AmbientAutoNATv2Config conf) → Option -
autoNAT(
bool enabled) → Option -
autoNATv2AllowPrivateAddrs(
) → Option - Configures AutoNATv2 to allow private addresses (for testing)
-
autoNATv2AmplificationAttackPreventionDialWait(
Duration duration) → Option - Configures AutoNATv2 amplification attack prevention dial wait time
-
autoNATv2DataRequestPolicy(
DataRequestPolicyFunc policy) → Option - Configures AutoNATv2 with a custom data request policy
-
autoNATv2MetricsTracer(
MetricsTracer metricsTracer) → Option - Configures AutoNATv2 with a metrics tracer
-
autoNATv2Options(
List< AutoNATv2Option> options) → Option - Configures AutoNATv2 with specific options
-
autoNATv2ServerRateLimit(
int rpm, int perPeerRPM, int dialDataRPM) → Option - Configures AutoNATv2 server rate limits
-
autoRelay(
bool enabled) → Option -
connManager(
ConnManager manager) → Option -
eventBus(
EventBus bus) → Option -
forceReachability(
Reachability reachability) → Option -
holePunching(
bool enabled) → Option -
identifyDisableObservedAddrManager(
bool disable) → Option -
identifyDisableSignedPeerRecord(
bool disable) → Option -
identifyProtocolVersion(
String version) → Option -
identifyUserAgent(
String agent) → Option -
identity(
KeyPair keyPair) → Option - Configures libp2p to use the given identity (private key).
-
listenAddrs(
List< MultiAddr> addrs) → Option - Configures libp2p to listen on the given addresses.
-
muxer(
String id, Multiplexer muxerFactory(Conn secureConn, bool isClient)) → Option - Configures libp2p to use the given stream multiplexer.
-
natManager(
NATManager factory(Network)) → Option -
negotiationTimeout(
Duration timeout) → Option -
new_(
List< Option> options) → Future<Host> - Creates a new libp2p node with the given options.
-
newConfig(
) → Config - Creates a new Config instance.
-
noSecurity(
) → Option - Configures libp2p to use no security (insecure connections).
-
ping(
bool enabled) → Option - Configures libp2p to enable/disable the Ping service.
-
protocolVersion(
String version) → Option - Configures libp2p to use the given protocol version.
-
relay(
bool enabled) → Option -
relayMetricsObserver(
RelayMetricsObserver observer) → Option - Sets the relay metrics observer for tracking relay client operations
-
relayServers(
List< String> servers) → Option -
security(
SecurityProtocol securityProtocol) → Option - Configures libp2p to use the given security protocol.
-
transport(
Transport transport) → Option - Configures libp2p to use the given transport.
-
userAgent(
String agent) → Option - Configures libp2p to use the given user agent.