Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • UintSignable
    • Uint128

Index

Constructors

constructor

  • new Uint128(v: string | BN): Uint128

Properties

Optional ADTname

ADTname?: string

Optional contractAddress

contractAddress?: ByStr20

Private tokenInfo

tokenInfo: TokenInfo

type

type: string = "Uint128"

value

value: BN

Methods

asBN

  • asBN(): BN

asBig

  • asBig(): any

getReadable

  • getReadable(): any
  • throws error if tokenInfo is not set returns a readable frontend formatted string

    Returns any

getTokenInfo

  • getTokenInfo(): TokenInfo

getType

  • getType(): string

setADTname

  • setADTname(ADTname: string): Uint128

setContractAddress

setTokenInfo

  • setTokenInfo(info: TokenInfo): void

toHash

  • toHash(): string

toSend

  • toSend(): string

Static fromFraction

  • fromFraction(fraction: string, decimals: number): Uint128
  • Parameters

    • fraction: string

      the string representing a fraction delimited with a "." example: 0.04

    • decimals: number

      the number of decimals the target number represented has example: 0.04 decimals 12 would result in: 40 000 000 000

    Returns Uint128

Static fromFractionUint128

Static fromStringUint128

Static fromStringtoFraction

  • fromStringtoFraction(str: string, decimals: number, precision?: number): any
  • Parameters

    • str: string

      the string or Uint128 from the blockchain

    • decimals: number

      the decimals in the string that represents some token§

    • precision: number = 3

      the precision of the fraction that the output string represents

    Returns any

Static getRandom

Static zil

Generated using TypeDoc