https://github.com/namehash/ens-label-inspector
Detailed inspection of labels in ENS names
https://github.com/namehash/ens-label-inspector
ens
Last synced: about 1 month ago
JSON representation
Detailed inspection of labels in ENS names
- Host: GitHub
- URL: https://github.com/namehash/ens-label-inspector
- Owner: namehash
- License: mit
- Created: 2023-08-21T09:32:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-22T17:57:39.000Z (about 1 year ago)
- Last Synced: 2025-11-27T16:41:16.523Z (4 months ago)
- Topics: ens
- Language: Python
- Homepage: https://nameguard.io
- Size: 18.4 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# NameHash Label Inspector
The Label Inspector is a critical component of the NameHash software stack that is used to protect users from malicious domain names.
* ENS-tailored domain name label inspection
* Character and grapheme information, scripts, codepoints, ...
* Confusable grapheme detection
* Rendering checks for different fonts
* ENSIP-15 verification with detailed explanations and auto-suggestions
* Punycode and DNS hostname compatibility checks
* Supports many use cases
* Standalone Python library ([PyPI](https://pypi.org/project/ens-label-inspector/))
* ASGI web server
* [Amazon AWS Lambda](https://aws.amazon.com/lambda/) handler
## Getting Started
### Installing the library
The Label Inspector is available as a Python library on [PyPI](https://pypi.org/project/ens-label-inspector/). You can install it with `pip`:
```bash
pip install ens-label-inspector
```
### Starting the web server
A FastAPI application is included in the `label_inspector.web_api` module. The default installation from PyPI does not include an ASGI server, so you will need to install one separately. For example, to install [uvicorn](https://www.uvicorn.org):
```bash
pip install 'uvicorn[standard]'
```
You can start the web server with:
```bash
uvicorn label_inspector.web_api:app
```
Make an example request:
```bash
curl -d '{"label":"nick"}' -H "Content-Type: application/json" -X POST http://localhos
t:8000
# {"label":"nick","status":"normalized", ...
```
### Using the AWS Lambda handler
The Label Inspector includes a handler for [Amazon AWS Lambda](https://aws.amazon.com/lambda/). It is available in the `label_inspector.lambda` module. You can use it to create a Lambda function that will respond to HTTP requests. It uses the [mangum](https://mangum.io) library.
See the included [Dockerfile](/Dockerfile) for an example of how to build a Lambda deployment package.
## For maintainers
See [DEV.md](DEV.md).
## License
Licensed under the MIT License, Copyright © 2023-present [NameHash Labs](https://namehashlabs.org).
See [LICENSE](./LICENSE) for more information.