TypedData#
- class starknet_py.utils.typed_data.TypedData#
Dataclass representing a TypedData object
- primary_type: str#
- domain: StarkNetDomain#
- message: dict#
- static from_dict(data: TypedData) TypedData #
Create TypedData dataclass from dictionary.
- Parameters:
data – TypedData dictionary.
- Returns:
TypedData dataclass instance.
- type_hash(type_name: str) int #
Calculate the hash of a type name.
- Parameters:
type_name – Name of the type.
- Returns:
Hash of the type name.
- struct_hash(type_name: str, data: dict) int #
Calculate the hash of a struct.
- Parameters:
type_name – Name of the type.
data – Data defining the struct.
- Returns:
Hash of the struct.
- message_hash(account_address: int) int #
Calculate the hash of the message.
- Parameters:
account_address – Address of an account.
- Returns:
Hash of the message.