#gateway #ccip #ensdomains

bin+lib ens-offchain-resolver-gateway

ENS Offchain Resolver Gateway

3 releases

0.1.4 Jun 30, 2023
0.1.3 Jun 30, 2023
0.1.2 Jun 29, 2023

#71 in #gateway

Download history 29/week @ 2024-02-25 2/week @ 2024-03-03 1/week @ 2024-03-10 54/week @ 2024-03-31 1/week @ 2024-04-07

55 downloads per month

Custom license

38KB
438 lines

CI Status Docker Crates.io Docs.rs

ENS Offchain Resolver Gateway

ENS gateway implementation working in a similar way to the TypeScript gateway implementation.

Precompiled ENS gateways are available in releases page.

A Docker image is also available: https://hub.docker.com/r/jeje/ens-offchain-resolver-gateway-rs

Lastly a library is provided to ease implementation of custom gateways without duplicating much code. A good sample is the default implementation provided.

CLI Usage

ENS Offchain Gateway server answering requests from CCIP-READ protocol (aka ERC-3668)

Usage: ens-gateway [OPTIONS] --privatekey <VALUE> <--json <FILE>>

Options:
  -k, --privatekey <VALUE>  private key of the wallet allowed to sign offchain ENS record results [env: PRIVATE_KEY]
  -t, --ttl <VALUE>         TTL for signatures [env: TTL=] [default: 300]
  -i, --ip <VALUE>          server IP to bind to -- change it to 0.0.0.0 for all interfaces [env: LISTEN_IP=] [default: 127.0.0.1]
  -p, --port <VALUE>        server port to bind to [env: LISTEN_PORT=] [default: 8080]
      --json <FILE>         Json file to use as a database
  -h, --help                Print help
  -V, --version             Print version

Docker Usage

PRIVATE_KEY="<your private key>" docker run --rm \
  -e PRIVATE_KEY=${PRIVATE_KEY} \
  -p 8080:8080 \
  -v .:/tmp:ro \
  jeje/ens-offchain-resolver-gateway-rs \
  --json /tmp/test.eth.json

Helpful Resources

Dependencies

~37–56MB
~1M SLoC