Options
All
  • Public
  • Public/Protected
  • All
Menu

@unstoppabledomains/resolution

Index

Type aliases

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}

NetworkIdMap

NetworkIdMap: object
internal

Used internally to map network number to a string

Type declaration

  • [key: number]: string

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

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 NullAddress

NullAddress: "0x0000000000000000000000000000000000000000" = "0x0000000000000000000000000000000000000000"

Const NullAddressExtended

NullAddressExtended: "0x0000000000000000000000000000000000000000000000000000000000000000" = "0x0000000000000000000000000000000000000000000000000000000000000000"

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

expectResolutionErrorCode

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

    • callback: Promise<any> | Function
    • code: string

    Returns 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

mockAPICalls

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

    • testName: string
    • Default value url: string = MainnetUrl

    Returns void

mockAsyncMethod

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

    • object: any
    • method: string
    • value: any

    Returns SpyInstance<any, unknown[]>

mockAsyncMethods

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

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