Class which can be used to make record queries.

Constructors

  • Parameters

    • name: string
    • mns: MetrixContract
    • provider: Provider
    • hash: string
    • Optionalresolver: string

    Returns Name

Properties

hash: string
mns: MetrixContract
name: string
provider: Provider
resolver: undefined | string

Methods

  • Create a subdomain of this name

    Parameters

    • label: string

      The hash of the label specifying the subnode.

    Returns Promise<Transaction>

    a Transaction object

  • Parameters

    • label: string

    Returns Promise<Transaction>

  • Get an address by coin

    Parameters

    • OptionalcoinId: string

      slip44 coin id

    Returns Promise<string>

    the address the resolver

  • Get the contenthash

    Returns Promise<string | {
        contentType: string;
        value: string;
    }>

    the value and content or AddressZero if no resolver

  • Get the owning address of the Name

    Returns Promise<string>

    the address of the name

  • Get the resolver address

    Returns Promise<string>

    the address the resolver

  • Get the resolver address

    Returns Promise<string>

    the address the resolver

  • Get the ttl

    Returns Promise<number>

    the address the resolver

  • Get the contenthash

    Parameters

    • key: string

      the etext data key to query

    Returns Promise<string>

    the text value

  • Set the address

    Parameters

    • key: string

      a coin symbol with slip44 support like 'MRX'

    • address: string

      an address

    Returns Promise<Transaction>

    a Transaction object

  • Set the contenthash

    Parameters

    • content: string

      the hash

    Returns Promise<Transaction>

    a Transaction object

  • Set the owning address of the Name

    Parameters

    • address: string

      an EVM compatible address

    Returns Promise<Transaction>

    a Transaction object

  • Set the resolver of the Name

    Parameters

    • address: string

      an EVM compatible address

    Returns Promise<Transaction>

    a Transaction object

  • Sets the owner of a subnode

    Parameters

    • label: string

      The key to set.

    • newOwner: string

      An address for the owner

    Returns Promise<Transaction>

    a Transaction object

  • Sets the record for a subnode.

    Parameters

    • label: string

      The hash of the label specifying the subnode.

    • newOwner: string

      The address of the new owner.

    • resolver: string

      The address of the resolver.

    • ttl: number = 0

      The TTL in seconds.

    Returns Promise<Transaction>

    a Transaction object

  • Sets the TTL

    Parameters

    • ttl: bigint

      The TTL in seconds.

    Returns Promise<Transaction>

    a Transaction object

  • Sets the text data associated with a key.

    Parameters

    • key: string

      The key to set.

    • recordValue: string

      The text data value to set.

    Returns Promise<Transaction>

    a Transaction object