HplCurrency class represents a in-game currency managed by the Honeycomb protocol.

Hierarchy

  • Module
    • HplCurrency

Constructors

  • Parameters

    • address: PublicKey
    • _currency: Currency
    • _mint: Mint
    • _metadata: Metadata

    Returns HplCurrency

Properties

_honeycomb: Honeycomb
address: PublicKey

Accessors

  • get kind(): CurrencyKind
  • Gets the kind of the currency.

    Returns CurrencyKind

  • get mint(): Mint
  • Gets the underlying mint of the currency.

    Returns Mint

  • get name(): string
  • Gets the name of the currency.

    Returns string

  • get symbol(): string
  • Gets the symbol of the currency.

    Returns string

  • get uri(): string
  • Gets the URI of the currency.

    Returns string

Methods

  • Gets the holder account for the given owner.

    Parameters

    • Optional owner: PublicKey

      The owner of the holder account. If not provided, uses the identity address.

    • Optional reFetch: boolean

      Set to true to force re-fetching of the holder account data.

    Returns Promise<HplHolderAccount>

  • Gets the Honeycomb instance.

    Returns Honeycomb

  • Installs the HplCurrency in the given Honeycomb instance.

    Parameters

    • honeycomb: Honeycomb

      The Honeycomb instance to install the currency.

    Returns Honeycomb

  • Gets the associated HoneycombProject.

    Returns HoneycombProject

  • Updates the currency with the given arguments.

    Parameters

    • args: UpdateCurrencyArgs

      The arguments for updating the currency.

    • Optional confirmOptions: ConfirmOptions

      Optional confirm options for the transaction.

    Returns Promise<ConfirmedContext>

  • Fetches URI data for the currency.

    Parameters

    • Optional reFetch: boolean

      Set to true to force re-fetching of the data.

    Returns Promise<any>

  • Creates an HplCurrency instance from the given address.

    Parameters

    • connection: Connection

      The Solana web3 connection.

    • address: PublicKey

      The address of the currency.

    Returns Promise<HplCurrency>

  • Creates a new HplCurrency instance.

    Parameters

    • honeycomb: Honeycomb

      The Honeycomb instance.

    • args: CreateCurrencyArgs | {
          mint: PublicKey;
      }

      The arguments for creating the currency.

    • Optional confirmOptions: ConfirmOptions

      Optional confirm options for the transaction.

    Returns Promise<HplCurrency>

Generated using TypeDoc