2022-10-28 03:17:15 +00:00
# Js-Waku Examples
2022-06-17 00:48:15 +00:00
## Examples
2022-06-17 00:49:30 +00:00
Here is the list of the examples using [`js-waku` ](https://www.npmjs.com/package/js-waku ) and the features they demonstrate:
2022-06-17 00:48:15 +00:00
2023-01-17 09:38:35 +00:00
See https://examples.waku.org/ for more examples.
2022-09-06 17:55:29 +00:00
2022-10-28 03:17:15 +00:00
### Web Chat App
2023-05-10 10:11:33 +00:00
- [code ](examples/web-chat )
2022-10-28 03:17:15 +00:00
- [website ](https://examples.waku.org/web-chat )
- Demonstrates: Group chat, React/TypeScript, Relay, Store.
2023-12-08 10:28:54 +00:00
### Tic Tac Toe
- [code ](examples/tictactoe )
- [website ](https://examples.waku.org/tictactoe )
- Demonstrates: Gaming, Light Client, Store, NextJS, Waku React.
2022-10-28 03:17:15 +00:00
### Ethereum Private Messaging
End-to-end encrypted communication between two Ethereum addresses.
2023-05-10 10:11:33 +00:00
- [code ](examples/eth-pm )
2022-10-28 03:17:15 +00:00
- [website ](https://examples.waku.org/eth-pm )
- Demonstrates: Private Messaging, React/TypeScript, Light Client, Signature with Web3, Asymmetric Encryption.
### Waku Light Client in JavaScript
Send messages between several users (or just one) using light client targetted protocols.
2023-05-10 10:11:33 +00:00
- [code ](examples/light-js )
2022-10-28 03:17:15 +00:00
- [website ](https://examples.waku.org/light-js )
- Demonstrates: Waku Light node: Filter + Light Push, Pure Javascript/HTML using ESM/unpkg bundle.
### Minimal Angular (v13) Waku Relay
2023-07-12 10:11:30 +00:00
A barebone messaging app to illustrate the seamless integration of `js-waku` into AngularJS.
2022-10-28 03:17:15 +00:00
2023-05-10 10:11:33 +00:00
- [code ](examples/relay-angular-chat )
2022-10-28 03:17:15 +00:00
- [website ](https://examples.waku.org/relay-angular-chat )
- Demonstrates: Group messaging, Angular, Waku Relay, Protobuf using `protobufjs` , No async/await syntax.
### Waku Relay in JavaScript
This example uses Waku Relay to send and receive simple text messages.
2023-05-10 10:11:33 +00:00
- [code ](examples/relay-js )
2022-10-28 03:17:15 +00:00
- [website ](https://examples.waku.org/relay-js )
- Demonstrates: Waku Relay, Pure Javascript/HTML using ESM/unpkg bundle.
### Waku Relay in ReactJS
2023-07-12 10:11:30 +00:00
A barebone chat app to illustrate the seamless integration of `js-waku` into ReactJS.
2022-10-28 03:17:15 +00:00
2023-05-10 10:11:33 +00:00
- [code ](examples/relay-reactjs-chat )
2022-10-28 03:17:15 +00:00
- [website ](https://examples.waku.org/relay-reactjs-chat )
- Demonstrates: Group chat, React/JavaScript, Waku Relay, Protobuf using `protobufjs` .
### Using [RLN](https://rfc.vac.dev/spec/32/) in JavaScript
> Rate limiting nullifier (RLN) is a construct based on zero-knowledge proofs
> that provides an anonymous rate-limited signaling/messaging framework
> suitable for decentralized (and centralized) environments
Use RLN in the browser, compatible with nwaku chat2 and go-waku chat2 RLN implementations.
2023-05-10 10:11:33 +00:00
- [code ](examples/rln-js )
2022-10-28 03:17:15 +00:00
- [website ](https://examples.waku.org/rln-js )
- Demonstrates:
- RLN:
- Generate credentials
- Insert membership to smart contract (Goerli testnet)
- Retrieve smart contract state
- Generate and send proofs
- Verify incoming proofs
- Pure Javascript/HTML using ESM/unpkg bundle.
### Using Waku Store in JavaScript
This example uses Waku Store to retrieve the latest ping relay message (used for keep alive purposes) and displays its timestamp.
2023-05-10 10:11:33 +00:00
- [code ](examples/store-js )
2022-10-28 03:17:15 +00:00
- [website ](https://examples.waku.org/store-js )
- Demonstrates: Waku Store: Using a condition to stop retrieving results from Waku Store, Pure Javascript/HTML using ESM/unpkg bundle.
### Minimal ReactJS Waku Store App
2023-07-12 10:11:30 +00:00
A simple app that retrieves chat messages using [Waku Store ](https://docs.waku.org/overview/concepts/protocols#store ) to illustrate the retrieval of messages with `js-waku` and ReactJS.
2022-10-28 03:17:15 +00:00
2023-05-10 10:11:33 +00:00
- [code ](examples/store-reactjs-chat )
2022-10-28 03:17:15 +00:00
- [website ](https://examples.waku.org/store-reactjs-chat )
- Demonstrates: React/JavaScript, Waku Store, Protobuf using `protobufjs` , no async/await syntax.
2022-09-06 17:55:29 +00:00
# Continuous Integration
The `master` branch is being built by Jenkins CI:
https://ci.infra.status.im/job/website/job/examples.waku.org/
Based on the [`ci/Jenkinsfile` ](./ci/Jenkinsfile ).