Skip to main content

useENS

Callable

  • useENS(__namedParameters: { address?: string; ens?: string }): { address?: string; avatar?: string; ens?: string; loading: boolean; resolver?: Resolver; getAddress: any; getEns: any }

  • Useful hook to work with ENS names.


    Parameters

    • __namedParameters: { address?: string; ens?: string }

    Returns { address?: string; avatar?: string; ens?: string; loading: boolean; resolver?: Resolver; getAddress: any; getEns: any }

    • optionaladdress?: string
    • optionalavatar?: string
    • optionalens?: string
    • loading: boolean
    • optionalresolver?: Resolver
    • getAddress: function
      • getAddress(ens: string): Promise<undefined | string>

      • Parameters

        • ens: string

        Returns Promise<undefined | string>

    • getEns: function
      • getEns(address: string): Promise<undefined | string>

      • Parameters

        • address: string

        Returns Promise<undefined | string>