lighter-sdk 0.1.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- lighter/__init__.py +140 -0
- lighter/api/__init__.py +11 -0
- lighter/api/account_api.py +2371 -0
- lighter/api/block_api.py +863 -0
- lighter/api/candlestick_api.py +718 -0
- lighter/api/info_api.py +282 -0
- lighter/api/order_api.py +2734 -0
- lighter/api/root_api.py +529 -0
- lighter/api/transaction_api.py +3525 -0
- lighter/api_client.py +784 -0
- lighter/api_response.py +21 -0
- lighter/configuration.py +475 -0
- lighter/exceptions.py +199 -0
- lighter/models/__init__.py +112 -0
- lighter/models/account.py +110 -0
- lighter/models/account_api_keys.py +104 -0
- lighter/models/account_market_stats.py +98 -0
- lighter/models/account_metadata.py +94 -0
- lighter/models/account_pn_l.py +106 -0
- lighter/models/account_position.py +112 -0
- lighter/models/account_stats.py +102 -0
- lighter/models/accounts.py +106 -0
- lighter/models/api_key.py +98 -0
- lighter/models/block.py +124 -0
- lighter/models/blocks.py +106 -0
- lighter/models/bridge_supported_network.py +96 -0
- lighter/models/candlestick.py +106 -0
- lighter/models/candlesticks.py +106 -0
- lighter/models/contract_address.py +94 -0
- lighter/models/current_height.py +96 -0
- lighter/models/cursor.py +92 -0
- lighter/models/deposit_history.py +106 -0
- lighter/models/deposit_history_item.py +105 -0
- lighter/models/detailed_account.py +152 -0
- lighter/models/detailed_accounts.py +106 -0
- lighter/models/detailed_candlestick.py +108 -0
- lighter/models/enriched_tx.py +129 -0
- lighter/models/exchange_stats.py +110 -0
- lighter/models/fee_bucket.py +96 -0
- lighter/models/funding.py +98 -0
- lighter/models/fundings.py +106 -0
- lighter/models/is_whitelisted.py +98 -0
- lighter/models/l1_provider_info.py +98 -0
- lighter/models/layer2_basic_info.py +100 -0
- lighter/models/liquidation.py +100 -0
- lighter/models/market_info.py +116 -0
- lighter/models/next_nonce.py +96 -0
- lighter/models/order.py +159 -0
- lighter/models/order_book.py +119 -0
- lighter/models/order_book_depth.py +115 -0
- lighter/models/order_book_detail.py +151 -0
- lighter/models/order_book_details.py +104 -0
- lighter/models/order_book_orders.py +117 -0
- lighter/models/order_book_stats.py +102 -0
- lighter/models/order_books.py +104 -0
- lighter/models/orders.py +106 -0
- lighter/models/pn_l_entry.py +94 -0
- lighter/models/position_funding.py +111 -0
- lighter/models/price_level.py +94 -0
- lighter/models/public_pool.py +128 -0
- lighter/models/public_pool_info.py +100 -0
- lighter/models/public_pool_share.py +96 -0
- lighter/models/public_pools.py +106 -0
- lighter/models/req_get_account.py +101 -0
- lighter/models/req_get_account_active_orders.py +96 -0
- lighter/models/req_get_account_api_keys.py +94 -0
- lighter/models/req_get_account_by_l1_address.py +92 -0
- lighter/models/req_get_account_inactive_orders.py +103 -0
- lighter/models/req_get_account_orders.py +99 -0
- lighter/models/req_get_account_pending_txs.py +106 -0
- lighter/models/req_get_account_pn_l.py +118 -0
- lighter/models/req_get_account_txs.py +111 -0
- lighter/models/req_get_block.py +101 -0
- lighter/models/req_get_block_txs.py +101 -0
- lighter/models/req_get_by_account.py +101 -0
- lighter/models/req_get_candlesticks.py +109 -0
- lighter/models/req_get_deposit_history.py +106 -0
- lighter/models/req_get_fee_bucket.py +92 -0
- lighter/models/req_get_fundings.py +107 -0
- lighter/models/req_get_l1_tx.py +92 -0
- lighter/models/req_get_latest_deposit.py +92 -0
- lighter/models/req_get_next_nonce.py +94 -0
- lighter/models/req_get_order_book_details.py +92 -0
- lighter/models/req_get_order_book_orders.py +95 -0
- lighter/models/req_get_order_books.py +92 -0
- lighter/models/req_get_public_pools.py +109 -0
- lighter/models/req_get_range_with_cursor.py +95 -0
- lighter/models/req_get_range_with_index.py +95 -0
- lighter/models/req_get_range_with_index_sortable.py +107 -0
- lighter/models/req_get_recent_trades.py +95 -0
- lighter/models/req_get_trades.py +126 -0
- lighter/models/req_get_tx.py +101 -0
- lighter/models/req_get_withdraw_history.py +106 -0
- lighter/models/req_is_whitelisted.py +92 -0
- lighter/models/result_code.py +94 -0
- lighter/models/simple_order.py +102 -0
- lighter/models/status.py +94 -0
- lighter/models/sub_accounts.py +106 -0
- lighter/models/ticker.py +103 -0
- lighter/models/trade.py +125 -0
- lighter/models/trades.py +106 -0
- lighter/models/tx.py +121 -0
- lighter/models/tx_hash.py +96 -0
- lighter/models/tx_hashes.py +96 -0
- lighter/models/txs.py +104 -0
- lighter/models/validator_info.py +94 -0
- lighter/models/withdraw_history.py +110 -0
- lighter/models/withdraw_history_cursor.py +94 -0
- lighter/models/withdraw_history_item.py +114 -0
- lighter/models/zk_lighter_info.py +92 -0
- lighter/py.typed +0 -0
- lighter/rest.py +215 -0
- lighter/signer_client.py +440 -0
- lighter/signers/signer-amd64.so +0 -0
- lighter/signers/signer-arm64.dylib +0 -0
- lighter/transactions/__init__.py +3 -0
- lighter/transactions/cancel_order.py +27 -0
- lighter/transactions/create_order.py +33 -0
- lighter/transactions/withdraw.py +25 -0
- lighter/ws_client.py +160 -0
- lighter_sdk-0.1.0.dist-info/LICENSE +201 -0
- lighter_sdk-0.1.0.dist-info/METADATA +26 -0
- lighter_sdk-0.1.0.dist-info/RECORD +125 -0
- lighter_sdk-0.1.0.dist-info/WHEEL +5 -0
- lighter_sdk-0.1.0.dist-info/top_level.txt +1 -0
lighter/api/root_api.py
ADDED
@@ -0,0 +1,529 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document:
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
import warnings
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
|
+
from typing_extensions import Annotated
|
18
|
+
|
19
|
+
from lighter.models.status import Status
|
20
|
+
from lighter.models.zk_lighter_info import ZkLighterInfo
|
21
|
+
|
22
|
+
from lighter.api_client import ApiClient, RequestSerialized
|
23
|
+
from lighter.api_response import ApiResponse
|
24
|
+
from lighter.rest import RESTResponseType
|
25
|
+
|
26
|
+
|
27
|
+
class RootApi:
|
28
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
29
|
+
Ref: https://openapi-generator.tech
|
30
|
+
|
31
|
+
Do not edit the class manually.
|
32
|
+
"""
|
33
|
+
|
34
|
+
def __init__(self, api_client=None) -> None:
|
35
|
+
if api_client is None:
|
36
|
+
api_client = ApiClient.get_default()
|
37
|
+
self.api_client = api_client
|
38
|
+
|
39
|
+
|
40
|
+
@validate_call
|
41
|
+
async def info(
|
42
|
+
self,
|
43
|
+
_request_timeout: Union[
|
44
|
+
None,
|
45
|
+
Annotated[StrictFloat, Field(gt=0)],
|
46
|
+
Tuple[
|
47
|
+
Annotated[StrictFloat, Field(gt=0)],
|
48
|
+
Annotated[StrictFloat, Field(gt=0)]
|
49
|
+
]
|
50
|
+
] = None,
|
51
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
52
|
+
_content_type: Optional[StrictStr] = None,
|
53
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
54
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
55
|
+
) -> ZkLighterInfo:
|
56
|
+
"""info
|
57
|
+
|
58
|
+
Get info of zklighter
|
59
|
+
|
60
|
+
:param _request_timeout: timeout setting for this request. If one
|
61
|
+
number provided, it will be total request
|
62
|
+
timeout. It can also be a pair (tuple) of
|
63
|
+
(connection, read) timeouts.
|
64
|
+
:type _request_timeout: int, tuple(int, int), optional
|
65
|
+
:param _request_auth: set to override the auth_settings for an a single
|
66
|
+
request; this effectively ignores the
|
67
|
+
authentication in the spec for a single request.
|
68
|
+
:type _request_auth: dict, optional
|
69
|
+
:param _content_type: force content-type for the request.
|
70
|
+
:type _content_type: str, Optional
|
71
|
+
:param _headers: set to override the headers for a single
|
72
|
+
request; this effectively ignores the headers
|
73
|
+
in the spec for a single request.
|
74
|
+
:type _headers: dict, optional
|
75
|
+
:param _host_index: set to override the host_index for a single
|
76
|
+
request; this effectively ignores the host_index
|
77
|
+
in the spec for a single request.
|
78
|
+
:type _host_index: int, optional
|
79
|
+
:return: Returns the result object.
|
80
|
+
""" # noqa: E501
|
81
|
+
|
82
|
+
_param = self._info_serialize(
|
83
|
+
_request_auth=_request_auth,
|
84
|
+
_content_type=_content_type,
|
85
|
+
_headers=_headers,
|
86
|
+
_host_index=_host_index
|
87
|
+
)
|
88
|
+
|
89
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
90
|
+
'200': "ZkLighterInfo",
|
91
|
+
'400': "ResultCode",
|
92
|
+
}
|
93
|
+
response_data = await self.api_client.call_api(
|
94
|
+
*_param,
|
95
|
+
_request_timeout=_request_timeout
|
96
|
+
)
|
97
|
+
await response_data.read()
|
98
|
+
return self.api_client.response_deserialize(
|
99
|
+
response_data=response_data,
|
100
|
+
response_types_map=_response_types_map,
|
101
|
+
).data
|
102
|
+
|
103
|
+
|
104
|
+
@validate_call
|
105
|
+
async def info_with_http_info(
|
106
|
+
self,
|
107
|
+
_request_timeout: Union[
|
108
|
+
None,
|
109
|
+
Annotated[StrictFloat, Field(gt=0)],
|
110
|
+
Tuple[
|
111
|
+
Annotated[StrictFloat, Field(gt=0)],
|
112
|
+
Annotated[StrictFloat, Field(gt=0)]
|
113
|
+
]
|
114
|
+
] = None,
|
115
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
116
|
+
_content_type: Optional[StrictStr] = None,
|
117
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
118
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
119
|
+
) -> ApiResponse[ZkLighterInfo]:
|
120
|
+
"""info
|
121
|
+
|
122
|
+
Get info of zklighter
|
123
|
+
|
124
|
+
:param _request_timeout: timeout setting for this request. If one
|
125
|
+
number provided, it will be total request
|
126
|
+
timeout. It can also be a pair (tuple) of
|
127
|
+
(connection, read) timeouts.
|
128
|
+
:type _request_timeout: int, tuple(int, int), optional
|
129
|
+
:param _request_auth: set to override the auth_settings for an a single
|
130
|
+
request; this effectively ignores the
|
131
|
+
authentication in the spec for a single request.
|
132
|
+
:type _request_auth: dict, optional
|
133
|
+
:param _content_type: force content-type for the request.
|
134
|
+
:type _content_type: str, Optional
|
135
|
+
:param _headers: set to override the headers for a single
|
136
|
+
request; this effectively ignores the headers
|
137
|
+
in the spec for a single request.
|
138
|
+
:type _headers: dict, optional
|
139
|
+
:param _host_index: set to override the host_index for a single
|
140
|
+
request; this effectively ignores the host_index
|
141
|
+
in the spec for a single request.
|
142
|
+
:type _host_index: int, optional
|
143
|
+
:return: Returns the result object.
|
144
|
+
""" # noqa: E501
|
145
|
+
|
146
|
+
_param = self._info_serialize(
|
147
|
+
_request_auth=_request_auth,
|
148
|
+
_content_type=_content_type,
|
149
|
+
_headers=_headers,
|
150
|
+
_host_index=_host_index
|
151
|
+
)
|
152
|
+
|
153
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
154
|
+
'200': "ZkLighterInfo",
|
155
|
+
'400': "ResultCode",
|
156
|
+
}
|
157
|
+
response_data = await self.api_client.call_api(
|
158
|
+
*_param,
|
159
|
+
_request_timeout=_request_timeout
|
160
|
+
)
|
161
|
+
await response_data.read()
|
162
|
+
return self.api_client.response_deserialize(
|
163
|
+
response_data=response_data,
|
164
|
+
response_types_map=_response_types_map,
|
165
|
+
)
|
166
|
+
|
167
|
+
|
168
|
+
@validate_call
|
169
|
+
async def info_without_preload_content(
|
170
|
+
self,
|
171
|
+
_request_timeout: Union[
|
172
|
+
None,
|
173
|
+
Annotated[StrictFloat, Field(gt=0)],
|
174
|
+
Tuple[
|
175
|
+
Annotated[StrictFloat, Field(gt=0)],
|
176
|
+
Annotated[StrictFloat, Field(gt=0)]
|
177
|
+
]
|
178
|
+
] = None,
|
179
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
180
|
+
_content_type: Optional[StrictStr] = None,
|
181
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
182
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
183
|
+
) -> RESTResponseType:
|
184
|
+
"""info
|
185
|
+
|
186
|
+
Get info of zklighter
|
187
|
+
|
188
|
+
:param _request_timeout: timeout setting for this request. If one
|
189
|
+
number provided, it will be total request
|
190
|
+
timeout. It can also be a pair (tuple) of
|
191
|
+
(connection, read) timeouts.
|
192
|
+
:type _request_timeout: int, tuple(int, int), optional
|
193
|
+
:param _request_auth: set to override the auth_settings for an a single
|
194
|
+
request; this effectively ignores the
|
195
|
+
authentication in the spec for a single request.
|
196
|
+
:type _request_auth: dict, optional
|
197
|
+
:param _content_type: force content-type for the request.
|
198
|
+
:type _content_type: str, Optional
|
199
|
+
:param _headers: set to override the headers for a single
|
200
|
+
request; this effectively ignores the headers
|
201
|
+
in the spec for a single request.
|
202
|
+
:type _headers: dict, optional
|
203
|
+
:param _host_index: set to override the host_index for a single
|
204
|
+
request; this effectively ignores the host_index
|
205
|
+
in the spec for a single request.
|
206
|
+
:type _host_index: int, optional
|
207
|
+
:return: Returns the result object.
|
208
|
+
""" # noqa: E501
|
209
|
+
|
210
|
+
_param = self._info_serialize(
|
211
|
+
_request_auth=_request_auth,
|
212
|
+
_content_type=_content_type,
|
213
|
+
_headers=_headers,
|
214
|
+
_host_index=_host_index
|
215
|
+
)
|
216
|
+
|
217
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
218
|
+
'200': "ZkLighterInfo",
|
219
|
+
'400': "ResultCode",
|
220
|
+
}
|
221
|
+
response_data = await self.api_client.call_api(
|
222
|
+
*_param,
|
223
|
+
_request_timeout=_request_timeout
|
224
|
+
)
|
225
|
+
return response_data.response
|
226
|
+
|
227
|
+
|
228
|
+
def _info_serialize(
|
229
|
+
self,
|
230
|
+
_request_auth,
|
231
|
+
_content_type,
|
232
|
+
_headers,
|
233
|
+
_host_index,
|
234
|
+
) -> RequestSerialized:
|
235
|
+
|
236
|
+
_host = None
|
237
|
+
|
238
|
+
_collection_formats: Dict[str, str] = {
|
239
|
+
}
|
240
|
+
|
241
|
+
_path_params: Dict[str, str] = {}
|
242
|
+
_query_params: List[Tuple[str, str]] = []
|
243
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
244
|
+
_form_params: List[Tuple[str, str]] = []
|
245
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
246
|
+
_body_params: Optional[bytes] = None
|
247
|
+
|
248
|
+
# process the path parameters
|
249
|
+
# process the query parameters
|
250
|
+
# process the header parameters
|
251
|
+
# process the form parameters
|
252
|
+
# process the body parameter
|
253
|
+
|
254
|
+
|
255
|
+
# set the HTTP header `Accept`
|
256
|
+
if 'Accept' not in _header_params:
|
257
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
258
|
+
[
|
259
|
+
'application/json'
|
260
|
+
]
|
261
|
+
)
|
262
|
+
|
263
|
+
|
264
|
+
# authentication setting
|
265
|
+
_auth_settings: List[str] = [
|
266
|
+
]
|
267
|
+
|
268
|
+
return self.api_client.param_serialize(
|
269
|
+
method='GET',
|
270
|
+
resource_path='/info',
|
271
|
+
path_params=_path_params,
|
272
|
+
query_params=_query_params,
|
273
|
+
header_params=_header_params,
|
274
|
+
body=_body_params,
|
275
|
+
post_params=_form_params,
|
276
|
+
files=_files,
|
277
|
+
auth_settings=_auth_settings,
|
278
|
+
collection_formats=_collection_formats,
|
279
|
+
_host=_host,
|
280
|
+
_request_auth=_request_auth
|
281
|
+
)
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
@validate_call
|
287
|
+
async def status(
|
288
|
+
self,
|
289
|
+
_request_timeout: Union[
|
290
|
+
None,
|
291
|
+
Annotated[StrictFloat, Field(gt=0)],
|
292
|
+
Tuple[
|
293
|
+
Annotated[StrictFloat, Field(gt=0)],
|
294
|
+
Annotated[StrictFloat, Field(gt=0)]
|
295
|
+
]
|
296
|
+
] = None,
|
297
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
298
|
+
_content_type: Optional[StrictStr] = None,
|
299
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
300
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
301
|
+
) -> Status:
|
302
|
+
"""status
|
303
|
+
|
304
|
+
Get status of zklighter
|
305
|
+
|
306
|
+
:param _request_timeout: timeout setting for this request. If one
|
307
|
+
number provided, it will be total request
|
308
|
+
timeout. It can also be a pair (tuple) of
|
309
|
+
(connection, read) timeouts.
|
310
|
+
:type _request_timeout: int, tuple(int, int), optional
|
311
|
+
:param _request_auth: set to override the auth_settings for an a single
|
312
|
+
request; this effectively ignores the
|
313
|
+
authentication in the spec for a single request.
|
314
|
+
:type _request_auth: dict, optional
|
315
|
+
:param _content_type: force content-type for the request.
|
316
|
+
:type _content_type: str, Optional
|
317
|
+
:param _headers: set to override the headers for a single
|
318
|
+
request; this effectively ignores the headers
|
319
|
+
in the spec for a single request.
|
320
|
+
:type _headers: dict, optional
|
321
|
+
:param _host_index: set to override the host_index for a single
|
322
|
+
request; this effectively ignores the host_index
|
323
|
+
in the spec for a single request.
|
324
|
+
:type _host_index: int, optional
|
325
|
+
:return: Returns the result object.
|
326
|
+
""" # noqa: E501
|
327
|
+
|
328
|
+
_param = self._status_serialize(
|
329
|
+
_request_auth=_request_auth,
|
330
|
+
_content_type=_content_type,
|
331
|
+
_headers=_headers,
|
332
|
+
_host_index=_host_index
|
333
|
+
)
|
334
|
+
|
335
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
336
|
+
'200': "Status",
|
337
|
+
'400': "ResultCode",
|
338
|
+
}
|
339
|
+
response_data = await self.api_client.call_api(
|
340
|
+
*_param,
|
341
|
+
_request_timeout=_request_timeout
|
342
|
+
)
|
343
|
+
await response_data.read()
|
344
|
+
return self.api_client.response_deserialize(
|
345
|
+
response_data=response_data,
|
346
|
+
response_types_map=_response_types_map,
|
347
|
+
).data
|
348
|
+
|
349
|
+
|
350
|
+
@validate_call
|
351
|
+
async def status_with_http_info(
|
352
|
+
self,
|
353
|
+
_request_timeout: Union[
|
354
|
+
None,
|
355
|
+
Annotated[StrictFloat, Field(gt=0)],
|
356
|
+
Tuple[
|
357
|
+
Annotated[StrictFloat, Field(gt=0)],
|
358
|
+
Annotated[StrictFloat, Field(gt=0)]
|
359
|
+
]
|
360
|
+
] = None,
|
361
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
362
|
+
_content_type: Optional[StrictStr] = None,
|
363
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
364
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
365
|
+
) -> ApiResponse[Status]:
|
366
|
+
"""status
|
367
|
+
|
368
|
+
Get status of zklighter
|
369
|
+
|
370
|
+
:param _request_timeout: timeout setting for this request. If one
|
371
|
+
number provided, it will be total request
|
372
|
+
timeout. It can also be a pair (tuple) of
|
373
|
+
(connection, read) timeouts.
|
374
|
+
:type _request_timeout: int, tuple(int, int), optional
|
375
|
+
:param _request_auth: set to override the auth_settings for an a single
|
376
|
+
request; this effectively ignores the
|
377
|
+
authentication in the spec for a single request.
|
378
|
+
:type _request_auth: dict, optional
|
379
|
+
:param _content_type: force content-type for the request.
|
380
|
+
:type _content_type: str, Optional
|
381
|
+
:param _headers: set to override the headers for a single
|
382
|
+
request; this effectively ignores the headers
|
383
|
+
in the spec for a single request.
|
384
|
+
:type _headers: dict, optional
|
385
|
+
:param _host_index: set to override the host_index for a single
|
386
|
+
request; this effectively ignores the host_index
|
387
|
+
in the spec for a single request.
|
388
|
+
:type _host_index: int, optional
|
389
|
+
:return: Returns the result object.
|
390
|
+
""" # noqa: E501
|
391
|
+
|
392
|
+
_param = self._status_serialize(
|
393
|
+
_request_auth=_request_auth,
|
394
|
+
_content_type=_content_type,
|
395
|
+
_headers=_headers,
|
396
|
+
_host_index=_host_index
|
397
|
+
)
|
398
|
+
|
399
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
400
|
+
'200': "Status",
|
401
|
+
'400': "ResultCode",
|
402
|
+
}
|
403
|
+
response_data = await self.api_client.call_api(
|
404
|
+
*_param,
|
405
|
+
_request_timeout=_request_timeout
|
406
|
+
)
|
407
|
+
await response_data.read()
|
408
|
+
return self.api_client.response_deserialize(
|
409
|
+
response_data=response_data,
|
410
|
+
response_types_map=_response_types_map,
|
411
|
+
)
|
412
|
+
|
413
|
+
|
414
|
+
@validate_call
|
415
|
+
async def status_without_preload_content(
|
416
|
+
self,
|
417
|
+
_request_timeout: Union[
|
418
|
+
None,
|
419
|
+
Annotated[StrictFloat, Field(gt=0)],
|
420
|
+
Tuple[
|
421
|
+
Annotated[StrictFloat, Field(gt=0)],
|
422
|
+
Annotated[StrictFloat, Field(gt=0)]
|
423
|
+
]
|
424
|
+
] = None,
|
425
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
426
|
+
_content_type: Optional[StrictStr] = None,
|
427
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
428
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
429
|
+
) -> RESTResponseType:
|
430
|
+
"""status
|
431
|
+
|
432
|
+
Get status of zklighter
|
433
|
+
|
434
|
+
:param _request_timeout: timeout setting for this request. If one
|
435
|
+
number provided, it will be total request
|
436
|
+
timeout. It can also be a pair (tuple) of
|
437
|
+
(connection, read) timeouts.
|
438
|
+
:type _request_timeout: int, tuple(int, int), optional
|
439
|
+
:param _request_auth: set to override the auth_settings for an a single
|
440
|
+
request; this effectively ignores the
|
441
|
+
authentication in the spec for a single request.
|
442
|
+
:type _request_auth: dict, optional
|
443
|
+
:param _content_type: force content-type for the request.
|
444
|
+
:type _content_type: str, Optional
|
445
|
+
:param _headers: set to override the headers for a single
|
446
|
+
request; this effectively ignores the headers
|
447
|
+
in the spec for a single request.
|
448
|
+
:type _headers: dict, optional
|
449
|
+
:param _host_index: set to override the host_index for a single
|
450
|
+
request; this effectively ignores the host_index
|
451
|
+
in the spec for a single request.
|
452
|
+
:type _host_index: int, optional
|
453
|
+
:return: Returns the result object.
|
454
|
+
""" # noqa: E501
|
455
|
+
|
456
|
+
_param = self._status_serialize(
|
457
|
+
_request_auth=_request_auth,
|
458
|
+
_content_type=_content_type,
|
459
|
+
_headers=_headers,
|
460
|
+
_host_index=_host_index
|
461
|
+
)
|
462
|
+
|
463
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
464
|
+
'200': "Status",
|
465
|
+
'400': "ResultCode",
|
466
|
+
}
|
467
|
+
response_data = await self.api_client.call_api(
|
468
|
+
*_param,
|
469
|
+
_request_timeout=_request_timeout
|
470
|
+
)
|
471
|
+
return response_data.response
|
472
|
+
|
473
|
+
|
474
|
+
def _status_serialize(
|
475
|
+
self,
|
476
|
+
_request_auth,
|
477
|
+
_content_type,
|
478
|
+
_headers,
|
479
|
+
_host_index,
|
480
|
+
) -> RequestSerialized:
|
481
|
+
|
482
|
+
_host = None
|
483
|
+
|
484
|
+
_collection_formats: Dict[str, str] = {
|
485
|
+
}
|
486
|
+
|
487
|
+
_path_params: Dict[str, str] = {}
|
488
|
+
_query_params: List[Tuple[str, str]] = []
|
489
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
490
|
+
_form_params: List[Tuple[str, str]] = []
|
491
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
492
|
+
_body_params: Optional[bytes] = None
|
493
|
+
|
494
|
+
# process the path parameters
|
495
|
+
# process the query parameters
|
496
|
+
# process the header parameters
|
497
|
+
# process the form parameters
|
498
|
+
# process the body parameter
|
499
|
+
|
500
|
+
|
501
|
+
# set the HTTP header `Accept`
|
502
|
+
if 'Accept' not in _header_params:
|
503
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
504
|
+
[
|
505
|
+
'application/json'
|
506
|
+
]
|
507
|
+
)
|
508
|
+
|
509
|
+
|
510
|
+
# authentication setting
|
511
|
+
_auth_settings: List[str] = [
|
512
|
+
]
|
513
|
+
|
514
|
+
return self.api_client.param_serialize(
|
515
|
+
method='GET',
|
516
|
+
resource_path='/',
|
517
|
+
path_params=_path_params,
|
518
|
+
query_params=_query_params,
|
519
|
+
header_params=_header_params,
|
520
|
+
body=_body_params,
|
521
|
+
post_params=_form_params,
|
522
|
+
files=_files,
|
523
|
+
auth_settings=_auth_settings,
|
524
|
+
collection_formats=_collection_formats,
|
525
|
+
_host=_host,
|
526
|
+
_request_auth=_request_auth
|
527
|
+
)
|
528
|
+
|
529
|
+
|