Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Identity

NOTES:

premint

can be called BEFORE the identity was minted (i.e. purchase phase).

postmint

can be called AFTER the identity was minted.

Hierarchy

Index

Constructors

  • new Identity(address: string, node: string): Identity

Methods

  • getAddress(): string
  • getNode(): string
  • hasIdentity(): Promise<boolean>
  • postmint

    Returns Promise<boolean>

    Whether the identity has a minted identity.

  • hasTicket(): Promise<boolean>
  • premint

    Returns Promise<boolean>

    Whether the identity has a ticket.

  • hasValidTicket(): Promise<boolean>
  • premint

    Returns Promise<boolean>

    Whether the identity has a valid (unexpired) ticket.

  • init(provider: Provider, contractConfig?: ContractConfig): Promise<void>
  • Initializes all the contracts based on the given core address and connects the identity to the underlying contracts.

    Parameters

    Returns Promise<void>

  • initWithContacts(contracts: Contracts): Promise<void>
  • myAddressRecord(coinType?: number): Promise<string>
  • postmint

    Returns the address of the given node, associated with the given coinType.

    Parameters

    • Optional coinType: number

      The coin type used to query the value. Default: 60 (ETH).

    Returns Promise<string>

    The address associated with the given key, returns an empty string if not set.

  • myExpiryDate(): Promise<Date>
  • postmint

    Returns Promise<Date>

    The identity's expiry date.

  • myLivenessDate(): Promise<Date>
  • postmint

    Returns Promise<Date>

    The identity's last liveness check.

  • myTextRecord(key: string): Promise<string>
  • postmint

    Returns the value of the given node, associated with the given key.

    Parameters

    • key: string

      The key used to query the value.

    Returns Promise<string>

    The value associated with the given key, returns an empty string if not set.

  • myTicketProfile(): Promise<Profile>
  • myTicketUserId(): Promise<string>
  • premint

    Returns Promise<string>

    The full user identity.

  • myTokenURI(): Promise<string>
  • postmint

    Returns Promise<string>

    The token URI of the (minted) identity.

  • myUserId(): Promise<string>
  • postmint

    Returns Promise<string>

    The full user identity.

  • postmint

    An extended version of getAddressRecord, also returns whether the address record is verified or not.

    Parameters

    • Optional coinType: number

      The coin type used to query the value. Default: 60 (ETH).

    Returns Promise<ValidatedAddrRecord>

    The record associated with the given key, returns an empty string if not set.

  • postmint

    An extended version of getTextRecord, also returns whether the text record is verified or not.

    Parameters

    • key: string

      The key used to query the value.

    Returns Promise<ValidatedTextRecord>

    The record associated with the given key, returns an empty string if not set.

Generated using TypeDoc