OptionaladdrsRaw libp2p multiaddr listen addresses, e.g. "/p2p-circuit", "/webrtc".
For testing only. In production leave this unset and let the transport use defaultNodeListenAddrs.
Defaults to defaultNodeListenAddrs.
Called when agent-info bytes have been received from a peer.
OptionalbootstrapRelay multiaddrs to dial at startup. The transport invokes NodeOptions.connectedToRelayCallback once the dialable circuit address has been received.
OptionalconnectedCalled when the bootstrap connection to a relay is complete.
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.
Node-specific options accepted by createNode, on top of the platform-agnostic NodeOptions.