fix: include timestamp in curl command (#31)
Co-authored-by: Vaclav Pavlin <vaclav@status.im>
This commit is contained in:
parent
47fbd2fce4
commit
72c77adaf9
|
@ -1,4 +1,5 @@
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
|
.env
|
||||||
keystore
|
keystore
|
||||||
postgresql
|
postgresql
|
||||||
rln_tree
|
rln_tree
|
||||||
|
|
|
@ -14,7 +14,7 @@ You need:
|
||||||
* Ethereum Sepolia account with some balance <0.01 Eth. Get some [here](https://www.infura.io/faucet/sepolia).
|
* Ethereum Sepolia account with some balance <0.01 Eth. Get some [here](https://www.infura.io/faucet/sepolia).
|
||||||
* A password to protect your rln membership.
|
* A password to protect your rln membership.
|
||||||
|
|
||||||
There is `.env.example` available for you as a template to use for providing the above values. The process when working with `.env` files is to copy the `.env.example`, store it as `.env` and edit the values there.
|
`docker-compose` [will read the `./.env` file](https://docs.docker.com/compose/environment-variables/set-environment-variables/#additional-information-3) from the filesystem. There is `.env.example` available for you as a template to use for providing the above values. The process when working with `.env` files is to copy the `.env.example`, store it as `.env` and edit the values there.
|
||||||
|
|
||||||
```
|
```
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
|
@ -23,6 +23,7 @@ ${EDITOR} .env
|
||||||
|
|
||||||
Make sure to **NOT** place any secrets into `.env.example`, as they might be unintentionally published in the Git repository.
|
Make sure to **NOT** place any secrets into `.env.example`, as they might be unintentionally published in the Git repository.
|
||||||
|
|
||||||
|
|
||||||
**🔑 1. Register RLN membership**
|
**🔑 1. Register RLN membership**
|
||||||
|
|
||||||
The RLN membership is your access key to The Waku Network. Its registration is done onchain, and allows your nwaku node to publish messages in a decentralized and private way, respecting some [rate limits](https://rfc.vac.dev/spec/64/#rate-limit-exceeded).
|
The RLN membership is your access key to The Waku Network. Its registration is done onchain, and allows your nwaku node to publish messages in a decentralized and private way, respecting some [rate limits](https://rfc.vac.dev/spec/64/#rate-limit-exceeded).
|
||||||
|
@ -62,7 +63,7 @@ curl http://127.0.0.1:8645/debug/v1/info
|
||||||
```
|
```
|
||||||
curl -X POST "http://127.0.0.1:8645/relay/v1/auto/messages" \
|
curl -X POST "http://127.0.0.1:8645/relay/v1/auto/messages" \
|
||||||
-H "content-type: application/json" \
|
-H "content-type: application/json" \
|
||||||
-d '{"payload":"'$(echo -n "Hello Waku Network - from Anonymous User" | base64)'","contentTopic":"/my-app/2/chatroom-1/proto"}'
|
-d '{"payload":"'$(echo -n "Hello Waku Network - from Anonymous User" | base64)'","contentTopic":"/my-app/2/chatroom-1/proto","timestamp":$(date +%s%N)}'
|
||||||
```
|
```
|
||||||
|
|
||||||
**Get messages sent to a `contentTopic`**. Note that any store node in the network is used to reply.
|
**Get messages sent to a `contentTopic`**. Note that any store node in the network is used to reply.
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if test -f $(pwd)/keystore/keystore.json; then
|
|
||||||
echo "keystore/keystore.json alredy exists. Use it instead of creating a new one."
|
if test -f ./keystore/keystore.json; then
|
||||||
|
echo "keystore/keystore.json already exists. Use it instead of creating a new one."
|
||||||
echo "Exiting"
|
echo "Exiting"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p ./keystore
|
||||||
|
|
||||||
if test -f .env; then
|
if test -f .env; then
|
||||||
echo "Using .env file"
|
echo "Using .env file"
|
||||||
. $(pwd)/.env
|
. $(pwd)/.env
|
||||||
|
|
Loading…
Reference in New Issue