Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "account/utils"

Index

Functions

convert

  • convert(num: string, unit: string, operator: string): string
  • Parameters

    • num: string
    • unit: string
    • operator: string

    Returns string

fromRau

  • fromRau(rau: string, unit: string): string
  • fromRau is a function to convert Rau to Iotx.

    Parameters

    • rau: string

      number of Rau in string

    • unit: string

      unit converts to

    Returns string

    number of unit

fromUtf8

  • fromUtf8(value: string): string
  • Should be called to get hex representation of utf8 string

    Parameters

    • value: string

      input string

    Returns string

    hex representation of input string

hexToBytes

  • hexToBytes(hex: string): Uint8Array
  • Convert a hex string to a byte array

    Parameters

    • hex: string

      string

    Returns Uint8Array

    the byte array

isHexStrict

  • isHexStrict(hex: string): boolean
  • Check if string is HEX, requires a 0x in front

    Parameters

    • hex: string

      to be checked

    Returns boolean

    is hex

toRau

  • toRau(num: string, unit: string): string
  • toRau is a function to convert various units to Rau.

    Parameters

    • num: string

      is the number of unit

    • unit: string

      is the unit to convert to Rau.

    Returns string

    number of Rau

toUtf8

  • toUtf8(hex: string): string
  • Should be called to get utf8 from it's hex representation

    Parameters

    • hex: string

      hex string

    Returns string

    ascii string representation of hex value

validateAddress

  • validateAddress(address: string): boolean
  • validate address for iotex.

    Parameters

    • address: string

      address

    Returns boolean

    validate result

Generated using TypeDoc