Collection of utilities for working with Haveno.

### Hierarchy

- HavenoUtils

## Index

### Constructors

- constructor

### Properties

- centinerosToAUMultiplier
- lastLogTimeMs
- logLevel
- months

### Methods

- centinerosToAtomicUnits
- formatTimestamp
- getFormValue
- getLogLevel
- kill
- log
- setFormValue
- setLogLevel

## Constructors

### constructor

- new HavenoUtils(): HavenoUtils

- #### Returns HavenoUtils

## Properties

### Static centinerosToAUMultiplier

centinerosToAUMultiplier: number = 10000

- Defined in src/utils/HavenoUtils.ts:11

### Static lastLogTimeMs

lastLogTimeMs: number = 0

- Defined in src/utils/HavenoUtils.ts:13

### Static logLevel

logLevel: number = 0

- Defined in src/utils/HavenoUtils.ts:10

### Static months

months: string[] = ...

- Defined in src/utils/HavenoUtils.ts:12

## Methods

### Static centinerosToAtomicUnits

- centinerosToAtomicUnits(centineros: number): bigint

- - Defined in src/utils/HavenoUtils.ts:83

  Convert centineros to atomic units.

  #### Parameters

  - ##### centineros: number

    denominates an amount of XMR in centineros

  #### Returns bigint

  the amount denominated in atomic units

### Static formatTimestamp

- formatTimestamp(timestamp: number): string

- - Defined in src/utils/HavenoUtils.ts:56

  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

### Static getFormValue

- getFormValue(fieldId: FieldId, form: PaymentAccountForm ): string

- - Defined in src/utils/HavenoUtils.ts:95

  Get a form field value.

  #### Parameters

  - ##### fieldId: FieldId

    id of the field to get the value from

  - ##### form: PaymentAccountForm

    form to get the field value from

  #### Returns string

  the form field value

### Static getLogLevel

- getLogLevel(): number

- - Defined in src/utils/HavenoUtils.ts:30

  Get the log level.

  #### Returns number

  the current log level

### Static kill

- kill(process: any, signal?: string): Promise<void>

- - Defined in src/utils/HavenoUtils.ts:69

  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>

### Static log

- log(level: number, msg: string): void

- - Defined in src/utils/HavenoUtils.ts:40

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

  #### Parameters

  - ##### level: number

    log level of the message

  - ##### msg: string

    message to log

  #### Returns void

### Static setFormValue

- setFormValue(fieldId: FieldId, value: string, form: PaymentAccountForm ): void

- - Defined in src/utils/HavenoUtils.ts:110

  Set a form field value.

  #### Parameters

  - ##### fieldId: FieldId

    id of the field to set the value of

  - ##### value: string

    field value to set

  - ##### form: PaymentAccountForm

    form to get the field from

  #### Returns void

  the form field value

### Static setLogLevel

- setLogLevel(level: number): Promise<void>

- - Defined in src/utils/HavenoUtils.ts:20

  Set the log level with 0 being least verbose.

  #### Parameters

  - ##### level: number

    the log level

  #### Returns Promise<void>

Generated using TypeDoc