Class CLValueBool

Represents a boolean value in the Casper type system. This class encapsulates a boolean value and provides methods for byte conversion and CLValue integration.

Hierarchy

  • CLValueBool

Constructors

Properties

Methods

Constructors

Properties

value: boolean

Methods

  • Converts the boolean value to its byte representation.

    Returns

    A Uint8Array with a single byte: 1 for true, 0 for false.

    Returns Uint8Array

  • Converts the instance to a JSON boolean.

    Returns

    The boolean value of the instance.

    Returns boolean

  • Provides a string representation of the boolean value.

    Returns

    The string 'true' or 'false'.

    Returns string

  • Creates a CLValueBool instance from a Uint8Array. Parses the first byte in the array to determine the boolean value.

    Returns

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

    Throws

    Will throw an error if the source array is empty or contains an invalid boolean byte.

    Parameters

    • source: Uint8Array

      The Uint8Array containing the byte representation of the boolean value.

    Returns IResultWithBytes<CLValueBool>

Generated using TypeDoc