86 Commits

Author SHA1 Message Date
Arseniy Klempner
4dcd8ff8e2
cleanup(02-types): drop duplicate-type adapter procs + bump nwaku
waku_client.nim's adapter procs (copying logos_core_client's MerkleNode/
ExternalMerkleProof into the plugin's namesakes) are now trivial — the
types are unified via re-export. Collapse to direct callback assignments.
2026-05-21 13:25:21 -06:00
Arseniy Klempner
cbbf4b23ae
cleanup(01-dry): use watchMembershipConfirmation helper + bump nwaku
Replaces the duplicated watcher proc body with a single call to the
new gifter-client helper. Net change: 38-line inline watcher -> 10
lines invoking the helper. Bumps vendor/nwaku for the helper itself.
2026-05-21 12:17:56 -06:00
Arseniy Klempner
295b8d7933
feat(chat): membership status watcher + bump nwaku for 2-phase gifter
src/chat/delivery/waku_client.nim:
- After the gifter-client returns its optimistic leaf_index, spawn a
  background watcher that polls the gifter's new membership-status
  RPC (short-lived libp2p streams on /logos/rln/membership/status/
  1.0.0) until the on-chain membership PDA materialises for our id.
  If the authoritative leaf differs from the optimistic snapshot, the
  watcher rewrites lezGm.membershipIndex. The OnchainLEZGroupManager's
  poll loop picks up the corrected proof on its next iteration;
  spam_protection's self-verify rejects bad proofs until then.

vendor/nwaku bump pulls in:
- New /logos/rln/membership/status/1.0.0 codec + handlers on the
  gifter server.
- MembershipStatusRequest/Response RPC messages.
- WakuRlnGifterClient.queryMembershipStatus.
- Mix-node gifter-client watcher with the same pattern.
2026-05-21 11:15:17 -06:00
Arseniy Klempner
0257fdf443
feat(chat): gate first publish on proof root stability in valid_roots
Replaces the blind 30s post-RLN-ready sleep in sendBytes with a
poll-based wait: capture our cachedProof's merkle root, then wait
until it has been present in our own rootTracker for ≥2 poll cycles
(cap 180s, warn-and-publish on cap). Adaptive to the underlying
chain's block cadence — solves the testnet RLN root-drift race
where a 30-42s sleep wasn't enough for mix-node verifiers to poll
the post-registration root, so proofs failed with
"Spam protection proof verification failed" at mix entry.

Non-OnchainLEZ group managers retain the 30s fallback.

Bumps vendor/nwaku to pick up the OnchainLEZGroupManager.proofRoot +
getPollInterval accessors this gate uses.

Also drops the deprecated logos-cpp-sdk override on the nix-fetched
LOGOSCORE: overriding the SDK breaks liblogos 7df6195's source
(stale requestObject/onEvent shape). Plugins via logos-module-builder
ship the newer SDK and are ABI-compatible with the native build.
2026-05-20 11:54:57 -06:00
Arseniy Klempner
ce127b566a
feat(chat): consume RLN membership spec wire format on chat-side gifter
Updates the chat-side gifter caller in waku_client.nim to the new
MembershipAllocationRequest / MembershipAllocationSuccess types:
* identity commitment is sent as bytes (not hex string)
* authentication_type='eth-allowlist' is set explicitly when signing
* rate limit is passed as proto3 optional
* configAccountId is read off success.configAccountId (the LEZ extension)

Bumps vendor/nwaku and vendor/logos-lez-rln to pull in the spec-aligned
wire format on both the gifter server and the auto-registering mix-node
client paths.
2026-05-13 16:10:56 -06:00
Arseniy Klempner
bba01ee9dc
feat(sim): exercise rln-gifter EIP-191 auth in mix_lez_chat sim
Wires the existing mix_lez_chat simulation to drive the gifter's
EIP-191 allowlist auth path end-to-end:

* bumps vendor/nwaku and vendor/logos-lez-rln (and, transitively,
  logos-delivery-module and its bundled logos-delivery copy) to pick up
  the auth plugin, the auto-registering client's EIP-191 signing, and
  the new --mix-gifter-allowlist / --mix-gifter-auth-key CLI flags.
