Interface that represents a Name Resolver

interface NameResolver {
    name(node: string): Promise<string>;
    setName(node: string, name: string): Promise<Transaction>;
    supportsInterface(interfaceId: string): Promise<boolean>;
}

Hierarchy

  • IERC165
    • NameResolver

Implemented by

Methods

  • Returns the name associated with an MNS node, for reverse records. Defined in EIP181.

    Parameters

    • node: string

      The MNS node to query.

    Returns Promise<string>

    The associated name.

  • Sets the name associated with an MNS node, for reverse records. May only be called by the owner of that node in the MNS registry.

    Parameters

    • node: string

      The node to update.

    • name: string

      The name to set.

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created.

    This function call must use less than 30 000 gas. Defined in EIP181.

    Parameters

    • interfaceId: string

      The MNS node to query.

    Returns Promise<boolean>

    if the interface is supported