b1dfa9ce55 | ||
---|---|---|
.github | ||
.vscode | ||
nim-waku@fb2ea06a4f | ||
proto | ||
src | ||
web-chat | ||
.cspell.json | ||
.editorconfig | ||
.eslintrc.json | ||
.gitignore | ||
.gitmodules | ||
.mocharc.json | ||
.prettierignore | ||
LICENSE-APACHE-v2 | ||
LICENSE-MIT | ||
README.md | ||
bors.toml | ||
buf.gen.yaml | ||
buf.yaml | ||
jest.config.js | ||
package-lock.json | ||
package.json | ||
tsconfig.json | ||
tsconfig.module.json |
README.md
js-waku
A JavaScript implementation of the Waku v2 protocol.
Waku Protocol Support
You can track progress on the project board.
- ✔: Supported
- 🚧: Implementation in progress
- ⛔: Support is not planned
Spec | Implementation Status |
---|---|
6/WAKU1 | ⛔ |
7/WAKU-DATA | ⛔ |
8/WAKU-MAIL | ⛔ |
9/WAKU-RPC | ⛔ |
10/WAKU2 | 🚧 |
11/WAKU2-RELAY | ✔ |
12/WAKU2-FILTER | |
13/WAKU2-STORE | ✔ (querying node only) |
14/WAKU2-MESSAGE | ✔ |
15/WAKU2-BRIDGE | |
16/WAKU2-RPC | ⛔ |
17/WAKU2-RLNRELAY | |
18/WAKU2-SWAP |
Bugs, Questions & Features
If you encounter any bug or would like to propose new features, feel free to open an issue.
For support, questions & more general topics, please join the discussion on the Vac forum (use #js-waku tag).
Examples
Web Chat App (ReactJS)
A ReactJS web app is provided as an a show case of the library used in the browser.
A deployed version is available at https://status-im.github.io/js-waku/ Do note that due to some technical restrictions, it does not currently work out-of-the-box. If you wish to try it out, follow the instructions on the Vac forum. It is currently unstable and likely to break.
To run a development version locally, do:
git clone https://github.com/status-im/js-waku/ ; cd js-waku
npm install
npm run build
cd web-chat
npm install
npm run start
Then, you can use /help
to change your nick and connect to a server.
CLI Chat App (NodeJS)
A node chat app is provided as a working example of the library. It is interoperable with the nim-waku chat app example. To run the chat app, first ensure you have Node.js v14 or above:
node --version
Then, install and run:
git clone https://github.com/status-im/js-waku/ ; cd js-waku
npm install
npm run chat -- --staticNode /ip4/134.209.139.210/tcp/30303/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ
You can also specify an optional listenAddr
parameter (.e.g --listenAddr /ip4/0.0.0.0/tcp/7777/ws
).
This is only useful if you want a remote node to dial to your chat app,
it is not necessary in normal usage when you just connect to the fleet.
Contributing
Build & Test
To build and test this repository, you need:
- Node.js & npm
- bufbuild (only if changing protobuf files)
- protoc (only if changing protobuf files)
To ensure interoperability with nim-waku, some tests are run against a nim-waku node.
This is why nim-waku
is present as a git submodule, which itself contain several submodules.
At this stage, it is not possible to exclude nim-waku tests, hence git submodule update --init --recursive
is run before testing (see pretest
script).
To build nim-waku, you also need Rust.
Guidelines
- Please follow Chris Beam's commit message guide,
- Usually best to test new code,
- CI must pass.
License
Licensed and distributed under either of
- MIT license: LICENSE-MIT or http://opensource.org/licenses/MIT
or
- Apache License, Version 2.0, (LICENSE-APACHE-v2 or http://www.apache.org/licenses/LICENSE-2.0)
at your option. These files may not be copied, modified, or distributed except according to those terms.