go-waku/examples/chat2
Vit∀ly Vlasov 6e47bd1cf0
feat: filter subscription management and multiplexing (#1048)
Filter wrapper API that takes care of managing subscriptions and multiplex them onto a single data channel to be consumed by user. 

Co-authored-by: Prem Chaitanya Prathi <chaitanyaprem@gmail.com>
2024-05-15 13:03:59 +05:30
..
build add chat2 example 2021-04-04 13:08:48 -04:00
pb chore: switch to Google's Protobuf library 2023-02-16 11:37:59 -04:00
.gitignore Add tests and lint code 2021-08-13 13:56:09 +02:00
Makefile feat: make RLN available by default 2023-09-14 09:03:18 -04:00
README.md chore: switch wakuv2 fleet to waku 2024-03-20 11:38:48 +01:00
chat.go feat: storeV3 client (#1028) 2024-05-03 12:07:03 -04:00
exec.go feat: storeV3 client (#1028) 2024-05-03 12:07:03 -04:00
flags.go fix: content topic validation as per rfc 51 (#874) 2023-11-08 18:24:24 +05:30
go.mod feat: filter subscription management and multiplexing (#1048) 2024-05-15 13:03:59 +05:30
go.sum feat: filter subscription management and multiplexing (#1048) 2024-05-15 13:03:59 +05:30
main.go chore: rename status-im/go-waku to waku-org/go-waku 2022-11-09 16:03:40 -04:00
options.go chore(rln-relay): use the only key from keystore if only 1 exists 2023-09-08 12:05:32 -04:00
screen.go feat: chat2 refactor / redesign 2022-08-15 15:22:13 -04:00
ui.go chore: rename status-im/go-waku to waku-org/go-waku 2022-11-09 16:03:40 -04:00

README.md

Using the chat2 application

Background

The chat2 application is a basic command-line chat app using the Waku v2 suite of protocols. It connects to a fleet of test nodes to provide end-to-end p2p chat capabilities. The Waku team is currently using this application for internal testing. If you want try our protocols, or join the dogfooding fun, follow the instructions below.

Preparation

make

Basic application usage

To start the chat2 application in its most basic form, run the following from the project directory

./build/chat2

You may need to set DNS server if behind a VPN,

./build/chat2 --dns-discovery-name-server 8.8.8.8

Specifying a static peer

In order to connect to a specific node as relay peer, define that node's multiaddr as a staticnode when starting the app:

./build/chat2 -staticnode=/dns4/node-01.do-ams3.waku.test.statusim.net/tcp/30303/p2p/16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W

This will bypass the random peer selection process and connect to the specified node.

In-chat options

Command Effect
/help displays available in-chat commands
/connect interactively connect to a new peer
/nick change nickname for current chat session
/peers Display the list of connected peers

chat2 message protobuf format

Each chat2 message is encoded as follows

message Chat2Message {
  uint64 timestamp = 1;
  string nick = 2;
  bytes payload = 3;
}

where timestamp is the Unix timestamp of the message, nick is the relevant chat2 user's selected nickname and payload is the actual chat message being sent. The payload is the byte array representation of a UTF8 encoded string.