Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NeoContractNameService

Hierarchy

  • NeoContractNameService

Index

Methods

Static getAddress

  • getAddress(network: NetworkItem, neoCNSScriptHash: ScriptHash, domain: string, subDomain: string): Promise<string | undefined>
  • Resolves a domain and subDomain to an on chain entity.

    Parameters

    • network: NetworkItem

      The Neo network target.

    • neoCNSScriptHash: ScriptHash

      The neoCNS script hash. This is relatively static and is published (Here).

    • domain: string

      The root domain to target (i.e "moonlight").

    • subDomain: string

      The subDomain to target (i.e "claims").

    Returns Promise<string | undefined>

Static registerDomain

  • Registers a new root level domain for use in the contract.

    Parameters

    • network: NetworkItem

      The Neo network target.

    • neoCNSScriptHash: ScriptHash

      The neoCNS script hash. This is relatively static and is published (Here).

    • domain: string

      The requested root domain.

    • wif: WIF

      The owner's wif.

    Returns Promise<any>

Static transferDomain

Static upsertSubDomain

  • upsertSubDomain(network: NetworkItem, neoCNSScriptHash: ScriptHash, domain: string, subDomain: string, address: string, wif: WIF): Promise<any>
  • Updates the domain registery

    Parameters

    • network: NetworkItem

      The Neo network target.

    • neoCNSScriptHash: ScriptHash

      The neoCNS script hash. This is relatively static and is published (Here).

    • domain: string

      The root level domain to update.

    • subDomain: string

      The subdomain to modify.

    • address: string

      The new target. This can be a literal address or a script hash.

    • wif: WIF

      The wif of the domain owner.

    Returns Promise<any>

Generated using TypeDoc