Collection of utilities for working with Haveno.

Hierarchy

  • HavenoUtils

Constructors

Properties

lastLogTimeMs: number = 0
logLevel: number = 0
months: string[] = ...

Methods

  • Divide one bigint by another.

    Returns

    the result

    Parameters

    • a: bigint

      dividend

    • b: bigint

      divisor

    Returns number

  • Format a timestamp as e.g. Jul-07 hh:mm:ss:ms. // TODO: move to GenUtils?

    Returns

    the formatted timestamp

    Parameters

    • timestamp: number

      the timestamp in milliseconds to format

    Returns string

  • Kill the given process.

    TODO (woodser): move this to monero-javascript GenUtils.js as common utility

    Parameters

    • process: any

      the nodejs child process to child

    • Optional signal: string

      the kill signal, e.g. SIGTERM, SIGKILL, SIGINT (default)

    Returns Promise<void>

  • Log a message. // TODO (woodser): switch to log library?

    Parameters

    • level: number

      log level of the message

    • msg: string

      message to log

    Returns void

  • Set the log level with 0 being least verbose.

    Parameters

    • level: number

      the log level

    Returns Promise<void>

  • Wait for the duration.

    Parameters

    • durationMs: number

      the duration to wait for in milliseconds

    Returns Promise<unknown>

Generated using TypeDoc