go-waku/examples/chat2
Richard Ramos 448781687e feat: output logs to file 2022-11-03 07:06:16 +01:00
..
build add chat2 example 2021-04-04 13:08:48 -04:00
pb add chat2 example 2021-04-04 13:08:48 -04:00
.gitignore Add tests and lint code 2021-08-13 13:56:09 +02:00
Makefile feat: chat2 refactor / redesign 2022-08-15 15:22:13 -04:00
README.md feat: chat2 refactor / redesign 2022-08-15 15:22:13 -04:00
chat.go chore: move dependencies from status-im to waku-org 2022-10-27 11:41:23 -04:00
exec.go fix(rln): remove idcommitment and idkey 2022-10-21 11:42:18 -04:00
flags.go feat: output logs to file 2022-11-03 07:06:16 +01:00
go.mod feat: output logs to file 2022-11-03 07:06:16 +01:00
go.sum chore: move dependencies from status-im to waku-org 2022-10-27 11:41:23 -04:00
main.go feat: output logs to file 2022-11-03 07:06:16 +01:00
options.go feat: output logs to file 2022-11-03 07:06:16 +01:00
rln-credentials.go chore: move dependencies from status-im to waku-org 2022-10-27 11:41:23 -04:00
screen.go feat: chat2 refactor / redesign 2022-08-15 15:22:13 -04:00
ui.go feat: output logs to file 2022-11-03 07:06:16 +01: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

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=/ip4/134.209.139.210/tcp/30303/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ

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.