nwaku/examples/v1
Hanno Cornelius 7f23bdf29f
chore: update nwaku submodules (#1123)
* chore: update submodules

* fix: SIGTERM ambiguity

* fix: ambiguous RNGs

* fix: ContentType is no longer a string

* fix: more fixes related to ambiguous RNGs

* fix: start all protocols

* chore: also update nim-eth

* chore: important new fixes in nim-libp2p

* fix: more changes related to RNG. Some reversion to reflect nim-eth update

* fix: breaking changes in nim-eth submodule

* fix: start protocols in tests

* fix: chat2bridge protocols async mounting

* fix: v1 test compilation

* fix: rln test compilation

* fix: remove confusing keys qualifier for the same HmacDrbgContext
2022-09-07 16:31:27 +01:00
..
README.md And update example readme with correct make target 2020-10-09 09:32:05 +02:00
config_example.nim Add Waku v1 usage example, fix #54 (#106) 2020-08-26 14:20:04 +02:00
example Add Waku v1 usage example, fix #54 (#106) 2020-08-26 14:20:04 +02:00
example.nim chore: update nwaku submodules (#1123) 2022-09-07 16:31:27 +01:00

README.md

Waku v1 example

Introduction

This is a basic Waku v1 example to show the Waku v1 API usage.

It can be run as a single node, in which case it will just post and receive its own messages.

Or multiple nodes can be started and can connect to each other, so that messages can be passed around.

How to build

make example1

How to run

Single node

# Lauch example node
./build/example

Messages will be posted and received.

Multiple nodes

# Launch first example node
./build/example

Now look for an INFO log containing the enode address, e.g.: enode://26..5b@0.0.0.0:30303 (but with full address)

Copy the full enode string of the first node and start the second node with that enode string as staticnode config option:

# Launch second example node, providing the enode address of the first node
./build/example --staticnode:enode://26..5b@0.0.0.0:30303 --ports-shift:1

Now both nodes will receive also messages from each other.