Explain how to run Waku node in README (#1921)
This commit is contained in:
parent
c8d20f84f8
commit
13da3a09c5
|
@ -10,6 +10,7 @@
|
||||||
- [How to Release](RELEASING.md)
|
- [How to Release](RELEASING.md)
|
||||||
- [How to run a Bootnode](BOOTNODE.md)
|
- [How to run a Bootnode](BOOTNODE.md)
|
||||||
- [How to run a Mailserver](MAILSERVER.md)
|
- [How to run a Mailserver](MAILSERVER.md)
|
||||||
|
- [How to run a Waku node](./_examples/README.md#run-waku-node)
|
||||||
- [How to configure status-go](/config)
|
- [How to configure status-go](/config)
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
|
@ -2,6 +2,31 @@
|
||||||
|
|
||||||
> All code snippets are run from the root project directory.
|
> All code snippets are run from the root project directory.
|
||||||
|
|
||||||
|
## Run Waku node
|
||||||
|
|
||||||
|
Running Waku node is a matter of a correct configuration. To enable Waku and JSON-RPC HTTP interface use:
|
||||||
|
```shell script
|
||||||
|
{
|
||||||
|
"APIModules": "waku",
|
||||||
|
"HTTPEnabled": true,
|
||||||
|
"HTTPHost": "localhost",
|
||||||
|
"HTTPPort": 8545,
|
||||||
|
"WakuConfig": {
|
||||||
|
"Enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
This command will start a Waku node using the `eth.prod` fleet:
|
||||||
|
```shell script
|
||||||
|
$ ./build/bin/statusd -c ./_examples/waku.json
|
||||||
|
```
|
||||||
|
|
||||||
|
From now on, you can interact with Waku using HTTP interface:
|
||||||
|
```shell script
|
||||||
|
$ curl -XPOST http://localhost:8545 -H 'Content-type: application/json' -d '{"jsonrpc":"2.0","method":"waku_info","params":[],"id":1}'
|
||||||
|
```
|
||||||
|
|
||||||
## Whisper-Waku bridge
|
## Whisper-Waku bridge
|
||||||
|
|
||||||
This example demonstrates how bridging between Whisper and Waku works.
|
This example demonstrates how bridging between Whisper and Waku works.
|
||||||
|
@ -44,7 +69,7 @@ $ echo '{"jsonrpc":"2.0","method":"waku_generateSymKeyFromPassword","params":["t
|
||||||
}
|
}
|
||||||
|
|
||||||
# send a message
|
# send a message
|
||||||
$ echo '{"jsonrpc":"2.0","method":"waku_post","params":[{"symKeyID":"98999c238e3747b7562674a86d450d531eca616d288a500268878e90848bfe4e", "ttl":100, "topic": "0xaabbccdd", "payload":"0x010203", "powTarget": 5.0, "powTime": 3}],"id":1}' | \
|
$ echo '{"jsonrpc":"2.0","method":"waku_post","params":[{"symKeyID":"1e07adfcb80c9e9853fb2c4cce3d91c17edd17ab6e950387833d64878fe91624", "ttl":100, "topic": "0xaabbccdd", "payload":"0x010203", "powTarget": 5.0, "powTime": 3}],"id":1}' | \
|
||||||
nc -U ./test-waku-bridge/geth.ipc
|
nc -U ./test-waku-bridge/geth.ipc
|
||||||
{
|
{
|
||||||
"jsonrpc": "2.0",
|
"jsonrpc": "2.0",
|
||||||
|
@ -74,4 +99,3 @@ $ echo '{"jsonrpc":"2.0","method":"shh_getFilterMessages","params":["8fd6c01721a
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"APIModules": "waku,shh",
|
"APIModules": "waku",
|
||||||
"HTTPEnabled": true,
|
"HTTPEnabled": true,
|
||||||
|
"HTTPHost": "localhost",
|
||||||
|
"HTTPPort": 8545,
|
||||||
"WakuConfig": {
|
"WakuConfig": {
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"APIModules": "waku,shh",
|
"APIModules": "shh",
|
||||||
"HTTPEnabled": true,
|
"HTTPEnabled": true,
|
||||||
|
"HTTPHost": "localhost",
|
||||||
|
"HTTPPort": 8545,
|
||||||
"WhisperConfig": {
|
"WhisperConfig": {
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue