Options
All
  • Public
  • Public/Protected
  • All
Menu

Collection of utilities for working with Haveno.

Hierarchy

  • HavenoUtils

Index

Constructors

Properties

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

Methods

  • centinerosToAtomicUnits(centineros: number): bigint
  • Convert centineros to atomic units.

    Parameters

    • centineros: number

      denominates an amount of XMR in centineros

    Returns bigint

    the amount denominated in atomic units

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

    Parameters

    • timestamp: number

      the timestamp in milliseconds to format

    Returns string

    the formatted timestamp

  • getLogLevel(): number
  • kill(process: any, signal?: string): Promise<void>
  • 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(level: number, msg: string): 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

  • setLogLevel(level: number): Promise<void>
  • Set the log level with 0 being least verbose.

    Parameters

    • level: number

      the log level

    Returns Promise<void>

Generated using TypeDoc