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

    Class UInt32

    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
    value: BN

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

    abiName: string = 'uint32'
    byteWidth: number = 4
    isSigned: boolean = false
    • 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
      • strict: boolean = false

      Returns boolean

    • 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