wealdtech / go-ens

Apache License 2.0
90 stars 35 forks source link

Support of ENSIP-15 for the funky emoji domains #39

Open palevoo opened 6 months ago

palevoo commented 6 months ago

Hey @wealdtech thank you for maintaining this!

I've run into issue with the following domain:

https://app.ens.domains/trish🫧.eth

Normalise -> ToUnicode throws the following error: failed to convert to standard unicode: idna: disallowed rune U+1FAE7

From what I've found so far it seems these emojis are part of the normalization standard proposal, which is still in draft:

https://docs.ens.domains/ensip/15

There seems to be some support already https://www.npmjs.com/package/@adraffy/ens-normalize

Was wondering if there are plans or resources to implement it while it is still in draft?

Thanks!

mcdee commented 6 months ago

This seems to work fine for me:

package main

import (
        "fmt"

        ens "github.com/wealdtech/go-ens/v3"
)

func main() {
        res, err := ens.NameHash("trish🫧.eth")
        if err != nil {
                panic(err)
        }
        fmt.Printf("%#x\n", res)
}