{"id":22123595,"url":"https://github.com/v3xlabs/enstate","last_synced_at":"2025-04-05T12:01:37.900Z","repository":{"id":166979509,"uuid":"634895920","full_name":"v3xlabs/enstate","owner":"v3xlabs","description":"ENS JSON API \u0026 Cloudflare Worker written in Rust. Try it out 👇","archived":false,"fork":false,"pushed_at":"2025-03-21T18:03:44.000Z","size":964,"stargazers_count":69,"open_issues_count":10,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T11:02:40.628Z","etag":null,"topics":["cloudflare","ens","ethereum","json","rust","workers"],"latest_commit_sha":null,"homepage":"https://enstate.rs/n/luc.eth","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/v3xlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-01T13:44:46.000Z","updated_at":"2025-03-21T18:03:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"85e0e564-0482-4784-b8ff-1e6b94a159a2","html_url":"https://github.com/v3xlabs/enstate","commit_stats":null,"previous_names":["v3xlabs/enstate"],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v3xlabs%2Fenstate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v3xlabs%2Fenstate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v3xlabs%2Fenstate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v3xlabs%2Fenstate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v3xlabs","download_url":"https://codeload.github.com/v3xlabs/enstate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332555,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","ens","ethereum","json","rust","workers"],"created_at":"2024-12-01T15:35:32.732Z","updated_at":"2025-04-05T12:01:37.864Z","avatar_url":"https://github.com/v3xlabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\".github/banner.png#1\" alt=\"enstate.rs\" /\u003e\n\n\u003e ⚠️ This branch is currently undergoing a rewrite.\n\u003e Please see the [v1](https://github.com/v3xlabs/edgeserver/tree/v1) branch for the latest stable release.\n\n## 📌 API Specification (OpenAPI)\n\nThe API specification is available [on enstate.rs](https://enstate.rs/docs) or locally at `{your_site_here}/docs`.\n\n## 🌐 Hosted version\n\nFor demonstration purposes (and one-off usage), a hosted instance is made available at [https://enstate.rs](https://enstate.rs) and a cloudflare worker at [https://worker.enstate.rs](https://worker.enstate.rs). This instance is provided as-is and as a gift to the community. Please do not abuse it.\n\n### 📌 Example\n\n\u003e [name/luc.eth](https://worker.enstate.rs/n/luc.eth) \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; [name/rescueorg.eth](https://worker.enstate.rs/n/rescueorg.eth) \u0026nbsp;\u0026nbsp;\u0026nbsp; [name/antony.sh](https://worker.enstate.rs/n/antony.sh)\u003cbr /\u003e\n\u003e [image/vitalik.eth](https://worker.enstate.rs/i/vitalik.eth)\u0026nbsp;\u0026nbsp;\u0026nbsp; [name/khori.eth](https://worker.enstate.rs/n/khori.eth) \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; [name/helgesson.eth](https://worker.enstate.rs/n/helgesson.eth)\u003cbr /\u003e\n\u003e [bulk/address](https://enstate.rs/bulk/a?addresses[]=0x225f137127d9067788314bc7fcc1f36746a3c3B5\u0026addresses[]=0xd577D1322cB22eB6EAC1a008F62b18807921EFBc\u0026addresses[]=0x8F8f07b6D61806Ec38febd15B07528dCF2903Ae7\u0026addresses[]=0x8e8Db5CcEF88cca9d624701Db544989C996E3216\u0026addresses[]=0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5\u0026addresses[]=0xF1F78f308F08fDCAC933124ee8B52A376ff542B4) \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; [sse/address](https://enstate.rs/sse/a?addresses[]=0x225f137127d9067788314bc7fcc1f36746a3c3B5\u0026addresses[]=0xd577D1322cB22eB6EAC1a008F62b18807921EFBc\u0026addresses[]=0x8F8f07b6D61806Ec38febd15B07528dCF2903Ae7\u0026addresses[]=0x8e8Db5CcEF88cca9d624701Db544989C996E3216\u0026addresses[]=0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5\u0026addresses[]=0xF1F78f308F08fDCAC933124ee8B52A376ff542B4) \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; [header/luc.eth](https://enstate.rs/h/luc.eth)\n\n## 🚀 Getting Started\n\nWe believe software should be simple and containerized. Enstate provides you with a lightweight docker container that you can run anywhere.\n\n### 🐳 Docker\n\n```sh\ndocker run \\\n  -p 3000:3000 \\\n  -e REDIS_URL=redis://0.0.0.0:6379 \\\n  -e RPC_URL=https://rpc.ankr.com/eth \\\n  ghcr.io/v3xlabs/enstate:1.0.5\n```\n\n### 🐳 Docker Compose\n\n```yaml\nversion: \"3.8\"\nservices:\n    enstate:\n        image: ghcr.io/v3xlabs/enstate:1.0.5\n        ports:\n            - 3000:3000\n        environment:\n            - REDIS_URL=redis://redis:6379\n            - RPC_URL=https://rpc.ankr.com/eth\n        depends_on:\n            - redis\n    redis:\n        image: redis:6.2.5-alpine\n        ports:\n            - 6379:6379\n```\n\n### 🦀 Cloudflare Workers\n\n```sh\ncd worker\n```\n\n#### Run the worker locally\n\n```sh\ncp .dev.vars.example .dev.vars\n```\n\nEdit your `.dev.vars` file at this time to include environment variables for `UNIVERSAL_RESOLVER`, `RPC_URL` (optional) and `OPENSEA_API_KEY` (optional).\n\nTo run the worker locally you can now run:\n\n```\npnpm dev\n```\n\n#### Deploying to Cloudflare Workers\n\nCreate a [**KV namespace**](https://developers.cloudflare.com/kv/get-started/#3-create-a-kv-namespace) via `wrangler` or the Cloudflare dashboard.\n\n```sh\npnpm wrangler kv:namespace create \u003cYOUR_NAMESPACE\u003e\n```\n\nCopy the `id` of your newly created KV namespace to your [`wrangler.toml`](./worker/wrangler.toml). The `binding` value should remain as `enstate-1` regardless of what you named yours when you created it.\n\nDeploy the worker:\n\n```sh\npnpm wrangler deploy\n```\n\nUpload your secrets:\n\n```sh\necho \"https://rpc.ankr.com/eth/XXXXXX\" | pnpm wrangler secret put RPC_URL\necho \"XXXXX\" | pnpm wrangler secret put OPENSEA_API_KEY\n```\n\nAdditionally, there is a hosted instance available at [worker.enstate.rs](https://worker.enstate.rs).\n\n## Contributing\n\n### Standalone Server\n\n```sh\ncd app \u0026\u0026 cargo run -p enstate\n```\n\n### Cloudflare Worker\n\n```sh\ncd worker \u0026\u0026 pnpm dev\n```\n\nFor more information on running the worker locally, please see [running Cloudflare Workers locally](#run-the-worker-locally).\n\n## Features\n\nHere is a short summary of the features provided by the Enstate API including limitations.\n\n### Avatar \u0026 Header Images\n\nAn additional `avatar` field at the top level of the ENSProfile object is provided. This field is a URL to the avatar image, with optional gateway rewrites for IPFS and IPNS hashes.\n\nYou can also directly access the avatar image of a user by using the `/i/{name}` and `/h/{name}` endpoints.\n\n### Contenthash\n\nCurrently **limited implementation**. Only supports `ipfs`.\nTODO add support for `ipns`, `swarm`, `arweave`, `onion`, `onion3`, `skynet`\n\n### Common Records\n\nFor each profile we look up the following records:\nYou can customize the records you want to query by adjusting the `PROFILE_RECORDS` environment variable.\nScoping down the size of this list can drastically improve the performance of your requests.\n\n| Record Type                   | Description             |\n| ----------------------------- | ----------------------- |\n| `description`                 | Description             |\n| `url`                         | URL to the profile      |\n| `name`                        | Name of the profile     |\n| `mail`                        | Email address           |\n| `email`                       | Email address           |\n| `avatar`                      | URL to the avatar       |\n| `header`                      | URL to the header image |\n| `display`                     | Display name            |\n| `location`                    | Location                |\n| `timezone`                    | Timezone                |\n| `language`                    | Language                |\n| `pronouns`                    | Pronouns                |\n| `com.github`                  | GitHub username         |\n| `org.matrix`                  | Matrix username         |\n| `com.twitter`                 | Twitter username        |\n| `com.discord`                 | Discord username        |\n| `social.bsky`                 | Bsky username           |\n| `io.keybase`                  | Keybase username        |\n| `org.telegram`                | Telegram username       |\n| `social.mastodon`             | Mastodon username       |\n| `network.dm3.profile`         | DM3 profile             |\n| `network.dm3.deliveryService` | DM3 delivery service    |\n\n### Multichain Support\n\nBy default we query profiles for an vast array of chains.\nYou can customize the chains you want to query by adjusting the `MULTICOIN_CHAINS` environment variable.\nForcing it to only chains of interest can drastically improve the performance of your requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv3xlabs%2Fenstate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv3xlabs%2Fenstate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv3xlabs%2Fenstate/lists"}