Config class

Config describes a set of settings for a libp2p node

This is not a stable interface. Use the options defined in the root package.

Available extensions

Constructors

Config.new()

Properties

addrsFactory AddrsFactory?
getter/setter pair
connManager ConnManager?
getter/setter pair
disableObservedAddrManager bool?
getter/setter pair
disableSignedPeerRecord bool?
getter/setter pair
enableAutoNAT bool
getter/setter pair
enableHolePunching bool
getter/setter pair
enablePing bool
getter/setter pair
enableRelay bool
getter/setter pair
eventBus EventBus?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
identifyProtocolVersion String?
getter/setter pair
identifyUserAgent String?
getter/setter pair
insecure bool
Whether to use insecure connections (no security)
getter/setter pair
listenAddrs List<MultiAddr>
List of addresses to listen on
getter/setter pair
muxers List<StreamMuxer>
List of stream multiplexers to use
getter/setter pair
natManagerFactory NATManager Function(Network)?
getter/setter pair
negotiationTimeout Duration?
getter/setter pair
peerKey KeyPair?
The private key for this node
getter/setter pair
protocolVersion String?
The protocol version that identifies the family of protocols used by the peer in the Identify protocol.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
securityProtocols List<SecurityProtocol>
List of security protocols to use
getter/setter pair
transports List<Transport>
List of transports to use
getter/setter pair
userAgent String?
The identifier this node will send to other peers when identifying itself, e.g. via the identify protocol.
getter/setter pair

Methods

apply(List<Option> opts) Future<void>
Apply applies the given options to the config, returning the first error encountered (if any).
newNode() Future<Host>
Creates a new libp2p Host from the Config.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
withAddrsFactory(AddrsFactory factory) Future<void>

Available on Config, provided by the ConfigOptions extension

withAutoNAT(bool enabled) Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to enable/disable the AutoNAT service.
withConnManager(ConnManager manager) Future<void>

Available on Config, provided by the ConfigOptions extension

withEventBus(EventBus bus) Future<void>

Available on Config, provided by the ConfigOptions extension

withHolePunching(bool enabled) Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to enable/disable the Hole Punching service.
withIdentifyDisableObservedAddrManager(bool disable) Future<void>

Available on Config, provided by the ConfigOptions extension

withIdentifyDisableSignedPeerRecord(bool disable) Future<void>

Available on Config, provided by the ConfigOptions extension

withIdentifyProtocolVersion(String version) Future<void>

Available on Config, provided by the ConfigOptions extension

withIdentifyUserAgent(String agent) Future<void>

Available on Config, provided by the ConfigOptions extension

withIdentity(KeyPair keyPair) Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to use the given identity (private key).
withListenAddrs(List<MultiAddr> addrs) Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to use the given addresses.
withMuxer(String id, Multiplexer muxerFactory(Conn secureConn, bool isClient)) Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to use the given stream multiplexer.
withNatManager(NATManager factory(Network)) Future<void>

Available on Config, provided by the ConfigOptions extension

withNegotiationTimeout(Duration timeout) Future<void>

Available on Config, provided by the ConfigOptions extension

withNoSecurity() Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to use no security (insecure connections).
withPing(bool enabled) Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to enable/disable the Ping service.
withProtocolVersion(String version) Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to use the given protocol version.
withRelay(bool enabled) Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to enable/disable the Relay service.
withSecurity(SecurityProtocol securityProtocol) Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to use the given security protocol.
withTransport(Transport transport) Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to use the given transport.
withUserAgent(String agent) Future<void>

Available on Config, provided by the ConfigOptions extension

Configures libp2p to use the given user agent.

Operators

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