Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace eth-ens-namehash with ens-normalize.js #37

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

adraffy
Copy link

@adraffy adraffy commented Oct 15, 2022

Copied from other fork: This is my first-attempt at replacing the eth-ens-namehash repo. I essentially deleted everything and started fresh. I kept the existing functionality (normalize() and hash()) and exposed my new functionality via import renames. Except for the hash.js shim, /derive/, /src/ and /validate/ are direct-copies from @adraffy/ens-normalize.js.

For more information, check Project Readme, Derive Readme, and Validation Readme.


Note: This build still has a few areas that are still under development:

  • I just completed a big review of Latin, but it probably needs another pass or two to fix mistakes.
  • There is an excessive amount of arrows, crosses, and star-like characters that need simplified -- there might not be a good solution.
  • I've already limited combining marks to (1), and limited what they can attach to (like emoji, isolates, etc.), but I'm thinking that's not enough, and what we really need is a whitelisted sequence of valid combinations, possibly per script, because even if you lock down what marks can be used, marks can still be applied to characters that shouldn't have them.

I will keep this repo in sync as a finish the last few things.

@adraffy
Copy link
Author

adraffy commented Jan 11, 2023

@adraffy/ens-normalize.js has been pretty stable.

This repo now contains the minimal data necessary for operation and validation conformance.

It is a direct replacement for the prior library except it is ESM not CJS.

I removed all of the build code as the 99.9% use-case is normalize()/namehash()—not rebuilding the spec from scratch.

@adraffy
Copy link
Author

adraffy commented Feb 27, 2023

Updated to match @adraffy/ens-normalize.js 1.9.0

@adraffy
Copy link
Author

adraffy commented Jun 6, 2023

https://discuss.ens.domains/t/draft-approval-of-ens-name-normalization-standard/16957/7

This should now be a zero-change drop-in replacement for the old library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant