waku-objects-playground
所属分类:其他
开发工具:Svelte
文件大小:0KB
下载次数:0
上传日期:2023-08-23 09:19:15
上 传 者:
sh-1993
说明: 一个简单的waku聊天应用程序,用于玩和测试waku对象,
(A simple waku chat application to play with and test waku objects,)
文件列表:
.env (48, 2023-12-12)
.eslintignore (160, 2023-12-12)
.eslintrc.cjs (529, 2023-12-12)
.npmrc (44, 2023-12-12)
.prettierignore (160, 2023-12-12)
.prettierrc (248, 2023-12-12)
DEVELOPERS.md (24601, 2023-12-12)
LICENSE-APACHE-v2 (11365, 2023-12-12)
LICENSE-MIT (1101, 2023-12-12)
docker-compose.yaml (288, 2023-12-12)
knip.ts (1067, 2023-12-12)
package.json (2320, 2023-12-12)
pnpm-lock.yaml (246859, 2023-12-12)
src/ (0, 2023-12-12)
src/app.d.ts (240, 2023-12-12)
src/app.html (644, 2023-12-12)
src/cli/ (0, 2023-12-12)
src/cli/cli.ts (1813, 2023-12-12)
src/lib/ (0, 2023-12-12)
src/lib/abis/ (0, 2023-12-12)
src/lib/abis/erc20.json (3107, 2023-12-12)
src/lib/adapters/ (0, 2023-12-12)
src/lib/adapters/balance.ts (1478, 2023-12-12)
src/lib/adapters/index.ts (1743, 2023-12-12)
src/lib/adapters/ipfs.ts (624, 2023-12-12)
src/lib/adapters/transaction.ts (4887, 2023-12-12)
src/lib/adapters/utils.ts (1456, 2023-12-12)
src/lib/adapters/waku/ (0, 2023-12-12)
src/lib/adapters/waku/codec.ts (2023, 2023-12-12)
src/lib/adapters/waku/crypto.test.ts (1558, 2023-12-12)
src/lib/adapters/waku/crypto.ts (2784, 2023-12-12)
src/lib/adapters/waku/index.ts (32929, 2023-12-12)
src/lib/adapters/waku/message-hash.test.ts (1781, 2023-12-12)
src/lib/adapters/waku/message-hash.ts (1573, 2023-12-12)
... ...
# Waku Objects: Playground
Waku Objects Playground is a simple chat app. Its main use is to showcase Waku Objects, develop and test them.
## Developing
Install dependencies with `pnpm install`. Then start the development server:
```bash
# 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
```
## Building
To create a production version of your app:
```bash
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`.
```bash
STATIC=TRUE pnpm build
```
The outcome is in `build` folder.
## Config
Use env variables to specify:
```bash
# 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'
```
## CLI
There is a built-in command line tool for making development easier.
Run it with this command:
```bash
pnpm cli
[arguments]
```
Currently the following commands are available:
- `pnpm cli fund [amount=1]`: fund an address from a builtin hardhat test account
- `pnpm cli balance `: prints the balance of the account that belongs to the address
- `pnpm cli txinfo `: prints the transaction information
- `pnpm cli waku profile `: prints the profile belonging to an address
- `pnpm cli waku set-profile [avatar]`: set the name and avatar of profile at address
- `pnpm cli waku group-chat `: prints the group chats
- `pnpm cli waku set-group-chat [...users]`: set the name, avatar and users of a group chat`
- `pnpm cli waku chats `: prints the chats object
- `pnpm cli waku chat `: prints the chat object
- `pnpm cli waku chat-messages `: prints the messages of a chat
- `pnpm cli waku private-message `: prints the private messages
- `pnpm cli waku objects `: prints the object store
- `pnpm cli waku send ` sends a private `message` from a user (or group) to another one
- `pnpm cli waku invite ` invite a user to a group chat
## License
Licensed and distributed under either of
- MIT license: [LICENSE-MIT](https://github.com/waku-org/js-waku/blob/master/LICENSE-MIT) or http://opensource.org/licenses/MIT
or
- Apache License, Version 2.0, ([LICENSE-APACHE-v2](https://github.com/waku-org/js-waku/blob/master/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.
近期下载者:
相关文件:
收藏者: