diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6532b4..ad2e5bf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ jobs: image: ghcr.io/kin-labs/kinetic-solana-network:latest ports: [ '8899:8899', '8900:8900' ] kinetic: - image: ghcr.io/kin-labs/kinetic:1.0.0-rc.13 + image: ghcr.io/kin-labs/kinetic:1.0.0-rc.16 ports: - 3000:3000 options: --health-cmd "wget localhost:3000/api/uptime -q -O - > /dev/null 2>&1" --health-interval 10s --health-timeout 5s --health-retries 5 diff --git a/README.md b/README.md index a23ef15..a1cf81c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ In order to use this SDK, please head over to the [Kinetic Pyrhon SDK](https://d ## Version -This SDK is built to work with `@kinetic/api@v1.0.0-rc.13`. Using it with other versions may lead to issues. +This SDK is built to work with `@kinetic/api@v1.0.0-rc.16`. Using it with other versions may lead to issues. ## Contributing diff --git a/pyproject.toml b/pyproject.toml index 308b35a..e0e1dce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "kinetic-sdk" -version = "1.0.0-rc.13-1" +version = "1.0.0-rc.16" description = "" authors = ["Kin Foundation "] license = "MIT" diff --git a/src/kinetic_sdk/generated/client/__init__.py b/src/kinetic_sdk/generated/client/__init__.py index 5a42ec6..984d648 100644 --- a/src/kinetic_sdk/generated/client/__init__.py +++ b/src/kinetic_sdk/generated/client/__init__.py @@ -5,7 +5,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/api/account_api.py b/src/kinetic_sdk/generated/client/api/account_api.py index 7f2c0ae..a7df1a4 100644 --- a/src/kinetic_sdk/generated/client/api/account_api.py +++ b/src/kinetic_sdk/generated/client/api/account_api.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/api/airdrop_api.py b/src/kinetic_sdk/generated/client/api/airdrop_api.py index dea32a4..0548764 100644 --- a/src/kinetic_sdk/generated/client/api/airdrop_api.py +++ b/src/kinetic_sdk/generated/client/api/airdrop_api.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/api/app_api.py b/src/kinetic_sdk/generated/client/api/app_api.py index 92431b3..e032feb 100644 --- a/src/kinetic_sdk/generated/client/api/app_api.py +++ b/src/kinetic_sdk/generated/client/api/app_api.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/api/transaction_api.py b/src/kinetic_sdk/generated/client/api/transaction_api.py index fc63b39..04445c4 100644 --- a/src/kinetic_sdk/generated/client/api/transaction_api.py +++ b/src/kinetic_sdk/generated/client/api/transaction_api.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ @@ -43,6 +43,61 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client + self.get_kinetic_transaction_endpoint = _Endpoint( + settings={ + "response_type": ([Transaction],), + "auth": [], + "endpoint_path": "/api/transaction/kinetic-transaction/{environment}/{index}", + "operation_id": "get_kinetic_transaction", + "http_method": "GET", + "servers": None, + }, + params_map={ + "all": [ + "environment", + "index", + "reference", + "signature", + ], + "required": [ + "environment", + "index", + "reference", + "signature", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "environment": (str,), + "index": (int,), + "reference": (str,), + "signature": (str,), + }, + "attribute_map": { + "environment": "environment", + "index": "index", + "reference": "reference", + "signature": "signature", + }, + "location_map": { + "environment": "path", + "index": "path", + "reference": "query", + "signature": "query", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": [], + }, + api_client=api_client, + ) self.get_latest_blockhash_endpoint = _Endpoint( settings={ "response_type": (LatestBlockhashResponse,), @@ -229,6 +284,74 @@ def __init__(self, api_client=None): api_client=api_client, ) + def get_kinetic_transaction(self, environment, index, reference, signature, **kwargs): + """# noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_kinetic_transaction(environment, index, reference, signature, async_req=True) + >>> result = thread.get() + + Args: + environment (str): + index (int): + reference (str): + signature (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [Transaction] + If the method is called asynchronously, returns the request + thread. + """ + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["_request_auths"] = kwargs.get("_request_auths", None) + kwargs["environment"] = environment + kwargs["index"] = index + kwargs["reference"] = reference + kwargs["signature"] = signature + return self.get_kinetic_transaction_endpoint.call_with_http_info(**kwargs) + def get_latest_blockhash(self, environment, index, **kwargs): """# noqa: E501 diff --git a/src/kinetic_sdk/generated/client/api_client.py b/src/kinetic_sdk/generated/client/api_client.py index a7dd783..39e5cab 100644 --- a/src/kinetic_sdk/generated/client/api_client.py +++ b/src/kinetic_sdk/generated/client/api_client.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/configuration.py b/src/kinetic_sdk/generated/client/configuration.py index b7fb879..0be280f 100644 --- a/src/kinetic_sdk/generated/client/configuration.py +++ b/src/kinetic_sdk/generated/client/configuration.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ @@ -390,7 +390,7 @@ def to_debug_report(self): "Python SDK Debug Report:\n" "OS: {env}\n" "Python Version: {pyversion}\n" - "Version of the API: 1.0.0-rc.13\n" + "Version of the API: 1.0.0-rc.16\n" "SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version) ) diff --git a/src/kinetic_sdk/generated/client/exceptions.py b/src/kinetic_sdk/generated/client/exceptions.py index 2f05a09..ec1945f 100644 --- a/src/kinetic_sdk/generated/client/exceptions.py +++ b/src/kinetic_sdk/generated/client/exceptions.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/account_info.py b/src/kinetic_sdk/generated/client/model/account_info.py index fd9efb7..b9c130f 100644 --- a/src/kinetic_sdk/generated/client/model/account_info.py +++ b/src/kinetic_sdk/generated/client/model/account_info.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/app_config.py b/src/kinetic_sdk/generated/client/model/app_config.py index 0359e3a..7300489 100644 --- a/src/kinetic_sdk/generated/client/model/app_config.py +++ b/src/kinetic_sdk/generated/client/model/app_config.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/app_config_api.py b/src/kinetic_sdk/generated/client/model/app_config_api.py index bdbfec4..910a08b 100644 --- a/src/kinetic_sdk/generated/client/model/app_config_api.py +++ b/src/kinetic_sdk/generated/client/model/app_config_api.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/app_config_app.py b/src/kinetic_sdk/generated/client/model/app_config_app.py index f74210a..71ff655 100644 --- a/src/kinetic_sdk/generated/client/model/app_config_app.py +++ b/src/kinetic_sdk/generated/client/model/app_config_app.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/app_config_cluster.py b/src/kinetic_sdk/generated/client/model/app_config_cluster.py index 40f63f8..ea3d6e2 100644 --- a/src/kinetic_sdk/generated/client/model/app_config_cluster.py +++ b/src/kinetic_sdk/generated/client/model/app_config_cluster.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/app_config_environment.py b/src/kinetic_sdk/generated/client/model/app_config_environment.py index 6292310..5db9236 100644 --- a/src/kinetic_sdk/generated/client/model/app_config_environment.py +++ b/src/kinetic_sdk/generated/client/model/app_config_environment.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/app_config_mint.py b/src/kinetic_sdk/generated/client/model/app_config_mint.py index f3a70b3..71ae7a9 100644 --- a/src/kinetic_sdk/generated/client/model/app_config_mint.py +++ b/src/kinetic_sdk/generated/client/model/app_config_mint.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/app_health.py b/src/kinetic_sdk/generated/client/model/app_health.py index f5f41a3..c947a6c 100644 --- a/src/kinetic_sdk/generated/client/model/app_health.py +++ b/src/kinetic_sdk/generated/client/model/app_health.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/balance_response.py b/src/kinetic_sdk/generated/client/model/balance_response.py index bb64479..7f17b99 100644 --- a/src/kinetic_sdk/generated/client/model/balance_response.py +++ b/src/kinetic_sdk/generated/client/model/balance_response.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/balance_token.py b/src/kinetic_sdk/generated/client/model/balance_token.py index 7e62336..8cac6d5 100644 --- a/src/kinetic_sdk/generated/client/model/balance_token.py +++ b/src/kinetic_sdk/generated/client/model/balance_token.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/close_account_request.py b/src/kinetic_sdk/generated/client/model/close_account_request.py index 693afb2..c2da862 100644 --- a/src/kinetic_sdk/generated/client/model/close_account_request.py +++ b/src/kinetic_sdk/generated/client/model/close_account_request.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ @@ -101,11 +101,7 @@ def openapi_types(): "environment": (str,), # noqa: E501 "index": (int,), # noqa: E501 "mint": (str,), # noqa: E501 - "reference_id": ( - str, - none_type, - ), # noqa: E501 - "reference_type": ( + "reference": ( str, none_type, ), # noqa: E501 @@ -121,8 +117,7 @@ def discriminator(): "environment": "environment", # noqa: E501 "index": "index", # noqa: E501 "mint": "mint", # noqa: E501 - "reference_id": "referenceId", # noqa: E501 - "reference_type": "referenceType", # noqa: E501 + "reference": "reference", # noqa: E501 } read_only_vars = {} @@ -172,8 +167,7 @@ def _from_openapi_data(cls, commitment, account, environment, index, mint, *args Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - reference_id (str, none_type): [optional] # noqa: E501 - reference_type (str, none_type): [optional] # noqa: E501 + reference (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -276,8 +270,7 @@ def __init__(self, commitment, account, environment, index, mint, *args, **kwarg Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - reference_id (str, none_type): [optional] # noqa: E501 - reference_type (str, none_type): [optional] # noqa: E501 + reference (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/src/kinetic_sdk/generated/client/model/cluster_type.py b/src/kinetic_sdk/generated/client/model/cluster_type.py index 3cb4382..b7841f2 100644 --- a/src/kinetic_sdk/generated/client/model/cluster_type.py +++ b/src/kinetic_sdk/generated/client/model/cluster_type.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/commitment.py b/src/kinetic_sdk/generated/client/model/commitment.py index 2aa4401..647c619 100644 --- a/src/kinetic_sdk/generated/client/model/commitment.py +++ b/src/kinetic_sdk/generated/client/model/commitment.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/compiled_inner_instruction.py b/src/kinetic_sdk/generated/client/model/compiled_inner_instruction.py index fa55626..39da7ff 100644 --- a/src/kinetic_sdk/generated/client/model/compiled_inner_instruction.py +++ b/src/kinetic_sdk/generated/client/model/compiled_inner_instruction.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/compiled_instruction.py b/src/kinetic_sdk/generated/client/model/compiled_instruction.py index 23a0e9b..f632c79 100644 --- a/src/kinetic_sdk/generated/client/model/compiled_instruction.py +++ b/src/kinetic_sdk/generated/client/model/compiled_instruction.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/confirmation_status.py b/src/kinetic_sdk/generated/client/model/confirmation_status.py index 55584a9..7356cd0 100644 --- a/src/kinetic_sdk/generated/client/model/confirmation_status.py +++ b/src/kinetic_sdk/generated/client/model/confirmation_status.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/confirmed_signature_info.py b/src/kinetic_sdk/generated/client/model/confirmed_signature_info.py index 1843b8b..c46f480 100644 --- a/src/kinetic_sdk/generated/client/model/confirmed_signature_info.py +++ b/src/kinetic_sdk/generated/client/model/confirmed_signature_info.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/confirmed_transaction_meta.py b/src/kinetic_sdk/generated/client/model/confirmed_transaction_meta.py index 80ccf97..016697e 100644 --- a/src/kinetic_sdk/generated/client/model/confirmed_transaction_meta.py +++ b/src/kinetic_sdk/generated/client/model/confirmed_transaction_meta.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/context.py b/src/kinetic_sdk/generated/client/model/context.py deleted file mode 100644 index 1982255..0000000 --- a/src/kinetic_sdk/generated/client/model/context.py +++ /dev/null @@ -1,281 +0,0 @@ -""" - @kin-kinetic/api - - The OpenAPI definition of the Kinetic API # noqa: E501 - - The version of the OpenAPI document: 1.0.0-rc.13 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from kinetic_sdk.generated.client.exceptions import ApiAttributeError -from kinetic_sdk.generated.client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - OpenApiModel, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, -) - - -class Context(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = {} - - validations = {} - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - "slot": ( - int, - none_type, - ), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - attribute_map = { - "slot": "slot", # noqa: E501 - } - - read_only_vars = {} - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Context - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - slot (int, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", True) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set( - [ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", - ] - ) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Context - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - slot (int, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes." - ) diff --git a/src/kinetic_sdk/generated/client/model/create_account_request.py b/src/kinetic_sdk/generated/client/model/create_account_request.py index ab69c2e..c654315 100644 --- a/src/kinetic_sdk/generated/client/model/create_account_request.py +++ b/src/kinetic_sdk/generated/client/model/create_account_request.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ @@ -102,11 +102,7 @@ def openapi_types(): "last_valid_block_height": (int,), # noqa: E501 "mint": (str,), # noqa: E501 "tx": (str,), # noqa: E501 - "reference_id": ( - str, - none_type, - ), # noqa: E501 - "reference_type": ( + "reference": ( str, none_type, ), # noqa: E501 @@ -123,8 +119,7 @@ def discriminator(): "last_valid_block_height": "lastValidBlockHeight", # noqa: E501 "mint": "mint", # noqa: E501 "tx": "tx", # noqa: E501 - "reference_id": "referenceId", # noqa: E501 - "reference_type": "referenceType", # noqa: E501 + "reference": "reference", # noqa: E501 } read_only_vars = {} @@ -177,8 +172,7 @@ def _from_openapi_data( Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - reference_id (str, none_type): [optional] # noqa: E501 - reference_type (str, none_type): [optional] # noqa: E501 + reference (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -285,8 +279,7 @@ def __init__( Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - reference_id (str, none_type): [optional] # noqa: E501 - reference_type (str, none_type): [optional] # noqa: E501 + reference (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/src/kinetic_sdk/generated/client/model/get_transaction_response.py b/src/kinetic_sdk/generated/client/model/get_transaction_response.py index a286ae1..3c8fee9 100644 --- a/src/kinetic_sdk/generated/client/model/get_transaction_response.py +++ b/src/kinetic_sdk/generated/client/model/get_transaction_response.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ @@ -30,10 +30,10 @@ def lazy_import(): - from kinetic_sdk.generated.client.model.rpc_response_and_context import RpcResponseAndContext + from kinetic_sdk.generated.client.model.signature_status import SignatureStatus from kinetic_sdk.generated.client.model.transaction_response import TransactionResponse - globals()["RpcResponseAndContext"] = RpcResponseAndContext + globals()["SignatureStatus"] = SignatureStatus globals()["TransactionResponse"] = TransactionResponse @@ -99,7 +99,7 @@ def openapi_types(): lazy_import() return { "signature": (str,), # noqa: E501 - "status": (RpcResponseAndContext,), # noqa: E501 + "status": (SignatureStatus,), # noqa: E501 "transaction": (TransactionResponse,), # noqa: E501 } @@ -124,7 +124,7 @@ def _from_openapi_data(cls, signature, status, transaction, *args, **kwargs): # Args: signature (str): - status (RpcResponseAndContext): + status (SignatureStatus): transaction (TransactionResponse): Keyword Args: @@ -222,7 +222,7 @@ def __init__(self, signature, status, transaction, *args, **kwargs): # noqa: E5 Args: signature (str): - status (RpcResponseAndContext): + status (SignatureStatus): transaction (TransactionResponse): Keyword Args: diff --git a/src/kinetic_sdk/generated/client/model/history_response.py b/src/kinetic_sdk/generated/client/model/history_response.py index 2854986..d84ec68 100644 --- a/src/kinetic_sdk/generated/client/model/history_response.py +++ b/src/kinetic_sdk/generated/client/model/history_response.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/latest_blockhash_response.py b/src/kinetic_sdk/generated/client/model/latest_blockhash_response.py index 8f0c0b2..b384184 100644 --- a/src/kinetic_sdk/generated/client/model/latest_blockhash_response.py +++ b/src/kinetic_sdk/generated/client/model/latest_blockhash_response.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/make_transfer_request.py b/src/kinetic_sdk/generated/client/model/make_transfer_request.py index d8a71ea..8bd39ae 100644 --- a/src/kinetic_sdk/generated/client/model/make_transfer_request.py +++ b/src/kinetic_sdk/generated/client/model/make_transfer_request.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ @@ -102,11 +102,7 @@ def openapi_types(): "mint": (str,), # noqa: E501 "last_valid_block_height": (int,), # noqa: E501 "tx": (str,), # noqa: E501 - "reference_id": ( - str, - none_type, - ), # noqa: E501 - "reference_type": ( + "reference": ( str, none_type, ), # noqa: E501 @@ -123,8 +119,7 @@ def discriminator(): "mint": "mint", # noqa: E501 "last_valid_block_height": "lastValidBlockHeight", # noqa: E501 "tx": "tx", # noqa: E501 - "reference_id": "referenceId", # noqa: E501 - "reference_type": "referenceType", # noqa: E501 + "reference": "reference", # noqa: E501 } read_only_vars = {} @@ -177,8 +172,7 @@ def _from_openapi_data( Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - reference_id (str, none_type): [optional] # noqa: E501 - reference_type (str, none_type): [optional] # noqa: E501 + reference (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -285,8 +279,7 @@ def __init__( Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - reference_id (str, none_type): [optional] # noqa: E501 - reference_type (str, none_type): [optional] # noqa: E501 + reference (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/src/kinetic_sdk/generated/client/model/minimum_rent_exemption_balance_response.py b/src/kinetic_sdk/generated/client/model/minimum_rent_exemption_balance_response.py index b5bc23b..dabac8c 100644 --- a/src/kinetic_sdk/generated/client/model/minimum_rent_exemption_balance_response.py +++ b/src/kinetic_sdk/generated/client/model/minimum_rent_exemption_balance_response.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/request_airdrop_request.py b/src/kinetic_sdk/generated/client/model/request_airdrop_request.py index 3edc147..a2c597a 100644 --- a/src/kinetic_sdk/generated/client/model/request_airdrop_request.py +++ b/src/kinetic_sdk/generated/client/model/request_airdrop_request.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/request_airdrop_response.py b/src/kinetic_sdk/generated/client/model/request_airdrop_response.py index 9e50b33..989a88f 100644 --- a/src/kinetic_sdk/generated/client/model/request_airdrop_response.py +++ b/src/kinetic_sdk/generated/client/model/request_airdrop_response.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/rpc_response_and_context.py b/src/kinetic_sdk/generated/client/model/rpc_response_and_context.py deleted file mode 100644 index 4ba061f..0000000 --- a/src/kinetic_sdk/generated/client/model/rpc_response_and_context.py +++ /dev/null @@ -1,300 +0,0 @@ -""" - @kin-kinetic/api - - The OpenAPI definition of the Kinetic API # noqa: E501 - - The version of the OpenAPI document: 1.0.0-rc.13 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from kinetic_sdk.generated.client.exceptions import ApiAttributeError -from kinetic_sdk.generated.client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - OpenApiModel, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, -) - - -def lazy_import(): - from kinetic_sdk.generated.client.model.context import Context - from kinetic_sdk.generated.client.model.signature_status import SignatureStatus - - globals()["Context"] = Context - globals()["SignatureStatus"] = SignatureStatus - - -class RpcResponseAndContext(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = {} - - validations = {} - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - "context": (Context,), # noqa: E501 - "value": (SignatureStatus,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - attribute_map = { - "context": "context", # noqa: E501 - "value": "value", # noqa: E501 - } - - read_only_vars = {} - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, context, value, *args, **kwargs): # noqa: E501 - """RpcResponseAndContext - a model defined in OpenAPI - - Args: - context (Context): - value (SignatureStatus): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", True) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.context = context - self.value = value - for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set( - [ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", - ] - ) - - @convert_js_args_to_python_args - def __init__(self, context, value, *args, **kwargs): # noqa: E501 - """RpcResponseAndContext - a model defined in OpenAPI - - Args: - context (Context): - value (SignatureStatus): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.context = context - self.value = value - for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes." - ) diff --git a/src/kinetic_sdk/generated/client/model/signature_status.py b/src/kinetic_sdk/generated/client/model/signature_status.py index 90385d8..8322290 100644 --- a/src/kinetic_sdk/generated/client/model/signature_status.py +++ b/src/kinetic_sdk/generated/client/model/signature_status.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/token_amount.py b/src/kinetic_sdk/generated/client/model/token_amount.py index 74dfdd2..8966426 100644 --- a/src/kinetic_sdk/generated/client/model/token_amount.py +++ b/src/kinetic_sdk/generated/client/model/token_amount.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/token_balance.py b/src/kinetic_sdk/generated/client/model/token_balance.py index da11c68..b085185 100644 --- a/src/kinetic_sdk/generated/client/model/token_balance.py +++ b/src/kinetic_sdk/generated/client/model/token_balance.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/token_info.py b/src/kinetic_sdk/generated/client/model/token_info.py index f6288c0..7388199 100644 --- a/src/kinetic_sdk/generated/client/model/token_info.py +++ b/src/kinetic_sdk/generated/client/model/token_info.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/transaction.py b/src/kinetic_sdk/generated/client/model/transaction.py index c907cd0..8e16646 100644 --- a/src/kinetic_sdk/generated/client/model/transaction.py +++ b/src/kinetic_sdk/generated/client/model/transaction.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ @@ -146,11 +146,7 @@ def openapi_types(): int, none_type, ), # noqa: E501 - "reference_id": ( - str, - none_type, - ), # noqa: E501 - "reference_type": ( + "reference": ( str, none_type, ), # noqa: E501 @@ -242,8 +238,7 @@ def discriminator(): "ip": "ip", # noqa: E501 "mint": "mint", # noqa: E501 "processing_duration": "processingDuration", # noqa: E501 - "reference_id": "referenceId", # noqa: E501 - "reference_type": "referenceType", # noqa: E501 + "reference": "reference", # noqa: E501 "signature": "signature", # noqa: E501 "solana_committed": "solanaCommitted", # noqa: E501 "solana_committed_duration": "solanaCommittedDuration", # noqa: E501 @@ -316,8 +311,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ip (str, none_type): [optional] # noqa: E501 mint (str, none_type): [optional] # noqa: E501 processing_duration (int, none_type): [optional] # noqa: E501 - reference_id (str, none_type): [optional] # noqa: E501 - reference_type (str, none_type): [optional] # noqa: E501 + reference (str, none_type): [optional] # noqa: E501 signature (str, none_type): [optional] # noqa: E501 solana_committed (datetime, none_type): [optional] # noqa: E501 solana_committed_duration (int, none_type): [optional] # noqa: E501 @@ -438,8 +432,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 ip (str, none_type): [optional] # noqa: E501 mint (str, none_type): [optional] # noqa: E501 processing_duration (int, none_type): [optional] # noqa: E501 - reference_id (str, none_type): [optional] # noqa: E501 - reference_type (str, none_type): [optional] # noqa: E501 + reference (str, none_type): [optional] # noqa: E501 signature (str, none_type): [optional] # noqa: E501 solana_committed (datetime, none_type): [optional] # noqa: E501 solana_committed_duration (int, none_type): [optional] # noqa: E501 diff --git a/src/kinetic_sdk/generated/client/model/transaction_data.py b/src/kinetic_sdk/generated/client/model/transaction_data.py index 576ef9a..3c2b6a2 100644 --- a/src/kinetic_sdk/generated/client/model/transaction_data.py +++ b/src/kinetic_sdk/generated/client/model/transaction_data.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/transaction_error.py b/src/kinetic_sdk/generated/client/model/transaction_error.py index efab2c8..4a606f5 100644 --- a/src/kinetic_sdk/generated/client/model/transaction_error.py +++ b/src/kinetic_sdk/generated/client/model/transaction_error.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/transaction_error_type.py b/src/kinetic_sdk/generated/client/model/transaction_error_type.py index 265c3e4..272b44a 100644 --- a/src/kinetic_sdk/generated/client/model/transaction_error_type.py +++ b/src/kinetic_sdk/generated/client/model/transaction_error_type.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/transaction_response.py b/src/kinetic_sdk/generated/client/model/transaction_response.py index 020ae9d..52bd4c7 100644 --- a/src/kinetic_sdk/generated/client/model/transaction_response.py +++ b/src/kinetic_sdk/generated/client/model/transaction_response.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model/transaction_status.py b/src/kinetic_sdk/generated/client/model/transaction_status.py index a9216b7..add3ad8 100644 --- a/src/kinetic_sdk/generated/client/model/transaction_status.py +++ b/src/kinetic_sdk/generated/client/model/transaction_status.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/model_utils.py b/src/kinetic_sdk/generated/client/model_utils.py index 3519005..fe2ef0a 100644 --- a/src/kinetic_sdk/generated/client/model_utils.py +++ b/src/kinetic_sdk/generated/client/model_utils.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/generated/client/models/__init__.py b/src/kinetic_sdk/generated/client/models/__init__.py index e87d256..a528185 100644 --- a/src/kinetic_sdk/generated/client/models/__init__.py +++ b/src/kinetic_sdk/generated/client/models/__init__.py @@ -27,7 +27,6 @@ from kinetic_sdk.generated.client.model.confirmation_status import ConfirmationStatus from kinetic_sdk.generated.client.model.confirmed_signature_info import ConfirmedSignatureInfo from kinetic_sdk.generated.client.model.confirmed_transaction_meta import ConfirmedTransactionMeta -from kinetic_sdk.generated.client.model.context import Context from kinetic_sdk.generated.client.model.create_account_request import CreateAccountRequest from kinetic_sdk.generated.client.model.get_transaction_response import GetTransactionResponse from kinetic_sdk.generated.client.model.history_response import HistoryResponse @@ -38,7 +37,6 @@ ) from kinetic_sdk.generated.client.model.request_airdrop_request import RequestAirdropRequest from kinetic_sdk.generated.client.model.request_airdrop_response import RequestAirdropResponse -from kinetic_sdk.generated.client.model.rpc_response_and_context import RpcResponseAndContext from kinetic_sdk.generated.client.model.signature_status import SignatureStatus from kinetic_sdk.generated.client.model.token_amount import TokenAmount from kinetic_sdk.generated.client.model.token_balance import TokenBalance diff --git a/src/kinetic_sdk/generated/client/rest.py b/src/kinetic_sdk/generated/client/rest.py index ae9e967..364c455 100644 --- a/src/kinetic_sdk/generated/client/rest.py +++ b/src/kinetic_sdk/generated/client/rest.py @@ -3,7 +3,7 @@ The OpenAPI definition of the Kinetic API # noqa: E501 - The version of the OpenAPI document: 1.0.0-rc.13 + The version of the OpenAPI document: 1.0.0-rc.16 Generated by: https://openapi-generator.tech """ diff --git a/src/kinetic_sdk/kinetic_sdk.py b/src/kinetic_sdk/kinetic_sdk.py index b71dffa..a7dd4dd 100644 --- a/src/kinetic_sdk/kinetic_sdk.py +++ b/src/kinetic_sdk/kinetic_sdk.py @@ -23,20 +23,18 @@ def close_account( account: PublicKeyString, commitment: Optional[Commitment] = None, mint: Optional[PublicKeyString] = None, - reference_id: Optional[str] = None, - reference_type: Optional[str] = None, + reference: Optional[str] = None, ): - return self.internal.close_account(account, commitment, mint, reference_id, reference_type) + return self.internal.close_account(account, commitment, mint, reference) def create_account( self, owner: Keypair, commitment: Optional[Commitment] = None, mint: Optional[PublicKeyString] = None, - reference_id: Optional[str] = None, - reference_type: Optional[str] = None, + reference: Optional[str] = None, ): - return self.internal.create_account(owner, commitment, mint, reference_id, reference_type) + return self.internal.create_account(owner, commitment, mint, reference) def get_account_info( self, @@ -55,6 +53,9 @@ def get_explorer_url(self, path: str): def get_history(self, account: PublicKeyString, mint: Optional[PublicKeyString] = None): return self.internal.get_history(account, mint) + def get_kinetic_transaction(self, signature: Optional[str] = None, reference: Optional[str] = None): + return self.internal.get_kinetic_transaction(signature, reference) + def get_token_accounts(self, account: PublicKeyString, mint: Optional[PublicKeyString] = None): return self.internal.get_token_accounts(account, mint) @@ -69,12 +70,11 @@ def make_transfer( tx_type: TransactionType = TransactionType.NONE, mint: Optional[PublicKeyString] = None, commitment: Optional[Commitment] = None, - reference_id: Optional[str] = None, - reference_type: Optional[str] = None, + reference: Optional[str] = None, sender_create: bool = False, ): return self.internal.make_transfer( - owner, destination, amount, mint, tx_type, reference_id, reference_type, sender_create, commitment + owner, destination, amount, mint, tx_type, reference, sender_create, commitment ) def make_transfer_batch( @@ -84,12 +84,9 @@ def make_transfer_batch( tx_type: TransactionType = TransactionType.NONE, mint: Optional[PublicKeyString] = None, commitment: Optional[Commitment] = None, - reference_id: Optional[str] = None, - reference_type: Optional[str] = None, + reference: Optional[str] = None, ): - return self.internal.make_transfer_batch( - owner, destinations, mint, tx_type, reference_id, reference_type, commitment - ) + return self.internal.make_transfer_batch(owner, destinations, mint, tx_type, reference, commitment) def request_airdrop( self, diff --git a/src/kinetic_sdk/kinetic_sdk_internal.py b/src/kinetic_sdk/kinetic_sdk_internal.py index f40ccbc..412d4b2 100644 --- a/src/kinetic_sdk/kinetic_sdk_internal.py +++ b/src/kinetic_sdk/kinetic_sdk_internal.py @@ -50,8 +50,7 @@ def close_account( account: PublicKeyString, commitment: Commitment, mint: PublicKeyString, - reference_id: str, - reference_type: str, + reference: str, ): app_config = self._ensure_app_config() app_mint = get_app_mint(app_config, mint) @@ -63,8 +62,7 @@ def close_account( environment=self.sdk_config["environment"], index=self.sdk_config["index"], mint=app_mint.public_key, - reference_id=reference_id, - reference_type=reference_type, + reference=reference, ) return self.account_api.close_account(request) @@ -74,8 +72,7 @@ def create_account( owner: Keypair, commitment: Optional[Commitment] = None, mint: Optional[PublicKeyString] = None, - reference_id: Optional[str] = None, - reference_type: Optional[str] = None, + reference: Optional[str] = None, ): app_config = self._ensure_app_config() app_mint = get_app_mint(app_config, mint) @@ -105,8 +102,7 @@ def create_account( index=self.sdk_config["index"], last_valid_block_height=blockhash["last_valid_block_height"], mint=app_mint.public_key, - reference_id=reference_id, - reference_type=reference_type, + reference=reference, tx=pybase64.b64encode_as_string(tx), ) @@ -163,6 +159,14 @@ def get_history( commitment, ) + def get_kinetic_transaction(self, signature: Optional[str] = None, reference: Optional[str] = None): + return self.transaction_api.get_kinetic_transaction( + self.sdk_config["environment"], + self.sdk_config["index"], + reference=reference or '', + signature=signature or '', + ) + def get_token_accounts( self, account: PublicKeyString, mint: PublicKeyString, commitment: Optional[Commitment] = None ): @@ -192,8 +196,7 @@ def make_transfer( amount: str, mint: PublicKeyString, tx_type: TransactionType, - reference_id: str, - reference_type: str, + reference: str, sender_create: Optional[bool] = None, commitment: Optional[Commitment] = None, ): @@ -254,8 +257,7 @@ def make_transfer( index=self.sdk_config["index"], last_valid_block_height=blockhash["last_valid_block_height"], mint=app_mint.public_key, - reference_id=reference_id, - reference_type=reference_type, + reference=reference, tx=pybase64.b64encode_as_string(tx), ) @@ -267,8 +269,7 @@ def make_transfer_batch( destinations, mint, tx_type, - reference_id: str, - reference_type: str, + reference: str, commitment: Optional[Commitment] = None, ): app_config = self._ensure_app_config() @@ -335,8 +336,7 @@ def make_transfer_batch( index=self.sdk_config["index"], last_valid_block_height=blockhash["last_valid_block_height"], mint=app_mint.public_key, - reference_id=reference_id, - reference_type=reference_type, + reference=reference, tx=pybase64.b64encode_as_string(tx), ) diff --git a/src/kinetic_sdk/models/version.py b/src/kinetic_sdk/models/version.py index fea5da0..277b6c4 100644 --- a/src/kinetic_sdk/models/version.py +++ b/src/kinetic_sdk/models/version.py @@ -1,3 +1,3 @@ # pylint: disable=missing-module-docstring NAME = "Kinetic Python SDK" -VERSION = "1.0.0-rc.13-1" +VERSION = "1.0.0-rc.16" diff --git a/tests/kinetic_sdk_test.py b/tests/kinetic_sdk_test.py index 6555784..42ba3cb 100644 --- a/tests/kinetic_sdk_test.py +++ b/tests/kinetic_sdk_test.py @@ -1,5 +1,7 @@ # flake8: noqa: F841 # pylint: disable=missing-module-docstring +import uuid + from solana.publickey import PublicKey from kinetic_sdk import ( @@ -35,6 +37,10 @@ ) +def unique_id(): + return "test-{}".format(uuid.uuid4()) + + def test_get_balance(): """Test getting balance of an account""" balance = sdk.get_balance(PublicKey(ALICE_ACCOUNT)) @@ -130,6 +136,31 @@ def test_make_transfer(): assert transfer["source"] == ALICE_ACCOUNT +def test_make_transfer_with_reference(): + """Test making a transfer with a reference""" + reference = unique_id() + transfer = sdk.make_transfer( + owner=ALICE_KEYPAIR, + destination=BOB_ACCOUNT, + amount=1, + reference=reference, + ) + assert isinstance(transfer, Transaction) + assert transfer["errors"] == [] + assert transfer["status"] == TransactionStatus("Committed") + assert isinstance(transfer["status"], TransactionStatus) + + found = sdk.get_kinetic_transaction(reference=reference) + assert found[0]["amount"] == "1" + assert found[0]["status"] == TransactionStatus("Confirmed") + assert found[0]["source"] == ALICE_ACCOUNT + assert found[0]["reference"] == reference + assert found[0]["commitment"] == "Confirmed" + assert found[0]["destination"] == BOB_TOKEN_ACCOUNT + assert found[0]["fee_payer"] == FEE_PAYER + assert found[0]["mint"] == DEFAULT_MINT + + def test_make_transfer_batch(): """Test making a batch transfer""" transfer_batch = sdk.make_transfer_batch(