* adds a `gifterAuthKey` knob on WakuConfig + the JSON config bridge in
  client_api so chat sender/receiver instances sign their gifter
  requests too.
* commits 5 fixed test secp256k1 keys (one per non-gifter mix node and
  per chat client) under simulations/mix_lez_chat/fixtures/gifter_auth/
  along with their derived addresses.
* run_simulation.sh sources keys.env+addresses.env, sets
  `mixGifterAllowlist` on mix node 0, and threads the matching
  `mixGifterAuthKey` / `gifterAuthKey` into nodes 1-3 and the
  receiver/sender configs.

Test fixtures only — keys must never be reused outside this sim.
2026-05-13 11:10:27 -06:00
Arseniy Klempner
4060bb67c1
feat: add mix+LEZ RLN integration for logos-chat
Integrate logos-chat with the LEZ-backed mix network:

- Update vendor/nwaku to logos-delivery fork (feat/mix-rln-gifter-sim)
  with mix protocol, OnchainLEZGroupManager, RLN gifter client, and
  mix-rln-spam-protection-plugin
- Add vendor/logos-lez-rln submodule for reproducible LEZ module builds
- Add RLN FFI surface to liblogoschat: chat_set_rln_fetcher,
  chat_set_rln_config, chat_push_roots, chat_push_proof, etc.
