Options
All
  • Public
  • Public/Protected
  • All
Menu

@unstoppabledomains/resolution

Index

Type aliases

API

API: object

Type declaration

Bip44Constants

Bip44Constants: [number, string, string]

Blockchain

Blockchain: boolean | object

Main configurational object for Resolution instance

Dictionary

Dictionary<T>: object

Type parameters

  • T

Type declaration

  • [k: string]: T

EnsNetworkIdMap

EnsNetworkIdMap: object

EnsNetworkIdMap type represending the map between network number and network name

typedef

Type declaration

  • [key: number]: string

NamingServiceSource

NamingServiceSource: string | boolean | SourceDefinition

NamingServiceSource just an alias

typedef

{string | boolean | SourceDefinition}

ResolutionMethod

ResolutionMethod: NamingServiceName | "UDAPI"

ResolutionResponse

ResolutionResponse: object

ResolutionResulution

typedef

ResolutionResponse

property

{Object} addresses - Resolution addresses for various currency addresses attached to the domain

property

{Object} meta - meta information about the owner of the domain

Type declaration

ZnsResolution

ZnsResolution: object

Default structure of ZnsResolution records

typedef

{object} ZnsResolution

Type declaration

  • [key: string]: any

nodeHash

nodeHash: string

owner

owner: string

ttl

ttl: string

Variables

Const DefaultUrl

DefaultUrl: "https://unstoppabledomains.com/api/v1" = "https://unstoppabledomains.com/api/v1"

Const EthCoinIndex

EthCoinIndex: 60 = 60

Const MainnetUrl

MainnetUrl: "https://mainnet.infura.io" = "https://mainnet.infura.io"

Const UDApiDefaultUrl

UDApiDefaultUrl: "https://unstoppabledomains.com/api/v1" = "https://unstoppabledomains.com/api/v1"

Const UNCLAIMED_DOMAIN_RESPONSE

UNCLAIMED_DOMAIN_RESPONSE: object = UnclaimedDomainResponse
deprecated

Use UnclaimedDomainResponse instead (deprecated since 0.3.4)

Type declaration

Const ZilliqaUrl

ZilliqaUrl: "https://api.zilliqa.com" = "https://api.zilliqa.com"

Functions

Const childhash

  • childhash(parent: nodeHash, label: string, options?: object): nodeHash
  • childhash(parent: string, child: string, options?: object): string

default

  • default(domain: string, __namedParameters?: object): nodeHash

expectResolutionErrorCode

  • expectResolutionErrorCode(callback: Promise<any> | Function, code: string): Promise<void>

expectSpyToBeCalled

  • expectSpyToBeCalled(spies: any[]): void

fromBech32Address

  • fromBech32Address(address: string, testnet?: boolean): string
  • fromBech32Address

    Parameters

    • address: string

      a valid Zilliqa bech32 address

    • Default value testnet: boolean = false

    Returns string

    a canonical 20-byte Ethereum-style address

invert

  • invert(object: any): object
  • Should invert the object (keys becomes values and values becomes keys)

    Parameters

    • object: any

    Returns object

isNullAddress

  • isNullAddress(key: string): boolean

mockAPICalls

  • mockAPICalls(testName: string, url?: string): void

mockAsyncMethod

  • mockAsyncMethod(object: any, method: string, value: any): SpyInstance<any, unknown[]>

mockAsyncMethods

  • mockAsyncMethods(object: any, methods: Dictionary<any>): SpyInstance<any, unknown[]>[]

Const namehash

  • namehash(name?: string, __namedParameters?: object): any
  • Parameters

    • Default value name: string = ""
    • Default value __namedParameters: object = {}

    Returns any

normalize

  • normalize(name: string): string

set

  • set(object: any, key: any, value: any): any
  • Parses object in format { "key.key2.key3" : value } into { key: { key2: {key3: value } } }

    Parameters

    • object: any

      object to parse

    • key: any

      string to split

    • value: any

      value to make it equal to

    Returns any

toBech32Address

  • toBech32Address(address: string, testnet?: boolean): string
  • toBech32Address

    Encodes a canonical 20-byte Ethereum-style address as a bech32 zilliqa address.

    The expected format is zil1

    where address and checksum are the result of bech32 encoding a Buffer containing the address bytes.

    Parameters

    • address: string
    • Default value testnet: boolean = false

    Returns string

    38 char bech32 encoded zilliqa address

Const toChecksumAddress

  • toChecksumAddress(address: string): string
  • toChecksumAddress

    takes hex-encoded string and returns the corresponding address

    Parameters

    • address: string

    Returns string

Object literals

Const DefaultAPI

DefaultAPI: object

url

url: string = UDApiDefaultUrl

Const UnclaimedDomainResponse

UnclaimedDomainResponse: object

addresses

addresses: object

Type declaration

meta

meta: object

owner

owner: null = null

ttl

ttl: number = 0

type

type: string = ""

Generated using TypeDoc