Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Registry

Hierarchy

  • Registry

Index

Constructors

constructor

  • new Registry(convex: ConvexAPI): Registry
  • Initaliizes a new Registry object, you need to provide a ConvexAPI Object.

    Best practice is to use the convex.registry property instead of creating a new object

    Parameters

    • convex: ConvexAPI

      API object to access the convex network.

    Returns Registry

Properties

address

address: BigInt

Readonly convex

convex: ConvexAPI

Registry object to call registry commands

Protected items

items: {}

Type declaration

Methods

clearCache

  • clearCache(): void
  • Clear the internal CNS cache. This will restart the requests to resolve registry names.

    Returns void

Protected getAddress

  • getAddress(): Promise<BigInt>
  • Return the address of the CNS system. This calls (address *registry*) to find the internal address used by convex than has the registration list

    Returns Promise<BigInt>

    Address of the registration library/actor

isRegistered

  • isRegistered(name: string): Promise<boolean>
  • Return true if the name has been registered.

    Parameters

    • name: string

      Name of the registry entry

    Returns Promise<boolean>

    boolean True or False if the name has been registered.

item

  • Return registry information about the registered name. At the moment this just returns the address and the owner address of the registered item.

    Parameters

    • name: string

      Name of the registered item

    Returns Promise<IRegistryItem>

    return an IRegistryItem record with the address and owner address of the registered name

register

  • Register or update a name with the CNS ( Convex Named Service ).

    Parameters

    • name: string

      Name to register or update

    • registerAddress: BigInt

      Address to register/update with the name

    • account: Account

      ConvexAccount to use to sign and spend a fee to register/update the name.

    Returns Promise<IRegistryItem>

    an IRegistryItem object with the new address and owner address of the registered item.

resolveAddress

  • resolveAddress(name: string): Promise<BigInt>
  • Resolve a registartion name to an address.

    Parameters

    • name: string

      Name of the registration to resolve.

    Returns Promise<BigInt>

    The address saved for this registered name.

resolveOwner

  • resolveOwner(name: string): Promise<BigInt>
  • Resolve a registerd name to it's owner. Only an owner address can update a current registered name

    results

    The owner address of the registration

    Parameters

    • name: string

      Name of the registration.

    Returns Promise<BigInt>

Generated using TypeDoc