Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DappHelper

Index

Constructors

  • new DappHelper(configService: ConfigService<Record<string, unknown>, false>, networkService: NetworkService): DappHelper

Methods

  • createDetailsTableHTML(details: Record<string, string | number | object>[]): string
  • Method to return a html formatted string that represents the input object. This string will be used mostly by a Notifier strategy implementation to present the report content.

    Parameters

    • details: Record<string, string | number | object>[]

      The list of queried result.

    Returns string

    The html-formatted string that represents the input queried result.

  • getBlockTimestamp(blockRepository: BlockHttp, height: number): Promise<number>
  • Method to get timestamp from a dHealth block-height number.

    async
    access

    public

    Parameters

    • blockRepository: BlockHttp
    • height: number

    Returns Promise<number>

  • getNetworkTimestampFromUInt64(timestamp: UInt64): number
  • getTimeRange(periodFormat: string): { endDate: Date; startDate: Date }
  • Method to get date range according to the period format string.

    access

    public

    Parameters

    • periodFormat: string

      The period format string e.g. "D", "W", "M".

    Returns { endDate: Date; startDate: Date }

    • endDate: Date
    • startDate: Date

Generated using TypeDoc