A Quick guide on how to set up and run the demo.
- Install Rust and
wasm-pack. - Make sure that you use
1.82.0-nightlyversion of Rust compiler. - Generate the WebAssembly library using
wasm-pack build --target web.
To get the project up and running, follow these steps:
- Provide
target/wasm32-unknown-unknown/release/helios_ts.wasm - Install dependencies using
npm install - Build the project using
npm run build - Finally, serve the project using
http-server
Go to http://localhost:8080 in your web browser to view the project.
For this you need to select a block for bootstrapping the light client:
- Open https://beaconcha.in/
- Open any finalized epoch not older than 2 weeks, e.g. https://beaconcha.in/epoch/305454
- Find the very first slot (the earliest), e.g. in the epoch 305454: https://beaconcha.in/slot/9774528
- Copy hash in the
block rootfield:0x4fb3cdfabdfe3df74c3de6157dfe816bef1130044f5982bf54f2e3a04f698e2f - Paste into the UI.
To avoid CORS issues, either:
- In production, you should run your own proxy server.
- For development purposes, you can:
- Use a browser extension to disable CORS.
- Run the browser with CORS disabled using Terminal.
- Use a public proxy server like "https://corsproxy.io/?". Prefix the URLs in
app.jswith the proxy URL.