Hierarchy

  • DWEBName

Constructors

Properties

features: Record<Feature, boolean>

Contains flags for features supported by the name on the network where it is located.

name: string
namehash: string
network: Network
provider: BaseProvider
registryContract: Contract
resolverAddress?: string
signer?: Signer

Methods

  • Get Ethereum or other blockchain address associated with name

    Parameters

    • Optional coinId: string

    Returns Promise<null | string>

  • Get multiple coin addresses associated with name

    Parameters

    • coinIds: string[]

      array of coinIds ['ETH', 'BTC']

    Returns Promise<{
        address: string;
        id: string;
        success: boolean;
        type: number;
    }[]>

  • Get DNS records of given type. Records are in binary format.

    Parameters

    • type: number

    Returns Promise<null | Buffer>

  • Get expiration date of the domain. Returns null if the domain has no expiration date.

    Returns Promise<null | Date>

  • Get resolver contract instance

    Parameters

    • writable: boolean = false

      writable instance will allow calling methods that change data

    Returns Promise<null | Contract>

  • Return resolver contract address

    Parameters

    • forceRefresh: boolean = false

      if true will query blockchain for address even if we have it

    Returns Promise<null | string>

  • Get time to live for the records in seconds. Note that DNS records have TTL specified in the records themselves.

    Returns Promise<number>

  • Parameters

    • coinId: string
    • address: string

    Returns Promise<TransactionResponse>

  • Set multiple coin addresses associated with name in a single transaction.

    Parameters

    • data: Record<string, string>

      map of coinId to address {'ETH': '0x1234', 'BTC': 'bc1q...'}

    Returns Promise<TransactionResponse>

  • Samples:

    1. IPFS ipfs://QmRAQB6YaCyidP37UdDnjFY5vQuiBrcqdyoW1CuDgwxkD4
    2. Swarm bzz://d1de9994b4d039f6548d191eb26786769f580809256b4685ef316805265ea162

    Parameters

    • contentUrl: null | string

    Returns Promise<TransactionResponse>

  • Write DNS data in binary wire format

    Parameters

    • data: Buffer

      DNS records encoded in binary format

    Returns Promise<TransactionResponse>

  • Parameters

    • key: string
    • value: string

    Returns Promise<TransactionResponse>

Generated using TypeDoc