Interface that represent an Address Resolver

interface AddrResolver {
    addr(node: string): Promise<string>;
    addrByType(node: string, coinType: bigint): Promise<string>;
    setAddr(node: string, a: string): Promise<Transaction>;
    setAddrByType(node: string, coinType: bigint, a: string): Promise<Transaction>;
    supportsInterface(interfaceId: string): Promise<boolean>;
}

Hierarchy

  • IERC165
    • AddrResolver

Implemented by

Methods

  • Returns the address associated with an MNS node.

    Parameters

    • node: string

      The MNS node to query.

    Returns Promise<string>

    The associated address.

  • Returns the address associated with an MNS node.

    Parameters

    • node: string

      The MNS node to query.

    • coinType: bigint

      the slip44 id of the coin

    Returns Promise<string>

    The associated address.

  • Sets the address associated with an MNS node. May only be called by the owner of that node in the MNS registry.

    Parameters

    • node: string

      The node to update.

    • a: string

      The address to set.

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Sets the address associated with an MNS node. May only be called by the owner of that node in the MNS registry.

    Parameters

    • node: string

      The node to update.

    • coinType: bigint

      the slip44 id of the coin

    • a: string

      The address 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