Class CLTypeOption

Represents an Option type in the Casper type system. This class implements the CLType interface, allowing for optional values with specified inner types.

Hierarchy

  • CLTypeOption

Implements

Constructors

Properties

Methods

Constructors

Properties

inner: CLType

The inner CLType that this Option may contain.

Methods

  • Converts the CLTypeOption instance to its byte representation. This includes the type ID for Option followed by the byte representation of the inner type.

    Returns

    A Uint8Array representing the CLTypeOption.

    Returns Uint8Array

  • Converts the CLTypeOption instance to a JSON-compatible representation. The JSON object includes a single key-value pair, where the key is "Option" and the value is the JSON representation of the inner type.

    Returns

    A JSON object representing the option type and its inner type.

    Returns {
        [key: string]: CLType;
    }

  • Creates a CLTypeOption instance from a JSON representation. Parses JSON input to determine the inner type of the option.

    Returns

    A new CLTypeOption instance with the parsed inner type.

    Parameters

    • source: any

      The JSON representation of the CLTypeOption.

    Returns CLTypeOption

Generated using TypeDoc