Life is long, if you know how to use it
This repository is an example highlighting the use of some novel technologies:
- Waku decentralized messaging in
rust
(usingrust-waku-bindings
). bash
scripting to interact with Waku as a JSON-RPC client.
This makes uses of WAKU2-RELAY
, with the following specifications:
- PubSub topic set to
/waku/2/default-waku/proto
- Content topics
/dailystoic/1/request/proto
and/dailystoic/1/broadcast/proto
.
User flow:
- Subscribe to a message that is delivered every 24 hrs (monitor the
PubSub
for the content topic/dailystoic/1/broadcast/proto
). - Ask for a daily stoic (
Request
) via/dailystoic/1/request/proto
.
This is a binary, written in rust
. Usage:
dailystoic /quotes/quotes.json
The first and only argument being passed is the file path to a JSON file containing the quotes.
When running your own nwaku
node, you can use the JSON-RPC client to interact with waku. For this, the following are required:
- bash
- protoc
- jq
- xxd
- Running nwaku ndoe
To use the bash client to get a daily stoic quote using your local nwaku
node:
cd bash_client
./client.sh