Initializes the Reticulum engine.
Configuration options for the node.
OptionalcompressionProvider?: ObjectEngine for handling bz2 Resources (e.g., for rngit).
OptionaldefaultGravity?: numberDefault interface gravity applied
to any interface that doesn't specify one (Python default_gravity).
Higher gravity = preferred for paths. Defaults to
Reticulum.DEFAULT_GRAVITY (0).
Optionaldiscovery?: ObjectExtra options forwarded to the
InterfaceDiscovery constructor when enableDiscovery is true
(requiredValue, discoverySources, networkIdentity, backboneSupport).
OptionalenableDiscovery?: booleanWhen true, start an
InterfaceDiscovery listener on the transport "announce" event
so a leaf can discover connectable transport-node interfaces on the
rnstransport.discovery.interface aspect (Python discover_interfaces).
v1 is surface-only — no auto-connect.
OptionalingressControl?: IngressControlConfigNode-global ingress burst-control overrides applied to every interface
at addInterface time (Python's [reticulum]-section ic_* options —
there is no per-interface form). Absent keys keep the Python defaults.
Per-interface programmatic control (including iface.ingressControl = false to opt out) always remains available.
OptionallogLevel?: string | numberInitial log threshold. Accepts
a LogLevel value or a level name ("DEBUG", "NOTICE", …).
Takes precedence over the RETICULUM_LOG_LEVEL environment variable.
See src/utils/log.js.
OptionalstorageAdapter?: StorageAdapterInterface for persisting identities and caches.
OptionaluseImplicitProof?: boolean§6.5.2 PROOF form for opportunistic DATA: true (default, upstream) emits the 64-byte implicit body; false emits the 96-byte explicit body.
Whether stop has run.
StaticDEFAULT_The default interface gravity applied when an interface doesn't specify one
(RNS.Interfaces.Interface.Interface.DEFAULT_GRAVITY). Higher gravity =
preferred for paths when the same announce is heard on multiple interfaces.
StaticDEFAULT_The base per-hop timeout in seconds (RNS.Reticulum.DEFAULT_PER_HOP_TIMEOUT),
added on top of the bitrate-derived term in
TransportCore.firstHopTimeout / TransportCore.establishmentTimeout.
StaticIFAC_Minimum IFAC size in bytes (RNS.Reticulum.IFAC_MIN_SIZE). Re-exported
from import("./ifac.js").IFAC_MIN_SIZE for upstream API parity.
StaticIFAC_Fixed IFAC salt (RNS.Reticulum.IFAC_SALT). Re-exported from
import("./ifac.js").IFAC_SALT for upstream API parity.
StaticMINIMUM_Minimum acceptable interface bitrate in bits/s
(RNS.Reticulum.MINIMUM_BITRATE in the Python reference). A configured
bitrate below this is ignored so the interface keeps its default — used
for config-time validation only. It does not cause interfaces to be
skipped in routing; the Python reference doesn't either.
StaticMTUThe network MTU in bytes (RNS.Reticulum.MTU). The largest packet the
network will carry; feeds the bitrate-adaptive timeout math
(TransportCore.firstHopTimeout).
Attaches a physical or virtual network interface to the router.
Connecting to a local shared instance is now the caller's job — use the
LocalClientInterface.connectToSharedInstance() static factory (from
@reticulum/node/src/interfaces/local_client.js) and pass the resulting
interface here. Keeping shared-instance discovery out of the core keeps
Reticulum free of Node.js builtins and browser-safe.
An instantiated interface (TCP, WebSocket, RNode, shared-instance client, ...)
If true, unroutable packets fallback to this interface
Removes a local destination, ceasing all incoming traffic to that application endpoint.
The bitrate-adaptive proof timeout for a single hop toward the destination,
in seconds (RNS.Reticulum.get_first_hop_timeout). Delegates to
TransportCore.firstHopTimeout; falls back to
Reticulum.DEFAULT_PER_HOP_TIMEOUT when no route / bitrate is known.
seconds
The bitrate of the slowest currently-online interface, in bits/s, or
null when no online interface reports a usable bitrate
(RNS.Reticulum.get_lowest_interface_bitrate). Delegates to
TransportCore.lowestInterfaceBitrate. (The Python reference also
has a shared-instance RPC branch; reticulum-js has no shared-instance
model yet, so only the local delegation is exposed.)
A full round trip for an MTU on the slowest currently-online interface,
plus per-hop grace, in seconds (RNS.Reticulum.get_medium_path_timeout).
Delegates to TransportCore.mediumPathTimeout; returns 0 when no
online interface bitrate is known. (No shared-instance RPC branch — see
getLowestInterfaceBitrate.)
seconds
Binds an application-level Destination to the network. When your web components spin up and instantiate a Yjs provider, this is where they register their collaborative endpoints to receive traffic.
Removes an interface and purges its routes from the TransportCore.
An instantiated interface (TCP, WebSocket, RNode)
Graceful shutdown: stops interface discovery, disconnects every attached interface, and flushes the persistence layer so the final debounced batch isn't lost. A per-interface disconnect failure is logged and the rest still proceed. Idempotent.
Links and their channels are not torn down here (they are owned by the application's destinations); they terminate when their interfaces close.
The primary entry point and orchestrator for the Reticulum Network System.
Description
The Reticulum class orchestrates the transport and local destinations.