Class CLValueInt32

Represents a 32-bit signed integer value in the Casper type system. This class provides methods for handling 32-bit integers, including byte conversion and CLValue integration.

Hierarchy

  • CLValueNumeric
    • CLValueInt32

Constructors

Properties

Methods

Constructors

Properties

value: BigNumber

Methods

  • Converts the Int32 value to its byte representation in little-endian format.

    Returns

    A Uint8Array representing the bytes of the Int32 value.

    Returns Uint8Array

  • Retrieves the numeric value.

    Returns

    The numeric representation of the value.

    Returns BigNumber

  • Converts the instance to a JSON-compatible string.

    Returns

    The string representation of the instance.

    Returns string

  • Converts the numeric value to a JavaScript number.

    Returns

    The numeric value as a JavaScript number.

    Returns number

  • Provides a string representation of the numeric value.

    Returns

    The string representation of the value.

    Returns string

  • Creates a CLValueInt32 instance from a Uint8Array. Interprets the first 4 bytes of the array as a 32-bit integer in little-endian format.

    Returns

    An object containing the new CLValueInt32 instance and any remaining bytes.

    Throws

    Will throw an error if the source array is smaller than Int32ByteSize.

    Parameters

    • source: Uint8Array

      The Uint8Array containing the byte representation of the Int32 value.

    Returns IResultWithBytes<CLValueInt32>

Generated using TypeDoc