Chat-side integration of the LEZ-backed RLN mix protocol:
- src/chat/delivery/waku_client.nim: mount waku_mix with onchain
RLN spam protection wired to logos_core_client fetchers; gate
the first publish on (a) gifter status confirmation, (b)
cushion of 2 poll intervals after confirmation, and (c) proof
root stability in the local valid_roots window; wrap mix
lightpush in withTimeout so vanished SURB replies surface as
Err instead of pinning the send coroutine.
- src/chat/client.nim: surface sendBytes errors via asyncSpawn
wrapped try/except instead of discarding the future (was
hiding every mix-publish failure).
- chat-side gifter client invocation (RLN membership service
wire format, EIP-191 ethereum-allowlist auth).
- Background membership status watcher that reconciles the
optimistic leaf returned by the gifter against the chain's
authoritative leaf via the status RPC.
Simulation harness (simulations/mix_lez_chat/):
- Spin up sequencer + run_setup + 4 mix nodes (one of which
runs the gifter service) + chat sender + chat receiver.
- SIM_NETWORK={local,testnet}, SIM_SLIM for testnet (reuses
shipped config_account + cached payment_account), Docker
image + GHCR for cross-platform testing.
- Strict mix-pool readiness gate, kademlia + RLN root activity
checks, gifter EIP-191 auth fixture, slim-mode submodule
minimization.
- TREE_ID_HEX pinned to the canonical testnet deployment.
Submodule bumps:
- vendor/nwaku to 8e6ba04 (LEZ-backed RLN mix + 2-phase gifter).
- vendor/logos-lez-rln to 950f287 (SPEL RLN program + mix sim
infrastructure + canonical testnet deploy).
Docs:
- RUN_SLIM_TESTNET.md: slim sim recipe.
- cleanup/MODE_A_GIFTER_SLOT_BUG.md: per-signer nonce collision
postmortem driving the queue+worker fix.
Logos Chat
A privacy focused decentralized messaging SDK, built on the Logos Stack. Logos Chat provides permission-less, censorship-resistant communication for humans and clankers.
Quick Start
Prerequisites
Build
# Initialize submodules and dependencies
make update
# Build all targets (examples + shared library)
make all
# Run tests
make tests
Quick Tasks
Here are common tasks to get up and running. See examples/ for full examples, including pingpong.nim which demonstrates a full two-client conversation.
Initialize Client
let waku = initWakuClient(DefaultConfig())
var client = newClient(waku).get()
...
...
client.start()
Create Introduction Bundle
Introductions are single use key-bundles required by Senders to initiate a conversation. Recipients must generate them before anyone can contact them. IntroBundles contain no secrets and can be published, or transmitted over over other channels.
...
# IntroBundles are sent to other clients Out-of-Band to establish a conversation.
let intro_bundle = client.createIntroBundle()
...
Create 1:1 Chat
Once a Sender has retrieved a bundle then they can create a conversation. All conversations must have an initial message.
...
let initial_content = @[1,2,3]
# This intro_bundle must come from another client
let convo_id = await client.newPrivateConversation( intro_bundle, initial_content )
...
Receive Message
Receiving a message is accomplished by registering a callback.
...
client.onNewMessage(proc( convo: Conversation, msg: ReceivedMessage ) {.async.} =
echo convo.id(), msg.content
)
...
Send Message
...
let content = @[1,2,3]
let convo = client.getConversation( convo_id )
await client.sendMessage( content )
...
Message Flow
sequenceDiagram
participant S as Saro
participant R as Raya
Note over R,S: Discovery
R -->> S: Send intro bundle via established channel
Note over R,S: Initialization
S ->> R: PrivateV1 Invite + initial message
Note over R,S: Operation
loop Encrypted messaging
par
R ->> S: Send Message
and
S ->> R: Send Message
end
end
C Bindings
A shared library with C bindings is available:
make liblogoschat
This produces build/liblogoschat.{dylib,so,dll}. See library/liblogoschat.h and examples/cbindings/ for usage.
License
Dual-licensed under MIT and Apache 2.0.