Options
All
  • Public
  • Public/Protected
  • All
Menu
description

The main service of the Accounts module.

since

v0.3.0

Hierarchy

  • AssetsService

Index

Constructors

Methods

  • This method executes a count query using the {@link model} argument.

    Caution: Count queries require a considerable amount of RAM to execute. It is preferred to use pro-active statistics with collections that contain one document with a counter.

    Parameters

    Returns Promise<number>

    The number of matching transactions.

  • This method creates or updates a document in the transactions collection.

    async

    Parameters

    • query: AssetQuery

      The query configuration with sort, order, pageNumber, pageSize.

    • data: AssetModel

      The fields or data that has to be updated (will be added to $set: {}).

    • ops: Record<string, any> = {}

      The operations that must be run additionally (e.g. $inc: {}) (optional).

    Returns Promise<AssetDocument>

    The updated transactions document.

  • Method to query the existence of a document in the transactions collection.

    This executes a lean mongoose query such that the properties of the returned document are reduced to only the "_id" field.

    Parameters

    • query: AssetQuery

      The query configuration with sort, order, pageNumber, pageSize.

    Returns Promise<boolean>

    Whether a document exists which validates the passed query.

  • updateBatch(documents: AssetModel[]): Promise<number>
  • formatMosaicId(mosaicOrNamespaceId: string): string
  • This helper method serves as a parser for account public keys and addresses.

    This static method can be used for any inputs that require to identify a participant [account]. Accounts can always be referred to by their public key as it can be used to generate the resulting identifier (address).

    access

    public

    static

    Parameters

    • mosaicOrNamespaceId: string

    Returns string

    A mosaic identifier corresponding to a given namespace identifier (if any).

Generated using TypeDoc