Class CLTypeMap

Represents a Map type in the Casper type system. This class implements the CLType interface, allowing the use of key-value pairs with specified types.

Hierarchy

  • CLTypeMap

Implements

Constructors

Properties

Methods

Constructors

Properties

key: CLType

The CLType of the map's keys.

val: CLType

The CLType of the map's values.

Methods

  • Converts the CLTypeMap instance to its byte representation. This includes the type ID for Map followed by the byte representations of the key and value types.

    Returns

    A Uint8Array representing the CLTypeMap.

    Returns Uint8Array

  • Converts the CLTypeMap instance to a JSON-compatible representation. The JSON object includes a "Map" key containing the JSON representations of the key and value types.

    Returns

    A JSON object representing the map type and its key and value types.

    Returns {
        Map: {
            key: CLType;
            value: CLType;
        };
    }

  • Creates a CLTypeMap instance from a JSON representation. Parses JSON input to determine the key and value types of the map.

    Returns

    A new CLTypeMap instance with parsed key and value types.

    Throws

    If the JSON structure is invalid.

    Parameters

    • source: any

      The JSON representation of the CLTypeMap.

    Returns CLTypeMap

Generated using TypeDoc