# coding: utf-8

"""
    Aeternity Epoch

    This is the [Aeternity](https://www.aeternity.com/) Epoch API.  # noqa: E501

    OpenAPI spec version: 0.9.0
    Contact: apiteam@aeternity.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from swagger_client.api_client import ApiClient


class ObsoleteApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def get_active_registered_oracles(self, **kwargs):  # noqa: E501
        """get_active_registered_oracles  # noqa: E501

        Get active registered oracles  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_active_registered_oracles(async=True)
        >>> result = thread.get()

        :param async bool
        :param str _from: Last oracle in previous page
        :param int max: Max number of active oracles received
        :return: RegisteredOracles
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_active_registered_oracles_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_active_registered_oracles_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_active_registered_oracles_with_http_info(self, **kwargs):  # noqa: E501
        """get_active_registered_oracles  # noqa: E501

        Get active registered oracles  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_active_registered_oracles_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param str _from: Last oracle in previous page
        :param int max: Max number of active oracles received
        :return: RegisteredOracles
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['_from', 'max']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_active_registered_oracles" % key
                )
            params[key] = val
        del params['kwargs']

        if 'max' in params and params['max'] > 1000:  # noqa: E501
            raise ValueError("Invalid value for parameter `max` when calling `get_active_registered_oracles`, must be a value less than or equal to `1000`")  # noqa: E501
        if 'max' in params and params['max'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `max` when calling `get_active_registered_oracles`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'max' in params:
            query_params.append(('max', params['max']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/oracles', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RegisteredOracles',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_oracle_questions(self, oracle_pub_key, **kwargs):  # noqa: E501
        """get_oracle_questions  # noqa: E501

        Get active oracle questions  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_oracle_questions(oracle_pub_key, async=True)
        >>> result = thread.get()

        :param async bool
        :param str oracle_pub_key: Oracle public key (required)
        :param str _from: Last query id in previous page
        :param int max: Max number of oracle queries received
        :return: OracleQuestions
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.get_oracle_questions_with_http_info(oracle_pub_key, **kwargs)  # noqa: E501
        else:
            (data) = self.get_oracle_questions_with_http_info(oracle_pub_key, **kwargs)  # noqa: E501
            return data

    def get_oracle_questions_with_http_info(self, oracle_pub_key, **kwargs):  # noqa: E501
        """get_oracle_questions  # noqa: E501

        Get active oracle questions  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.get_oracle_questions_with_http_info(oracle_pub_key, async=True)
        >>> result = thread.get()

        :param async bool
        :param str oracle_pub_key: Oracle public key (required)
        :param str _from: Last query id in previous page
        :param int max: Max number of oracle queries received
        :return: OracleQuestions
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['oracle_pub_key', '_from', 'max']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_oracle_questions" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'oracle_pub_key' is set
        if ('oracle_pub_key' not in params or
                params['oracle_pub_key'] is None):
            raise ValueError("Missing the required parameter `oracle_pub_key` when calling `get_oracle_questions`")  # noqa: E501

        if 'max' in params and params['max'] > 1000:  # noqa: E501
            raise ValueError("Invalid value for parameter `max` when calling `get_oracle_questions`, must be a value less than or equal to `1000`")  # noqa: E501
        if 'max' in params and params['max'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `max` when calling `get_oracle_questions`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'oracle_pub_key' in params:
            query_params.append(('oracle_pub_key', params['oracle_pub_key']))  # noqa: E501
        if '_from' in params:
            query_params.append(('from', params['_from']))  # noqa: E501
        if 'max' in params:
            query_params.append(('max', params['max']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/oracle-questions', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='OracleQuestions',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_name_claim_tx(self, body, **kwargs):  # noqa: E501
        """post_name_claim_tx  # noqa: E501

        Create name claim transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_name_claim_tx(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param NameClaimTx body: Creates new name claim transaction (required)
        :return: NameHash
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.post_name_claim_tx_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.post_name_claim_tx_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def post_name_claim_tx_with_http_info(self, body, **kwargs):  # noqa: E501
        """post_name_claim_tx  # noqa: E501

        Create name claim transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_name_claim_tx_with_http_info(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param NameClaimTx body: Creates new name claim transaction (required)
        :return: NameHash
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_name_claim_tx" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `post_name_claim_tx`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/name-claim-tx', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='NameHash',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_name_preclaim_tx(self, body, **kwargs):  # noqa: E501
        """post_name_preclaim_tx  # noqa: E501

        Create name preclaim transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_name_preclaim_tx(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param NamePreclaimTx body: Creates new name preclaim transaction (required)
        :return: NameCommitmentHash
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.post_name_preclaim_tx_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.post_name_preclaim_tx_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def post_name_preclaim_tx_with_http_info(self, body, **kwargs):  # noqa: E501
        """post_name_preclaim_tx  # noqa: E501

        Create name preclaim transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_name_preclaim_tx_with_http_info(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param NamePreclaimTx body: Creates new name preclaim transaction (required)
        :return: NameCommitmentHash
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_name_preclaim_tx" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `post_name_preclaim_tx`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/name-preclaim-tx', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='NameCommitmentHash',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_name_revoke_tx(self, body, **kwargs):  # noqa: E501
        """post_name_revoke_tx  # noqa: E501

        Create name revoke transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_name_revoke_tx(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param NameRevokeTx body: Creates new name revoke transaction (required)
        :return: NameHash
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.post_name_revoke_tx_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.post_name_revoke_tx_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def post_name_revoke_tx_with_http_info(self, body, **kwargs):  # noqa: E501
        """post_name_revoke_tx  # noqa: E501

        Create name revoke transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_name_revoke_tx_with_http_info(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param NameRevokeTx body: Creates new name revoke transaction (required)
        :return: NameHash
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_name_revoke_tx" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `post_name_revoke_tx`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/name-revoke-tx', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='NameHash',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_name_transfer_tx(self, body, **kwargs):  # noqa: E501
        """post_name_transfer_tx  # noqa: E501

        Create name transfer transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_name_transfer_tx(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param NameTransferTx body: Creates new name transfer transaction (required)
        :return: NameHash
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.post_name_transfer_tx_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.post_name_transfer_tx_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def post_name_transfer_tx_with_http_info(self, body, **kwargs):  # noqa: E501
        """post_name_transfer_tx  # noqa: E501

        Create name transfer transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_name_transfer_tx_with_http_info(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param NameTransferTx body: Creates new name transfer transaction (required)
        :return: NameHash
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_name_transfer_tx" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `post_name_transfer_tx`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/name-transfer-tx', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='NameHash',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_name_update_tx(self, body, **kwargs):  # noqa: E501
        """post_name_update_tx  # noqa: E501

        Create name update transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_name_update_tx(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param NameUpdateTx body: Creates new name update transaction (required)
        :return: NameHash
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.post_name_update_tx_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.post_name_update_tx_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def post_name_update_tx_with_http_info(self, body, **kwargs):  # noqa: E501
        """post_name_update_tx  # noqa: E501

        Create name update transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_name_update_tx_with_http_info(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param NameUpdateTx body: Creates new name update transaction (required)
        :return: NameHash
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_name_update_tx" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `post_name_update_tx`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/name-update-tx', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='NameHash',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_oracle_extend_tx(self, body, **kwargs):  # noqa: E501
        """post_oracle_extend_tx  # noqa: E501

        Create oracle extend transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_oracle_extend_tx(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param OracleExtendTx body: Creates new oracle extend transaction (required)
        :return: OracleRegisterResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.post_oracle_extend_tx_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.post_oracle_extend_tx_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def post_oracle_extend_tx_with_http_info(self, body, **kwargs):  # noqa: E501
        """post_oracle_extend_tx  # noqa: E501

        Create oracle extend transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_oracle_extend_tx_with_http_info(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param OracleExtendTx body: Creates new oracle extend transaction (required)
        :return: OracleRegisterResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_oracle_extend_tx" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `post_oracle_extend_tx`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/oracle-extend-tx', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='OracleRegisterResponse',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_oracle_query_tx(self, body, **kwargs):  # noqa: E501
        """post_oracle_query_tx  # noqa: E501

        Create oracle query transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_oracle_query_tx(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param OracleQueryTx body: Creates new oracle query transaction (required)
        :return: OracleQueryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.post_oracle_query_tx_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.post_oracle_query_tx_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def post_oracle_query_tx_with_http_info(self, body, **kwargs):  # noqa: E501
        """post_oracle_query_tx  # noqa: E501

        Create oracle query transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_oracle_query_tx_with_http_info(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param OracleQueryTx body: Creates new oracle query transaction (required)
        :return: OracleQueryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_oracle_query_tx" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `post_oracle_query_tx`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/oracle-query-tx', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='OracleQueryResponse',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_oracle_register_tx(self, body, **kwargs):  # noqa: E501
        """post_oracle_register_tx  # noqa: E501

        Create oracle register transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_oracle_register_tx(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param OracleRegisterTx body: Creates new oracle register transaction (required)
        :return: OracleRegisterResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.post_oracle_register_tx_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.post_oracle_register_tx_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def post_oracle_register_tx_with_http_info(self, body, **kwargs):  # noqa: E501
        """post_oracle_register_tx  # noqa: E501

        Create oracle register transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_oracle_register_tx_with_http_info(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param OracleRegisterTx body: Creates new oracle register transaction (required)
        :return: OracleRegisterResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_oracle_register_tx" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `post_oracle_register_tx`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/oracle-register-tx', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='OracleRegisterResponse',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_oracle_response_tx(self, body, **kwargs):  # noqa: E501
        """post_oracle_response_tx  # noqa: E501

        Create oracle response transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_oracle_response_tx(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param OracleResponseTx body: Creates new oracle response transaction (required)
        :return: OracleQueryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.post_oracle_response_tx_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.post_oracle_response_tx_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def post_oracle_response_tx_with_http_info(self, body, **kwargs):  # noqa: E501
        """post_oracle_response_tx  # noqa: E501

        Create oracle response transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_oracle_response_tx_with_http_info(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param OracleResponseTx body: Creates new oracle response transaction (required)
        :return: OracleQueryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_oracle_response_tx" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `post_oracle_response_tx`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/oracle-response-tx', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='OracleQueryResponse',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_spend_tx(self, body, **kwargs):  # noqa: E501
        """post_spend_tx  # noqa: E501

        Create spend transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_spend_tx(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param SpendTx body: Creates new spend transaction (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.post_spend_tx_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.post_spend_tx_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def post_spend_tx_with_http_info(self, body, **kwargs):  # noqa: E501
        """post_spend_tx  # noqa: E501

        Create spend transaction  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.post_spend_tx_with_http_info(body, async=True)
        >>> result = thread.get()

        :param async bool
        :param SpendTx body: Creates new spend transaction (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_spend_tx" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `post_spend_tx`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/spend-tx', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
