Data types#

Module containing representations of Cairo types. Mostly used to generate proper serializers.

class starknet_py.cairo.data_types.CairoType#

Base type for all Cairo type representations. All types extend it.

class starknet_py.cairo.data_types.FeltType#

Type representation of Cairo field element.

class starknet_py.cairo.data_types.TupleType#

Type representation of Cairo tuples without named fields.

types: List[CairoType]#

types of every tuple element.

class starknet_py.cairo.data_types.NamedTupleType#

Type representation of Cairo tuples with named fields.

types: OrderedDict[str, CairoType]#

types of every tuple member.

class starknet_py.cairo.data_types.ArrayType#

Type representation of Cairo arrays.

inner_type: CairoType#

type of element inside array.

class starknet_py.cairo.data_types.StructType#

Type representation of Cairo structures.

types: OrderedDict[str, CairoType]#

types of every structure member.