Waku Objects Playground is a simple chat app. Its main use is to showcase Waku Objects, develop and test them.
Install dependencies with pnpm install
. Then start the development server:
# bind to 127.0.0.1
pnpm dev --host
# or start the server and open the app in a new browser tab
pnpm dev --open
To create a production version of your app:
pnpm build
You can preview the production build with pnpm preview
.
If you want to create a build that can be statically served, you need to set env STATIC=TRUE
.
STATIC=TRUE pnpm build
The outcome is in build
folder.
Use env variables to specify:
# Which waku node to connect to
# Options:
# local single waku node running in docker
# production waku nodes used for production deployment
# Defaults to
PUBLIC_WAKU='production'
# Which blockchain to connect to
# Options:
# local local chain running in docker
# chiado chiado testnet
# gnosis gnosis mainnet
# Defaults to
PUBLIC_BLOCKCHAIN='gnosis'
There is a built-in command line tool for making development easier.
Run it with this command:
pnpm cli <command> [arguments]
Currently the following commands are available:
pnpm cli fund <address> [amount=1]
: fund an address from a builtin hardhat test accountpnpm cli balance <address>
: prints the balance of the account that belongs to the addresspnpm cli txinfo <hash>
: prints the transaction informationpnpm cli waku profile <address>
: prints the profile belonging to an addresspnpm cli waku set-profile <address> <name> [avatar]
: set the name and avatar of profile at addresspnpm cli waku group-chat <address>
: prints the group chatspnpm cli waku set-group-chat <address> <name> <avatar> [...users]
: set the name, avatar and users of a group chat`pnpm cli waku chats <address>
: prints the chats objectpnpm cli waku chat <address> <chat-id>
: prints the chat objectpnpm cli waku chat-messages <address> <chat-id>
: prints the messages of a chatpnpm cli waku private-message <address>
: prints the private messagespnpm cli waku objects <address>
: prints the object storepnpm cli waku send <from> <to> <message>
sends a private message
from a user (or group) to another onepnpm cli waku invite <from> <to> <chat-id>
invite a user to a group chatLicensed and distributed under either of
or
at your option. These files may not be copied, modified, or distributed except according to those terms.