Code Monkey home page Code Monkey logo

daily-stoic-waku's Introduction

Life is long, if you know how to use it

Daily stoic

This repository is an example highlighting the use of some novel technologies:

  1. Waku decentralized messaging in rust (using rust-waku-bindings).
  2. bash scripting to interact with Waku as a JSON-RPC client.

Architecture

This makes uses of WAKU2-RELAY, with the following specifications:

  1. PubSub topic set to /waku/2/default-waku/proto
  2. Content topics /dailystoic/1/request/proto and /dailystoic/1/broadcast/proto.

User flow:

  1. Subscribe to a message that is delivered every 24 hrs (monitor the PubSub for the content topic /dailystoic/1/broadcast/proto).
  2. Ask for a daily stoic (Request) via /dailystoic/1/request/proto.

dailystoic

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.

Bash client

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

daily-stoic-waku's People

Contributors

mfw78 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.