OptionaladdrsListening addresses.
Defaults to defaultNodeListenAddrs.
Called when agent-info bytes have been received from a peer.
OptionalbootstrapRelay multiaddrs to dial at startup. Required on mobile — without an active relay reservation the peer is unreachable. The transport invokes NodeOptions.connectedToRelayCallback once the dialable circuit address has been received.
OptionalconnectedCalled when the bootstrap connection to a relay is complete.
OptionalconnectionOverrides libp2p's connection gater.
On React Native libp2p applies its browser gater, which refuses to dial
insecure WebSocket (/ws) relays and private/LAN addresses. A production
deployment behind a secure wss relay never hits this, but development and
demo setups that target a cleartext relay or LAN peers must supply a gater
that permits those dials (e.g. { denyDialMultiaddr: async () => false }).
Left undefined, libp2p keeps its secure-by-default browser gater.
OptionalhandshakeTimeout in milliseconds for the outbound access handshake response. Defaults to 10_000 ms.
OptionaliceList of ICE server URLs needed for establishing direct connections.
OptionalidOptional human-readable identifier attached to log records.
Handler for incoming application messages.
OptionalnetworkNetwork access bytes sent in handshake responses (and outbound handshakes for nodes).
Defaults to new Uint8Array([0]) — an empty array breaks the
counter-handshake because .send() would be a no-op.
Handler invoked for every incoming access handshake. Returns true to grant access, false to deny. Denials are sticky for the session.
Called when an inbound peer completes the access handshake. Fire-and-forget.
OptionalpeerCalled when a peer disconnects. Fire-and-forget.
React Native-specific options accepted by createNode, on top of the platform-agnostic NodeOptions.