add
This commit is contained in:
Binary file not shown.
Binary file not shown.
45
ccxt/static_dependencies/starknet/models/typed_data.py
Normal file
45
ccxt/static_dependencies/starknet/models/typed_data.py
Normal file
@@ -0,0 +1,45 @@
|
||||
"""
|
||||
TypedDict structures for TypedData
|
||||
"""
|
||||
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, List, Optional, TypedDict
|
||||
|
||||
class Revision(Enum):
|
||||
"""
|
||||
Enum representing the revision of the specification to be used.
|
||||
"""
|
||||
|
||||
V0 = 0
|
||||
V1 = 1
|
||||
|
||||
|
||||
class ParameterDict(TypedDict):
|
||||
"""
|
||||
TypedDict representing a Parameter object
|
||||
"""
|
||||
|
||||
name: str
|
||||
type: str
|
||||
|
||||
|
||||
class StarkNetDomainDict(TypedDict):
|
||||
"""
|
||||
TypedDict representing a domain object (both StarkNetDomain, StarknetDomain).
|
||||
"""
|
||||
|
||||
name: str
|
||||
version: str
|
||||
chainId: str
|
||||
revision: Optional[Revision]
|
||||
|
||||
|
||||
class TypedDataDict(TypedDict):
|
||||
"""
|
||||
TypedDict representing a TypedData object
|
||||
"""
|
||||
|
||||
types: Dict[str, List[ParameterDict]]
|
||||
primaryType: str
|
||||
domain: StarkNetDomainDict
|
||||
message: Dict[str, Any]
|
||||
Reference in New Issue
Block a user