An open API service indexing awesome lists of open source software.

https://github.com/limechain/wisp

Wisp Protocol Relayer implementation in TypeScript (NestJS)
https://github.com/limechain/wisp

Last synced: over 1 year ago
JSON representation

Wisp Protocol Relayer implementation in TypeScript (NestJS)

Awesome Lists containing this project

README

          

# Wisp Relayer

NPM Version
Package License

## Description

Wisp Relayer node that:
- Handles Light Client Optimistic/Finality updates, requests ZKPs from
a [Wisp-Prover API](https://github.com/LimeChain/wisp-prover) and updates the on-chain LightClient contract
- Watches `Outbox` contracts for Cross-Rollup Messages and relays them to `Inbox` contracts once Light Client state is updated

## Installation

```bash
$ npm install
```

## Development

**Prerequisite**

Copy and example yaml and populate the ENV variables:

```markdown
cp ./config/example.yaml ./config/config.yaml
```

### Docker

Execute the following script
```bash
bash ./start.sh
```

### From Source

**Scripts**

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev
```

**Note**

In order for the relayer to receive light client finality updates, LimeChain's forked lodestar must be started:
1. Get the current `checkpointRoot` by executing:
```bash
curl https://lodestar-goerli.chainsafe.io/eth/v1/beacon/states/finalized/finality_checkpoints | jq ".data.finalized.root" | tr -d '"'
```
2. Start the `lodestar-wisp1:0` image, populating the returned `checkpointRoot:
```bash
docker run limechain/lodestar-wisp:1.0 lightclient --network goerli --beaconApiUrl=https://lodestar-goerli.chainsafe.io --checkpointRoot=${CHECKPOINT_ROOT} --crcApiUrl=http://relayer:8080
```

## License

The code in this project is free software under the [MIT License](LICENSE).