reticulum-js
    Preparing search index...

    Class Reticulum

    The primary entry point and orchestrator for the Reticulum Network System.

    The Reticulum class orchestrates the transport and local destinations.

    Index
    • Initializes the Reticulum engine.

      Parameters

      • config: {
            compressionProvider?: Object;
            discovery?: Object;
            enableDiscovery?: boolean;
            logLevel?: string | number;
            storageAdapter?: StorageAdapter;
            useImplicitProof?: boolean;
        } = {}

        Configuration options for the node.

        • OptionalcompressionProvider?: Object

          Engine for handling bz2 Resources (e.g., for rngit).

        • Optionaldiscovery?: Object

          Extra options forwarded to the InterfaceDiscovery constructor when enableDiscovery is true (requiredValue, discoverySources, networkIdentity, backboneSupport).

        • OptionalenableDiscovery?: boolean

          When 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.

        • OptionallogLevel?: string | number

          Initial 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?: StorageAdapter

          Interface 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.

      Returns Reticulum

    _stopped: boolean

    Whether stop has run.

    compressionProvider: Object | null
    discovery: InterfaceDiscovery | null
    localDestinations: Map<any, any>
    persistor: Persistor
    persistorLoadPromise: Promise<void>
    storage: StorageAdapter | null
    transport: TransportCore
    useImplicitProof: boolean
    MINIMUM_BITRATE: number = 5

    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.

    • 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.

      Parameters

      • rnsInterface: Interface

        An instantiated interface (TCP, WebSocket, RNode, shared-instance client, ...)

      • isDefault: boolean = false

        If true, unroutable packets fallback to this interface

      Returns void

    • 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.

      Parameters

      Returns void

    • Removes an interface and purges its routes from the TransportCore.

      Parameters

      • rnsInterface: Interface

        An instantiated interface (TCP, WebSocket, RNode)

      Returns void

    • 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.

      Returns Promise<void>