HplHolderAccount class represents the holder account of HplCurrency.

Hierarchy

  • HplHolderAccount

Constructors

Properties

address: PublicKey

Accessors

  • get amount(): BN
  • Gets the total amount (including perceived amount) of the holder account.

    Returns BN

  • get delegate(): PublicKey
  • Gets the delegate of the holder account.

    Returns PublicKey

  • get delegatedAmount(): bigint
  • Gets the delegated amount of the holder account.

    Returns bigint

  • get isActive(): boolean
  • Checks if the holder account is active.

    Returns boolean

  • get owner(): PublicKey
  • Gets the owner of the holder account.

    Returns PublicKey

  • get status(): HolderStatus
  • Gets the status of the holder account.

    Returns HolderStatus

  • get tokenAccount(): PublicKey
  • Gets the associated token account of the holder account.

    Returns PublicKey

Methods

  • Approves a delegate for the holder account.

    Parameters

    • amount: number

      The amount to approve for delegation.

    • delegate: PublicKey

      The delegate to approve.

    • Optional confirmOptions: ConfirmOptions

      Optional confirm options for the transaction.

    Returns Promise<ConfirmedContext>

  • Burns tokens from the holder account.

    Parameters

    • amount: number

      The amount to burn.

    • Optional confirmOptions: ConfirmOptions

      Optional confirm options for the transaction.

    Returns Promise<ConfirmedContext>

  • Gets the associated HplCurrency instance.

    Returns HplCurrency

  • Funds tokens to the holder account.

    Parameters

    • amount: number

      The amount to fund.

    • Optional confirmOptions: ConfirmOptions

      Optional confirm options for the transaction.

    Returns Promise<ConfirmedContext>

  • Mints new tokens for the holder account.

    Parameters

    • amount: number

      The amount to mint.

    • Optional confirmOptions: ConfirmOptions

      Optional confirm options for the transaction.

    Returns Promise<ConfirmedContext>

  • Revokes the delegate approval for the holder account.

    Parameters

    • Optional confirmOptions: ConfirmOptions

      Optional confirm options for the transaction.

    Returns Promise<ConfirmedContext>

  • Sets the status of the holder account.

    Parameters

    • status: HolderStatus

      The new status to set.

    • Optional confirmOptions: ConfirmOptions

      Optional confirm options for the transaction.

    Returns Promise<ConfirmedContext>

  • Transfers tokens to another holder account.

    Parameters

    • amount: number

      The amount to transfer.

    • to: PublicKey | HplHolderAccount

      The destination holder account or its public key.

    • Optional confirmOptions: ConfirmOptions

      Optional confirm options for the transaction.

    Returns Promise<ConfirmedContext>

Generated using TypeDoc