@wharfkit/session - v4.0.1
    Preparing search index...

    Class RequestFlags

    Binary integer with the underlying value represented by a BN.js instance. Follows C++11 standard for arithmetic operators and conversions.

    This type is optimized for correctness not speed, if you plan to manipulate integers in a tight loop you're advised to use the underlying BN.js value or convert to a JavaScript number first.

    Hierarchy (View Summary)

    Index
    • Create a new instance, don't use this directly. Use the .from factory method instead.

      Parameters

      • value: BN

      Returns RequestFlags

      If the value over- or under-flows the integer type.

    value: BN

    The underlying BN.js instance – don't modify this directly – take a copy first using .clone().

    abiName: string
    background: number
    broadcast: number
    byteWidth: number
    isSigned: boolean
    • get background(): boolean

      Returns boolean

    • set background(enabled: boolean): void

      Parameters

      • enabled: boolean

      Returns void

    • get broadcast(): boolean

      Returns boolean

    • set broadcast(enabled: boolean): void

      Parameters

      • enabled: boolean

      Returns void

    • get byteArray(): Uint8Array

      Number as bytes in little endian (matches memory layout in C++ contract).

      Returns Uint8Array

    • get max(): BN

      Largest value that can be represented by this integer type.

      Returns BN

    • get min(): BN

      Smallest value that can be represented by this integer type.

      Returns BN

    • get zero(): Int

      Return a zero value of this type

      Returns Int

    • Parameters

      • type: string

      Returns string | number

    • Mutating add.

      Parameters

      • num: IntType

      Returns void

    • Non-mutating add.

      Parameters

      • num: IntType

      Returns this

    • Cast this integer to other type.

      Type Parameters

      • T extends typeof Int

      Parameters

      • type: T
      • Optionaloverflow: OverflowBehavior

        How to handle overflow, default is to preserve bit-pattern (C++11 behavior).

      Returns InstanceType<T>

    • Mutating divide.

      Parameters

      • by: IntType
      • Optionalbehavior: DivisionBehavior

        How to handle the remainder, default is to floor (round down).

      Returns void

      When dividing by zero.

    • Non-mutating divide.

      Parameters

      • by: IntType
      • Optionalbehavior: DivisionBehavior

        How to handle the remainder, default is to floor (round down).

      Returns this

      When dividing by zero.

    • Compare two integers, if strict is set to true the test will only consider integers of the exact same type. I.e. Int64.from(1).equals(UInt64.from(1)) will return false.

      Parameters

      • other: Uint8Array<ArrayBufferLike> | IntType
      • Optionalstrict: boolean

      Returns boolean

    • Greater than comparision operator

      Parameters

      Returns boolean

    • Greater than or equal comparision operator

      Parameters

      Returns boolean

    • Less than comparision operator

      Parameters

      Returns boolean

    • Less than or equal comparision operator

      Parameters

      Returns boolean

    • Mutating multiply.

      Parameters

      • by: IntType

      Returns void

    • Non-mutating multiply.

      Parameters

      • by: IntType

      Returns this

    • Mutating subtract.

      Parameters

      • num: IntType

      Returns void

    • Non-mutating subtract.

      Parameters

      • num: IntType

      Returns this

    • Called when encoding to binary abi format.

      Parameters

      Returns void

    • Called when encoding to json abi format.

      Returns string | number

    • Convert to a JavaScript number.

      Returns number

      If the number cannot be represented by 53-bits.

    • Returns a string representation of an object.

      Returns string

    • Returns Int

    • Divide lhs by rhs and return the quotient, dropping the remainder.

      Parameters

      Returns Int

      When dividing by zero.

    • Divide lhs by rhs and return the quotient + remainder rounded up to the closest integer.

      Parameters

      Returns Int

      When dividing by zero.

    • Divide lhs by rhs and return the quotient + remainder rounded to the closest integer.

      Parameters

      Returns Int

      When dividing by zero.

    • Create a new instance from value.

      Type Parameters

      • T extends typeof Int

      Parameters

      • this: T
      • value: Uint8Array<ArrayBufferLike> | IntType

        Value to create new Int instance from, can be a string, number, little-endian byte array or another Int instance.

      • Optionaloverflow: OverflowBehavior

        How to handle integer overflow, default behavior is to throw.

      Returns InstanceType<T>

    • Create a new instance from value.

      Parameters

      • value: any

        Value to create new Int instance from, can be a string, number, little-endian byte array or another Int instance.

      • Optionaloverflow: OverflowBehavior

        How to handle integer overflow, default behavior is to throw.

      Returns unknown

    • Type Parameters

      • T extends typeof Int

      Parameters

      Returns InstanceType<T>

    • Parameters

      Returns unknown

    • Compare lhs to rhs and return true if lhs is greater than rhs.

      Parameters

      Returns boolean

    • Compare lhs to rhs and return true if lhs is greater than or equal to rhs.

      Parameters

      Returns boolean

    • Compare lhs to rhs and return true if lhs is less than rhs.

      Parameters

      Returns boolean

    • Compare lhs to rhs and return true if lhs is less than or equal to rhs.

      Parameters

      Returns boolean

    • Type Parameters

      • T extends typeof Int

      Parameters

      • this: T

      Returns InstanceType<T>

    • Returns unknown