@hashgraph/sdk
    Preparing search index...

    Class Long

    Index

    Constructors

    • Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as signed integers. See the from* functions below for more convenient ways of constructing Longs.

      Parameters

      • low: number
      • Optionalhigh: number
      • Optionalunsigned: boolean

      Returns Long

    Properties

    high: number

    The high 32 bits as a signed value.

    low: number

    The low 32 bits as a signed value.

    unsigned: boolean

    Whether unsigned or not.

    MAX_UNSIGNED_VALUE: Long

    Maximum unsigned value.

    MAX_VALUE: Long

    Maximum signed value.

    MIN_VALUE: Long

    Minimum signed value.

    NEG_ONE: Long

    Signed negative one.

    ONE: Long

    Signed one.

    UONE: Long

    Unsigned one.

    UZERO: Long

    Unsigned zero.

    ZERO: Long

    Signed zero

    Methods

    • Returns the sum of this and the specified Long.

      Parameters

      • addend: LongLike

      Returns Long

    • Returns the bitwise AND of this Long and the specified.

      Parameters

      • other: LongLike

      Returns Long

    • Returns count leading zeros of this Long.

      Returns number

    • Compares this Long's value with the specified's.

      Parameters

      • other: LongLike

      Returns number

    • Compares this Long's value with the specified's.

      Parameters

      • other: LongLike

      Returns number

    • Returns count leading zeros of this Long.

      Returns number

    • Returns count trailing zeros of this Long.

      Returns number

    • Returns count trailing zeros of this Long.

      Returns number

    • Returns this Long divided by the specified.

      Parameters

      • divisor: LongLike

      Returns Long

    • Returns this Long divided by the specified.

      Parameters

      • divisor: LongLike

      Returns Long

    • Tests if this Long's value equals the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Tests if this Long's value equals the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Tests if this Long's value equals zero.

      Returns boolean

    • Tests if this Long's value is greater than or equal the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Gets the high 32 bits as a signed integer.

      Returns number

    • Gets the high 32 bits as an unsigned integer.

      Returns number

    • Gets the low 32 bits as a signed integer.

      Returns number

    • Gets the low 32 bits as an unsigned integer.

      Returns number

    • Gets the number of bits needed to represent the absolute value of this Long.

      Returns number

    • Tests if this Long's value is greater than the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Tests if this Long's value is greater than or equal the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Tests if this Long's value is greater than the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Tests if this Long's value is greater than or equal the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Tests if this Long's value is even.

      Returns boolean

    • Tests if this Long's value is negative.

      Returns boolean

    • Tests if this Long's value is odd.

      Returns boolean

    • Tests if this Long's value is positive or zero.

      Returns boolean

    • Tests if this Long can be safely represented as a JavaScript number.

      Returns boolean

    • Tests if this Long's value equals zero.

      Returns boolean

    • Tests if this Long's value is less than or equal the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Tests if this Long's value is less than the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Tests if this Long's value is less than or equal the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Tests if this Long's value is less than the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Tests if this Long's value is less than or equal the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Returns this Long modulo the specified.

      Parameters

      • other: LongLike

      Returns Long

    • Returns this Long modulo the specified.

      Parameters

      • other: LongLike

      Returns Long

    • Returns the product of this and the specified Long.

      Parameters

      • multiplier: LongLike

      Returns Long

    • Returns the product of this and the specified Long.

      Parameters

      • multiplier: LongLike

      Returns Long

    • Tests if this Long's value differs from the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Negates this Long's value.

      Returns Long

    • Negates this Long's value.

      Returns Long

    • Tests if this Long's value differs from the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Returns the bitwise NOT of this Long.

      Returns Long

    • Tests if this Long's value differs from the specified's.

      Parameters

      • other: LongLike

      Returns boolean

    • Returns the bitwise OR of this Long and the specified.

      Parameters

      • other: LongLike

      Returns Long

    • Returns this Long modulo the specified.

      Parameters

      • other: LongLike

      Returns Long

    • Returns this Long with bits rotated to the left by the given amount.

      Parameters

      • numBits: number | Long

      Returns Long

    • Returns this Long with bits rotated to the right by the given amount.

      Parameters

      • numBits: number | Long

      Returns Long

    • Returns this Long with bits rotated to the left by the given amount.

      Parameters

      • numBits: number | Long

      Returns Long

    • Returns this Long with bits rotated to the right by the given amount.

      Parameters

      • numBits: number | Long

      Returns Long

    • Returns this Long with bits shifted to the left by the given amount.

      Parameters

      • numBits: number | Long

      Returns Long

    • Returns this Long with bits arithmetically shifted to the right by the given amount.

      Parameters

      • numBits: number | Long

      Returns Long

    • Returns this Long with bits logically shifted to the right by the given amount.

      Parameters

      • numBits: number | Long

      Returns Long

    • Returns this Long with bits shifted to the left by the given amount.

      Parameters

      • numBits: number | Long

      Returns Long

    • Returns this Long with bits arithmetically shifted to the right by the given amount.

      Parameters

      • numBits: number | Long

      Returns Long

    • Returns this Long with bits logically shifted to the right by the given amount.

      Parameters

      • numBits: number | Long

      Returns Long

    • Returns this Long with bits logically shifted to the right by the given amount.

      Parameters

      • numBits: number | Long

      Returns Long

    • Returns the difference of this and the specified Long.

      Parameters

      • subtrahend: LongLike

      Returns Long

    • Returns the difference of this and the specified Long.

      Parameters

      • subtrahend: LongLike

      Returns Long

    • Converts the Long to a big integer.

      Returns bigint

    • Converts this Long to its byte representation.

      Parameters

      • Optionalle: boolean

      Returns number[]

    • Converts this Long to its big endian byte representation.

      Returns number[]

    • Converts this Long to its little endian byte representation.

      Returns number[]

    • Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.

      Returns number

    • Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).

      Returns number

    • Converts this Long to signed.

      Returns Long

    • Converts the Long to a string written in the specified radix.

      Parameters

      • Optionalradix: number

      Returns string

    • Converts this Long to unsigned.

      Returns Long

    • Returns the bitwise XOR of this Long and the given one.

      Parameters

      • other: LongLike

      Returns Long

    • Returns a Long representing the given big integer value.

      Parameters

      • value: bigint
      • Optionalunsigned: boolean

      Returns Long

    • Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits.

      Parameters

      • lowBits: number
      • highBits: number
      • Optionalunsigned: boolean

      Returns Long

    • Creates a Long from its byte representation.

      Parameters

      • bytes: number[]
      • Optionalunsigned: boolean
      • Optionalle: boolean

      Returns Long

    • Creates a Long from its big endian byte representation.

      Parameters

      • bytes: number[]
      • Optionalunsigned: boolean

      Returns Long

    • Creates a Long from its little endian byte representation.

      Parameters

      • bytes: number[]
      • Optionalunsigned: boolean

      Returns Long

    • Returns a Long representing the given 32 bit integer value.

      Parameters

      • value: number
      • Optionalunsigned: boolean

      Returns Long

    • Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.

      Parameters

      • value: number
      • Optionalunsigned: boolean

      Returns Long

    • Returns a Long representation of the given string, written using the specified radix.

      Parameters

      • str: string
      • Optionalunsigned: number | boolean
      • Optionalradix: number

      Returns Long

    • Converts the specified value to a Long.

      Parameters

      • val: LongLike
      • Optionalunsigned: boolean

      Returns Long

    • Tests if the specified object is a Long.

      Parameters

      • obj: any

      Returns obj is Long