Client per-transfer download limit (KB) advertised in /get requests.
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionsAnnounces the lxmf.delivery destination with the given display name.
Builds the §4.3 msgpack app_data ([name(bin8), stamp_cost, [SF_COMPRESSION]])
and attaches it to the identity so Destination.announce signs it as part
of the announce body.
Human-readable node name shown to peers.
OptionalstampCost: number | null = null
Active stamp cost (1-254), or null to advertise stamping as disabled.
Announces the lxmf.propagation destination, advertising this node to the
network. Requires enablePropagation first.
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
Enables the propagation-node role (§5.3): creates the lxmf.propagation
destination, registers the /get message-download handler, and ingests
submitted messages received via link Resources.
The node stores propagated messages addressed to other identities and
serves them to clients over /get; messages addressed to this router's
own delivery identity are locally delivered (decrypted + dispatched as a
message event). Returns the PropagationNode for direct access
(e.g. inspecting PropagationNode.store).
Call announcePropagationNode afterwards to broadcast the node.
Optionaloptions: PropagationNodeOptions = {}Ingests a paper message delivered as an lxm:// URI (LXMRouter.ingest_lxm_uri).
The URI body is base64-decoded into the paper payload, de-duplicated by its
transient_id (so re-ingesting the same QR/URI is a no-op), decrypted with
the local lxmf.delivery destination, and dispatched through the same
message event path as a network-delivered message. Paper messages always
disable stamp enforcement (LXMRouter.lxmf_propagation is_paper_message).
The sender's signature is verified when their identity is already known (recalled from a prior announce); otherwise the message is still delivered with an unverified signature, exactly like the Python reference.
The lxm:// paper message URI.
The reconstructed message, or null when
the URI is not addressed to this node (decryption fails) or was already
ingested.
Initializes the router and registers the LXMF delivery destination.
Establishes (or updates) a peering relationship with another propagation
node (LXMRouter.peer). The peer's advertised limits and costs are read
from its app_data; messages this node stores are then offered to it on the
next syncPeers.
Peer's lxmf.propagation hash.
Optionalmetadata?: Map<number, Uint8Array<ArrayBufferLike>> | nullNode metadata map.
Peer's peering cost (≤ MAX_PEERING_COST).
OptionalperSyncLimitKb?: number | nullPer-sync cumulative limit.
OptionalperTransferLimitKb?: number | nullPer-message transfer limit.
Peer's propagation stamp cost.
Peer's stamp cost flexibility.
the peer, or null if peering was rejected.
Re-processes every parked message whose sender identity may now be known (typically called after a just-validated announce made a previously- unknown identity available — first-contact opportunistic delivery).
Each entry is fed back through _processIncomingMessage: if the
identity is still unknown it is re-parked (without re-requesting the
path, guarded by alreadyParked), otherwise it is verified and
dispatched. Safe and cheap to call when nothing is parked.
Call this when a new Identity is cached (e.g., in your IDENTIFY handler). It checks if any parked messages are now ready for processing.
Pass null to re-process an opportunistic (linkless) parked message.
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Optionaloptions: boolean | EventListenerOptionsSerializes and sends an LXMF message.
When delivering over a link, this waits for the link to become ACTIVE and then sends LINKIDENTIFY (once per initiator link) before the message DATA — Python LXMF otherwise drops packets that arrive before identify.
Sets the propagation node to submit messages to and sync from, by its
lxmf.propagation destination hash. The node's identity/app_data must be
learned from an announce before submit/sync can run.
Submits a message to the configured propagation node for store-and-forward delivery (LXMF.md §5.8 / LXMessage PROPAGATED).
Packs the message into propagation form (dest_hash ‖ E(src‖sig‖payload),
§5.3), appends a propagation stamp meeting the node's advertised cost, and
sends the msgpack([time, [lxmf_data]]) container to the node as a Link
Resource. The node stores it until the recipient syncs.
Optionaloptions: { stampCost?: number } = {}
Override the stamp cost (defaults to the node's advertised cost, then PROPAGATION_COST).
Downloads messages addressed to identity from the configured propagation
node (LXMRouter.request_messages_from_propagation_node).
Drives the /get exchange: list available transient_ids, request those
not already held, decrypt + dispatch each, then ack so the node purges
them. Resolves with counts of received / duplicate messages.
The recipient identity to identify as (so the node serves our messages).
OptionalmaxMessages: number = ALL_MESSAGES
Cap on messages fetched.
Runs one outbound sync pass against every peered node. Resolves when all peers have completed (or postponed) their sync.
Breaks a peering relationship (LXMRouter.unpeer).
Handles LXMF routing and message processing.
Description
LXMF Router for managing incoming and outgoing messages