Class CLTypeTuple2

Represents a Tuple2 type in the Casper type system. This class implements the CLType interface for tuples containing two elements.

Hierarchy

  • CLTypeTuple2

Implements

Constructors

Properties

inner1: CLType

The CLType of the first element in the Tuple2.

inner2: CLType

The CLType of the second element in the Tuple2.

Methods

  • Converts the CLTypeTuple2 instance to its byte representation. This includes the type ID for Tuple2 followed by the byte representations of both inner types.

    Returns

    A Uint8Array representing the CLTypeTuple2.

    Returns Uint8Array

  • Converts the CLTypeTuple2 instance to a JSON-compatible representation. The JSON object contains a "Tuple2" key with an array including the two inner types.

    Returns

    A JSON object representing the Tuple2 type and its inner types.

    Returns {
        [key: string]: CLType[];
    }

  • Creates a CLTypeTuple2 instance from a JSON representation. Parses JSON input to determine the two inner types for the Tuple2.

    Returns

    A new CLTypeTuple2 instance with the parsed inner types.

    Throws

    Error if the JSON structure is invalid or the inner types are not correctly specified.

    Parameters

    • source: any

      The JSON representation of the CLTypeTuple2.

    Returns CLTypeTuple2

Generated using TypeDoc