Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils"

Index

Type aliases

Amount

Amount: number

Sym

Sym: string

Functions

isAccountNameValid

  • isAccountNameValid(name: string): boolean
  • Checks if account name is valid

    example

    isAccountNameValid("eosnationftw") //=> true isAccountNameValid("eosnation678") //=> false isAccountNameValid("eosnationftw123") //=> false

    Parameters

    • name: string

    Returns boolean

isAccountNameValidErrors

  • isAccountNameValidErrors(name: string): void
  • Checks if Account name is valid by throwing Errors

    Parameters

    • name: string

    Returns void

preciseRound

  • preciseRound(number: number, precision?: number): number
  • Precise Round

    example

    preciseRound(1.00005, 4) //=> 1.0001

    Parameters

    • number: number
    • Default value precision: number = 4

    Returns number

splitQuantity

  • splitQuantity(quantity: string): [Amount, Sym]
  • Split Quantity

    example

    splitQuantity("10.5000 EOS") //=> [10.5, "EOS"] splitQuantity("45.5000 BOS") //=> [45.5, "BOS"]

    Parameters

    • quantity: string

    Returns [Amount, Sym]

Generated using TypeDoc