circle-configurations 0.1.0b1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of circle-configurations might be problematic. Click here for more details.

Files changed (79) hide show
  1. circle_configurations-0.1.0b1/PKG-INFO +16 -0
  2. circle_configurations-0.1.0b1/README.md +73 -0
  3. circle_configurations-0.1.0b1/circle/__init__.py +0 -0
  4. circle_configurations-0.1.0b1/circle/web3/__init__.py +0 -0
  5. circle_configurations-0.1.0b1/circle/web3/configurations/__init__.py +57 -0
  6. circle_configurations-0.1.0b1/circle/web3/configurations/api/__init__.py +8 -0
  7. circle_configurations-0.1.0b1/circle/web3/configurations/api/developer_account_api.py +301 -0
  8. circle_configurations-0.1.0b1/circle/web3/configurations/api/faucet_api.py +194 -0
  9. circle_configurations-0.1.0b1/circle/web3/configurations/api/monitor_tokens_api.py +832 -0
  10. circle_configurations-0.1.0b1/circle/web3/configurations/api/webhook_subscriptions_api.py +189 -0
  11. circle_configurations-0.1.0b1/circle/web3/configurations/api_client.py +751 -0
  12. circle_configurations-0.1.0b1/circle/web3/configurations/api_response.py +25 -0
  13. circle_configurations-0.1.0b1/circle/web3/configurations/configuration.py +439 -0
  14. circle_configurations-0.1.0b1/circle/web3/configurations/exceptions.py +162 -0
  15. circle_configurations-0.1.0b1/circle/web3/configurations/models/__init__.py +37 -0
  16. circle_configurations-0.1.0b1/circle/web3/configurations/models/blockchain.py +40 -0
  17. circle_configurations-0.1.0b1/circle/web3/configurations/models/create_monitored_tokens200_response.py +71 -0
  18. circle_configurations-0.1.0b1/circle/web3/configurations/models/delete_monitored_tokens_request.py +67 -0
  19. circle_configurations-0.1.0b1/circle/web3/configurations/models/error.py +69 -0
  20. circle_configurations-0.1.0b1/circle/web3/configurations/models/faucet_request.py +76 -0
  21. circle_configurations-0.1.0b1/circle/web3/configurations/models/get_entity_config200_response.py +71 -0
  22. circle_configurations-0.1.0b1/circle/web3/configurations/models/get_entity_config_response.py +67 -0
  23. circle_configurations-0.1.0b1/circle/web3/configurations/models/get_monitored_tokens_response.py +78 -0
  24. circle_configurations-0.1.0b1/circle/web3/configurations/models/get_notification_signature.py +71 -0
  25. circle_configurations-0.1.0b1/circle/web3/configurations/models/get_public_key200_response.py +71 -0
  26. circle_configurations-0.1.0b1/circle/web3/configurations/models/get_public_key_response.py +67 -0
  27. circle_configurations-0.1.0b1/circle/web3/configurations/models/list_monitored_tokens200_response.py +71 -0
  28. circle_configurations-0.1.0b1/circle/web3/configurations/models/list_monitored_tokens200_response_response.py +77 -0
  29. circle_configurations-0.1.0b1/circle/web3/configurations/models/notification_signature_public_key.py +73 -0
  30. circle_configurations-0.1.0b1/circle/web3/configurations/models/post_monitored_tokens_request.py +67 -0
  31. circle_configurations-0.1.0b1/circle/web3/configurations/models/post_monitored_tokens_response.py +78 -0
  32. circle_configurations-0.1.0b1/circle/web3/configurations/models/put_monitored_tokens_request.py +67 -0
  33. circle_configurations-0.1.0b1/circle/web3/configurations/models/put_monitored_tokens_response.py +78 -0
  34. circle_configurations-0.1.0b1/circle/web3/configurations/models/put_monitored_tokens_scope_request.py +68 -0
  35. circle_configurations-0.1.0b1/circle/web3/configurations/models/status.py +69 -0
  36. circle_configurations-0.1.0b1/circle/web3/configurations/models/testnet_blockchain.py +37 -0
  37. circle_configurations-0.1.0b1/circle/web3/configurations/models/token_monitor_scope.py +36 -0
  38. circle_configurations-0.1.0b1/circle/web3/configurations/models/token_response.py +87 -0
  39. circle_configurations-0.1.0b1/circle/web3/configurations/models/token_standard.py +37 -0
  40. circle_configurations-0.1.0b1/circle/web3/configurations/models/update_monitored_tokens200_response.py +71 -0
  41. circle_configurations-0.1.0b1/circle/web3/configurations/py.typed +0 -0
  42. circle_configurations-0.1.0b1/circle/web3/configurations/rest.py +299 -0
  43. circle_configurations-0.1.0b1/circle_configurations.egg-info/PKG-INFO +16 -0
  44. circle_configurations-0.1.0b1/circle_configurations.egg-info/SOURCES.txt +78 -0
  45. circle_configurations-0.1.0b1/circle_configurations.egg-info/dependency_links.txt +1 -0
  46. circle_configurations-0.1.0b1/circle_configurations.egg-info/requires.txt +4 -0
  47. circle_configurations-0.1.0b1/circle_configurations.egg-info/top_level.txt +1 -0
  48. circle_configurations-0.1.0b1/pyproject.toml +30 -0
  49. circle_configurations-0.1.0b1/setup.cfg +7 -0
  50. circle_configurations-0.1.0b1/setup.py +45 -0
  51. circle_configurations-0.1.0b1/test/test_blockchain.py +32 -0
  52. circle_configurations-0.1.0b1/test/test_create_monitored_tokens200_response.py +64 -0
  53. circle_configurations-0.1.0b1/test/test_delete_monitored_tokens_request.py +51 -0
  54. circle_configurations-0.1.0b1/test/test_developer_account_api.py +43 -0
  55. circle_configurations-0.1.0b1/test/test_error.py +51 -0
  56. circle_configurations-0.1.0b1/test/test_faucet_api.py +36 -0
  57. circle_configurations-0.1.0b1/test/test_faucet_request.py +56 -0
  58. circle_configurations-0.1.0b1/test/test_get_entity_config200_response.py +51 -0
  59. circle_configurations-0.1.0b1/test/test_get_entity_config_response.py +50 -0
  60. circle_configurations-0.1.0b1/test/test_get_monitored_tokens_response.py +63 -0
  61. circle_configurations-0.1.0b1/test/test_get_notification_signature.py +54 -0
  62. circle_configurations-0.1.0b1/test/test_get_public_key200_response.py +51 -0
  63. circle_configurations-0.1.0b1/test/test_get_public_key_response.py +50 -0
  64. circle_configurations-0.1.0b1/test/test_list_monitored_tokens200_response.py +68 -0
  65. circle_configurations-0.1.0b1/test/test_list_monitored_tokens200_response_response.py +67 -0
  66. circle_configurations-0.1.0b1/test/test_monitor_tokens_api.py +64 -0
  67. circle_configurations-0.1.0b1/test/test_notification_signature_public_key.py +57 -0
  68. circle_configurations-0.1.0b1/test/test_post_monitored_tokens_request.py +51 -0
  69. circle_configurations-0.1.0b1/test/test_post_monitored_tokens_response.py +63 -0
  70. circle_configurations-0.1.0b1/test/test_put_monitored_tokens_request.py +50 -0
  71. circle_configurations-0.1.0b1/test/test_put_monitored_tokens_response.py +63 -0
  72. circle_configurations-0.1.0b1/test/test_put_monitored_tokens_scope_request.py +51 -0
  73. circle_configurations-0.1.0b1/test/test_status.py +51 -0
  74. circle_configurations-0.1.0b1/test/test_testnet_blockchain.py +32 -0
  75. circle_configurations-0.1.0b1/test/test_token_monitor_scope.py +32 -0
  76. circle_configurations-0.1.0b1/test/test_token_response.py +64 -0
  77. circle_configurations-0.1.0b1/test/test_token_standard.py +32 -0
  78. circle_configurations-0.1.0b1/test/test_update_monitored_tokens200_response.py +64 -0
  79. circle_configurations-0.1.0b1/test/test_webhook_subscriptions_api.py +36 -0
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.1
2
+ Name: circle-configurations
3
+ Version: 0.1.0b1
4
+ Summary: Configurations
5
+ Home-page:
6
+ Author: OpenAPI Generator community
7
+ Author-email: team@openapitools.org
8
+ Keywords: OpenAPI,OpenAPI-Generator,Configurations
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: urllib3<2.1.0,>=1.25.3
11
+ Requires-Dist: python-dateutil
12
+ Requires-Dist: pydantic<2,>=1.10.5
13
+ Requires-Dist: aenum
14
+
15
+ General Configuration APIs for Web3 Service products.
16
+
@@ -0,0 +1,73 @@
1
+ # circle-configurations
2
+ General Configuration APIs for Web3 Service products.
3
+
4
+ - API version: 1.0
5
+ - Package version: 0.1.0b1
6
+
7
+ ## Requirements.
8
+
9
+ Python 3.7+
10
+
11
+ ## Installation
12
+ ### pip install
13
+
14
+ ```sh
15
+ pip install circle-configurations
16
+ ```
17
+
18
+ Then import the package:
19
+ ```python
20
+ from circle.web3 import configurations
21
+ ```
22
+
23
+
24
+ ## Usage
25
+
26
+
27
+ 1. Generate an API key, if you haven't already, in the [Web3 Services Console](https://console.circle.com/). This API key will be used for authentication and authorization when making requests to Circle's APIs. API key can be set by environment variable or function parameter
28
+
29
+ ```sh
30
+ export CIRCLE_WEB3_API_KEY="Your API KEY"
31
+ ```
32
+
33
+ 2. Initiate API client
34
+
35
+ ```python
36
+ from circle.web3 import utils
37
+
38
+ client = utils.init_configurations_client(api_key="Your API KEY")
39
+ ```
40
+
41
+ 3. Interact with the client:
42
+
43
+ ```python
44
+ from circle.web3 import configurations
45
+
46
+ api_instance = configurations.DeveloperAccountApi(client)
47
+ try:
48
+ api_response = api_instance.get_public_key()
49
+ print(api_response.data.public_key)
50
+ except configurations.ApiException as e:
51
+ print("Exception when calling DeveloperAccountApi->get_public_key: %s\n" % e)
52
+ ```
53
+
54
+ ## Configuration
55
+
56
+ The client accept following configuration parameters:
57
+
58
+ Option | Required | Description
59
+ ------------ | ------------- | -------------
60
+ api_key | [] | Api Key that is used to authenticate against Circle APIs.
61
+ host | [] | Optional base URL to override the default: https://api.circle.com.
62
+ user_agent | [] | Optional custom user agent request header. We will prepend it to default user agent header if provided.
63
+
64
+ ## Need help or have questions?
65
+
66
+ Here are some helpful links, if you encounter any issues or have questions about this SDK:
67
+
68
+ - 📖 [Getting started](https://learn.circle.com/): Check out our official Developer-Controlled Wallets QuickStart.
69
+ - 🎮 [Join our Discord Community](https://discord.com/invite/buildoncircle): Engage, learn, and collaborate.
70
+ - 🛎 [Visit our Help-Desk Page](https://support.usdc.circle.com/hc/en-us/p/contactus?_gl=1*1va6vat*_ga*MTAyNTA0NTQ2NC4xNjk5NTYyMjgx*_ga_GJDVPCQNRV*MTcwMDQ5Mzg3Ny4xNC4xLjE3MDA0OTM4ODQuNTMuMC4w): Dive into curated FAQs and guides.
71
+ - 📧 [Direct Email](mailto:customer-support@circle.com): We're always a message away.
72
+ - 📖 [Read docs](https://developers.circle.com/w3s/docs?_gl=1*15ozb5b*_ga*MTAyNTA0NTQ2NC4xNjk5NTYyMjgx*_ga_GJDVPCQNRV*MTcwMDQ5Mzg3Ny4xNC4xLjE3MDA0OTM4ODQuNTMuMC4w): Check out our developer documentation.
73
+ Happy coding!
File without changes
File without changes
@@ -0,0 +1,57 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ The version of the OpenAPI document: 1.0
7
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+
9
+ Do not edit the class manually.
10
+ """ # noqa: E501
11
+
12
+
13
+ __version__ = "0.1.0b1"
14
+
15
+ # import apis into sdk package
16
+ from circle.web3.configurations.api.developer_account_api import DeveloperAccountApi
17
+ from circle.web3.configurations.api.faucet_api import FaucetApi
18
+ from circle.web3.configurations.api.monitor_tokens_api import MonitorTokensApi
19
+ from circle.web3.configurations.api.webhook_subscriptions_api import WebhookSubscriptionsApi
20
+
21
+ # import ApiClient
22
+ from circle.web3.configurations.api_response import ApiResponse
23
+ from circle.web3.configurations.api_client import ApiClient
24
+ from circle.web3.configurations.configuration import Configuration
25
+ from circle.web3.configurations.exceptions import OpenApiException
26
+ from circle.web3.configurations.exceptions import ApiTypeError
27
+ from circle.web3.configurations.exceptions import ApiValueError
28
+ from circle.web3.configurations.exceptions import ApiKeyError
29
+ from circle.web3.configurations.exceptions import ApiAttributeError
30
+ from circle.web3.configurations.exceptions import ApiException
31
+
32
+ # import models into sdk package
33
+ from circle.web3.configurations.models.blockchain import Blockchain
34
+ from circle.web3.configurations.models.create_monitored_tokens200_response import CreateMonitoredTokens200Response
35
+ from circle.web3.configurations.models.delete_monitored_tokens_request import DeleteMonitoredTokensRequest
36
+ from circle.web3.configurations.models.error import Error
37
+ from circle.web3.configurations.models.faucet_request import FaucetRequest
38
+ from circle.web3.configurations.models.get_entity_config200_response import GetEntityConfig200Response
39
+ from circle.web3.configurations.models.get_entity_config_response import GetEntityConfigResponse
40
+ from circle.web3.configurations.models.get_monitored_tokens_response import GetMonitoredTokensResponse
41
+ from circle.web3.configurations.models.get_notification_signature import GetNotificationSignature
42
+ from circle.web3.configurations.models.get_public_key200_response import GetPublicKey200Response
43
+ from circle.web3.configurations.models.get_public_key_response import GetPublicKeyResponse
44
+ from circle.web3.configurations.models.list_monitored_tokens200_response import ListMonitoredTokens200Response
45
+ from circle.web3.configurations.models.list_monitored_tokens200_response_response import ListMonitoredTokens200ResponseResponse
46
+ from circle.web3.configurations.models.notification_signature_public_key import NotificationSignaturePublicKey
47
+ from circle.web3.configurations.models.post_monitored_tokens_request import PostMonitoredTokensRequest
48
+ from circle.web3.configurations.models.post_monitored_tokens_response import PostMonitoredTokensResponse
49
+ from circle.web3.configurations.models.put_monitored_tokens_request import PutMonitoredTokensRequest
50
+ from circle.web3.configurations.models.put_monitored_tokens_response import PutMonitoredTokensResponse
51
+ from circle.web3.configurations.models.put_monitored_tokens_scope_request import PutMonitoredTokensScopeRequest
52
+ from circle.web3.configurations.models.status import Status
53
+ from circle.web3.configurations.models.testnet_blockchain import TestnetBlockchain
54
+ from circle.web3.configurations.models.token_monitor_scope import TokenMonitorScope
55
+ from circle.web3.configurations.models.token_response import TokenResponse
56
+ from circle.web3.configurations.models.token_standard import TokenStandard
57
+ from circle.web3.configurations.models.update_monitored_tokens200_response import UpdateMonitoredTokens200Response
@@ -0,0 +1,8 @@
1
+ # flake8: noqa
2
+
3
+ # import apis into api package
4
+ from circle.web3.configurations.api.developer_account_api import DeveloperAccountApi
5
+ from circle.web3.configurations.api.faucet_api import FaucetApi
6
+ from circle.web3.configurations.api.monitor_tokens_api import MonitorTokensApi
7
+ from circle.web3.configurations.api.webhook_subscriptions_api import WebhookSubscriptionsApi
8
+
@@ -0,0 +1,301 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ The version of the OpenAPI document: 1.0
5
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
6
+
7
+ Do not edit the class manually.
8
+ """ # noqa: E501
9
+
10
+
11
+ import re # noqa: F401
12
+ import io
13
+ import warnings
14
+
15
+ from pydantic import validate_arguments, ValidationError
16
+ from typing_extensions import Annotated
17
+
18
+ from circle.web3.configurations.models.get_entity_config200_response import GetEntityConfig200Response
19
+ from circle.web3.configurations.models.get_public_key200_response import GetPublicKey200Response
20
+
21
+ from circle.web3.configurations.api_client import ApiClient
22
+ from circle.web3.configurations.api_response import ApiResponse
23
+ from circle.web3.configurations.exceptions import ( # noqa: F401
24
+ ApiTypeError,
25
+ ApiValueError
26
+ )
27
+
28
+
29
+ class DeveloperAccountApi(object):
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None):
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+ @validate_arguments
42
+ def get_entity_config(self, **kwargs) -> GetEntityConfig200Response: # noqa: E501
43
+ """Get configuration for entity # noqa: E501
44
+
45
+ Get the app ID associated to the entity. # noqa: E501
46
+ This method makes a synchronous HTTP request by default. To make an
47
+ asynchronous HTTP request, please pass async_req=True
48
+
49
+ >>> thread = api.get_entity_config(async_req=True)
50
+ >>> result = thread.get()
51
+
52
+ :param async_req: Whether to execute the request asynchronously.
53
+ :type async_req: bool, optional
54
+ :param _request_timeout: timeout setting for this request. If one
55
+ number provided, it will be total request
56
+ timeout. It can also be a pair (tuple) of
57
+ (connection, read) timeouts.
58
+ :return: Returns the result object.
59
+ If the method is called asynchronously,
60
+ returns the request thread.
61
+ :rtype: GetEntityConfig200Response
62
+ """
63
+ kwargs['_return_http_data_only'] = True
64
+ if '_preload_content' in kwargs:
65
+ raise ValueError("Error! Please call the get_entity_config_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
66
+ return self.get_entity_config_with_http_info(**kwargs) # noqa: E501
67
+
68
+ @validate_arguments
69
+ def get_entity_config_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
70
+ """Get configuration for entity # noqa: E501
71
+
72
+ Get the app ID associated to the entity. # noqa: E501
73
+ This method makes a synchronous HTTP request by default. To make an
74
+ asynchronous HTTP request, please pass async_req=True
75
+
76
+ >>> thread = api.get_entity_config_with_http_info(async_req=True)
77
+ >>> result = thread.get()
78
+
79
+ :param async_req: Whether to execute the request asynchronously.
80
+ :type async_req: bool, optional
81
+ :param _preload_content: if False, the ApiResponse.data will
82
+ be set to none and raw_data will store the
83
+ HTTP response body without reading/decoding.
84
+ Default is True.
85
+ :type _preload_content: bool, optional
86
+ :param _return_http_data_only: response data instead of ApiResponse
87
+ object with status code, headers, etc
88
+ :type _return_http_data_only: bool, optional
89
+ :param _request_timeout: timeout setting for this request. If one
90
+ number provided, it will be total request
91
+ timeout. It can also be a pair (tuple) of
92
+ (connection, read) timeouts.
93
+ :param _request_auth: set to override the auth_settings for an a single
94
+ request; this effectively ignores the authentication
95
+ in the spec for a single request.
96
+ :type _request_auth: dict, optional
97
+ :type _content_type: string, optional: force content-type for the request
98
+ :return: Returns the result object.
99
+ If the method is called asynchronously,
100
+ returns the request thread.
101
+ :rtype: tuple(GetEntityConfig200Response, status_code(int), headers(HTTPHeaderDict))
102
+ """
103
+
104
+ _params = locals()
105
+
106
+ _all_params = [
107
+ ]
108
+ _all_params.extend(
109
+ [
110
+ 'async_req',
111
+ '_return_http_data_only',
112
+ '_preload_content',
113
+ '_request_timeout',
114
+ '_request_auth',
115
+ '_content_type',
116
+ '_headers'
117
+ ]
118
+ )
119
+
120
+ # validate the arguments
121
+ for _key, _val in _params['kwargs'].items():
122
+ if _key not in _all_params:
123
+ raise ApiTypeError(
124
+ "Got an unexpected keyword argument '%s'"
125
+ " to method get_entity_config" % _key
126
+ )
127
+ _params[_key] = _val
128
+ del _params['kwargs']
129
+
130
+ _collection_formats = {}
131
+
132
+ # process the path parameters
133
+ _path_params = {}
134
+
135
+ # process the query parameters
136
+ _query_params = []
137
+ # process the header parameters
138
+ _header_params = dict(_params.get('_headers', {}))
139
+ # process the form parameters
140
+ _form_params = []
141
+ _files = {}
142
+ # process the body parameter
143
+ _body_params = None
144
+ # set the HTTP header `Accept`
145
+ _header_params['Accept'] = self.api_client.select_header_accept(
146
+ ['application/json']) # noqa: E501
147
+
148
+ # authentication setting
149
+ _auth_settings = ['BearerAuth'] # noqa: E501
150
+
151
+ _response_types_map = {
152
+ '200': "GetEntityConfig200Response",
153
+ }
154
+
155
+ return self.api_client.call_api(
156
+ '/v1/w3s/config/entity', 'GET',
157
+ _path_params,
158
+ _query_params,
159
+ _header_params,
160
+ body=_body_params,
161
+ post_params=_form_params,
162
+ files=_files,
163
+ response_types_map=_response_types_map,
164
+ auth_settings=_auth_settings,
165
+ async_req=_params.get('async_req'),
166
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
167
+ _preload_content=_params.get('_preload_content', True),
168
+ _request_timeout=_params.get('_request_timeout'),
169
+ collection_formats=_collection_formats,
170
+ _request_auth=_params.get('_request_auth'))
171
+
172
+ @validate_arguments
173
+ def get_public_key(self, **kwargs) -> GetPublicKey200Response: # noqa: E501
174
+ """Get public key for entity # noqa: E501
175
+
176
+ Get the public key associated with the entity. # noqa: E501
177
+ This method makes a synchronous HTTP request by default. To make an
178
+ asynchronous HTTP request, please pass async_req=True
179
+
180
+ >>> thread = api.get_public_key(async_req=True)
181
+ >>> result = thread.get()
182
+
183
+ :param async_req: Whether to execute the request asynchronously.
184
+ :type async_req: bool, optional
185
+ :param _request_timeout: timeout setting for this request. If one
186
+ number provided, it will be total request
187
+ timeout. It can also be a pair (tuple) of
188
+ (connection, read) timeouts.
189
+ :return: Returns the result object.
190
+ If the method is called asynchronously,
191
+ returns the request thread.
192
+ :rtype: GetPublicKey200Response
193
+ """
194
+ kwargs['_return_http_data_only'] = True
195
+ if '_preload_content' in kwargs:
196
+ raise ValueError("Error! Please call the get_public_key_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
197
+ return self.get_public_key_with_http_info(**kwargs) # noqa: E501
198
+
199
+ @validate_arguments
200
+ def get_public_key_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
201
+ """Get public key for entity # noqa: E501
202
+
203
+ Get the public key associated with the entity. # noqa: E501
204
+ This method makes a synchronous HTTP request by default. To make an
205
+ asynchronous HTTP request, please pass async_req=True
206
+
207
+ >>> thread = api.get_public_key_with_http_info(async_req=True)
208
+ >>> result = thread.get()
209
+
210
+ :param async_req: Whether to execute the request asynchronously.
211
+ :type async_req: bool, optional
212
+ :param _preload_content: if False, the ApiResponse.data will
213
+ be set to none and raw_data will store the
214
+ HTTP response body without reading/decoding.
215
+ Default is True.
216
+ :type _preload_content: bool, optional
217
+ :param _return_http_data_only: response data instead of ApiResponse
218
+ object with status code, headers, etc
219
+ :type _return_http_data_only: bool, optional
220
+ :param _request_timeout: timeout setting for this request. If one
221
+ number provided, it will be total request
222
+ timeout. It can also be a pair (tuple) of
223
+ (connection, read) timeouts.
224
+ :param _request_auth: set to override the auth_settings for an a single
225
+ request; this effectively ignores the authentication
226
+ in the spec for a single request.
227
+ :type _request_auth: dict, optional
228
+ :type _content_type: string, optional: force content-type for the request
229
+ :return: Returns the result object.
230
+ If the method is called asynchronously,
231
+ returns the request thread.
232
+ :rtype: tuple(GetPublicKey200Response, status_code(int), headers(HTTPHeaderDict))
233
+ """
234
+
235
+ _params = locals()
236
+
237
+ _all_params = [
238
+ ]
239
+ _all_params.extend(
240
+ [
241
+ 'async_req',
242
+ '_return_http_data_only',
243
+ '_preload_content',
244
+ '_request_timeout',
245
+ '_request_auth',
246
+ '_content_type',
247
+ '_headers'
248
+ ]
249
+ )
250
+
251
+ # validate the arguments
252
+ for _key, _val in _params['kwargs'].items():
253
+ if _key not in _all_params:
254
+ raise ApiTypeError(
255
+ "Got an unexpected keyword argument '%s'"
256
+ " to method get_public_key" % _key
257
+ )
258
+ _params[_key] = _val
259
+ del _params['kwargs']
260
+
261
+ _collection_formats = {}
262
+
263
+ # process the path parameters
264
+ _path_params = {}
265
+
266
+ # process the query parameters
267
+ _query_params = []
268
+ # process the header parameters
269
+ _header_params = dict(_params.get('_headers', {}))
270
+ # process the form parameters
271
+ _form_params = []
272
+ _files = {}
273
+ # process the body parameter
274
+ _body_params = None
275
+ # set the HTTP header `Accept`
276
+ _header_params['Accept'] = self.api_client.select_header_accept(
277
+ ['application/json']) # noqa: E501
278
+
279
+ # authentication setting
280
+ _auth_settings = ['BearerAuth'] # noqa: E501
281
+
282
+ _response_types_map = {
283
+ '200': "GetPublicKey200Response",
284
+ }
285
+
286
+ return self.api_client.call_api(
287
+ '/v1/w3s/config/entity/publicKey', 'GET',
288
+ _path_params,
289
+ _query_params,
290
+ _header_params,
291
+ body=_body_params,
292
+ post_params=_form_params,
293
+ files=_files,
294
+ response_types_map=_response_types_map,
295
+ auth_settings=_auth_settings,
296
+ async_req=_params.get('async_req'),
297
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
298
+ _preload_content=_params.get('_preload_content', True),
299
+ _request_timeout=_params.get('_request_timeout'),
300
+ collection_formats=_collection_formats,
301
+ _request_auth=_params.get('_request_auth'))
@@ -0,0 +1,194 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ The version of the OpenAPI document: 1.0
5
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
6
+
7
+ Do not edit the class manually.
8
+ """ # noqa: E501
9
+
10
+
11
+ import re # noqa: F401
12
+ import io
13
+ import warnings
14
+
15
+ from pydantic import validate_arguments, ValidationError
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import Field, StrictStr
19
+
20
+ from typing import Optional
21
+
22
+ from circle.web3.configurations.models.faucet_request import FaucetRequest
23
+
24
+ from circle.web3.configurations.api_client import ApiClient
25
+ from circle.web3.configurations.api_response import ApiResponse
26
+ from circle.web3.configurations.exceptions import ( # noqa: F401
27
+ ApiTypeError,
28
+ ApiValueError
29
+ )
30
+
31
+
32
+ class FaucetApi(object):
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None):
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+ @validate_arguments
45
+ def request_testnet_tokens(self, x_request_id : Annotated[Optional[StrictStr], Field(description="Universally unique identifier (UUID v4) for the request. Helpful for identifying a request when communicating with Circle support.")] = None, faucet_request : Optional[FaucetRequest] = None, **kwargs) -> None: # noqa: E501
46
+ """Request testnet tokens # noqa: E501
47
+
48
+ Request testnet tokens for your wallet. # noqa: E501
49
+ This method makes a synchronous HTTP request by default. To make an
50
+ asynchronous HTTP request, please pass async_req=True
51
+
52
+ >>> thread = api.request_testnet_tokens(x_request_id, faucet_request, async_req=True)
53
+ >>> result = thread.get()
54
+
55
+ :param x_request_id: Universally unique identifier (UUID v4) for the request. Helpful for identifying a request when communicating with Circle support.
56
+ :type x_request_id: str
57
+ :param faucet_request:
58
+ :type faucet_request: FaucetRequest
59
+ :param async_req: Whether to execute the request asynchronously.
60
+ :type async_req: bool, optional
61
+ :param _request_timeout: timeout setting for this request. If one
62
+ number provided, it will be total request
63
+ timeout. It can also be a pair (tuple) of
64
+ (connection, read) timeouts.
65
+ :return: Returns the result object.
66
+ If the method is called asynchronously,
67
+ returns the request thread.
68
+ :rtype: None
69
+ """
70
+ kwargs['_return_http_data_only'] = True
71
+ if '_preload_content' in kwargs:
72
+ raise ValueError("Error! Please call the request_testnet_tokens_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
73
+ return self.request_testnet_tokens_with_http_info(x_request_id, faucet_request, **kwargs) # noqa: E501
74
+
75
+ @validate_arguments
76
+ def request_testnet_tokens_with_http_info(self, x_request_id : Annotated[Optional[StrictStr], Field(description="Universally unique identifier (UUID v4) for the request. Helpful for identifying a request when communicating with Circle support.")] = None, faucet_request : Optional[FaucetRequest] = None, **kwargs) -> ApiResponse: # noqa: E501
77
+ """Request testnet tokens # noqa: E501
78
+
79
+ Request testnet tokens for your wallet. # noqa: E501
80
+ This method makes a synchronous HTTP request by default. To make an
81
+ asynchronous HTTP request, please pass async_req=True
82
+
83
+ >>> thread = api.request_testnet_tokens_with_http_info(x_request_id, faucet_request, async_req=True)
84
+ >>> result = thread.get()
85
+
86
+ :param x_request_id: Universally unique identifier (UUID v4) for the request. Helpful for identifying a request when communicating with Circle support.
87
+ :type x_request_id: str
88
+ :param faucet_request:
89
+ :type faucet_request: FaucetRequest
90
+ :param async_req: Whether to execute the request asynchronously.
91
+ :type async_req: bool, optional
92
+ :param _preload_content: if False, the ApiResponse.data will
93
+ be set to none and raw_data will store the
94
+ HTTP response body without reading/decoding.
95
+ Default is True.
96
+ :type _preload_content: bool, optional
97
+ :param _return_http_data_only: response data instead of ApiResponse
98
+ object with status code, headers, etc
99
+ :type _return_http_data_only: bool, optional
100
+ :param _request_timeout: timeout setting for this request. If one
101
+ number provided, it will be total request
102
+ timeout. It can also be a pair (tuple) of
103
+ (connection, read) timeouts.
104
+ :param _request_auth: set to override the auth_settings for an a single
105
+ request; this effectively ignores the authentication
106
+ in the spec for a single request.
107
+ :type _request_auth: dict, optional
108
+ :type _content_type: string, optional: force content-type for the request
109
+ :return: Returns the result object.
110
+ If the method is called asynchronously,
111
+ returns the request thread.
112
+ :rtype: None
113
+ """
114
+
115
+ _params = locals()
116
+
117
+ _all_params = [
118
+ 'x_request_id',
119
+ 'faucet_request'
120
+ ]
121
+ _all_params.extend(
122
+ [
123
+ 'async_req',
124
+ '_return_http_data_only',
125
+ '_preload_content',
126
+ '_request_timeout',
127
+ '_request_auth',
128
+ '_content_type',
129
+ '_headers'
130
+ ]
131
+ )
132
+
133
+ # validate the arguments
134
+ for _key, _val in _params['kwargs'].items():
135
+ if _key not in _all_params:
136
+ raise ApiTypeError(
137
+ "Got an unexpected keyword argument '%s'"
138
+ " to method request_testnet_tokens" % _key
139
+ )
140
+ _params[_key] = _val
141
+ del _params['kwargs']
142
+
143
+ _collection_formats = {}
144
+
145
+ # process the path parameters
146
+ _path_params = {}
147
+
148
+ # process the query parameters
149
+ _query_params = []
150
+ # process the header parameters
151
+ _header_params = dict(_params.get('_headers', {}))
152
+ if _params['x_request_id']:
153
+ _header_params['X-Request-Id'] = _params['x_request_id']
154
+
155
+ # process the form parameters
156
+ _form_params = []
157
+ _files = {}
158
+ # process the body parameter
159
+ _body_params = None
160
+ if _params['faucet_request'] is not None:
161
+ _body_params = _params['faucet_request']
162
+
163
+ # set the HTTP header `Accept`
164
+ _header_params['Accept'] = self.api_client.select_header_accept(
165
+ ['application/json']) # noqa: E501
166
+
167
+ # set the HTTP header `Content-Type`
168
+ _content_types_list = _params.get('_content_type',
169
+ self.api_client.select_header_content_type(
170
+ ['application/json']))
171
+ if _content_types_list:
172
+ _header_params['Content-Type'] = _content_types_list
173
+
174
+ # authentication setting
175
+ _auth_settings = ['BearerAuth'] # noqa: E501
176
+
177
+ _response_types_map = {}
178
+
179
+ return self.api_client.call_api(
180
+ '/v1/faucet/drips', 'POST',
181
+ _path_params,
182
+ _query_params,
183
+ _header_params,
184
+ body=_body_params,
185
+ post_params=_form_params,
186
+ files=_files,
187
+ response_types_map=_response_types_map,
188
+ auth_settings=_auth_settings,
189
+ async_req=_params.get('async_req'),
190
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
191
+ _preload_content=_params.get('_preload_content', True),
192
+ _request_timeout=_params.get('_request_timeout'),
193
+ collection_formats=_collection_formats,
194
+ _request_auth=_params.get('_request_auth'))