Interface that represent a ContentHash Resolver

interface ContentHashResolver {
    contenthash(node: string): Promise<string>;
    setContenthash(node: string, hash: string): Promise<Transaction>;
    supportsInterface(interfaceId: string): Promise<boolean>;
}

Hierarchy

  • IERC165
    • ContentHashResolver

Implemented by

Methods

  • Sets the contenthash 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.

    • hash: string

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