From 8ca13666edf5f5b5df8d8a88ad035ca83dddb8f3 Mon Sep 17 00:00:00 2001 From: arashalaei Date: Tue, 17 Dec 2024 18:47:36 +0330 Subject: [PATCH] bug fixes --- docs/service/ChainActivityStepData.md | 9 ++- docs/service/EIP712SignRequest.md | 6 +- docs/service/PersonalSignRequest.md | 2 +- docs/service/PreparedTx.md | 1 - setup.py | 2 +- .../models/chain_activity_step_data.py | 55 +++---------------- .../models/eip712_sign_request.py | 50 +++-------------- .../models/personal_sign_request.py | 40 +------------- .../openapi_client/models/prepared_tx.py | 35 +----------- 9 files changed, 29 insertions(+), 171 deletions(-) diff --git a/docs/service/ChainActivityStepData.md b/docs/service/ChainActivityStepData.md index 57e5326..e8674d0 100644 --- a/docs/service/ChainActivityStepData.md +++ b/docs/service/ChainActivityStepData.md @@ -3,15 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | | **label** | **dict(str, str)** | | **gas_use_estimate** | **int** | | **gas_fee_estimate** | **dict(str, str)** | | **method_parameters** | [**MethodParameters**](MethodParameters.md) | | -**name** | **str** | The name of the EIP712 signature | -**typed_data** | [**TypedData**](TypedData.md) | | -**hash** | **str** | The hash of the EIP712 signature that needs to be signed | -**message** | **str** | The message that needs to be signed | +**name** | **str** | The name of the EIP712 signature | [optional] +**typed_data** | [**TypedData**](TypedData.md) | | [optional] +**hash** | **str** | The hash of the EIP712 signature that needs to be signed | [optional] +**message** | **str** | The message that needs to be signed | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/service/EIP712SignRequest.md b/docs/service/EIP712SignRequest.md index fe97227..86620e1 100644 --- a/docs/service/EIP712SignRequest.md +++ b/docs/service/EIP712SignRequest.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | The name of the EIP712 signature | -**typed_data** | [**TypedData**](TypedData.md) | | -**hash** | **str** | The hash of the EIP712 signature that needs to be signed | +**name** | **str** | The name of the EIP712 signature | [optional] +**typed_data** | [**TypedData**](TypedData.md) | | [optional] +**hash** | **str** | The hash of the EIP712 signature that needs to be signed | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/service/PersonalSignRequest.md b/docs/service/PersonalSignRequest.md index a2af93b..82cf140 100644 --- a/docs/service/PersonalSignRequest.md +++ b/docs/service/PersonalSignRequest.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **str** | The message that needs to be signed | +**message** | **str** | The message that needs to be signed | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/service/PreparedTx.md b/docs/service/PreparedTx.md index 1584c5f..435e5e9 100644 --- a/docs/service/PreparedTx.md +++ b/docs/service/PreparedTx.md @@ -3,7 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | | **label** | **dict(str, str)** | | **gas_use_estimate** | **int** | | **gas_fee_estimate** | **dict(str, str)** | | diff --git a/setup.py b/setup.py index 0318252..1be84a3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="zarban", - version="0.5.5", + version="0.5.6", author="Zarban", author_email="info@zarban.io", description="Python SDK for Zarban", diff --git a/src/zarban/service/openapi_client/models/chain_activity_step_data.py b/src/zarban/service/openapi_client/models/chain_activity_step_data.py index 71373d1..c41b126 100644 --- a/src/zarban/service/openapi_client/models/chain_activity_step_data.py +++ b/src/zarban/service/openapi_client/models/chain_activity_step_data.py @@ -34,7 +34,6 @@ class ChainActivityStepData(object): and the value is json key in definition. """ openapi_types = { - 'type': 'str', 'label': 'dict(str, str)', 'gas_use_estimate': 'int', 'gas_fee_estimate': 'dict(str, str)', @@ -46,7 +45,6 @@ class ChainActivityStepData(object): } attribute_map = { - 'type': 'type', 'label': 'label', 'gas_use_estimate': 'gasUseEstimate', 'gas_fee_estimate': 'gasFeeEstimate', @@ -60,13 +58,12 @@ class ChainActivityStepData(object): discriminator_value_class_map = { } - def __init__(self, type=None, label=None, gas_use_estimate=None, gas_fee_estimate=None, method_parameters=None, name=None, typed_data=None, hash=None, message=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, label=None, gas_use_estimate=None, gas_fee_estimate=None, method_parameters=None, name=None, typed_data=None, hash=None, message=None, local_vars_configuration=None): # noqa: E501 """ChainActivityStepData - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._type = None self._label = None self._gas_use_estimate = None self._gas_fee_estimate = None @@ -77,44 +74,18 @@ def __init__(self, type=None, label=None, gas_use_estimate=None, gas_fee_estimat self._message = None self.discriminator = 'type' - self.type = type self.label = label self.gas_use_estimate = gas_use_estimate self.gas_fee_estimate = gas_fee_estimate self.method_parameters = method_parameters - self.name = name - self.typed_data = typed_data - self.hash = hash - self.message = message - - @property - def type(self): - """Gets the type of this ChainActivityStepData. # noqa: E501 - - - :return: The type of this ChainActivityStepData. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this ChainActivityStepData. - - - :param type: The type of this ChainActivityStepData. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["PersonalSignRequest"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type + if name is not None: + self.name = name + if typed_data is not None: + self.typed_data = typed_data + if hash is not None: + self.hash = hash + if message is not None: + self.message = message @property def label(self): @@ -228,8 +199,6 @@ def name(self, name): :param name: The name of this ChainActivityStepData. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -251,8 +220,6 @@ def typed_data(self, typed_data): :param typed_data: The typed_data of this ChainActivityStepData. # noqa: E501 :type: TypedData """ - if self.local_vars_configuration.client_side_validation and typed_data is None: # noqa: E501 - raise ValueError("Invalid value for `typed_data`, must not be `None`") # noqa: E501 self._typed_data = typed_data @@ -276,8 +243,6 @@ def hash(self, hash): :param hash: The hash of this ChainActivityStepData. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and hash is None: # noqa: E501 - raise ValueError("Invalid value for `hash`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and hash is not None and not re.search(r'^(0x)?[0-9a-fA-F]{64}$', hash)): # noqa: E501 raise ValueError(r"Invalid value for `hash`, must be a follow pattern or equal to `/^(0x)?[0-9a-fA-F]{64}$/`") # noqa: E501 @@ -304,8 +269,6 @@ def message(self, message): :param message: The message of this ChainActivityStepData. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 self._message = message diff --git a/src/zarban/service/openapi_client/models/eip712_sign_request.py b/src/zarban/service/openapi_client/models/eip712_sign_request.py index 358a74c..da165d4 100644 --- a/src/zarban/service/openapi_client/models/eip712_sign_request.py +++ b/src/zarban/service/openapi_client/models/eip712_sign_request.py @@ -34,64 +34,34 @@ class EIP712SignRequest(object): and the value is json key in definition. """ openapi_types = { - 'type': 'str', 'name': 'str', 'typed_data': 'TypedData', 'hash': 'str' } attribute_map = { - 'type': 'type', 'name': 'name', 'typed_data': 'typedData', 'hash': 'hash' } - def __init__(self, type=None, name=None, typed_data=None, hash=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, name=None, typed_data=None, hash=None, local_vars_configuration=None): # noqa: E501 """EIP712SignRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._type = None self._name = None self._typed_data = None self._hash = None self.discriminator = None - self.type = type - self.name = name - self.typed_data = typed_data - self.hash = hash - - @property - def type(self): - """Gets the type of this EIP712SignRequest. # noqa: E501 - - - :return: The type of this EIP712SignRequest. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this EIP712SignRequest. - - - :param type: The type of this EIP712SignRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["EIP712SignRequest"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type + if name is not None: + self.name = name + if typed_data is not None: + self.typed_data = typed_data + if hash is not None: + self.hash = hash @property def name(self): @@ -113,8 +83,6 @@ def name(self, name): :param name: The name of this EIP712SignRequest. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -136,8 +104,6 @@ def typed_data(self, typed_data): :param typed_data: The typed_data of this EIP712SignRequest. # noqa: E501 :type: TypedData """ - if self.local_vars_configuration.client_side_validation and typed_data is None: # noqa: E501 - raise ValueError("Invalid value for `typed_data`, must not be `None`") # noqa: E501 self._typed_data = typed_data @@ -161,8 +127,6 @@ def hash(self, hash): :param hash: The hash of this EIP712SignRequest. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and hash is None: # noqa: E501 - raise ValueError("Invalid value for `hash`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and hash is not None and not re.search(r'^(0x)?[0-9a-fA-F]{64}$', hash)): # noqa: E501 raise ValueError(r"Invalid value for `hash`, must be a follow pattern or equal to `/^(0x)?[0-9a-fA-F]{64}$/`") # noqa: E501 diff --git a/src/zarban/service/openapi_client/models/personal_sign_request.py b/src/zarban/service/openapi_client/models/personal_sign_request.py index 1a40525..228a63d 100644 --- a/src/zarban/service/openapi_client/models/personal_sign_request.py +++ b/src/zarban/service/openapi_client/models/personal_sign_request.py @@ -34,56 +34,24 @@ class PersonalSignRequest(object): and the value is json key in definition. """ openapi_types = { - 'type': 'str', 'message': 'str' } attribute_map = { - 'type': 'type', 'message': 'message' } - def __init__(self, type=None, message=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, message=None, local_vars_configuration=None): # noqa: E501 """PersonalSignRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._type = None self._message = None self.discriminator = None - self.type = type - self.message = message - - @property - def type(self): - """Gets the type of this PersonalSignRequest. # noqa: E501 - - - :return: The type of this PersonalSignRequest. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this PersonalSignRequest. - - - :param type: The type of this PersonalSignRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["PersonalSignRequest"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type + if message is not None: + self.message = message @property def message(self): @@ -105,8 +73,6 @@ def message(self, message): :param message: The message of this PersonalSignRequest. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 self._message = message diff --git a/src/zarban/service/openapi_client/models/prepared_tx.py b/src/zarban/service/openapi_client/models/prepared_tx.py index fbf4547..57a4a26 100644 --- a/src/zarban/service/openapi_client/models/prepared_tx.py +++ b/src/zarban/service/openapi_client/models/prepared_tx.py @@ -34,7 +34,6 @@ class PreparedTx(object): and the value is json key in definition. """ openapi_types = { - 'type': 'str', 'label': 'dict(str, str)', 'gas_use_estimate': 'int', 'gas_fee_estimate': 'dict(str, str)', @@ -42,61 +41,29 @@ class PreparedTx(object): } attribute_map = { - 'type': 'type', 'label': 'label', 'gas_use_estimate': 'gasUseEstimate', 'gas_fee_estimate': 'gasFeeEstimate', 'method_parameters': 'methodParameters' } - def __init__(self, type=None, label=None, gas_use_estimate=None, gas_fee_estimate=None, method_parameters=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, label=None, gas_use_estimate=None, gas_fee_estimate=None, method_parameters=None, local_vars_configuration=None): # noqa: E501 """PreparedTx - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._type = None self._label = None self._gas_use_estimate = None self._gas_fee_estimate = None self._method_parameters = None self.discriminator = None - self.type = type self.label = label self.gas_use_estimate = gas_use_estimate self.gas_fee_estimate = gas_fee_estimate self.method_parameters = method_parameters - @property - def type(self): - """Gets the type of this PreparedTx. # noqa: E501 - - - :return: The type of this PreparedTx. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this PreparedTx. - - - :param type: The type of this PreparedTx. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["PreparedTx"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - @property def label(self): """Gets the label of this PreparedTx. # noqa: E501