- Wire gifter client for RLN membership registration via mix network
- Switch to filter-based message reception (relay: false, filter: true)
- Send via lightpushPublish(mixify=true) for Sphinx onion routing
- Add mix-librln separate build + duplicate symbol resolution
- Exclude vendor/logos-lez-rln from nimble link creation
- Update nix build for mix-librln and cross-platform support
2026-05-06 10:49:49 -06:00
Igor Sirotin
07da6e2dec
feat: use logos.dev fleet (#87)
* feat: use logos.dev fleet

* fix: cluster id defaults

* docs: comment with host names and peer ids
2026-02-27 18:30:34 +00:00
Jazz Turner-Baggs
c2196c77ee
Identity Simplification (#71)
* Contract interface for bindings

* Add errorType

* Remove Identity files

* Update Echo_bot

* update cbindings

* Add installation name

* Update tests

* bump libchat dep
2026-02-22 17:51:59 -08:00
osmaczko
240a46e475
fix: update library bindings for libchat integration (#69) 2026-02-18 22:20:16 +01:00
Jazz Turner-Baggs
ecfe9218c3
Remove unused submodules (#68)
* Remove uneeded vendored deps

* remove naxoltl

* remove proto definitions
2026-02-18 22:20:16 +01:00
Jazz Turner-Baggs
d421690aaf
fix: sender key error (#67) 2026-02-18 22:20:16 +01:00
Jazz Turner-Baggs
3bfba7cf25
Libchat library Integration (#55)
* chore: add smoke test and redesign CI workflow (#62)

Add a smoke test that validates the binary links all dependencies
at runtime by instantiating a client without networking. Redesign
CI into separate build and test jobs, with test gated on build.

* Add libchat module

* Add Context

* Add libchat

* Update to latest libchat

* Remove stale files

* Bump to latest Libchat

* Update imports

* Update client

* Update library to work with Libchat

* Fix examples

* Remove Tui Examples - Replace with logos-core

* Add Indentity Todo

* fix: add `build-libchat` as dependency for examples, tests, and library (#59)

The Rust liblogos_chat.so was not being built automatically, causing
runtime failures when loading the shared library.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add Todo for Sender data

* Updated error log

---------

Co-authored-by: osmaczko <33099791+osmaczko@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-18 22:20:14 +01:00
pablo
ce0f4e2aae
fix: rename Client to ChatClient 2026-01-12 18:16:01 +02:00
Jazz Turner-Baggs
9e999527e5
Update API Delivery Service (#44)
* Remove WakuCfg from Client

* Update examples
2025-12-17 19:15:47 -08:00
Jazz Turner-Baggs
3eefe3ba5c
Update WakuFleet (#41)
* Update fleet

* Remove deadcode
2025-12-16 23:16:57 -08:00
Jazz Turner-Baggs
d7af4e09ec
Update Examples (#40)
* Update examples.

* Update readme
2025-12-16 19:46:19 -08:00
Jazz Turner-Baggs
7ee12eb250
Inbound Path (#38)
* refactor invite

* Update tests

* Cleanups

* Remove ContentFrame references
2025-12-16 08:20:53 -08:00
Jazz Turner-Baggs
082f63f6c7
Remove contentFrame from Client (#29) 2025-12-15 13:55:19 -08:00
kaichaosun
70bd36785c
refactor: remove useless log 2025-12-04 11:51:34 +08:00
kaichaosun
567db393ac
fix: no error when decode failure 2025-12-04 10:45:16 +08:00
kaichaosun
76e65f49b6
chore: async stop process 2025-12-03 17:49:42 +08:00
kaichaosun
09f2af49e9
chore: stop with waku node 2025-12-03 17:35:01 +08:00
kaichaosun
a76af7b2c7
chore: move discovery to ds 2025-12-03 16:20:10 +08:00
kaichaosun
cc01e954ef
feat: dns discovery bootstrap 2025-12-03 15:49:38 +08:00
kaichaosun
eca8b57beb
Merge branch 'main' into fix-decrypt-out-messages 2025-12-01 14:42:58 +08:00
kaichaosun
622fe0a78b
chore: not expose private dh key. 2025-12-01 14:39:49 +08:00
Jazz Turner-Baggs
4700223b84
Rename module from chat_sdk to chat (#24) 2025-11-30 20:38:55 -08:00
kaichaosun
523dca43e1
fix: outgoing messages should not be decrypted 2025-11-28 16:09:02 +08:00
Jazz Turner-Baggs
c6e03686fe
fix: swap memcopy param order (#27) 2025-11-27 17:24:03 -08:00
Jazz Turner-Baggs
bce9dfe8f4
Remove WakuClient from convo.sendMessage (#26) 2025-11-27 10:06:37 -08:00
Jazz Turner-Baggs
07aad9b8b2
Add naxolotl test for DH ratchet step (#23)
* fix: naxolotl key saving

* chore: add test for DH ratchet step
2025-11-27 10:06:01 -08:00
Jazz Turner-Baggs
26c41313d4
Enable Tests (#22)
* Enable make tests

* Fix stale tests

* Set test logging level to ERROR

* Update readme

* Formatting changes
2025-11-25 08:14:59 -08:00
Jazz Turner-Baggs
127d16641c remove dead files 2025-11-24 07:47:42 -08:00
Jazz Turner-Baggs
57715899dd remove unused imports 2025-11-24 07:47:42 -08:00
Jazz Turner-Baggs
abb3c1a5d2 update domain separator 2025-11-24 07:47:12 -08:00
Jazz Turner-Baggs
f301410418 rename parameters 2025-11-24 07:47:12 -08:00
Jazz Turner-Baggs
bead4b62c2 remove unused parameter 2025-11-24 07:47:12 -08:00
Jazz Turner-Baggs
38218e38da Update tui 2025-10-20 08:21:31 -07:00
Jazz Turner-Baggs
e76556dc39 Add ReceivedMessage type for cleaner api 2025-10-20 08:21:31 -07:00
Jazz Turner-Baggs
627e6c8dd9 flatten publickey 2025-10-20 08:21:31 -07:00
Jazz Turner-Baggs
a6d54ab180 Add MessageInfo 2025-10-20 08:21:31 -07:00
Jazz Turner-Baggs
e3db122dd6 store single participant in privateV1 2025-10-20 08:21:31 -07:00
Jazz Turner-Baggs
16aebac0c7 Integrate doubleratchet encryption to PrivateV1 2025-10-09 22:12:33 -07:00
Jazz Turner-Baggs
8ff8add31d Cleanup naxolotl 2025-10-09 22:12:33 -07:00
Jazz Turner-Baggs
285b6f2d2e Add tests + requirements 2025-10-09 22:12:33 -07:00
Jazz Turner-Baggs
520ce1cb80 Initial impl 2025-10-09 22:12:33 -07:00
Jazz Turner-Baggs
0bf7491cee
Update waku cluster Id 2025-09-26 19:19:21 -07:00
Jazz Turner-Baggs
aefacba0e4
Wire delivery acknowledgements 2025-09-26 17:26:11 -07:00
Jazz Turner-Baggs
f52150ba83
add sendmessages to tui 2025-09-26 16:14:37 -07:00