https://github.com/str4d/zcon1-demo-wasm
https://github.com/str4d/zcon1-demo-wasm
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/str4d/zcon1-demo-wasm
- Owner: str4d
- Created: 2019-06-15T22:01:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T18:25:48.000Z (over 3 years ago)
- Last Synced: 2025-02-18T06:54:04.227Z (over 1 year ago)
- Language: JavaScript
- Size: 315 KB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zcon1 WASM demo
## Dependencies
- [Rust](https://www.rust-lang.org/tools/install)
- [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)
- [npm](https://www.npmjs.com/get-npm)
## Building
```sh
$ ./build.sh
```
## Running the backend
Web browsers currently cannot talk directly to gRPC servers, so it is necessary to run a
proxy as part of the backend. The `envoy/` subdirectory contains a Dockerfile and config
file for an Envoy proxy that listens on `localhost:8081` and will route requests to a
`lightwalletd` frontend listening on `localhost:9067`.
See [the `lightwalletd` documentation](https://github.com/zcash-hackworks/lightwalletd)
for details on how to set up a local `lightwalletd` testnet instance. Note that when
starting the frontend, you may need to use `--grpc-bind-addr 0.0.0.0:9067` so that the Docker
container can access it.
To build and run the Envoy proxy:
```sh
$ docker build -t lightwalletd/envoy -f envoy/envoy.Dockerfile envoy
$ docker run -d --network=host lightwalletd/envoy
```
## Running the demo
```sh
$ ln -s "$HOME/.zcash-params" demo-www/params
$ cd demo-www
$ npm run start
```
Then open http://localhost:8080/ in your browser.