ens-offchain-resolver-gateway

Crates.ioens-offchain-resolver-gateway
lib.rsens-offchain-resolver-gateway
version0.1.4
sourcesrc
created_at2023-06-29 17:19:58.441167
updated_at2023-06-30 21:59:12.461895
descriptionENS Offchain Resolver Gateway
homepagehttps://github.com/jeje/ens-offchain-resolver-gateway-rs
repositoryhttps://github.com/jeje/ens-offchain-resolver-gateway-rs
max_upload_size
id903505
size153,358
Jérôme Bernard (jeje)

documentation

https://docs.rs/ens_gateway_server

README

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

Commit count: 11

cargo fmt