Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

calculateTotalOrderPriceQNT

  • calculateTotalOrderPriceQNT(quantityQNT: string, priceQNT: string): string
  • Parameters

    • quantityQNT: string
    • priceQNT: string

    Returns string

commaFormat

  • commaFormat(amount: string): string
  • Parameters

    • amount: string

    Returns string

convertToQNT

  • convertToQNT(quantity: string): string
  • Converts a float to a QNT based on the number of decimals to use. Note! That this method throws a ConvertToQNTError in case the input is invalid. Callers must catch and handle this situation.

    throws

    utils.ConvertToQNTError

    Parameters

    • quantity: string

    Returns string

convertToQNTf

  • convertToQNTf(quantity: string): string
  • Parameters

    • quantity: string

    Returns string

debounce

  • debounce(func: Function, wait?: number, immediate?: boolean): (Anonymous function)
  • Parameters

    • func: Function
    • Optional wait: number
    • Optional immediate: boolean

    Returns (Anonymous function)

emptyToNull

  • emptyToNull(input: string): string | null
  • Parameters

    • input: string

    Returns string | null

epochTime

  • epochTime(): number

extend

  • extend(destination: object, source: object): object
  • Parameters

    • destination: object
      • [key: string]: any
    • source: object
      • [key: string]: any

    Returns object

    • [key: string]: any

formatQNT

  • formatQNT(quantity: string, decimals: number, returnNullZero?: boolean): string | null
  • Parameters

    • quantity: string
    • decimals: number
    • Optional returnNullZero: boolean

    Returns string | null

getByteLen

  • getByteLen(value: string): number
  • Count bytes in a string's UTF-8 representation.

    Parameters

    • value: string

    Returns number

    number

hasToManyDecimals

  • hasToManyDecimals(value: string, decimals: number): boolean
  • Very forgiving test to determine if the number of fractional parts exceeds @decimals param.

    Parameters

    • value: string

      String number value, can contain commas

    • decimals: number

      Number max allowed number of decimals.

    Returns boolean

    boolean

isArray

  • isArray(input: any): boolean
  • Parameters

    • input: any

    Returns boolean

isDefined

  • isDefined(input: any): boolean
  • Parameters

    • input: any

    Returns boolean

isEmpty

  • isEmpty(obj: object): boolean
  • Parameters

    • obj: object
      • [key: string]: any

    Returns boolean

isNumber

  • isNumber(value: string): boolean
  • Parameters

    • value: string

    Returns boolean

isObject

  • isObject(input: any): boolean
  • Parameters

    • input: any

    Returns boolean

isPublicKey

  • isPublicKey(publicKeyHex: string): boolean
  • Parameters

    • publicKeyHex: string

    Returns boolean

isString

  • isString(input: any): boolean
  • Parameters

    • input: any

    Returns boolean

readBytes

  • readBytes(buffer: ByteBuffer, length: number, offset?: number): number[]
  • Parameters

    • buffer: ByteBuffer
    • length: number
    • Optional offset: number

    Returns number[]

repeatWhile

  • repeatWhile(delay: number, cb: function): void
  • Parameters

    • delay: number
    • cb: function
        • (): boolean
        • Returns boolean

    Returns void

roundTo

  • roundTo(value: string, decimals: number): string
  • Parameters

    • value: string
    • decimals: number

    Returns string

setPromiseTimeout

  • setPromiseTimeout<T>(milliseconds: number, promise: Promise<any>): Promise<T>
  • Type parameters

    • T

    Parameters

    • milliseconds: number
    • promise: Promise<any>

    Returns Promise<T>

timestampToDate

  • timestampToDate(timestamp: number): Date
  • Parameters

    • timestamp: number

    Returns Date

trimDecimals

  • trimDecimals(formatted: string, decimals: number): string
  • Parameters

    • formatted: string
    • decimals: number

    Returns string

unformat

  • unformat(commaFormatted: string): string
  • Parameters

    • commaFormatted: string

    Returns string

writeBytes

  • writeBytes(buffer: ByteBuffer, bytes: number[]): void
  • Parameters

    • buffer: ByteBuffer
    • bytes: number[]

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc