Class CLValueOption

Represents an optional value in the Casper type system. An option can either contain a value or be empty (null).

Hierarchy

  • CLValueOption

Constructors

Properties

Methods

Constructors

Properties

inner: null | CLValue

Methods

  • Converts the option to its byte representation. If the option is empty, it returns a Uint8Array with a single 0 byte. If it contains a value, it returns a Uint8Array with 1 followed by the inner value's bytes.

    Returns

    A Uint8Array representing the bytes of the option.

    Returns Uint8Array

  • Checks if the option is empty.

    Returns

    true if the option is empty, false otherwise.

    Returns boolean

  • Converts the instance to a JSON-compatible format.

    Returns

    The JSON representation of the inner value or null if empty.

    If the instance is empty, it returns null. Otherwise, it calls toJSON() on the inner value to produce its JSON representation.

    Returns any

  • Provides a string representation of the option.

    Returns

    An empty string if the option is empty, otherwise the string representation of the inner value.

    Returns string

Generated using TypeDoc