Architecture Overview
A Demos node exposes two distinct messaging surfaces. Each is paired with a dedicated SDK client class.Two transports, two clients
| Component | Port | SDK class | Persistence |
|---|---|---|---|
| L2PS messaging server | 3006 (default) | instantMessaging.L2PSMessagingPeer | Yes — through L2PS rollup |
| Legacy signaling server | 3005 (default) | instantMessaging.MessagingPeer | No — relay only |
ml-kem-aes); the difference is what the server does with the encrypted payload after receiving it.
L2PSMessagingPeer pipeline (port 3006)
MessageStatus:
delivered— handed to recipient via WebSocketqueued— recipient offline, stored for later deliverysent— flushed from offline queue to recipientfailed— L2PS submission or persistence failedl2ps_pending— submitted to L2PS mempool, not yet batchedl2ps_batched— included in an L2PS batchl2ps_confirmed— confirmed on L1
l2psUid provided at registration: peers only discover and message peers in the same L2PS network.
MessagingPeer (legacy, port 3005)
The legacy signaling server is a transient relay. It tracks connected peers byclientId, forwards encrypted payloads, and emits peer_disconnected notifications when a peer drops. There is no message store, no batch pipeline, and no L1 attestation — the signaling server is purely a discovery and routing surface.
Shared encryption layer
Both clients encrypt and decrypt payloads withunifiedCrypto (exposed as encryption.ucrypto from the SDK). See Encryption for details.