reticulum-js
    Preparing search index...

    Class LXMPeer

    A peering relationship with another propagation node. One-way sync driver.

    Index
    alive: boolean
    destinationHash: Uint8Array<ArrayBufferLike>
    incoming: number
    lastHeard: number
    lastOffer: Uint8Array<ArrayBufferLike>[]
    link: Link | null
    metadata: Map<number, Uint8Array<ArrayBufferLike>> | null
    nextSyncAttempt: number

    Epoch seconds of the earliest next sync attempt (Python LXMPeer.next_sync_attempt): failed syncs back off cumulatively, a peer-reported throttle postpones, success resets both.

    offered: number
    outgoing: number
    peeringCost: number | null
    peeringKey: (number | Uint8Array<ArrayBufferLike>)[] | null
    propagationStampCost: number | null
    propagationStampCostFlexibility: number | null
    propagationSyncLimit: number | null

    Per-sync cumulative limit (KB).

    propagationTransferLimit: number | null

    Per-message transfer limit (KB).

    router: LXMRouter
    state: number
    syncBackoff: number

    Current cumulative backoff (seconds) — grows per attempt, reset when the link becomes ready (Python LXMPeer.sync_backoff).

    syncStrategy: number
    transferTimeoutMs: number

    Upper bound (ms) for waiting on the outbound message transfer. The JS Resource has no sender-side watchdog, so a stalled receiver — a link kept ACTIVE by keepalive pings while its application never pulls the parts — would otherwise hold this sync's container buffers and the link forever. Override for tests.

    • Generates the peering key stamp over receivingIdentityHash ‖ offeringIdentityHash (peerIdentity.hash ‖ this.router.identity.hash), at the peer's advertised peering cost. Returns true on success.

      Returns Promise<boolean>

    • Whether a peering key of sufficient value has been generated for this peer.

      Returns boolean

    • Runs one outbound sync pass: present peering key, offer unhandled messages, transfer those the peer wants, then mark them handled.

      Resolves true if a transfer was attempted, false if the sync was postponed (no peering key / nothing to offer / no link).

      Returns Promise<boolean>