Package org.web3j.ens

Class NameHash


  • public class NameHash
    extends java.lang.Object
    ENS name hash implementation.
    • Constructor Summary

      Constructors 
      Constructor Description
      NameHash()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String nameHash​(java.lang.String ensName)  
      static byte[] nameHashAsBytes​(java.lang.String ensName)  
      static java.lang.String normalise​(java.lang.String ensName)
      Normalise ENS name as per the specification.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NameHash

        public NameHash()
    • Method Detail

      • nameHashAsBytes

        public static byte[] nameHashAsBytes​(java.lang.String ensName)
        Parameters:
        ensName -
        Returns:
      • nameHash

        public static java.lang.String nameHash​(java.lang.String ensName)
        Parameters:
        ensName -
        Returns:
      • normalise

        public static java.lang.String normalise​(java.lang.String ensName)
        Normalise ENS name as per the specification.
        Parameters:
        ensName - our user input ENS name
        Returns:
        normalised ens name
        Throws:
        EnsResolutionException - if the name cannot be normalised