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
@@ -0,0 +1,3525 @@
|
|
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 pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
|
20
|
+
from typing import List, Optional
|
21
|
+
from typing_extensions import Annotated
|
22
|
+
from lighter.models.deposit_history import DepositHistory
|
23
|
+
from lighter.models.enriched_tx import EnrichedTx
|
24
|
+
from lighter.models.next_nonce import NextNonce
|
25
|
+
from lighter.models.tx_hash import TxHash
|
26
|
+
from lighter.models.tx_hashes import TxHashes
|
27
|
+
from lighter.models.txs import Txs
|
28
|
+
from lighter.models.withdraw_history import WithdrawHistory
|
29
|
+
|
30
|
+
from lighter.api_client import ApiClient, RequestSerialized
|
31
|
+
from lighter.api_response import ApiResponse
|
32
|
+
from lighter.rest import RESTResponseType
|
33
|
+
|
34
|
+
|
35
|
+
class TransactionApi:
|
36
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
37
|
+
Ref: https://openapi-generator.tech
|
38
|
+
|
39
|
+
Do not edit the class manually.
|
40
|
+
"""
|
41
|
+
|
42
|
+
def __init__(self, api_client=None) -> None:
|
43
|
+
if api_client is None:
|
44
|
+
api_client = ApiClient.get_default()
|
45
|
+
self.api_client = api_client
|
46
|
+
|
47
|
+
|
48
|
+
@validate_call
|
49
|
+
async def account_pending_txs(
|
50
|
+
self,
|
51
|
+
by: StrictStr,
|
52
|
+
value: StrictStr,
|
53
|
+
types: Optional[List[StrictInt]] = None,
|
54
|
+
_request_timeout: Union[
|
55
|
+
None,
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
57
|
+
Tuple[
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
59
|
+
Annotated[StrictFloat, Field(gt=0)]
|
60
|
+
]
|
61
|
+
] = None,
|
62
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
63
|
+
_content_type: Optional[StrictStr] = None,
|
64
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
65
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
66
|
+
) -> Txs:
|
67
|
+
"""accountPendingTxs
|
68
|
+
|
69
|
+
Get pending transactions of a specific account
|
70
|
+
|
71
|
+
:param by: (required)
|
72
|
+
:type by: str
|
73
|
+
:param value: (required)
|
74
|
+
:type value: str
|
75
|
+
:param types:
|
76
|
+
:type types: List[int]
|
77
|
+
:param _request_timeout: timeout setting for this request. If one
|
78
|
+
number provided, it will be total request
|
79
|
+
timeout. It can also be a pair (tuple) of
|
80
|
+
(connection, read) timeouts.
|
81
|
+
:type _request_timeout: int, tuple(int, int), optional
|
82
|
+
:param _request_auth: set to override the auth_settings for an a single
|
83
|
+
request; this effectively ignores the
|
84
|
+
authentication in the spec for a single request.
|
85
|
+
:type _request_auth: dict, optional
|
86
|
+
:param _content_type: force content-type for the request.
|
87
|
+
:type _content_type: str, Optional
|
88
|
+
:param _headers: set to override the headers for a single
|
89
|
+
request; this effectively ignores the headers
|
90
|
+
in the spec for a single request.
|
91
|
+
:type _headers: dict, optional
|
92
|
+
:param _host_index: set to override the host_index for a single
|
93
|
+
request; this effectively ignores the host_index
|
94
|
+
in the spec for a single request.
|
95
|
+
:type _host_index: int, optional
|
96
|
+
:return: Returns the result object.
|
97
|
+
""" # noqa: E501
|
98
|
+
|
99
|
+
_param = self._account_pending_txs_serialize(
|
100
|
+
by=by,
|
101
|
+
value=value,
|
102
|
+
types=types,
|
103
|
+
_request_auth=_request_auth,
|
104
|
+
_content_type=_content_type,
|
105
|
+
_headers=_headers,
|
106
|
+
_host_index=_host_index
|
107
|
+
)
|
108
|
+
|
109
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
110
|
+
'200': "Txs",
|
111
|
+
'400': "ResultCode",
|
112
|
+
}
|
113
|
+
response_data = await self.api_client.call_api(
|
114
|
+
*_param,
|
115
|
+
_request_timeout=_request_timeout
|
116
|
+
)
|
117
|
+
await response_data.read()
|
118
|
+
return self.api_client.response_deserialize(
|
119
|
+
response_data=response_data,
|
120
|
+
response_types_map=_response_types_map,
|
121
|
+
).data
|
122
|
+
|
123
|
+
|
124
|
+
@validate_call
|
125
|
+
async def account_pending_txs_with_http_info(
|
126
|
+
self,
|
127
|
+
by: StrictStr,
|
128
|
+
value: StrictStr,
|
129
|
+
types: Optional[List[StrictInt]] = None,
|
130
|
+
_request_timeout: Union[
|
131
|
+
None,
|
132
|
+
Annotated[StrictFloat, Field(gt=0)],
|
133
|
+
Tuple[
|
134
|
+
Annotated[StrictFloat, Field(gt=0)],
|
135
|
+
Annotated[StrictFloat, Field(gt=0)]
|
136
|
+
]
|
137
|
+
] = None,
|
138
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
139
|
+
_content_type: Optional[StrictStr] = None,
|
140
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
141
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
142
|
+
) -> ApiResponse[Txs]:
|
143
|
+
"""accountPendingTxs
|
144
|
+
|
145
|
+
Get pending transactions of a specific account
|
146
|
+
|
147
|
+
:param by: (required)
|
148
|
+
:type by: str
|
149
|
+
:param value: (required)
|
150
|
+
:type value: str
|
151
|
+
:param types:
|
152
|
+
:type types: List[int]
|
153
|
+
:param _request_timeout: timeout setting for this request. If one
|
154
|
+
number provided, it will be total request
|
155
|
+
timeout. It can also be a pair (tuple) of
|
156
|
+
(connection, read) timeouts.
|
157
|
+
:type _request_timeout: int, tuple(int, int), optional
|
158
|
+
:param _request_auth: set to override the auth_settings for an a single
|
159
|
+
request; this effectively ignores the
|
160
|
+
authentication in the spec for a single request.
|
161
|
+
:type _request_auth: dict, optional
|
162
|
+
:param _content_type: force content-type for the request.
|
163
|
+
:type _content_type: str, Optional
|
164
|
+
:param _headers: set to override the headers for a single
|
165
|
+
request; this effectively ignores the headers
|
166
|
+
in the spec for a single request.
|
167
|
+
:type _headers: dict, optional
|
168
|
+
:param _host_index: set to override the host_index for a single
|
169
|
+
request; this effectively ignores the host_index
|
170
|
+
in the spec for a single request.
|
171
|
+
:type _host_index: int, optional
|
172
|
+
:return: Returns the result object.
|
173
|
+
""" # noqa: E501
|
174
|
+
|
175
|
+
_param = self._account_pending_txs_serialize(
|
176
|
+
by=by,
|
177
|
+
value=value,
|
178
|
+
types=types,
|
179
|
+
_request_auth=_request_auth,
|
180
|
+
_content_type=_content_type,
|
181
|
+
_headers=_headers,
|
182
|
+
_host_index=_host_index
|
183
|
+
)
|
184
|
+
|
185
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
186
|
+
'200': "Txs",
|
187
|
+
'400': "ResultCode",
|
188
|
+
}
|
189
|
+
response_data = await self.api_client.call_api(
|
190
|
+
*_param,
|
191
|
+
_request_timeout=_request_timeout
|
192
|
+
)
|
193
|
+
await response_data.read()
|
194
|
+
return self.api_client.response_deserialize(
|
195
|
+
response_data=response_data,
|
196
|
+
response_types_map=_response_types_map,
|
197
|
+
)
|
198
|
+
|
199
|
+
|
200
|
+
@validate_call
|
201
|
+
async def account_pending_txs_without_preload_content(
|
202
|
+
self,
|
203
|
+
by: StrictStr,
|
204
|
+
value: StrictStr,
|
205
|
+
types: Optional[List[StrictInt]] = None,
|
206
|
+
_request_timeout: Union[
|
207
|
+
None,
|
208
|
+
Annotated[StrictFloat, Field(gt=0)],
|
209
|
+
Tuple[
|
210
|
+
Annotated[StrictFloat, Field(gt=0)],
|
211
|
+
Annotated[StrictFloat, Field(gt=0)]
|
212
|
+
]
|
213
|
+
] = None,
|
214
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
215
|
+
_content_type: Optional[StrictStr] = None,
|
216
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
217
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
218
|
+
) -> RESTResponseType:
|
219
|
+
"""accountPendingTxs
|
220
|
+
|
221
|
+
Get pending transactions of a specific account
|
222
|
+
|
223
|
+
:param by: (required)
|
224
|
+
:type by: str
|
225
|
+
:param value: (required)
|
226
|
+
:type value: str
|
227
|
+
:param types:
|
228
|
+
:type types: List[int]
|
229
|
+
:param _request_timeout: timeout setting for this request. If one
|
230
|
+
number provided, it will be total request
|
231
|
+
timeout. It can also be a pair (tuple) of
|
232
|
+
(connection, read) timeouts.
|
233
|
+
:type _request_timeout: int, tuple(int, int), optional
|
234
|
+
:param _request_auth: set to override the auth_settings for an a single
|
235
|
+
request; this effectively ignores the
|
236
|
+
authentication in the spec for a single request.
|
237
|
+
:type _request_auth: dict, optional
|
238
|
+
:param _content_type: force content-type for the request.
|
239
|
+
:type _content_type: str, Optional
|
240
|
+
:param _headers: set to override the headers for a single
|
241
|
+
request; this effectively ignores the headers
|
242
|
+
in the spec for a single request.
|
243
|
+
:type _headers: dict, optional
|
244
|
+
:param _host_index: set to override the host_index for a single
|
245
|
+
request; this effectively ignores the host_index
|
246
|
+
in the spec for a single request.
|
247
|
+
:type _host_index: int, optional
|
248
|
+
:return: Returns the result object.
|
249
|
+
""" # noqa: E501
|
250
|
+
|
251
|
+
_param = self._account_pending_txs_serialize(
|
252
|
+
by=by,
|
253
|
+
value=value,
|
254
|
+
types=types,
|
255
|
+
_request_auth=_request_auth,
|
256
|
+
_content_type=_content_type,
|
257
|
+
_headers=_headers,
|
258
|
+
_host_index=_host_index
|
259
|
+
)
|
260
|
+
|
261
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
262
|
+
'200': "Txs",
|
263
|
+
'400': "ResultCode",
|
264
|
+
}
|
265
|
+
response_data = await self.api_client.call_api(
|
266
|
+
*_param,
|
267
|
+
_request_timeout=_request_timeout
|
268
|
+
)
|
269
|
+
return response_data.response
|
270
|
+
|
271
|
+
|
272
|
+
def _account_pending_txs_serialize(
|
273
|
+
self,
|
274
|
+
by,
|
275
|
+
value,
|
276
|
+
types,
|
277
|
+
_request_auth,
|
278
|
+
_content_type,
|
279
|
+
_headers,
|
280
|
+
_host_index,
|
281
|
+
) -> RequestSerialized:
|
282
|
+
|
283
|
+
_host = None
|
284
|
+
|
285
|
+
_collection_formats: Dict[str, str] = {
|
286
|
+
'types': 'csv',
|
287
|
+
}
|
288
|
+
|
289
|
+
_path_params: Dict[str, str] = {}
|
290
|
+
_query_params: List[Tuple[str, str]] = []
|
291
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
292
|
+
_form_params: List[Tuple[str, str]] = []
|
293
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
294
|
+
_body_params: Optional[bytes] = None
|
295
|
+
|
296
|
+
# process the path parameters
|
297
|
+
# process the query parameters
|
298
|
+
if by is not None:
|
299
|
+
|
300
|
+
_query_params.append(('by', by))
|
301
|
+
|
302
|
+
if value is not None:
|
303
|
+
|
304
|
+
_query_params.append(('value', value))
|
305
|
+
|
306
|
+
if types is not None:
|
307
|
+
|
308
|
+
_query_params.append(('types', types))
|
309
|
+
|
310
|
+
# process the header parameters
|
311
|
+
# process the form parameters
|
312
|
+
# process the body parameter
|
313
|
+
|
314
|
+
|
315
|
+
# set the HTTP header `Accept`
|
316
|
+
if 'Accept' not in _header_params:
|
317
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
318
|
+
[
|
319
|
+
'application/json'
|
320
|
+
]
|
321
|
+
)
|
322
|
+
|
323
|
+
|
324
|
+
# authentication setting
|
325
|
+
_auth_settings: List[str] = [
|
326
|
+
]
|
327
|
+
|
328
|
+
return self.api_client.param_serialize(
|
329
|
+
method='GET',
|
330
|
+
resource_path='/api/v1/accountPendingTxs',
|
331
|
+
path_params=_path_params,
|
332
|
+
query_params=_query_params,
|
333
|
+
header_params=_header_params,
|
334
|
+
body=_body_params,
|
335
|
+
post_params=_form_params,
|
336
|
+
files=_files,
|
337
|
+
auth_settings=_auth_settings,
|
338
|
+
collection_formats=_collection_formats,
|
339
|
+
_host=_host,
|
340
|
+
_request_auth=_request_auth
|
341
|
+
)
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
@validate_call
|
347
|
+
async def account_txs(
|
348
|
+
self,
|
349
|
+
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
|
350
|
+
by: StrictStr,
|
351
|
+
value: StrictStr,
|
352
|
+
index: Optional[StrictInt] = None,
|
353
|
+
types: Optional[List[StrictInt]] = None,
|
354
|
+
_request_timeout: Union[
|
355
|
+
None,
|
356
|
+
Annotated[StrictFloat, Field(gt=0)],
|
357
|
+
Tuple[
|
358
|
+
Annotated[StrictFloat, Field(gt=0)],
|
359
|
+
Annotated[StrictFloat, Field(gt=0)]
|
360
|
+
]
|
361
|
+
] = None,
|
362
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
363
|
+
_content_type: Optional[StrictStr] = None,
|
364
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
365
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
366
|
+
) -> Txs:
|
367
|
+
"""accountTxs
|
368
|
+
|
369
|
+
Get transactions of a specific account
|
370
|
+
|
371
|
+
:param limit: (required)
|
372
|
+
:type limit: int
|
373
|
+
:param by: (required)
|
374
|
+
:type by: str
|
375
|
+
:param value: (required)
|
376
|
+
:type value: str
|
377
|
+
:param index:
|
378
|
+
:type index: int
|
379
|
+
:param types:
|
380
|
+
:type types: List[int]
|
381
|
+
:param _request_timeout: timeout setting for this request. If one
|
382
|
+
number provided, it will be total request
|
383
|
+
timeout. It can also be a pair (tuple) of
|
384
|
+
(connection, read) timeouts.
|
385
|
+
:type _request_timeout: int, tuple(int, int), optional
|
386
|
+
:param _request_auth: set to override the auth_settings for an a single
|
387
|
+
request; this effectively ignores the
|
388
|
+
authentication in the spec for a single request.
|
389
|
+
:type _request_auth: dict, optional
|
390
|
+
:param _content_type: force content-type for the request.
|
391
|
+
:type _content_type: str, Optional
|
392
|
+
:param _headers: set to override the headers for a single
|
393
|
+
request; this effectively ignores the headers
|
394
|
+
in the spec for a single request.
|
395
|
+
:type _headers: dict, optional
|
396
|
+
:param _host_index: set to override the host_index for a single
|
397
|
+
request; this effectively ignores the host_index
|
398
|
+
in the spec for a single request.
|
399
|
+
:type _host_index: int, optional
|
400
|
+
:return: Returns the result object.
|
401
|
+
""" # noqa: E501
|
402
|
+
|
403
|
+
_param = self._account_txs_serialize(
|
404
|
+
limit=limit,
|
405
|
+
by=by,
|
406
|
+
value=value,
|
407
|
+
index=index,
|
408
|
+
types=types,
|
409
|
+
_request_auth=_request_auth,
|
410
|
+
_content_type=_content_type,
|
411
|
+
_headers=_headers,
|
412
|
+
_host_index=_host_index
|
413
|
+
)
|
414
|
+
|
415
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
416
|
+
'200': "Txs",
|
417
|
+
'400': "ResultCode",
|
418
|
+
}
|
419
|
+
response_data = await self.api_client.call_api(
|
420
|
+
*_param,
|
421
|
+
_request_timeout=_request_timeout
|
422
|
+
)
|
423
|
+
await response_data.read()
|
424
|
+
return self.api_client.response_deserialize(
|
425
|
+
response_data=response_data,
|
426
|
+
response_types_map=_response_types_map,
|
427
|
+
).data
|
428
|
+
|
429
|
+
|
430
|
+
@validate_call
|
431
|
+
async def account_txs_with_http_info(
|
432
|
+
self,
|
433
|
+
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
|
434
|
+
by: StrictStr,
|
435
|
+
value: StrictStr,
|
436
|
+
index: Optional[StrictInt] = None,
|
437
|
+
types: Optional[List[StrictInt]] = None,
|
438
|
+
_request_timeout: Union[
|
439
|
+
None,
|
440
|
+
Annotated[StrictFloat, Field(gt=0)],
|
441
|
+
Tuple[
|
442
|
+
Annotated[StrictFloat, Field(gt=0)],
|
443
|
+
Annotated[StrictFloat, Field(gt=0)]
|
444
|
+
]
|
445
|
+
] = None,
|
446
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
447
|
+
_content_type: Optional[StrictStr] = None,
|
448
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
449
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
450
|
+
) -> ApiResponse[Txs]:
|
451
|
+
"""accountTxs
|
452
|
+
|
453
|
+
Get transactions of a specific account
|
454
|
+
|
455
|
+
:param limit: (required)
|
456
|
+
:type limit: int
|
457
|
+
:param by: (required)
|
458
|
+
:type by: str
|
459
|
+
:param value: (required)
|
460
|
+
:type value: str
|
461
|
+
:param index:
|
462
|
+
:type index: int
|
463
|
+
:param types:
|
464
|
+
:type types: List[int]
|
465
|
+
:param _request_timeout: timeout setting for this request. If one
|
466
|
+
number provided, it will be total request
|
467
|
+
timeout. It can also be a pair (tuple) of
|
468
|
+
(connection, read) timeouts.
|
469
|
+
:type _request_timeout: int, tuple(int, int), optional
|
470
|
+
:param _request_auth: set to override the auth_settings for an a single
|
471
|
+
request; this effectively ignores the
|
472
|
+
authentication in the spec for a single request.
|
473
|
+
:type _request_auth: dict, optional
|
474
|
+
:param _content_type: force content-type for the request.
|
475
|
+
:type _content_type: str, Optional
|
476
|
+
:param _headers: set to override the headers for a single
|
477
|
+
request; this effectively ignores the headers
|
478
|
+
in the spec for a single request.
|
479
|
+
:type _headers: dict, optional
|
480
|
+
:param _host_index: set to override the host_index for a single
|
481
|
+
request; this effectively ignores the host_index
|
482
|
+
in the spec for a single request.
|
483
|
+
:type _host_index: int, optional
|
484
|
+
:return: Returns the result object.
|
485
|
+
""" # noqa: E501
|
486
|
+
|
487
|
+
_param = self._account_txs_serialize(
|
488
|
+
limit=limit,
|
489
|
+
by=by,
|
490
|
+
value=value,
|
491
|
+
index=index,
|
492
|
+
types=types,
|
493
|
+
_request_auth=_request_auth,
|
494
|
+
_content_type=_content_type,
|
495
|
+
_headers=_headers,
|
496
|
+
_host_index=_host_index
|
497
|
+
)
|
498
|
+
|
499
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
500
|
+
'200': "Txs",
|
501
|
+
'400': "ResultCode",
|
502
|
+
}
|
503
|
+
response_data = await self.api_client.call_api(
|
504
|
+
*_param,
|
505
|
+
_request_timeout=_request_timeout
|
506
|
+
)
|
507
|
+
await response_data.read()
|
508
|
+
return self.api_client.response_deserialize(
|
509
|
+
response_data=response_data,
|
510
|
+
response_types_map=_response_types_map,
|
511
|
+
)
|
512
|
+
|
513
|
+
|
514
|
+
@validate_call
|
515
|
+
async def account_txs_without_preload_content(
|
516
|
+
self,
|
517
|
+
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
|
518
|
+
by: StrictStr,
|
519
|
+
value: StrictStr,
|
520
|
+
index: Optional[StrictInt] = None,
|
521
|
+
types: Optional[List[StrictInt]] = None,
|
522
|
+
_request_timeout: Union[
|
523
|
+
None,
|
524
|
+
Annotated[StrictFloat, Field(gt=0)],
|
525
|
+
Tuple[
|
526
|
+
Annotated[StrictFloat, Field(gt=0)],
|
527
|
+
Annotated[StrictFloat, Field(gt=0)]
|
528
|
+
]
|
529
|
+
] = None,
|
530
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
531
|
+
_content_type: Optional[StrictStr] = None,
|
532
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
533
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
534
|
+
) -> RESTResponseType:
|
535
|
+
"""accountTxs
|
536
|
+
|
537
|
+
Get transactions of a specific account
|
538
|
+
|
539
|
+
:param limit: (required)
|
540
|
+
:type limit: int
|
541
|
+
:param by: (required)
|
542
|
+
:type by: str
|
543
|
+
:param value: (required)
|
544
|
+
:type value: str
|
545
|
+
:param index:
|
546
|
+
:type index: int
|
547
|
+
:param types:
|
548
|
+
:type types: List[int]
|
549
|
+
:param _request_timeout: timeout setting for this request. If one
|
550
|
+
number provided, it will be total request
|
551
|
+
timeout. It can also be a pair (tuple) of
|
552
|
+
(connection, read) timeouts.
|
553
|
+
:type _request_timeout: int, tuple(int, int), optional
|
554
|
+
:param _request_auth: set to override the auth_settings for an a single
|
555
|
+
request; this effectively ignores the
|
556
|
+
authentication in the spec for a single request.
|
557
|
+
:type _request_auth: dict, optional
|
558
|
+
:param _content_type: force content-type for the request.
|
559
|
+
:type _content_type: str, Optional
|
560
|
+
:param _headers: set to override the headers for a single
|
561
|
+
request; this effectively ignores the headers
|
562
|
+
in the spec for a single request.
|
563
|
+
:type _headers: dict, optional
|
564
|
+
:param _host_index: set to override the host_index for a single
|
565
|
+
request; this effectively ignores the host_index
|
566
|
+
in the spec for a single request.
|
567
|
+
:type _host_index: int, optional
|
568
|
+
:return: Returns the result object.
|
569
|
+
""" # noqa: E501
|
570
|
+
|
571
|
+
_param = self._account_txs_serialize(
|
572
|
+
limit=limit,
|
573
|
+
by=by,
|
574
|
+
value=value,
|
575
|
+
index=index,
|
576
|
+
types=types,
|
577
|
+
_request_auth=_request_auth,
|
578
|
+
_content_type=_content_type,
|
579
|
+
_headers=_headers,
|
580
|
+
_host_index=_host_index
|
581
|
+
)
|
582
|
+
|
583
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
584
|
+
'200': "Txs",
|
585
|
+
'400': "ResultCode",
|
586
|
+
}
|
587
|
+
response_data = await self.api_client.call_api(
|
588
|
+
*_param,
|
589
|
+
_request_timeout=_request_timeout
|
590
|
+
)
|
591
|
+
return response_data.response
|
592
|
+
|
593
|
+
|
594
|
+
def _account_txs_serialize(
|
595
|
+
self,
|
596
|
+
limit,
|
597
|
+
by,
|
598
|
+
value,
|
599
|
+
index,
|
600
|
+
types,
|
601
|
+
_request_auth,
|
602
|
+
_content_type,
|
603
|
+
_headers,
|
604
|
+
_host_index,
|
605
|
+
) -> RequestSerialized:
|
606
|
+
|
607
|
+
_host = None
|
608
|
+
|
609
|
+
_collection_formats: Dict[str, str] = {
|
610
|
+
'types': 'csv',
|
611
|
+
}
|
612
|
+
|
613
|
+
_path_params: Dict[str, str] = {}
|
614
|
+
_query_params: List[Tuple[str, str]] = []
|
615
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
616
|
+
_form_params: List[Tuple[str, str]] = []
|
617
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
618
|
+
_body_params: Optional[bytes] = None
|
619
|
+
|
620
|
+
# process the path parameters
|
621
|
+
# process the query parameters
|
622
|
+
if index is not None:
|
623
|
+
|
624
|
+
_query_params.append(('index', index))
|
625
|
+
|
626
|
+
if limit is not None:
|
627
|
+
|
628
|
+
_query_params.append(('limit', limit))
|
629
|
+
|
630
|
+
if by is not None:
|
631
|
+
|
632
|
+
_query_params.append(('by', by))
|
633
|
+
|
634
|
+
if value is not None:
|
635
|
+
|
636
|
+
_query_params.append(('value', value))
|
637
|
+
|
638
|
+
if types is not None:
|
639
|
+
|
640
|
+
_query_params.append(('types', types))
|
641
|
+
|
642
|
+
# process the header parameters
|
643
|
+
# process the form parameters
|
644
|
+
# process the body parameter
|
645
|
+
|
646
|
+
|
647
|
+
# set the HTTP header `Accept`
|
648
|
+
if 'Accept' not in _header_params:
|
649
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
650
|
+
[
|
651
|
+
'application/json'
|
652
|
+
]
|
653
|
+
)
|
654
|
+
|
655
|
+
|
656
|
+
# authentication setting
|
657
|
+
_auth_settings: List[str] = [
|
658
|
+
]
|
659
|
+
|
660
|
+
return self.api_client.param_serialize(
|
661
|
+
method='GET',
|
662
|
+
resource_path='/api/v1/accountTxs',
|
663
|
+
path_params=_path_params,
|
664
|
+
query_params=_query_params,
|
665
|
+
header_params=_header_params,
|
666
|
+
body=_body_params,
|
667
|
+
post_params=_form_params,
|
668
|
+
files=_files,
|
669
|
+
auth_settings=_auth_settings,
|
670
|
+
collection_formats=_collection_formats,
|
671
|
+
_host=_host,
|
672
|
+
_request_auth=_request_auth
|
673
|
+
)
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
@validate_call
|
679
|
+
async def block_txs(
|
680
|
+
self,
|
681
|
+
by: StrictStr,
|
682
|
+
value: StrictStr,
|
683
|
+
_request_timeout: Union[
|
684
|
+
None,
|
685
|
+
Annotated[StrictFloat, Field(gt=0)],
|
686
|
+
Tuple[
|
687
|
+
Annotated[StrictFloat, Field(gt=0)],
|
688
|
+
Annotated[StrictFloat, Field(gt=0)]
|
689
|
+
]
|
690
|
+
] = None,
|
691
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
692
|
+
_content_type: Optional[StrictStr] = None,
|
693
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
694
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
695
|
+
) -> Txs:
|
696
|
+
"""blockTxs
|
697
|
+
|
698
|
+
Get transactions in a block
|
699
|
+
|
700
|
+
:param by: (required)
|
701
|
+
:type by: str
|
702
|
+
:param value: (required)
|
703
|
+
:type value: str
|
704
|
+
:param _request_timeout: timeout setting for this request. If one
|
705
|
+
number provided, it will be total request
|
706
|
+
timeout. It can also be a pair (tuple) of
|
707
|
+
(connection, read) timeouts.
|
708
|
+
:type _request_timeout: int, tuple(int, int), optional
|
709
|
+
:param _request_auth: set to override the auth_settings for an a single
|
710
|
+
request; this effectively ignores the
|
711
|
+
authentication in the spec for a single request.
|
712
|
+
:type _request_auth: dict, optional
|
713
|
+
:param _content_type: force content-type for the request.
|
714
|
+
:type _content_type: str, Optional
|
715
|
+
:param _headers: set to override the headers for a single
|
716
|
+
request; this effectively ignores the headers
|
717
|
+
in the spec for a single request.
|
718
|
+
:type _headers: dict, optional
|
719
|
+
:param _host_index: set to override the host_index for a single
|
720
|
+
request; this effectively ignores the host_index
|
721
|
+
in the spec for a single request.
|
722
|
+
:type _host_index: int, optional
|
723
|
+
:return: Returns the result object.
|
724
|
+
""" # noqa: E501
|
725
|
+
|
726
|
+
_param = self._block_txs_serialize(
|
727
|
+
by=by,
|
728
|
+
value=value,
|
729
|
+
_request_auth=_request_auth,
|
730
|
+
_content_type=_content_type,
|
731
|
+
_headers=_headers,
|
732
|
+
_host_index=_host_index
|
733
|
+
)
|
734
|
+
|
735
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
736
|
+
'200': "Txs",
|
737
|
+
'400': "ResultCode",
|
738
|
+
}
|
739
|
+
response_data = await self.api_client.call_api(
|
740
|
+
*_param,
|
741
|
+
_request_timeout=_request_timeout
|
742
|
+
)
|
743
|
+
await response_data.read()
|
744
|
+
return self.api_client.response_deserialize(
|
745
|
+
response_data=response_data,
|
746
|
+
response_types_map=_response_types_map,
|
747
|
+
).data
|
748
|
+
|
749
|
+
|
750
|
+
@validate_call
|
751
|
+
async def block_txs_with_http_info(
|
752
|
+
self,
|
753
|
+
by: StrictStr,
|
754
|
+
value: StrictStr,
|
755
|
+
_request_timeout: Union[
|
756
|
+
None,
|
757
|
+
Annotated[StrictFloat, Field(gt=0)],
|
758
|
+
Tuple[
|
759
|
+
Annotated[StrictFloat, Field(gt=0)],
|
760
|
+
Annotated[StrictFloat, Field(gt=0)]
|
761
|
+
]
|
762
|
+
] = None,
|
763
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
764
|
+
_content_type: Optional[StrictStr] = None,
|
765
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
766
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
767
|
+
) -> ApiResponse[Txs]:
|
768
|
+
"""blockTxs
|
769
|
+
|
770
|
+
Get transactions in a block
|
771
|
+
|
772
|
+
:param by: (required)
|
773
|
+
:type by: str
|
774
|
+
:param value: (required)
|
775
|
+
:type value: str
|
776
|
+
:param _request_timeout: timeout setting for this request. If one
|
777
|
+
number provided, it will be total request
|
778
|
+
timeout. It can also be a pair (tuple) of
|
779
|
+
(connection, read) timeouts.
|
780
|
+
:type _request_timeout: int, tuple(int, int), optional
|
781
|
+
:param _request_auth: set to override the auth_settings for an a single
|
782
|
+
request; this effectively ignores the
|
783
|
+
authentication in the spec for a single request.
|
784
|
+
:type _request_auth: dict, optional
|
785
|
+
:param _content_type: force content-type for the request.
|
786
|
+
:type _content_type: str, Optional
|
787
|
+
:param _headers: set to override the headers for a single
|
788
|
+
request; this effectively ignores the headers
|
789
|
+
in the spec for a single request.
|
790
|
+
:type _headers: dict, optional
|
791
|
+
:param _host_index: set to override the host_index for a single
|
792
|
+
request; this effectively ignores the host_index
|
793
|
+
in the spec for a single request.
|
794
|
+
:type _host_index: int, optional
|
795
|
+
:return: Returns the result object.
|
796
|
+
""" # noqa: E501
|
797
|
+
|
798
|
+
_param = self._block_txs_serialize(
|
799
|
+
by=by,
|
800
|
+
value=value,
|
801
|
+
_request_auth=_request_auth,
|
802
|
+
_content_type=_content_type,
|
803
|
+
_headers=_headers,
|
804
|
+
_host_index=_host_index
|
805
|
+
)
|
806
|
+
|
807
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
808
|
+
'200': "Txs",
|
809
|
+
'400': "ResultCode",
|
810
|
+
}
|
811
|
+
response_data = await self.api_client.call_api(
|
812
|
+
*_param,
|
813
|
+
_request_timeout=_request_timeout
|
814
|
+
)
|
815
|
+
await response_data.read()
|
816
|
+
return self.api_client.response_deserialize(
|
817
|
+
response_data=response_data,
|
818
|
+
response_types_map=_response_types_map,
|
819
|
+
)
|
820
|
+
|
821
|
+
|
822
|
+
@validate_call
|
823
|
+
async def block_txs_without_preload_content(
|
824
|
+
self,
|
825
|
+
by: StrictStr,
|
826
|
+
value: StrictStr,
|
827
|
+
_request_timeout: Union[
|
828
|
+
None,
|
829
|
+
Annotated[StrictFloat, Field(gt=0)],
|
830
|
+
Tuple[
|
831
|
+
Annotated[StrictFloat, Field(gt=0)],
|
832
|
+
Annotated[StrictFloat, Field(gt=0)]
|
833
|
+
]
|
834
|
+
] = None,
|
835
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
836
|
+
_content_type: Optional[StrictStr] = None,
|
837
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
838
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
839
|
+
) -> RESTResponseType:
|
840
|
+
"""blockTxs
|
841
|
+
|
842
|
+
Get transactions in a block
|
843
|
+
|
844
|
+
:param by: (required)
|
845
|
+
:type by: str
|
846
|
+
:param value: (required)
|
847
|
+
:type value: str
|
848
|
+
:param _request_timeout: timeout setting for this request. If one
|
849
|
+
number provided, it will be total request
|
850
|
+
timeout. It can also be a pair (tuple) of
|
851
|
+
(connection, read) timeouts.
|
852
|
+
:type _request_timeout: int, tuple(int, int), optional
|
853
|
+
:param _request_auth: set to override the auth_settings for an a single
|
854
|
+
request; this effectively ignores the
|
855
|
+
authentication in the spec for a single request.
|
856
|
+
:type _request_auth: dict, optional
|
857
|
+
:param _content_type: force content-type for the request.
|
858
|
+
:type _content_type: str, Optional
|
859
|
+
:param _headers: set to override the headers for a single
|
860
|
+
request; this effectively ignores the headers
|
861
|
+
in the spec for a single request.
|
862
|
+
:type _headers: dict, optional
|
863
|
+
:param _host_index: set to override the host_index for a single
|
864
|
+
request; this effectively ignores the host_index
|
865
|
+
in the spec for a single request.
|
866
|
+
:type _host_index: int, optional
|
867
|
+
:return: Returns the result object.
|
868
|
+
""" # noqa: E501
|
869
|
+
|
870
|
+
_param = self._block_txs_serialize(
|
871
|
+
by=by,
|
872
|
+
value=value,
|
873
|
+
_request_auth=_request_auth,
|
874
|
+
_content_type=_content_type,
|
875
|
+
_headers=_headers,
|
876
|
+
_host_index=_host_index
|
877
|
+
)
|
878
|
+
|
879
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
880
|
+
'200': "Txs",
|
881
|
+
'400': "ResultCode",
|
882
|
+
}
|
883
|
+
response_data = await self.api_client.call_api(
|
884
|
+
*_param,
|
885
|
+
_request_timeout=_request_timeout
|
886
|
+
)
|
887
|
+
return response_data.response
|
888
|
+
|
889
|
+
|
890
|
+
def _block_txs_serialize(
|
891
|
+
self,
|
892
|
+
by,
|
893
|
+
value,
|
894
|
+
_request_auth,
|
895
|
+
_content_type,
|
896
|
+
_headers,
|
897
|
+
_host_index,
|
898
|
+
) -> RequestSerialized:
|
899
|
+
|
900
|
+
_host = None
|
901
|
+
|
902
|
+
_collection_formats: Dict[str, str] = {
|
903
|
+
}
|
904
|
+
|
905
|
+
_path_params: Dict[str, str] = {}
|
906
|
+
_query_params: List[Tuple[str, str]] = []
|
907
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
908
|
+
_form_params: List[Tuple[str, str]] = []
|
909
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
910
|
+
_body_params: Optional[bytes] = None
|
911
|
+
|
912
|
+
# process the path parameters
|
913
|
+
# process the query parameters
|
914
|
+
if by is not None:
|
915
|
+
|
916
|
+
_query_params.append(('by', by))
|
917
|
+
|
918
|
+
if value is not None:
|
919
|
+
|
920
|
+
_query_params.append(('value', value))
|
921
|
+
|
922
|
+
# process the header parameters
|
923
|
+
# process the form parameters
|
924
|
+
# process the body parameter
|
925
|
+
|
926
|
+
|
927
|
+
# set the HTTP header `Accept`
|
928
|
+
if 'Accept' not in _header_params:
|
929
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
930
|
+
[
|
931
|
+
'application/json'
|
932
|
+
]
|
933
|
+
)
|
934
|
+
|
935
|
+
|
936
|
+
# authentication setting
|
937
|
+
_auth_settings: List[str] = [
|
938
|
+
]
|
939
|
+
|
940
|
+
return self.api_client.param_serialize(
|
941
|
+
method='GET',
|
942
|
+
resource_path='/api/v1/blockTxs',
|
943
|
+
path_params=_path_params,
|
944
|
+
query_params=_query_params,
|
945
|
+
header_params=_header_params,
|
946
|
+
body=_body_params,
|
947
|
+
post_params=_form_params,
|
948
|
+
files=_files,
|
949
|
+
auth_settings=_auth_settings,
|
950
|
+
collection_formats=_collection_formats,
|
951
|
+
_host=_host,
|
952
|
+
_request_auth=_request_auth
|
953
|
+
)
|
954
|
+
|
955
|
+
|
956
|
+
|
957
|
+
|
958
|
+
@validate_call
|
959
|
+
async def deposit_history(
|
960
|
+
self,
|
961
|
+
l1_address: StrictStr,
|
962
|
+
cursor: Optional[StrictStr] = None,
|
963
|
+
filter: Optional[StrictStr] = None,
|
964
|
+
_request_timeout: Union[
|
965
|
+
None,
|
966
|
+
Annotated[StrictFloat, Field(gt=0)],
|
967
|
+
Tuple[
|
968
|
+
Annotated[StrictFloat, Field(gt=0)],
|
969
|
+
Annotated[StrictFloat, Field(gt=0)]
|
970
|
+
]
|
971
|
+
] = None,
|
972
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
973
|
+
_content_type: Optional[StrictStr] = None,
|
974
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
975
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
976
|
+
) -> DepositHistory:
|
977
|
+
"""deposit_history
|
978
|
+
|
979
|
+
Get deposit history
|
980
|
+
|
981
|
+
:param l1_address: (required)
|
982
|
+
:type l1_address: str
|
983
|
+
:param cursor:
|
984
|
+
:type cursor: str
|
985
|
+
:param filter:
|
986
|
+
:type filter: str
|
987
|
+
:param _request_timeout: timeout setting for this request. If one
|
988
|
+
number provided, it will be total request
|
989
|
+
timeout. It can also be a pair (tuple) of
|
990
|
+
(connection, read) timeouts.
|
991
|
+
:type _request_timeout: int, tuple(int, int), optional
|
992
|
+
:param _request_auth: set to override the auth_settings for an a single
|
993
|
+
request; this effectively ignores the
|
994
|
+
authentication in the spec for a single request.
|
995
|
+
:type _request_auth: dict, optional
|
996
|
+
:param _content_type: force content-type for the request.
|
997
|
+
:type _content_type: str, Optional
|
998
|
+
:param _headers: set to override the headers for a single
|
999
|
+
request; this effectively ignores the headers
|
1000
|
+
in the spec for a single request.
|
1001
|
+
:type _headers: dict, optional
|
1002
|
+
:param _host_index: set to override the host_index for a single
|
1003
|
+
request; this effectively ignores the host_index
|
1004
|
+
in the spec for a single request.
|
1005
|
+
:type _host_index: int, optional
|
1006
|
+
:return: Returns the result object.
|
1007
|
+
""" # noqa: E501
|
1008
|
+
|
1009
|
+
_param = self._deposit_history_serialize(
|
1010
|
+
l1_address=l1_address,
|
1011
|
+
cursor=cursor,
|
1012
|
+
filter=filter,
|
1013
|
+
_request_auth=_request_auth,
|
1014
|
+
_content_type=_content_type,
|
1015
|
+
_headers=_headers,
|
1016
|
+
_host_index=_host_index
|
1017
|
+
)
|
1018
|
+
|
1019
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1020
|
+
'200': "DepositHistory",
|
1021
|
+
'400': "ResultCode",
|
1022
|
+
}
|
1023
|
+
response_data = await self.api_client.call_api(
|
1024
|
+
*_param,
|
1025
|
+
_request_timeout=_request_timeout
|
1026
|
+
)
|
1027
|
+
await response_data.read()
|
1028
|
+
return self.api_client.response_deserialize(
|
1029
|
+
response_data=response_data,
|
1030
|
+
response_types_map=_response_types_map,
|
1031
|
+
).data
|
1032
|
+
|
1033
|
+
|
1034
|
+
@validate_call
|
1035
|
+
async def deposit_history_with_http_info(
|
1036
|
+
self,
|
1037
|
+
l1_address: StrictStr,
|
1038
|
+
cursor: Optional[StrictStr] = None,
|
1039
|
+
filter: Optional[StrictStr] = None,
|
1040
|
+
_request_timeout: Union[
|
1041
|
+
None,
|
1042
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1043
|
+
Tuple[
|
1044
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1045
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1046
|
+
]
|
1047
|
+
] = None,
|
1048
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1049
|
+
_content_type: Optional[StrictStr] = None,
|
1050
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1051
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1052
|
+
) -> ApiResponse[DepositHistory]:
|
1053
|
+
"""deposit_history
|
1054
|
+
|
1055
|
+
Get deposit history
|
1056
|
+
|
1057
|
+
:param l1_address: (required)
|
1058
|
+
:type l1_address: str
|
1059
|
+
:param cursor:
|
1060
|
+
:type cursor: str
|
1061
|
+
:param filter:
|
1062
|
+
:type filter: str
|
1063
|
+
:param _request_timeout: timeout setting for this request. If one
|
1064
|
+
number provided, it will be total request
|
1065
|
+
timeout. It can also be a pair (tuple) of
|
1066
|
+
(connection, read) timeouts.
|
1067
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1068
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1069
|
+
request; this effectively ignores the
|
1070
|
+
authentication in the spec for a single request.
|
1071
|
+
:type _request_auth: dict, optional
|
1072
|
+
:param _content_type: force content-type for the request.
|
1073
|
+
:type _content_type: str, Optional
|
1074
|
+
:param _headers: set to override the headers for a single
|
1075
|
+
request; this effectively ignores the headers
|
1076
|
+
in the spec for a single request.
|
1077
|
+
:type _headers: dict, optional
|
1078
|
+
:param _host_index: set to override the host_index for a single
|
1079
|
+
request; this effectively ignores the host_index
|
1080
|
+
in the spec for a single request.
|
1081
|
+
:type _host_index: int, optional
|
1082
|
+
:return: Returns the result object.
|
1083
|
+
""" # noqa: E501
|
1084
|
+
|
1085
|
+
_param = self._deposit_history_serialize(
|
1086
|
+
l1_address=l1_address,
|
1087
|
+
cursor=cursor,
|
1088
|
+
filter=filter,
|
1089
|
+
_request_auth=_request_auth,
|
1090
|
+
_content_type=_content_type,
|
1091
|
+
_headers=_headers,
|
1092
|
+
_host_index=_host_index
|
1093
|
+
)
|
1094
|
+
|
1095
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1096
|
+
'200': "DepositHistory",
|
1097
|
+
'400': "ResultCode",
|
1098
|
+
}
|
1099
|
+
response_data = await self.api_client.call_api(
|
1100
|
+
*_param,
|
1101
|
+
_request_timeout=_request_timeout
|
1102
|
+
)
|
1103
|
+
await response_data.read()
|
1104
|
+
return self.api_client.response_deserialize(
|
1105
|
+
response_data=response_data,
|
1106
|
+
response_types_map=_response_types_map,
|
1107
|
+
)
|
1108
|
+
|
1109
|
+
|
1110
|
+
@validate_call
|
1111
|
+
async def deposit_history_without_preload_content(
|
1112
|
+
self,
|
1113
|
+
l1_address: StrictStr,
|
1114
|
+
cursor: Optional[StrictStr] = None,
|
1115
|
+
filter: Optional[StrictStr] = None,
|
1116
|
+
_request_timeout: Union[
|
1117
|
+
None,
|
1118
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1119
|
+
Tuple[
|
1120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1121
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1122
|
+
]
|
1123
|
+
] = None,
|
1124
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1125
|
+
_content_type: Optional[StrictStr] = None,
|
1126
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1127
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1128
|
+
) -> RESTResponseType:
|
1129
|
+
"""deposit_history
|
1130
|
+
|
1131
|
+
Get deposit history
|
1132
|
+
|
1133
|
+
:param l1_address: (required)
|
1134
|
+
:type l1_address: str
|
1135
|
+
:param cursor:
|
1136
|
+
:type cursor: str
|
1137
|
+
:param filter:
|
1138
|
+
:type filter: str
|
1139
|
+
:param _request_timeout: timeout setting for this request. If one
|
1140
|
+
number provided, it will be total request
|
1141
|
+
timeout. It can also be a pair (tuple) of
|
1142
|
+
(connection, read) timeouts.
|
1143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1145
|
+
request; this effectively ignores the
|
1146
|
+
authentication in the spec for a single request.
|
1147
|
+
:type _request_auth: dict, optional
|
1148
|
+
:param _content_type: force content-type for the request.
|
1149
|
+
:type _content_type: str, Optional
|
1150
|
+
:param _headers: set to override the headers for a single
|
1151
|
+
request; this effectively ignores the headers
|
1152
|
+
in the spec for a single request.
|
1153
|
+
:type _headers: dict, optional
|
1154
|
+
:param _host_index: set to override the host_index for a single
|
1155
|
+
request; this effectively ignores the host_index
|
1156
|
+
in the spec for a single request.
|
1157
|
+
:type _host_index: int, optional
|
1158
|
+
:return: Returns the result object.
|
1159
|
+
""" # noqa: E501
|
1160
|
+
|
1161
|
+
_param = self._deposit_history_serialize(
|
1162
|
+
l1_address=l1_address,
|
1163
|
+
cursor=cursor,
|
1164
|
+
filter=filter,
|
1165
|
+
_request_auth=_request_auth,
|
1166
|
+
_content_type=_content_type,
|
1167
|
+
_headers=_headers,
|
1168
|
+
_host_index=_host_index
|
1169
|
+
)
|
1170
|
+
|
1171
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1172
|
+
'200': "DepositHistory",
|
1173
|
+
'400': "ResultCode",
|
1174
|
+
}
|
1175
|
+
response_data = await self.api_client.call_api(
|
1176
|
+
*_param,
|
1177
|
+
_request_timeout=_request_timeout
|
1178
|
+
)
|
1179
|
+
return response_data.response
|
1180
|
+
|
1181
|
+
|
1182
|
+
def _deposit_history_serialize(
|
1183
|
+
self,
|
1184
|
+
l1_address,
|
1185
|
+
cursor,
|
1186
|
+
filter,
|
1187
|
+
_request_auth,
|
1188
|
+
_content_type,
|
1189
|
+
_headers,
|
1190
|
+
_host_index,
|
1191
|
+
) -> RequestSerialized:
|
1192
|
+
|
1193
|
+
_host = None
|
1194
|
+
|
1195
|
+
_collection_formats: Dict[str, str] = {
|
1196
|
+
}
|
1197
|
+
|
1198
|
+
_path_params: Dict[str, str] = {}
|
1199
|
+
_query_params: List[Tuple[str, str]] = []
|
1200
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1201
|
+
_form_params: List[Tuple[str, str]] = []
|
1202
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1203
|
+
_body_params: Optional[bytes] = None
|
1204
|
+
|
1205
|
+
# process the path parameters
|
1206
|
+
# process the query parameters
|
1207
|
+
if l1_address is not None:
|
1208
|
+
|
1209
|
+
_query_params.append(('l1_address', l1_address))
|
1210
|
+
|
1211
|
+
if cursor is not None:
|
1212
|
+
|
1213
|
+
_query_params.append(('cursor', cursor))
|
1214
|
+
|
1215
|
+
if filter is not None:
|
1216
|
+
|
1217
|
+
_query_params.append(('filter', filter))
|
1218
|
+
|
1219
|
+
# process the header parameters
|
1220
|
+
# process the form parameters
|
1221
|
+
# process the body parameter
|
1222
|
+
|
1223
|
+
|
1224
|
+
# set the HTTP header `Accept`
|
1225
|
+
if 'Accept' not in _header_params:
|
1226
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1227
|
+
[
|
1228
|
+
'application/json'
|
1229
|
+
]
|
1230
|
+
)
|
1231
|
+
|
1232
|
+
|
1233
|
+
# authentication setting
|
1234
|
+
_auth_settings: List[str] = [
|
1235
|
+
]
|
1236
|
+
|
1237
|
+
return self.api_client.param_serialize(
|
1238
|
+
method='GET',
|
1239
|
+
resource_path='/api/v1/deposit/history',
|
1240
|
+
path_params=_path_params,
|
1241
|
+
query_params=_query_params,
|
1242
|
+
header_params=_header_params,
|
1243
|
+
body=_body_params,
|
1244
|
+
post_params=_form_params,
|
1245
|
+
files=_files,
|
1246
|
+
auth_settings=_auth_settings,
|
1247
|
+
collection_formats=_collection_formats,
|
1248
|
+
_host=_host,
|
1249
|
+
_request_auth=_request_auth
|
1250
|
+
)
|
1251
|
+
|
1252
|
+
|
1253
|
+
|
1254
|
+
|
1255
|
+
@validate_call
|
1256
|
+
async def next_nonce(
|
1257
|
+
self,
|
1258
|
+
account_index: StrictInt,
|
1259
|
+
api_key_index: StrictInt,
|
1260
|
+
_request_timeout: Union[
|
1261
|
+
None,
|
1262
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1263
|
+
Tuple[
|
1264
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1265
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1266
|
+
]
|
1267
|
+
] = None,
|
1268
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1269
|
+
_content_type: Optional[StrictStr] = None,
|
1270
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1271
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1272
|
+
) -> NextNonce:
|
1273
|
+
"""nextNonce
|
1274
|
+
|
1275
|
+
Get next nonce for a specific account
|
1276
|
+
|
1277
|
+
:param account_index: (required)
|
1278
|
+
:type account_index: int
|
1279
|
+
:param api_key_index: (required)
|
1280
|
+
:type api_key_index: int
|
1281
|
+
:param _request_timeout: timeout setting for this request. If one
|
1282
|
+
number provided, it will be total request
|
1283
|
+
timeout. It can also be a pair (tuple) of
|
1284
|
+
(connection, read) timeouts.
|
1285
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1286
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1287
|
+
request; this effectively ignores the
|
1288
|
+
authentication in the spec for a single request.
|
1289
|
+
:type _request_auth: dict, optional
|
1290
|
+
:param _content_type: force content-type for the request.
|
1291
|
+
:type _content_type: str, Optional
|
1292
|
+
:param _headers: set to override the headers for a single
|
1293
|
+
request; this effectively ignores the headers
|
1294
|
+
in the spec for a single request.
|
1295
|
+
:type _headers: dict, optional
|
1296
|
+
:param _host_index: set to override the host_index for a single
|
1297
|
+
request; this effectively ignores the host_index
|
1298
|
+
in the spec for a single request.
|
1299
|
+
:type _host_index: int, optional
|
1300
|
+
:return: Returns the result object.
|
1301
|
+
""" # noqa: E501
|
1302
|
+
|
1303
|
+
_param = self._next_nonce_serialize(
|
1304
|
+
account_index=account_index,
|
1305
|
+
api_key_index=api_key_index,
|
1306
|
+
_request_auth=_request_auth,
|
1307
|
+
_content_type=_content_type,
|
1308
|
+
_headers=_headers,
|
1309
|
+
_host_index=_host_index
|
1310
|
+
)
|
1311
|
+
|
1312
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1313
|
+
'200': "NextNonce",
|
1314
|
+
'400': "ResultCode",
|
1315
|
+
}
|
1316
|
+
response_data = await self.api_client.call_api(
|
1317
|
+
*_param,
|
1318
|
+
_request_timeout=_request_timeout
|
1319
|
+
)
|
1320
|
+
await response_data.read()
|
1321
|
+
return self.api_client.response_deserialize(
|
1322
|
+
response_data=response_data,
|
1323
|
+
response_types_map=_response_types_map,
|
1324
|
+
).data
|
1325
|
+
|
1326
|
+
|
1327
|
+
@validate_call
|
1328
|
+
async def next_nonce_with_http_info(
|
1329
|
+
self,
|
1330
|
+
account_index: StrictInt,
|
1331
|
+
api_key_index: StrictInt,
|
1332
|
+
_request_timeout: Union[
|
1333
|
+
None,
|
1334
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1335
|
+
Tuple[
|
1336
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1337
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1338
|
+
]
|
1339
|
+
] = None,
|
1340
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1341
|
+
_content_type: Optional[StrictStr] = None,
|
1342
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1343
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1344
|
+
) -> ApiResponse[NextNonce]:
|
1345
|
+
"""nextNonce
|
1346
|
+
|
1347
|
+
Get next nonce for a specific account
|
1348
|
+
|
1349
|
+
:param account_index: (required)
|
1350
|
+
:type account_index: int
|
1351
|
+
:param api_key_index: (required)
|
1352
|
+
:type api_key_index: int
|
1353
|
+
:param _request_timeout: timeout setting for this request. If one
|
1354
|
+
number provided, it will be total request
|
1355
|
+
timeout. It can also be a pair (tuple) of
|
1356
|
+
(connection, read) timeouts.
|
1357
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1358
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1359
|
+
request; this effectively ignores the
|
1360
|
+
authentication in the spec for a single request.
|
1361
|
+
:type _request_auth: dict, optional
|
1362
|
+
:param _content_type: force content-type for the request.
|
1363
|
+
:type _content_type: str, Optional
|
1364
|
+
:param _headers: set to override the headers for a single
|
1365
|
+
request; this effectively ignores the headers
|
1366
|
+
in the spec for a single request.
|
1367
|
+
:type _headers: dict, optional
|
1368
|
+
:param _host_index: set to override the host_index for a single
|
1369
|
+
request; this effectively ignores the host_index
|
1370
|
+
in the spec for a single request.
|
1371
|
+
:type _host_index: int, optional
|
1372
|
+
:return: Returns the result object.
|
1373
|
+
""" # noqa: E501
|
1374
|
+
|
1375
|
+
_param = self._next_nonce_serialize(
|
1376
|
+
account_index=account_index,
|
1377
|
+
api_key_index=api_key_index,
|
1378
|
+
_request_auth=_request_auth,
|
1379
|
+
_content_type=_content_type,
|
1380
|
+
_headers=_headers,
|
1381
|
+
_host_index=_host_index
|
1382
|
+
)
|
1383
|
+
|
1384
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1385
|
+
'200': "NextNonce",
|
1386
|
+
'400': "ResultCode",
|
1387
|
+
}
|
1388
|
+
response_data = await self.api_client.call_api(
|
1389
|
+
*_param,
|
1390
|
+
_request_timeout=_request_timeout
|
1391
|
+
)
|
1392
|
+
await response_data.read()
|
1393
|
+
return self.api_client.response_deserialize(
|
1394
|
+
response_data=response_data,
|
1395
|
+
response_types_map=_response_types_map,
|
1396
|
+
)
|
1397
|
+
|
1398
|
+
|
1399
|
+
@validate_call
|
1400
|
+
async def next_nonce_without_preload_content(
|
1401
|
+
self,
|
1402
|
+
account_index: StrictInt,
|
1403
|
+
api_key_index: StrictInt,
|
1404
|
+
_request_timeout: Union[
|
1405
|
+
None,
|
1406
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1407
|
+
Tuple[
|
1408
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1409
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1410
|
+
]
|
1411
|
+
] = None,
|
1412
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1413
|
+
_content_type: Optional[StrictStr] = None,
|
1414
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1415
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1416
|
+
) -> RESTResponseType:
|
1417
|
+
"""nextNonce
|
1418
|
+
|
1419
|
+
Get next nonce for a specific account
|
1420
|
+
|
1421
|
+
:param account_index: (required)
|
1422
|
+
:type account_index: int
|
1423
|
+
:param api_key_index: (required)
|
1424
|
+
:type api_key_index: int
|
1425
|
+
:param _request_timeout: timeout setting for this request. If one
|
1426
|
+
number provided, it will be total request
|
1427
|
+
timeout. It can also be a pair (tuple) of
|
1428
|
+
(connection, read) timeouts.
|
1429
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1430
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1431
|
+
request; this effectively ignores the
|
1432
|
+
authentication in the spec for a single request.
|
1433
|
+
:type _request_auth: dict, optional
|
1434
|
+
:param _content_type: force content-type for the request.
|
1435
|
+
:type _content_type: str, Optional
|
1436
|
+
:param _headers: set to override the headers for a single
|
1437
|
+
request; this effectively ignores the headers
|
1438
|
+
in the spec for a single request.
|
1439
|
+
:type _headers: dict, optional
|
1440
|
+
:param _host_index: set to override the host_index for a single
|
1441
|
+
request; this effectively ignores the host_index
|
1442
|
+
in the spec for a single request.
|
1443
|
+
:type _host_index: int, optional
|
1444
|
+
:return: Returns the result object.
|
1445
|
+
""" # noqa: E501
|
1446
|
+
|
1447
|
+
_param = self._next_nonce_serialize(
|
1448
|
+
account_index=account_index,
|
1449
|
+
api_key_index=api_key_index,
|
1450
|
+
_request_auth=_request_auth,
|
1451
|
+
_content_type=_content_type,
|
1452
|
+
_headers=_headers,
|
1453
|
+
_host_index=_host_index
|
1454
|
+
)
|
1455
|
+
|
1456
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1457
|
+
'200': "NextNonce",
|
1458
|
+
'400': "ResultCode",
|
1459
|
+
}
|
1460
|
+
response_data = await self.api_client.call_api(
|
1461
|
+
*_param,
|
1462
|
+
_request_timeout=_request_timeout
|
1463
|
+
)
|
1464
|
+
return response_data.response
|
1465
|
+
|
1466
|
+
|
1467
|
+
def _next_nonce_serialize(
|
1468
|
+
self,
|
1469
|
+
account_index,
|
1470
|
+
api_key_index,
|
1471
|
+
_request_auth,
|
1472
|
+
_content_type,
|
1473
|
+
_headers,
|
1474
|
+
_host_index,
|
1475
|
+
) -> RequestSerialized:
|
1476
|
+
|
1477
|
+
_host = None
|
1478
|
+
|
1479
|
+
_collection_formats: Dict[str, str] = {
|
1480
|
+
}
|
1481
|
+
|
1482
|
+
_path_params: Dict[str, str] = {}
|
1483
|
+
_query_params: List[Tuple[str, str]] = []
|
1484
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1485
|
+
_form_params: List[Tuple[str, str]] = []
|
1486
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1487
|
+
_body_params: Optional[bytes] = None
|
1488
|
+
|
1489
|
+
# process the path parameters
|
1490
|
+
# process the query parameters
|
1491
|
+
if account_index is not None:
|
1492
|
+
|
1493
|
+
_query_params.append(('account_index', account_index))
|
1494
|
+
|
1495
|
+
if api_key_index is not None:
|
1496
|
+
|
1497
|
+
_query_params.append(('api_key_index', api_key_index))
|
1498
|
+
|
1499
|
+
# process the header parameters
|
1500
|
+
# process the form parameters
|
1501
|
+
# process the body parameter
|
1502
|
+
|
1503
|
+
|
1504
|
+
# set the HTTP header `Accept`
|
1505
|
+
if 'Accept' not in _header_params:
|
1506
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1507
|
+
[
|
1508
|
+
'application/json'
|
1509
|
+
]
|
1510
|
+
)
|
1511
|
+
|
1512
|
+
|
1513
|
+
# authentication setting
|
1514
|
+
_auth_settings: List[str] = [
|
1515
|
+
]
|
1516
|
+
|
1517
|
+
return self.api_client.param_serialize(
|
1518
|
+
method='GET',
|
1519
|
+
resource_path='/api/v1/nextNonce',
|
1520
|
+
path_params=_path_params,
|
1521
|
+
query_params=_query_params,
|
1522
|
+
header_params=_header_params,
|
1523
|
+
body=_body_params,
|
1524
|
+
post_params=_form_params,
|
1525
|
+
files=_files,
|
1526
|
+
auth_settings=_auth_settings,
|
1527
|
+
collection_formats=_collection_formats,
|
1528
|
+
_host=_host,
|
1529
|
+
_request_auth=_request_auth
|
1530
|
+
)
|
1531
|
+
|
1532
|
+
|
1533
|
+
|
1534
|
+
|
1535
|
+
@validate_call
|
1536
|
+
async def pending_txs(
|
1537
|
+
self,
|
1538
|
+
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
|
1539
|
+
index: Optional[StrictInt] = None,
|
1540
|
+
_request_timeout: Union[
|
1541
|
+
None,
|
1542
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1543
|
+
Tuple[
|
1544
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1545
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1546
|
+
]
|
1547
|
+
] = None,
|
1548
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1549
|
+
_content_type: Optional[StrictStr] = None,
|
1550
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1551
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1552
|
+
) -> Txs:
|
1553
|
+
"""pendingTxs
|
1554
|
+
|
1555
|
+
Get pending transactions
|
1556
|
+
|
1557
|
+
:param limit: (required)
|
1558
|
+
:type limit: int
|
1559
|
+
:param index:
|
1560
|
+
:type index: int
|
1561
|
+
:param _request_timeout: timeout setting for this request. If one
|
1562
|
+
number provided, it will be total request
|
1563
|
+
timeout. It can also be a pair (tuple) of
|
1564
|
+
(connection, read) timeouts.
|
1565
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1566
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1567
|
+
request; this effectively ignores the
|
1568
|
+
authentication in the spec for a single request.
|
1569
|
+
:type _request_auth: dict, optional
|
1570
|
+
:param _content_type: force content-type for the request.
|
1571
|
+
:type _content_type: str, Optional
|
1572
|
+
:param _headers: set to override the headers for a single
|
1573
|
+
request; this effectively ignores the headers
|
1574
|
+
in the spec for a single request.
|
1575
|
+
:type _headers: dict, optional
|
1576
|
+
:param _host_index: set to override the host_index for a single
|
1577
|
+
request; this effectively ignores the host_index
|
1578
|
+
in the spec for a single request.
|
1579
|
+
:type _host_index: int, optional
|
1580
|
+
:return: Returns the result object.
|
1581
|
+
""" # noqa: E501
|
1582
|
+
|
1583
|
+
_param = self._pending_txs_serialize(
|
1584
|
+
limit=limit,
|
1585
|
+
index=index,
|
1586
|
+
_request_auth=_request_auth,
|
1587
|
+
_content_type=_content_type,
|
1588
|
+
_headers=_headers,
|
1589
|
+
_host_index=_host_index
|
1590
|
+
)
|
1591
|
+
|
1592
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1593
|
+
'200': "Txs",
|
1594
|
+
'400': "ResultCode",
|
1595
|
+
}
|
1596
|
+
response_data = await self.api_client.call_api(
|
1597
|
+
*_param,
|
1598
|
+
_request_timeout=_request_timeout
|
1599
|
+
)
|
1600
|
+
await response_data.read()
|
1601
|
+
return self.api_client.response_deserialize(
|
1602
|
+
response_data=response_data,
|
1603
|
+
response_types_map=_response_types_map,
|
1604
|
+
).data
|
1605
|
+
|
1606
|
+
|
1607
|
+
@validate_call
|
1608
|
+
async def pending_txs_with_http_info(
|
1609
|
+
self,
|
1610
|
+
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
|
1611
|
+
index: Optional[StrictInt] = None,
|
1612
|
+
_request_timeout: Union[
|
1613
|
+
None,
|
1614
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1615
|
+
Tuple[
|
1616
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1617
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1618
|
+
]
|
1619
|
+
] = None,
|
1620
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1621
|
+
_content_type: Optional[StrictStr] = None,
|
1622
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1623
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1624
|
+
) -> ApiResponse[Txs]:
|
1625
|
+
"""pendingTxs
|
1626
|
+
|
1627
|
+
Get pending transactions
|
1628
|
+
|
1629
|
+
:param limit: (required)
|
1630
|
+
:type limit: int
|
1631
|
+
:param index:
|
1632
|
+
:type index: int
|
1633
|
+
:param _request_timeout: timeout setting for this request. If one
|
1634
|
+
number provided, it will be total request
|
1635
|
+
timeout. It can also be a pair (tuple) of
|
1636
|
+
(connection, read) timeouts.
|
1637
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1638
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1639
|
+
request; this effectively ignores the
|
1640
|
+
authentication in the spec for a single request.
|
1641
|
+
:type _request_auth: dict, optional
|
1642
|
+
:param _content_type: force content-type for the request.
|
1643
|
+
:type _content_type: str, Optional
|
1644
|
+
:param _headers: set to override the headers for a single
|
1645
|
+
request; this effectively ignores the headers
|
1646
|
+
in the spec for a single request.
|
1647
|
+
:type _headers: dict, optional
|
1648
|
+
:param _host_index: set to override the host_index for a single
|
1649
|
+
request; this effectively ignores the host_index
|
1650
|
+
in the spec for a single request.
|
1651
|
+
:type _host_index: int, optional
|
1652
|
+
:return: Returns the result object.
|
1653
|
+
""" # noqa: E501
|
1654
|
+
|
1655
|
+
_param = self._pending_txs_serialize(
|
1656
|
+
limit=limit,
|
1657
|
+
index=index,
|
1658
|
+
_request_auth=_request_auth,
|
1659
|
+
_content_type=_content_type,
|
1660
|
+
_headers=_headers,
|
1661
|
+
_host_index=_host_index
|
1662
|
+
)
|
1663
|
+
|
1664
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1665
|
+
'200': "Txs",
|
1666
|
+
'400': "ResultCode",
|
1667
|
+
}
|
1668
|
+
response_data = await self.api_client.call_api(
|
1669
|
+
*_param,
|
1670
|
+
_request_timeout=_request_timeout
|
1671
|
+
)
|
1672
|
+
await response_data.read()
|
1673
|
+
return self.api_client.response_deserialize(
|
1674
|
+
response_data=response_data,
|
1675
|
+
response_types_map=_response_types_map,
|
1676
|
+
)
|
1677
|
+
|
1678
|
+
|
1679
|
+
@validate_call
|
1680
|
+
async def pending_txs_without_preload_content(
|
1681
|
+
self,
|
1682
|
+
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
|
1683
|
+
index: Optional[StrictInt] = None,
|
1684
|
+
_request_timeout: Union[
|
1685
|
+
None,
|
1686
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1687
|
+
Tuple[
|
1688
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1689
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1690
|
+
]
|
1691
|
+
] = None,
|
1692
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1693
|
+
_content_type: Optional[StrictStr] = None,
|
1694
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1695
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1696
|
+
) -> RESTResponseType:
|
1697
|
+
"""pendingTxs
|
1698
|
+
|
1699
|
+
Get pending transactions
|
1700
|
+
|
1701
|
+
:param limit: (required)
|
1702
|
+
:type limit: int
|
1703
|
+
:param index:
|
1704
|
+
:type index: int
|
1705
|
+
:param _request_timeout: timeout setting for this request. If one
|
1706
|
+
number provided, it will be total request
|
1707
|
+
timeout. It can also be a pair (tuple) of
|
1708
|
+
(connection, read) timeouts.
|
1709
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1710
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1711
|
+
request; this effectively ignores the
|
1712
|
+
authentication in the spec for a single request.
|
1713
|
+
:type _request_auth: dict, optional
|
1714
|
+
:param _content_type: force content-type for the request.
|
1715
|
+
:type _content_type: str, Optional
|
1716
|
+
:param _headers: set to override the headers for a single
|
1717
|
+
request; this effectively ignores the headers
|
1718
|
+
in the spec for a single request.
|
1719
|
+
:type _headers: dict, optional
|
1720
|
+
:param _host_index: set to override the host_index for a single
|
1721
|
+
request; this effectively ignores the host_index
|
1722
|
+
in the spec for a single request.
|
1723
|
+
:type _host_index: int, optional
|
1724
|
+
:return: Returns the result object.
|
1725
|
+
""" # noqa: E501
|
1726
|
+
|
1727
|
+
_param = self._pending_txs_serialize(
|
1728
|
+
limit=limit,
|
1729
|
+
index=index,
|
1730
|
+
_request_auth=_request_auth,
|
1731
|
+
_content_type=_content_type,
|
1732
|
+
_headers=_headers,
|
1733
|
+
_host_index=_host_index
|
1734
|
+
)
|
1735
|
+
|
1736
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1737
|
+
'200': "Txs",
|
1738
|
+
'400': "ResultCode",
|
1739
|
+
}
|
1740
|
+
response_data = await self.api_client.call_api(
|
1741
|
+
*_param,
|
1742
|
+
_request_timeout=_request_timeout
|
1743
|
+
)
|
1744
|
+
return response_data.response
|
1745
|
+
|
1746
|
+
|
1747
|
+
def _pending_txs_serialize(
|
1748
|
+
self,
|
1749
|
+
limit,
|
1750
|
+
index,
|
1751
|
+
_request_auth,
|
1752
|
+
_content_type,
|
1753
|
+
_headers,
|
1754
|
+
_host_index,
|
1755
|
+
) -> RequestSerialized:
|
1756
|
+
|
1757
|
+
_host = None
|
1758
|
+
|
1759
|
+
_collection_formats: Dict[str, str] = {
|
1760
|
+
}
|
1761
|
+
|
1762
|
+
_path_params: Dict[str, str] = {}
|
1763
|
+
_query_params: List[Tuple[str, str]] = []
|
1764
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1765
|
+
_form_params: List[Tuple[str, str]] = []
|
1766
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1767
|
+
_body_params: Optional[bytes] = None
|
1768
|
+
|
1769
|
+
# process the path parameters
|
1770
|
+
# process the query parameters
|
1771
|
+
if index is not None:
|
1772
|
+
|
1773
|
+
_query_params.append(('index', index))
|
1774
|
+
|
1775
|
+
if limit is not None:
|
1776
|
+
|
1777
|
+
_query_params.append(('limit', limit))
|
1778
|
+
|
1779
|
+
# process the header parameters
|
1780
|
+
# process the form parameters
|
1781
|
+
# process the body parameter
|
1782
|
+
|
1783
|
+
|
1784
|
+
# set the HTTP header `Accept`
|
1785
|
+
if 'Accept' not in _header_params:
|
1786
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1787
|
+
[
|
1788
|
+
'application/json'
|
1789
|
+
]
|
1790
|
+
)
|
1791
|
+
|
1792
|
+
|
1793
|
+
# authentication setting
|
1794
|
+
_auth_settings: List[str] = [
|
1795
|
+
]
|
1796
|
+
|
1797
|
+
return self.api_client.param_serialize(
|
1798
|
+
method='GET',
|
1799
|
+
resource_path='/api/v1/pendingTxs',
|
1800
|
+
path_params=_path_params,
|
1801
|
+
query_params=_query_params,
|
1802
|
+
header_params=_header_params,
|
1803
|
+
body=_body_params,
|
1804
|
+
post_params=_form_params,
|
1805
|
+
files=_files,
|
1806
|
+
auth_settings=_auth_settings,
|
1807
|
+
collection_formats=_collection_formats,
|
1808
|
+
_host=_host,
|
1809
|
+
_request_auth=_request_auth
|
1810
|
+
)
|
1811
|
+
|
1812
|
+
|
1813
|
+
|
1814
|
+
|
1815
|
+
@validate_call
|
1816
|
+
async def send_tx(
|
1817
|
+
self,
|
1818
|
+
tx_type: StrictInt,
|
1819
|
+
tx_info: StrictStr,
|
1820
|
+
price_protection: Optional[StrictBool] = None,
|
1821
|
+
_request_timeout: Union[
|
1822
|
+
None,
|
1823
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1824
|
+
Tuple[
|
1825
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1826
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1827
|
+
]
|
1828
|
+
] = None,
|
1829
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1830
|
+
_content_type: Optional[StrictStr] = None,
|
1831
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1832
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1833
|
+
) -> TxHash:
|
1834
|
+
"""sendTx
|
1835
|
+
|
1836
|
+
You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
|
1837
|
+
|
1838
|
+
:param tx_type: (required)
|
1839
|
+
:type tx_type: int
|
1840
|
+
:param tx_info: (required)
|
1841
|
+
:type tx_info: str
|
1842
|
+
:param price_protection:
|
1843
|
+
:type price_protection: bool
|
1844
|
+
:param _request_timeout: timeout setting for this request. If one
|
1845
|
+
number provided, it will be total request
|
1846
|
+
timeout. It can also be a pair (tuple) of
|
1847
|
+
(connection, read) timeouts.
|
1848
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1849
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1850
|
+
request; this effectively ignores the
|
1851
|
+
authentication in the spec for a single request.
|
1852
|
+
:type _request_auth: dict, optional
|
1853
|
+
:param _content_type: force content-type for the request.
|
1854
|
+
:type _content_type: str, Optional
|
1855
|
+
:param _headers: set to override the headers for a single
|
1856
|
+
request; this effectively ignores the headers
|
1857
|
+
in the spec for a single request.
|
1858
|
+
:type _headers: dict, optional
|
1859
|
+
:param _host_index: set to override the host_index for a single
|
1860
|
+
request; this effectively ignores the host_index
|
1861
|
+
in the spec for a single request.
|
1862
|
+
:type _host_index: int, optional
|
1863
|
+
:return: Returns the result object.
|
1864
|
+
""" # noqa: E501
|
1865
|
+
|
1866
|
+
_param = self._send_tx_serialize(
|
1867
|
+
tx_type=tx_type,
|
1868
|
+
tx_info=tx_info,
|
1869
|
+
price_protection=price_protection,
|
1870
|
+
_request_auth=_request_auth,
|
1871
|
+
_content_type=_content_type,
|
1872
|
+
_headers=_headers,
|
1873
|
+
_host_index=_host_index
|
1874
|
+
)
|
1875
|
+
|
1876
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1877
|
+
'200': "TxHash",
|
1878
|
+
'400': "ResultCode",
|
1879
|
+
}
|
1880
|
+
response_data = await self.api_client.call_api(
|
1881
|
+
*_param,
|
1882
|
+
_request_timeout=_request_timeout
|
1883
|
+
)
|
1884
|
+
await response_data.read()
|
1885
|
+
return self.api_client.response_deserialize(
|
1886
|
+
response_data=response_data,
|
1887
|
+
response_types_map=_response_types_map,
|
1888
|
+
).data
|
1889
|
+
|
1890
|
+
|
1891
|
+
@validate_call
|
1892
|
+
async def send_tx_with_http_info(
|
1893
|
+
self,
|
1894
|
+
tx_type: StrictInt,
|
1895
|
+
tx_info: StrictStr,
|
1896
|
+
price_protection: Optional[StrictBool] = None,
|
1897
|
+
_request_timeout: Union[
|
1898
|
+
None,
|
1899
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1900
|
+
Tuple[
|
1901
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1902
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1903
|
+
]
|
1904
|
+
] = None,
|
1905
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1906
|
+
_content_type: Optional[StrictStr] = None,
|
1907
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1908
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1909
|
+
) -> ApiResponse[TxHash]:
|
1910
|
+
"""sendTx
|
1911
|
+
|
1912
|
+
You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
|
1913
|
+
|
1914
|
+
:param tx_type: (required)
|
1915
|
+
:type tx_type: int
|
1916
|
+
:param tx_info: (required)
|
1917
|
+
:type tx_info: str
|
1918
|
+
:param price_protection:
|
1919
|
+
:type price_protection: bool
|
1920
|
+
:param _request_timeout: timeout setting for this request. If one
|
1921
|
+
number provided, it will be total request
|
1922
|
+
timeout. It can also be a pair (tuple) of
|
1923
|
+
(connection, read) timeouts.
|
1924
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1925
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1926
|
+
request; this effectively ignores the
|
1927
|
+
authentication in the spec for a single request.
|
1928
|
+
:type _request_auth: dict, optional
|
1929
|
+
:param _content_type: force content-type for the request.
|
1930
|
+
:type _content_type: str, Optional
|
1931
|
+
:param _headers: set to override the headers for a single
|
1932
|
+
request; this effectively ignores the headers
|
1933
|
+
in the spec for a single request.
|
1934
|
+
:type _headers: dict, optional
|
1935
|
+
:param _host_index: set to override the host_index for a single
|
1936
|
+
request; this effectively ignores the host_index
|
1937
|
+
in the spec for a single request.
|
1938
|
+
:type _host_index: int, optional
|
1939
|
+
:return: Returns the result object.
|
1940
|
+
""" # noqa: E501
|
1941
|
+
|
1942
|
+
_param = self._send_tx_serialize(
|
1943
|
+
tx_type=tx_type,
|
1944
|
+
tx_info=tx_info,
|
1945
|
+
price_protection=price_protection,
|
1946
|
+
_request_auth=_request_auth,
|
1947
|
+
_content_type=_content_type,
|
1948
|
+
_headers=_headers,
|
1949
|
+
_host_index=_host_index
|
1950
|
+
)
|
1951
|
+
|
1952
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1953
|
+
'200': "TxHash",
|
1954
|
+
'400': "ResultCode",
|
1955
|
+
}
|
1956
|
+
response_data = await self.api_client.call_api(
|
1957
|
+
*_param,
|
1958
|
+
_request_timeout=_request_timeout
|
1959
|
+
)
|
1960
|
+
await response_data.read()
|
1961
|
+
return self.api_client.response_deserialize(
|
1962
|
+
response_data=response_data,
|
1963
|
+
response_types_map=_response_types_map,
|
1964
|
+
)
|
1965
|
+
|
1966
|
+
|
1967
|
+
@validate_call
|
1968
|
+
async def send_tx_without_preload_content(
|
1969
|
+
self,
|
1970
|
+
tx_type: StrictInt,
|
1971
|
+
tx_info: StrictStr,
|
1972
|
+
price_protection: Optional[StrictBool] = None,
|
1973
|
+
_request_timeout: Union[
|
1974
|
+
None,
|
1975
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1976
|
+
Tuple[
|
1977
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1978
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1979
|
+
]
|
1980
|
+
] = None,
|
1981
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1982
|
+
_content_type: Optional[StrictStr] = None,
|
1983
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1984
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1985
|
+
) -> RESTResponseType:
|
1986
|
+
"""sendTx
|
1987
|
+
|
1988
|
+
You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
|
1989
|
+
|
1990
|
+
:param tx_type: (required)
|
1991
|
+
:type tx_type: int
|
1992
|
+
:param tx_info: (required)
|
1993
|
+
:type tx_info: str
|
1994
|
+
:param price_protection:
|
1995
|
+
:type price_protection: bool
|
1996
|
+
:param _request_timeout: timeout setting for this request. If one
|
1997
|
+
number provided, it will be total request
|
1998
|
+
timeout. It can also be a pair (tuple) of
|
1999
|
+
(connection, read) timeouts.
|
2000
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2001
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2002
|
+
request; this effectively ignores the
|
2003
|
+
authentication in the spec for a single request.
|
2004
|
+
:type _request_auth: dict, optional
|
2005
|
+
:param _content_type: force content-type for the request.
|
2006
|
+
:type _content_type: str, Optional
|
2007
|
+
:param _headers: set to override the headers for a single
|
2008
|
+
request; this effectively ignores the headers
|
2009
|
+
in the spec for a single request.
|
2010
|
+
:type _headers: dict, optional
|
2011
|
+
:param _host_index: set to override the host_index for a single
|
2012
|
+
request; this effectively ignores the host_index
|
2013
|
+
in the spec for a single request.
|
2014
|
+
:type _host_index: int, optional
|
2015
|
+
:return: Returns the result object.
|
2016
|
+
""" # noqa: E501
|
2017
|
+
|
2018
|
+
_param = self._send_tx_serialize(
|
2019
|
+
tx_type=tx_type,
|
2020
|
+
tx_info=tx_info,
|
2021
|
+
price_protection=price_protection,
|
2022
|
+
_request_auth=_request_auth,
|
2023
|
+
_content_type=_content_type,
|
2024
|
+
_headers=_headers,
|
2025
|
+
_host_index=_host_index
|
2026
|
+
)
|
2027
|
+
|
2028
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2029
|
+
'200': "TxHash",
|
2030
|
+
'400': "ResultCode",
|
2031
|
+
}
|
2032
|
+
response_data = await self.api_client.call_api(
|
2033
|
+
*_param,
|
2034
|
+
_request_timeout=_request_timeout
|
2035
|
+
)
|
2036
|
+
return response_data.response
|
2037
|
+
|
2038
|
+
|
2039
|
+
def _send_tx_serialize(
|
2040
|
+
self,
|
2041
|
+
tx_type,
|
2042
|
+
tx_info,
|
2043
|
+
price_protection,
|
2044
|
+
_request_auth,
|
2045
|
+
_content_type,
|
2046
|
+
_headers,
|
2047
|
+
_host_index,
|
2048
|
+
) -> RequestSerialized:
|
2049
|
+
|
2050
|
+
_host = None
|
2051
|
+
|
2052
|
+
_collection_formats: Dict[str, str] = {
|
2053
|
+
}
|
2054
|
+
|
2055
|
+
_path_params: Dict[str, str] = {}
|
2056
|
+
_query_params: List[Tuple[str, str]] = []
|
2057
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2058
|
+
_form_params: List[Tuple[str, str]] = []
|
2059
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
2060
|
+
_body_params: Optional[bytes] = None
|
2061
|
+
|
2062
|
+
# process the path parameters
|
2063
|
+
# process the query parameters
|
2064
|
+
# process the header parameters
|
2065
|
+
# process the form parameters
|
2066
|
+
if tx_type is not None:
|
2067
|
+
_form_params.append(('tx_type', tx_type))
|
2068
|
+
if tx_info is not None:
|
2069
|
+
_form_params.append(('tx_info', tx_info))
|
2070
|
+
if price_protection is not None:
|
2071
|
+
_form_params.append(('price_protection', price_protection))
|
2072
|
+
# process the body parameter
|
2073
|
+
|
2074
|
+
|
2075
|
+
# set the HTTP header `Accept`
|
2076
|
+
if 'Accept' not in _header_params:
|
2077
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2078
|
+
[
|
2079
|
+
'application/json'
|
2080
|
+
]
|
2081
|
+
)
|
2082
|
+
|
2083
|
+
# set the HTTP header `Content-Type`
|
2084
|
+
if _content_type:
|
2085
|
+
_header_params['Content-Type'] = _content_type
|
2086
|
+
else:
|
2087
|
+
_default_content_type = (
|
2088
|
+
self.api_client.select_header_content_type(
|
2089
|
+
[
|
2090
|
+
'multipart/form-data'
|
2091
|
+
]
|
2092
|
+
)
|
2093
|
+
)
|
2094
|
+
if _default_content_type is not None:
|
2095
|
+
_header_params['Content-Type'] = _default_content_type
|
2096
|
+
|
2097
|
+
# authentication setting
|
2098
|
+
_auth_settings: List[str] = [
|
2099
|
+
]
|
2100
|
+
|
2101
|
+
return self.api_client.param_serialize(
|
2102
|
+
method='POST',
|
2103
|
+
resource_path='/api/v1/sendTx',
|
2104
|
+
path_params=_path_params,
|
2105
|
+
query_params=_query_params,
|
2106
|
+
header_params=_header_params,
|
2107
|
+
body=_body_params,
|
2108
|
+
post_params=_form_params,
|
2109
|
+
files=_files,
|
2110
|
+
auth_settings=_auth_settings,
|
2111
|
+
collection_formats=_collection_formats,
|
2112
|
+
_host=_host,
|
2113
|
+
_request_auth=_request_auth
|
2114
|
+
)
|
2115
|
+
|
2116
|
+
|
2117
|
+
|
2118
|
+
|
2119
|
+
@validate_call
|
2120
|
+
async def send_tx_batch(
|
2121
|
+
self,
|
2122
|
+
tx_types: StrictStr,
|
2123
|
+
tx_infos: StrictStr,
|
2124
|
+
_request_timeout: Union[
|
2125
|
+
None,
|
2126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2127
|
+
Tuple[
|
2128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2130
|
+
]
|
2131
|
+
] = None,
|
2132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2133
|
+
_content_type: Optional[StrictStr] = None,
|
2134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2136
|
+
) -> TxHashes:
|
2137
|
+
"""sendTxBatch
|
2138
|
+
|
2139
|
+
You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
|
2140
|
+
|
2141
|
+
:param tx_types: (required)
|
2142
|
+
:type tx_types: str
|
2143
|
+
:param tx_infos: (required)
|
2144
|
+
:type tx_infos: str
|
2145
|
+
:param _request_timeout: timeout setting for this request. If one
|
2146
|
+
number provided, it will be total request
|
2147
|
+
timeout. It can also be a pair (tuple) of
|
2148
|
+
(connection, read) timeouts.
|
2149
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2150
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2151
|
+
request; this effectively ignores the
|
2152
|
+
authentication in the spec for a single request.
|
2153
|
+
:type _request_auth: dict, optional
|
2154
|
+
:param _content_type: force content-type for the request.
|
2155
|
+
:type _content_type: str, Optional
|
2156
|
+
:param _headers: set to override the headers for a single
|
2157
|
+
request; this effectively ignores the headers
|
2158
|
+
in the spec for a single request.
|
2159
|
+
:type _headers: dict, optional
|
2160
|
+
:param _host_index: set to override the host_index for a single
|
2161
|
+
request; this effectively ignores the host_index
|
2162
|
+
in the spec for a single request.
|
2163
|
+
:type _host_index: int, optional
|
2164
|
+
:return: Returns the result object.
|
2165
|
+
""" # noqa: E501
|
2166
|
+
|
2167
|
+
_param = self._send_tx_batch_serialize(
|
2168
|
+
tx_types=tx_types,
|
2169
|
+
tx_infos=tx_infos,
|
2170
|
+
_request_auth=_request_auth,
|
2171
|
+
_content_type=_content_type,
|
2172
|
+
_headers=_headers,
|
2173
|
+
_host_index=_host_index
|
2174
|
+
)
|
2175
|
+
|
2176
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2177
|
+
'200': "TxHashes",
|
2178
|
+
'400': "ResultCode",
|
2179
|
+
}
|
2180
|
+
response_data = await self.api_client.call_api(
|
2181
|
+
*_param,
|
2182
|
+
_request_timeout=_request_timeout
|
2183
|
+
)
|
2184
|
+
await response_data.read()
|
2185
|
+
return self.api_client.response_deserialize(
|
2186
|
+
response_data=response_data,
|
2187
|
+
response_types_map=_response_types_map,
|
2188
|
+
).data
|
2189
|
+
|
2190
|
+
|
2191
|
+
@validate_call
|
2192
|
+
async def send_tx_batch_with_http_info(
|
2193
|
+
self,
|
2194
|
+
tx_types: StrictStr,
|
2195
|
+
tx_infos: StrictStr,
|
2196
|
+
_request_timeout: Union[
|
2197
|
+
None,
|
2198
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2199
|
+
Tuple[
|
2200
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2201
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2202
|
+
]
|
2203
|
+
] = None,
|
2204
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2205
|
+
_content_type: Optional[StrictStr] = None,
|
2206
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2207
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2208
|
+
) -> ApiResponse[TxHashes]:
|
2209
|
+
"""sendTxBatch
|
2210
|
+
|
2211
|
+
You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
|
2212
|
+
|
2213
|
+
:param tx_types: (required)
|
2214
|
+
:type tx_types: str
|
2215
|
+
:param tx_infos: (required)
|
2216
|
+
:type tx_infos: str
|
2217
|
+
:param _request_timeout: timeout setting for this request. If one
|
2218
|
+
number provided, it will be total request
|
2219
|
+
timeout. It can also be a pair (tuple) of
|
2220
|
+
(connection, read) timeouts.
|
2221
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2222
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2223
|
+
request; this effectively ignores the
|
2224
|
+
authentication in the spec for a single request.
|
2225
|
+
:type _request_auth: dict, optional
|
2226
|
+
:param _content_type: force content-type for the request.
|
2227
|
+
:type _content_type: str, Optional
|
2228
|
+
:param _headers: set to override the headers for a single
|
2229
|
+
request; this effectively ignores the headers
|
2230
|
+
in the spec for a single request.
|
2231
|
+
:type _headers: dict, optional
|
2232
|
+
:param _host_index: set to override the host_index for a single
|
2233
|
+
request; this effectively ignores the host_index
|
2234
|
+
in the spec for a single request.
|
2235
|
+
:type _host_index: int, optional
|
2236
|
+
:return: Returns the result object.
|
2237
|
+
""" # noqa: E501
|
2238
|
+
|
2239
|
+
_param = self._send_tx_batch_serialize(
|
2240
|
+
tx_types=tx_types,
|
2241
|
+
tx_infos=tx_infos,
|
2242
|
+
_request_auth=_request_auth,
|
2243
|
+
_content_type=_content_type,
|
2244
|
+
_headers=_headers,
|
2245
|
+
_host_index=_host_index
|
2246
|
+
)
|
2247
|
+
|
2248
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2249
|
+
'200': "TxHashes",
|
2250
|
+
'400': "ResultCode",
|
2251
|
+
}
|
2252
|
+
response_data = await self.api_client.call_api(
|
2253
|
+
*_param,
|
2254
|
+
_request_timeout=_request_timeout
|
2255
|
+
)
|
2256
|
+
await response_data.read()
|
2257
|
+
return self.api_client.response_deserialize(
|
2258
|
+
response_data=response_data,
|
2259
|
+
response_types_map=_response_types_map,
|
2260
|
+
)
|
2261
|
+
|
2262
|
+
|
2263
|
+
@validate_call
|
2264
|
+
async def send_tx_batch_without_preload_content(
|
2265
|
+
self,
|
2266
|
+
tx_types: StrictStr,
|
2267
|
+
tx_infos: StrictStr,
|
2268
|
+
_request_timeout: Union[
|
2269
|
+
None,
|
2270
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2271
|
+
Tuple[
|
2272
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2273
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2274
|
+
]
|
2275
|
+
] = None,
|
2276
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2277
|
+
_content_type: Optional[StrictStr] = None,
|
2278
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2279
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2280
|
+
) -> RESTResponseType:
|
2281
|
+
"""sendTxBatch
|
2282
|
+
|
2283
|
+
You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
|
2284
|
+
|
2285
|
+
:param tx_types: (required)
|
2286
|
+
:type tx_types: str
|
2287
|
+
:param tx_infos: (required)
|
2288
|
+
:type tx_infos: str
|
2289
|
+
:param _request_timeout: timeout setting for this request. If one
|
2290
|
+
number provided, it will be total request
|
2291
|
+
timeout. It can also be a pair (tuple) of
|
2292
|
+
(connection, read) timeouts.
|
2293
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2294
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2295
|
+
request; this effectively ignores the
|
2296
|
+
authentication in the spec for a single request.
|
2297
|
+
:type _request_auth: dict, optional
|
2298
|
+
:param _content_type: force content-type for the request.
|
2299
|
+
:type _content_type: str, Optional
|
2300
|
+
:param _headers: set to override the headers for a single
|
2301
|
+
request; this effectively ignores the headers
|
2302
|
+
in the spec for a single request.
|
2303
|
+
:type _headers: dict, optional
|
2304
|
+
:param _host_index: set to override the host_index for a single
|
2305
|
+
request; this effectively ignores the host_index
|
2306
|
+
in the spec for a single request.
|
2307
|
+
:type _host_index: int, optional
|
2308
|
+
:return: Returns the result object.
|
2309
|
+
""" # noqa: E501
|
2310
|
+
|
2311
|
+
_param = self._send_tx_batch_serialize(
|
2312
|
+
tx_types=tx_types,
|
2313
|
+
tx_infos=tx_infos,
|
2314
|
+
_request_auth=_request_auth,
|
2315
|
+
_content_type=_content_type,
|
2316
|
+
_headers=_headers,
|
2317
|
+
_host_index=_host_index
|
2318
|
+
)
|
2319
|
+
|
2320
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2321
|
+
'200': "TxHashes",
|
2322
|
+
'400': "ResultCode",
|
2323
|
+
}
|
2324
|
+
response_data = await self.api_client.call_api(
|
2325
|
+
*_param,
|
2326
|
+
_request_timeout=_request_timeout
|
2327
|
+
)
|
2328
|
+
return response_data.response
|
2329
|
+
|
2330
|
+
|
2331
|
+
def _send_tx_batch_serialize(
|
2332
|
+
self,
|
2333
|
+
tx_types,
|
2334
|
+
tx_infos,
|
2335
|
+
_request_auth,
|
2336
|
+
_content_type,
|
2337
|
+
_headers,
|
2338
|
+
_host_index,
|
2339
|
+
) -> RequestSerialized:
|
2340
|
+
|
2341
|
+
_host = None
|
2342
|
+
|
2343
|
+
_collection_formats: Dict[str, str] = {
|
2344
|
+
}
|
2345
|
+
|
2346
|
+
_path_params: Dict[str, str] = {}
|
2347
|
+
_query_params: List[Tuple[str, str]] = []
|
2348
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2349
|
+
_form_params: List[Tuple[str, str]] = []
|
2350
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
2351
|
+
_body_params: Optional[bytes] = None
|
2352
|
+
|
2353
|
+
# process the path parameters
|
2354
|
+
# process the query parameters
|
2355
|
+
# process the header parameters
|
2356
|
+
# process the form parameters
|
2357
|
+
if tx_types is not None:
|
2358
|
+
_form_params.append(('tx_types', tx_types))
|
2359
|
+
if tx_infos is not None:
|
2360
|
+
_form_params.append(('tx_infos', tx_infos))
|
2361
|
+
# process the body parameter
|
2362
|
+
|
2363
|
+
|
2364
|
+
# set the HTTP header `Accept`
|
2365
|
+
if 'Accept' not in _header_params:
|
2366
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2367
|
+
[
|
2368
|
+
'application/json'
|
2369
|
+
]
|
2370
|
+
)
|
2371
|
+
|
2372
|
+
# set the HTTP header `Content-Type`
|
2373
|
+
if _content_type:
|
2374
|
+
_header_params['Content-Type'] = _content_type
|
2375
|
+
else:
|
2376
|
+
_default_content_type = (
|
2377
|
+
self.api_client.select_header_content_type(
|
2378
|
+
[
|
2379
|
+
'multipart/form-data'
|
2380
|
+
]
|
2381
|
+
)
|
2382
|
+
)
|
2383
|
+
if _default_content_type is not None:
|
2384
|
+
_header_params['Content-Type'] = _default_content_type
|
2385
|
+
|
2386
|
+
# authentication setting
|
2387
|
+
_auth_settings: List[str] = [
|
2388
|
+
]
|
2389
|
+
|
2390
|
+
return self.api_client.param_serialize(
|
2391
|
+
method='POST',
|
2392
|
+
resource_path='/api/v1/sendTxBatch',
|
2393
|
+
path_params=_path_params,
|
2394
|
+
query_params=_query_params,
|
2395
|
+
header_params=_header_params,
|
2396
|
+
body=_body_params,
|
2397
|
+
post_params=_form_params,
|
2398
|
+
files=_files,
|
2399
|
+
auth_settings=_auth_settings,
|
2400
|
+
collection_formats=_collection_formats,
|
2401
|
+
_host=_host,
|
2402
|
+
_request_auth=_request_auth
|
2403
|
+
)
|
2404
|
+
|
2405
|
+
|
2406
|
+
|
2407
|
+
|
2408
|
+
@validate_call
|
2409
|
+
async def tx(
|
2410
|
+
self,
|
2411
|
+
by: StrictStr,
|
2412
|
+
value: StrictStr,
|
2413
|
+
_request_timeout: Union[
|
2414
|
+
None,
|
2415
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2416
|
+
Tuple[
|
2417
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2418
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2419
|
+
]
|
2420
|
+
] = None,
|
2421
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2422
|
+
_content_type: Optional[StrictStr] = None,
|
2423
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2424
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2425
|
+
) -> EnrichedTx:
|
2426
|
+
"""tx
|
2427
|
+
|
2428
|
+
Get transaction by hash or sequence index
|
2429
|
+
|
2430
|
+
:param by: (required)
|
2431
|
+
:type by: str
|
2432
|
+
:param value: (required)
|
2433
|
+
:type value: str
|
2434
|
+
:param _request_timeout: timeout setting for this request. If one
|
2435
|
+
number provided, it will be total request
|
2436
|
+
timeout. It can also be a pair (tuple) of
|
2437
|
+
(connection, read) timeouts.
|
2438
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2439
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2440
|
+
request; this effectively ignores the
|
2441
|
+
authentication in the spec for a single request.
|
2442
|
+
:type _request_auth: dict, optional
|
2443
|
+
:param _content_type: force content-type for the request.
|
2444
|
+
:type _content_type: str, Optional
|
2445
|
+
:param _headers: set to override the headers for a single
|
2446
|
+
request; this effectively ignores the headers
|
2447
|
+
in the spec for a single request.
|
2448
|
+
:type _headers: dict, optional
|
2449
|
+
:param _host_index: set to override the host_index for a single
|
2450
|
+
request; this effectively ignores the host_index
|
2451
|
+
in the spec for a single request.
|
2452
|
+
:type _host_index: int, optional
|
2453
|
+
:return: Returns the result object.
|
2454
|
+
""" # noqa: E501
|
2455
|
+
|
2456
|
+
_param = self._tx_serialize(
|
2457
|
+
by=by,
|
2458
|
+
value=value,
|
2459
|
+
_request_auth=_request_auth,
|
2460
|
+
_content_type=_content_type,
|
2461
|
+
_headers=_headers,
|
2462
|
+
_host_index=_host_index
|
2463
|
+
)
|
2464
|
+
|
2465
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2466
|
+
'200': "EnrichedTx",
|
2467
|
+
'400': "ResultCode",
|
2468
|
+
}
|
2469
|
+
response_data = await self.api_client.call_api(
|
2470
|
+
*_param,
|
2471
|
+
_request_timeout=_request_timeout
|
2472
|
+
)
|
2473
|
+
await response_data.read()
|
2474
|
+
return self.api_client.response_deserialize(
|
2475
|
+
response_data=response_data,
|
2476
|
+
response_types_map=_response_types_map,
|
2477
|
+
).data
|
2478
|
+
|
2479
|
+
|
2480
|
+
@validate_call
|
2481
|
+
async def tx_with_http_info(
|
2482
|
+
self,
|
2483
|
+
by: StrictStr,
|
2484
|
+
value: StrictStr,
|
2485
|
+
_request_timeout: Union[
|
2486
|
+
None,
|
2487
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2488
|
+
Tuple[
|
2489
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2490
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2491
|
+
]
|
2492
|
+
] = None,
|
2493
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2494
|
+
_content_type: Optional[StrictStr] = None,
|
2495
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2496
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2497
|
+
) -> ApiResponse[EnrichedTx]:
|
2498
|
+
"""tx
|
2499
|
+
|
2500
|
+
Get transaction by hash or sequence index
|
2501
|
+
|
2502
|
+
:param by: (required)
|
2503
|
+
:type by: str
|
2504
|
+
:param value: (required)
|
2505
|
+
:type value: str
|
2506
|
+
:param _request_timeout: timeout setting for this request. If one
|
2507
|
+
number provided, it will be total request
|
2508
|
+
timeout. It can also be a pair (tuple) of
|
2509
|
+
(connection, read) timeouts.
|
2510
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2511
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2512
|
+
request; this effectively ignores the
|
2513
|
+
authentication in the spec for a single request.
|
2514
|
+
:type _request_auth: dict, optional
|
2515
|
+
:param _content_type: force content-type for the request.
|
2516
|
+
:type _content_type: str, Optional
|
2517
|
+
:param _headers: set to override the headers for a single
|
2518
|
+
request; this effectively ignores the headers
|
2519
|
+
in the spec for a single request.
|
2520
|
+
:type _headers: dict, optional
|
2521
|
+
:param _host_index: set to override the host_index for a single
|
2522
|
+
request; this effectively ignores the host_index
|
2523
|
+
in the spec for a single request.
|
2524
|
+
:type _host_index: int, optional
|
2525
|
+
:return: Returns the result object.
|
2526
|
+
""" # noqa: E501
|
2527
|
+
|
2528
|
+
_param = self._tx_serialize(
|
2529
|
+
by=by,
|
2530
|
+
value=value,
|
2531
|
+
_request_auth=_request_auth,
|
2532
|
+
_content_type=_content_type,
|
2533
|
+
_headers=_headers,
|
2534
|
+
_host_index=_host_index
|
2535
|
+
)
|
2536
|
+
|
2537
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2538
|
+
'200': "EnrichedTx",
|
2539
|
+
'400': "ResultCode",
|
2540
|
+
}
|
2541
|
+
response_data = await self.api_client.call_api(
|
2542
|
+
*_param,
|
2543
|
+
_request_timeout=_request_timeout
|
2544
|
+
)
|
2545
|
+
await response_data.read()
|
2546
|
+
return self.api_client.response_deserialize(
|
2547
|
+
response_data=response_data,
|
2548
|
+
response_types_map=_response_types_map,
|
2549
|
+
)
|
2550
|
+
|
2551
|
+
|
2552
|
+
@validate_call
|
2553
|
+
async def tx_without_preload_content(
|
2554
|
+
self,
|
2555
|
+
by: StrictStr,
|
2556
|
+
value: StrictStr,
|
2557
|
+
_request_timeout: Union[
|
2558
|
+
None,
|
2559
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2560
|
+
Tuple[
|
2561
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2562
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2563
|
+
]
|
2564
|
+
] = None,
|
2565
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2566
|
+
_content_type: Optional[StrictStr] = None,
|
2567
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2568
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2569
|
+
) -> RESTResponseType:
|
2570
|
+
"""tx
|
2571
|
+
|
2572
|
+
Get transaction by hash or sequence index
|
2573
|
+
|
2574
|
+
:param by: (required)
|
2575
|
+
:type by: str
|
2576
|
+
:param value: (required)
|
2577
|
+
:type value: str
|
2578
|
+
:param _request_timeout: timeout setting for this request. If one
|
2579
|
+
number provided, it will be total request
|
2580
|
+
timeout. It can also be a pair (tuple) of
|
2581
|
+
(connection, read) timeouts.
|
2582
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2583
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2584
|
+
request; this effectively ignores the
|
2585
|
+
authentication in the spec for a single request.
|
2586
|
+
:type _request_auth: dict, optional
|
2587
|
+
:param _content_type: force content-type for the request.
|
2588
|
+
:type _content_type: str, Optional
|
2589
|
+
:param _headers: set to override the headers for a single
|
2590
|
+
request; this effectively ignores the headers
|
2591
|
+
in the spec for a single request.
|
2592
|
+
:type _headers: dict, optional
|
2593
|
+
:param _host_index: set to override the host_index for a single
|
2594
|
+
request; this effectively ignores the host_index
|
2595
|
+
in the spec for a single request.
|
2596
|
+
:type _host_index: int, optional
|
2597
|
+
:return: Returns the result object.
|
2598
|
+
""" # noqa: E501
|
2599
|
+
|
2600
|
+
_param = self._tx_serialize(
|
2601
|
+
by=by,
|
2602
|
+
value=value,
|
2603
|
+
_request_auth=_request_auth,
|
2604
|
+
_content_type=_content_type,
|
2605
|
+
_headers=_headers,
|
2606
|
+
_host_index=_host_index
|
2607
|
+
)
|
2608
|
+
|
2609
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2610
|
+
'200': "EnrichedTx",
|
2611
|
+
'400': "ResultCode",
|
2612
|
+
}
|
2613
|
+
response_data = await self.api_client.call_api(
|
2614
|
+
*_param,
|
2615
|
+
_request_timeout=_request_timeout
|
2616
|
+
)
|
2617
|
+
return response_data.response
|
2618
|
+
|
2619
|
+
|
2620
|
+
def _tx_serialize(
|
2621
|
+
self,
|
2622
|
+
by,
|
2623
|
+
value,
|
2624
|
+
_request_auth,
|
2625
|
+
_content_type,
|
2626
|
+
_headers,
|
2627
|
+
_host_index,
|
2628
|
+
) -> RequestSerialized:
|
2629
|
+
|
2630
|
+
_host = None
|
2631
|
+
|
2632
|
+
_collection_formats: Dict[str, str] = {
|
2633
|
+
}
|
2634
|
+
|
2635
|
+
_path_params: Dict[str, str] = {}
|
2636
|
+
_query_params: List[Tuple[str, str]] = []
|
2637
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2638
|
+
_form_params: List[Tuple[str, str]] = []
|
2639
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
2640
|
+
_body_params: Optional[bytes] = None
|
2641
|
+
|
2642
|
+
# process the path parameters
|
2643
|
+
# process the query parameters
|
2644
|
+
if by is not None:
|
2645
|
+
|
2646
|
+
_query_params.append(('by', by))
|
2647
|
+
|
2648
|
+
if value is not None:
|
2649
|
+
|
2650
|
+
_query_params.append(('value', value))
|
2651
|
+
|
2652
|
+
# process the header parameters
|
2653
|
+
# process the form parameters
|
2654
|
+
# process the body parameter
|
2655
|
+
|
2656
|
+
|
2657
|
+
# set the HTTP header `Accept`
|
2658
|
+
if 'Accept' not in _header_params:
|
2659
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2660
|
+
[
|
2661
|
+
'application/json'
|
2662
|
+
]
|
2663
|
+
)
|
2664
|
+
|
2665
|
+
|
2666
|
+
# authentication setting
|
2667
|
+
_auth_settings: List[str] = [
|
2668
|
+
]
|
2669
|
+
|
2670
|
+
return self.api_client.param_serialize(
|
2671
|
+
method='GET',
|
2672
|
+
resource_path='/api/v1/tx',
|
2673
|
+
path_params=_path_params,
|
2674
|
+
query_params=_query_params,
|
2675
|
+
header_params=_header_params,
|
2676
|
+
body=_body_params,
|
2677
|
+
post_params=_form_params,
|
2678
|
+
files=_files,
|
2679
|
+
auth_settings=_auth_settings,
|
2680
|
+
collection_formats=_collection_formats,
|
2681
|
+
_host=_host,
|
2682
|
+
_request_auth=_request_auth
|
2683
|
+
)
|
2684
|
+
|
2685
|
+
|
2686
|
+
|
2687
|
+
|
2688
|
+
@validate_call
|
2689
|
+
async def tx_from_l1_tx_hash(
|
2690
|
+
self,
|
2691
|
+
hash: StrictStr,
|
2692
|
+
_request_timeout: Union[
|
2693
|
+
None,
|
2694
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2695
|
+
Tuple[
|
2696
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2697
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2698
|
+
]
|
2699
|
+
] = None,
|
2700
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2701
|
+
_content_type: Optional[StrictStr] = None,
|
2702
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2703
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2704
|
+
) -> EnrichedTx:
|
2705
|
+
"""txFromL1TxHash
|
2706
|
+
|
2707
|
+
Get L1 transaction by L1 transaction hash
|
2708
|
+
|
2709
|
+
:param hash: (required)
|
2710
|
+
:type hash: str
|
2711
|
+
:param _request_timeout: timeout setting for this request. If one
|
2712
|
+
number provided, it will be total request
|
2713
|
+
timeout. It can also be a pair (tuple) of
|
2714
|
+
(connection, read) timeouts.
|
2715
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2716
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2717
|
+
request; this effectively ignores the
|
2718
|
+
authentication in the spec for a single request.
|
2719
|
+
:type _request_auth: dict, optional
|
2720
|
+
:param _content_type: force content-type for the request.
|
2721
|
+
:type _content_type: str, Optional
|
2722
|
+
:param _headers: set to override the headers for a single
|
2723
|
+
request; this effectively ignores the headers
|
2724
|
+
in the spec for a single request.
|
2725
|
+
:type _headers: dict, optional
|
2726
|
+
:param _host_index: set to override the host_index for a single
|
2727
|
+
request; this effectively ignores the host_index
|
2728
|
+
in the spec for a single request.
|
2729
|
+
:type _host_index: int, optional
|
2730
|
+
:return: Returns the result object.
|
2731
|
+
""" # noqa: E501
|
2732
|
+
|
2733
|
+
_param = self._tx_from_l1_tx_hash_serialize(
|
2734
|
+
hash=hash,
|
2735
|
+
_request_auth=_request_auth,
|
2736
|
+
_content_type=_content_type,
|
2737
|
+
_headers=_headers,
|
2738
|
+
_host_index=_host_index
|
2739
|
+
)
|
2740
|
+
|
2741
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2742
|
+
'200': "EnrichedTx",
|
2743
|
+
'400': "ResultCode",
|
2744
|
+
}
|
2745
|
+
response_data = await self.api_client.call_api(
|
2746
|
+
*_param,
|
2747
|
+
_request_timeout=_request_timeout
|
2748
|
+
)
|
2749
|
+
await response_data.read()
|
2750
|
+
return self.api_client.response_deserialize(
|
2751
|
+
response_data=response_data,
|
2752
|
+
response_types_map=_response_types_map,
|
2753
|
+
).data
|
2754
|
+
|
2755
|
+
|
2756
|
+
@validate_call
|
2757
|
+
async def tx_from_l1_tx_hash_with_http_info(
|
2758
|
+
self,
|
2759
|
+
hash: StrictStr,
|
2760
|
+
_request_timeout: Union[
|
2761
|
+
None,
|
2762
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2763
|
+
Tuple[
|
2764
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2765
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2766
|
+
]
|
2767
|
+
] = None,
|
2768
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2769
|
+
_content_type: Optional[StrictStr] = None,
|
2770
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2771
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2772
|
+
) -> ApiResponse[EnrichedTx]:
|
2773
|
+
"""txFromL1TxHash
|
2774
|
+
|
2775
|
+
Get L1 transaction by L1 transaction hash
|
2776
|
+
|
2777
|
+
:param hash: (required)
|
2778
|
+
:type hash: str
|
2779
|
+
:param _request_timeout: timeout setting for this request. If one
|
2780
|
+
number provided, it will be total request
|
2781
|
+
timeout. It can also be a pair (tuple) of
|
2782
|
+
(connection, read) timeouts.
|
2783
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2784
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2785
|
+
request; this effectively ignores the
|
2786
|
+
authentication in the spec for a single request.
|
2787
|
+
:type _request_auth: dict, optional
|
2788
|
+
:param _content_type: force content-type for the request.
|
2789
|
+
:type _content_type: str, Optional
|
2790
|
+
:param _headers: set to override the headers for a single
|
2791
|
+
request; this effectively ignores the headers
|
2792
|
+
in the spec for a single request.
|
2793
|
+
:type _headers: dict, optional
|
2794
|
+
:param _host_index: set to override the host_index for a single
|
2795
|
+
request; this effectively ignores the host_index
|
2796
|
+
in the spec for a single request.
|
2797
|
+
:type _host_index: int, optional
|
2798
|
+
:return: Returns the result object.
|
2799
|
+
""" # noqa: E501
|
2800
|
+
|
2801
|
+
_param = self._tx_from_l1_tx_hash_serialize(
|
2802
|
+
hash=hash,
|
2803
|
+
_request_auth=_request_auth,
|
2804
|
+
_content_type=_content_type,
|
2805
|
+
_headers=_headers,
|
2806
|
+
_host_index=_host_index
|
2807
|
+
)
|
2808
|
+
|
2809
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2810
|
+
'200': "EnrichedTx",
|
2811
|
+
'400': "ResultCode",
|
2812
|
+
}
|
2813
|
+
response_data = await self.api_client.call_api(
|
2814
|
+
*_param,
|
2815
|
+
_request_timeout=_request_timeout
|
2816
|
+
)
|
2817
|
+
await response_data.read()
|
2818
|
+
return self.api_client.response_deserialize(
|
2819
|
+
response_data=response_data,
|
2820
|
+
response_types_map=_response_types_map,
|
2821
|
+
)
|
2822
|
+
|
2823
|
+
|
2824
|
+
@validate_call
|
2825
|
+
async def tx_from_l1_tx_hash_without_preload_content(
|
2826
|
+
self,
|
2827
|
+
hash: StrictStr,
|
2828
|
+
_request_timeout: Union[
|
2829
|
+
None,
|
2830
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2831
|
+
Tuple[
|
2832
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2833
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2834
|
+
]
|
2835
|
+
] = None,
|
2836
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2837
|
+
_content_type: Optional[StrictStr] = None,
|
2838
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2839
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2840
|
+
) -> RESTResponseType:
|
2841
|
+
"""txFromL1TxHash
|
2842
|
+
|
2843
|
+
Get L1 transaction by L1 transaction hash
|
2844
|
+
|
2845
|
+
:param hash: (required)
|
2846
|
+
:type hash: str
|
2847
|
+
:param _request_timeout: timeout setting for this request. If one
|
2848
|
+
number provided, it will be total request
|
2849
|
+
timeout. It can also be a pair (tuple) of
|
2850
|
+
(connection, read) timeouts.
|
2851
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2852
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2853
|
+
request; this effectively ignores the
|
2854
|
+
authentication in the spec for a single request.
|
2855
|
+
:type _request_auth: dict, optional
|
2856
|
+
:param _content_type: force content-type for the request.
|
2857
|
+
:type _content_type: str, Optional
|
2858
|
+
:param _headers: set to override the headers for a single
|
2859
|
+
request; this effectively ignores the headers
|
2860
|
+
in the spec for a single request.
|
2861
|
+
:type _headers: dict, optional
|
2862
|
+
:param _host_index: set to override the host_index for a single
|
2863
|
+
request; this effectively ignores the host_index
|
2864
|
+
in the spec for a single request.
|
2865
|
+
:type _host_index: int, optional
|
2866
|
+
:return: Returns the result object.
|
2867
|
+
""" # noqa: E501
|
2868
|
+
|
2869
|
+
_param = self._tx_from_l1_tx_hash_serialize(
|
2870
|
+
hash=hash,
|
2871
|
+
_request_auth=_request_auth,
|
2872
|
+
_content_type=_content_type,
|
2873
|
+
_headers=_headers,
|
2874
|
+
_host_index=_host_index
|
2875
|
+
)
|
2876
|
+
|
2877
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2878
|
+
'200': "EnrichedTx",
|
2879
|
+
'400': "ResultCode",
|
2880
|
+
}
|
2881
|
+
response_data = await self.api_client.call_api(
|
2882
|
+
*_param,
|
2883
|
+
_request_timeout=_request_timeout
|
2884
|
+
)
|
2885
|
+
return response_data.response
|
2886
|
+
|
2887
|
+
|
2888
|
+
def _tx_from_l1_tx_hash_serialize(
|
2889
|
+
self,
|
2890
|
+
hash,
|
2891
|
+
_request_auth,
|
2892
|
+
_content_type,
|
2893
|
+
_headers,
|
2894
|
+
_host_index,
|
2895
|
+
) -> RequestSerialized:
|
2896
|
+
|
2897
|
+
_host = None
|
2898
|
+
|
2899
|
+
_collection_formats: Dict[str, str] = {
|
2900
|
+
}
|
2901
|
+
|
2902
|
+
_path_params: Dict[str, str] = {}
|
2903
|
+
_query_params: List[Tuple[str, str]] = []
|
2904
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2905
|
+
_form_params: List[Tuple[str, str]] = []
|
2906
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
2907
|
+
_body_params: Optional[bytes] = None
|
2908
|
+
|
2909
|
+
# process the path parameters
|
2910
|
+
# process the query parameters
|
2911
|
+
if hash is not None:
|
2912
|
+
|
2913
|
+
_query_params.append(('hash', hash))
|
2914
|
+
|
2915
|
+
# process the header parameters
|
2916
|
+
# process the form parameters
|
2917
|
+
# process the body parameter
|
2918
|
+
|
2919
|
+
|
2920
|
+
# set the HTTP header `Accept`
|
2921
|
+
if 'Accept' not in _header_params:
|
2922
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2923
|
+
[
|
2924
|
+
'application/json'
|
2925
|
+
]
|
2926
|
+
)
|
2927
|
+
|
2928
|
+
|
2929
|
+
# authentication setting
|
2930
|
+
_auth_settings: List[str] = [
|
2931
|
+
]
|
2932
|
+
|
2933
|
+
return self.api_client.param_serialize(
|
2934
|
+
method='GET',
|
2935
|
+
resource_path='/api/v1/txFromL1TxHash',
|
2936
|
+
path_params=_path_params,
|
2937
|
+
query_params=_query_params,
|
2938
|
+
header_params=_header_params,
|
2939
|
+
body=_body_params,
|
2940
|
+
post_params=_form_params,
|
2941
|
+
files=_files,
|
2942
|
+
auth_settings=_auth_settings,
|
2943
|
+
collection_formats=_collection_formats,
|
2944
|
+
_host=_host,
|
2945
|
+
_request_auth=_request_auth
|
2946
|
+
)
|
2947
|
+
|
2948
|
+
|
2949
|
+
|
2950
|
+
|
2951
|
+
@validate_call
|
2952
|
+
async def txs(
|
2953
|
+
self,
|
2954
|
+
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
|
2955
|
+
index: Optional[StrictInt] = None,
|
2956
|
+
_request_timeout: Union[
|
2957
|
+
None,
|
2958
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2959
|
+
Tuple[
|
2960
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2961
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2962
|
+
]
|
2963
|
+
] = None,
|
2964
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2965
|
+
_content_type: Optional[StrictStr] = None,
|
2966
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2967
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2968
|
+
) -> Txs:
|
2969
|
+
"""txs
|
2970
|
+
|
2971
|
+
Get transactions which are already packed into blocks
|
2972
|
+
|
2973
|
+
:param limit: (required)
|
2974
|
+
:type limit: int
|
2975
|
+
:param index:
|
2976
|
+
:type index: int
|
2977
|
+
:param _request_timeout: timeout setting for this request. If one
|
2978
|
+
number provided, it will be total request
|
2979
|
+
timeout. It can also be a pair (tuple) of
|
2980
|
+
(connection, read) timeouts.
|
2981
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2982
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2983
|
+
request; this effectively ignores the
|
2984
|
+
authentication in the spec for a single request.
|
2985
|
+
:type _request_auth: dict, optional
|
2986
|
+
:param _content_type: force content-type for the request.
|
2987
|
+
:type _content_type: str, Optional
|
2988
|
+
:param _headers: set to override the headers for a single
|
2989
|
+
request; this effectively ignores the headers
|
2990
|
+
in the spec for a single request.
|
2991
|
+
:type _headers: dict, optional
|
2992
|
+
:param _host_index: set to override the host_index for a single
|
2993
|
+
request; this effectively ignores the host_index
|
2994
|
+
in the spec for a single request.
|
2995
|
+
:type _host_index: int, optional
|
2996
|
+
:return: Returns the result object.
|
2997
|
+
""" # noqa: E501
|
2998
|
+
|
2999
|
+
_param = self._txs_serialize(
|
3000
|
+
limit=limit,
|
3001
|
+
index=index,
|
3002
|
+
_request_auth=_request_auth,
|
3003
|
+
_content_type=_content_type,
|
3004
|
+
_headers=_headers,
|
3005
|
+
_host_index=_host_index
|
3006
|
+
)
|
3007
|
+
|
3008
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3009
|
+
'200': "Txs",
|
3010
|
+
'400': "ResultCode",
|
3011
|
+
}
|
3012
|
+
response_data = await self.api_client.call_api(
|
3013
|
+
*_param,
|
3014
|
+
_request_timeout=_request_timeout
|
3015
|
+
)
|
3016
|
+
await response_data.read()
|
3017
|
+
return self.api_client.response_deserialize(
|
3018
|
+
response_data=response_data,
|
3019
|
+
response_types_map=_response_types_map,
|
3020
|
+
).data
|
3021
|
+
|
3022
|
+
|
3023
|
+
@validate_call
|
3024
|
+
async def txs_with_http_info(
|
3025
|
+
self,
|
3026
|
+
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
|
3027
|
+
index: Optional[StrictInt] = None,
|
3028
|
+
_request_timeout: Union[
|
3029
|
+
None,
|
3030
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3031
|
+
Tuple[
|
3032
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3033
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3034
|
+
]
|
3035
|
+
] = None,
|
3036
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3037
|
+
_content_type: Optional[StrictStr] = None,
|
3038
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3039
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3040
|
+
) -> ApiResponse[Txs]:
|
3041
|
+
"""txs
|
3042
|
+
|
3043
|
+
Get transactions which are already packed into blocks
|
3044
|
+
|
3045
|
+
:param limit: (required)
|
3046
|
+
:type limit: int
|
3047
|
+
:param index:
|
3048
|
+
:type index: int
|
3049
|
+
:param _request_timeout: timeout setting for this request. If one
|
3050
|
+
number provided, it will be total request
|
3051
|
+
timeout. It can also be a pair (tuple) of
|
3052
|
+
(connection, read) timeouts.
|
3053
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3054
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3055
|
+
request; this effectively ignores the
|
3056
|
+
authentication in the spec for a single request.
|
3057
|
+
:type _request_auth: dict, optional
|
3058
|
+
:param _content_type: force content-type for the request.
|
3059
|
+
:type _content_type: str, Optional
|
3060
|
+
:param _headers: set to override the headers for a single
|
3061
|
+
request; this effectively ignores the headers
|
3062
|
+
in the spec for a single request.
|
3063
|
+
:type _headers: dict, optional
|
3064
|
+
:param _host_index: set to override the host_index for a single
|
3065
|
+
request; this effectively ignores the host_index
|
3066
|
+
in the spec for a single request.
|
3067
|
+
:type _host_index: int, optional
|
3068
|
+
:return: Returns the result object.
|
3069
|
+
""" # noqa: E501
|
3070
|
+
|
3071
|
+
_param = self._txs_serialize(
|
3072
|
+
limit=limit,
|
3073
|
+
index=index,
|
3074
|
+
_request_auth=_request_auth,
|
3075
|
+
_content_type=_content_type,
|
3076
|
+
_headers=_headers,
|
3077
|
+
_host_index=_host_index
|
3078
|
+
)
|
3079
|
+
|
3080
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3081
|
+
'200': "Txs",
|
3082
|
+
'400': "ResultCode",
|
3083
|
+
}
|
3084
|
+
response_data = await self.api_client.call_api(
|
3085
|
+
*_param,
|
3086
|
+
_request_timeout=_request_timeout
|
3087
|
+
)
|
3088
|
+
await response_data.read()
|
3089
|
+
return self.api_client.response_deserialize(
|
3090
|
+
response_data=response_data,
|
3091
|
+
response_types_map=_response_types_map,
|
3092
|
+
)
|
3093
|
+
|
3094
|
+
|
3095
|
+
@validate_call
|
3096
|
+
async def txs_without_preload_content(
|
3097
|
+
self,
|
3098
|
+
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
|
3099
|
+
index: Optional[StrictInt] = None,
|
3100
|
+
_request_timeout: Union[
|
3101
|
+
None,
|
3102
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3103
|
+
Tuple[
|
3104
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3105
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3106
|
+
]
|
3107
|
+
] = None,
|
3108
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3109
|
+
_content_type: Optional[StrictStr] = None,
|
3110
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3111
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3112
|
+
) -> RESTResponseType:
|
3113
|
+
"""txs
|
3114
|
+
|
3115
|
+
Get transactions which are already packed into blocks
|
3116
|
+
|
3117
|
+
:param limit: (required)
|
3118
|
+
:type limit: int
|
3119
|
+
:param index:
|
3120
|
+
:type index: int
|
3121
|
+
:param _request_timeout: timeout setting for this request. If one
|
3122
|
+
number provided, it will be total request
|
3123
|
+
timeout. It can also be a pair (tuple) of
|
3124
|
+
(connection, read) timeouts.
|
3125
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3126
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3127
|
+
request; this effectively ignores the
|
3128
|
+
authentication in the spec for a single request.
|
3129
|
+
:type _request_auth: dict, optional
|
3130
|
+
:param _content_type: force content-type for the request.
|
3131
|
+
:type _content_type: str, Optional
|
3132
|
+
:param _headers: set to override the headers for a single
|
3133
|
+
request; this effectively ignores the headers
|
3134
|
+
in the spec for a single request.
|
3135
|
+
:type _headers: dict, optional
|
3136
|
+
:param _host_index: set to override the host_index for a single
|
3137
|
+
request; this effectively ignores the host_index
|
3138
|
+
in the spec for a single request.
|
3139
|
+
:type _host_index: int, optional
|
3140
|
+
:return: Returns the result object.
|
3141
|
+
""" # noqa: E501
|
3142
|
+
|
3143
|
+
_param = self._txs_serialize(
|
3144
|
+
limit=limit,
|
3145
|
+
index=index,
|
3146
|
+
_request_auth=_request_auth,
|
3147
|
+
_content_type=_content_type,
|
3148
|
+
_headers=_headers,
|
3149
|
+
_host_index=_host_index
|
3150
|
+
)
|
3151
|
+
|
3152
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3153
|
+
'200': "Txs",
|
3154
|
+
'400': "ResultCode",
|
3155
|
+
}
|
3156
|
+
response_data = await self.api_client.call_api(
|
3157
|
+
*_param,
|
3158
|
+
_request_timeout=_request_timeout
|
3159
|
+
)
|
3160
|
+
return response_data.response
|
3161
|
+
|
3162
|
+
|
3163
|
+
def _txs_serialize(
|
3164
|
+
self,
|
3165
|
+
limit,
|
3166
|
+
index,
|
3167
|
+
_request_auth,
|
3168
|
+
_content_type,
|
3169
|
+
_headers,
|
3170
|
+
_host_index,
|
3171
|
+
) -> RequestSerialized:
|
3172
|
+
|
3173
|
+
_host = None
|
3174
|
+
|
3175
|
+
_collection_formats: Dict[str, str] = {
|
3176
|
+
}
|
3177
|
+
|
3178
|
+
_path_params: Dict[str, str] = {}
|
3179
|
+
_query_params: List[Tuple[str, str]] = []
|
3180
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
3181
|
+
_form_params: List[Tuple[str, str]] = []
|
3182
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
3183
|
+
_body_params: Optional[bytes] = None
|
3184
|
+
|
3185
|
+
# process the path parameters
|
3186
|
+
# process the query parameters
|
3187
|
+
if index is not None:
|
3188
|
+
|
3189
|
+
_query_params.append(('index', index))
|
3190
|
+
|
3191
|
+
if limit is not None:
|
3192
|
+
|
3193
|
+
_query_params.append(('limit', limit))
|
3194
|
+
|
3195
|
+
# process the header parameters
|
3196
|
+
# process the form parameters
|
3197
|
+
# process the body parameter
|
3198
|
+
|
3199
|
+
|
3200
|
+
# set the HTTP header `Accept`
|
3201
|
+
if 'Accept' not in _header_params:
|
3202
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
3203
|
+
[
|
3204
|
+
'application/json'
|
3205
|
+
]
|
3206
|
+
)
|
3207
|
+
|
3208
|
+
|
3209
|
+
# authentication setting
|
3210
|
+
_auth_settings: List[str] = [
|
3211
|
+
]
|
3212
|
+
|
3213
|
+
return self.api_client.param_serialize(
|
3214
|
+
method='GET',
|
3215
|
+
resource_path='/api/v1/txs',
|
3216
|
+
path_params=_path_params,
|
3217
|
+
query_params=_query_params,
|
3218
|
+
header_params=_header_params,
|
3219
|
+
body=_body_params,
|
3220
|
+
post_params=_form_params,
|
3221
|
+
files=_files,
|
3222
|
+
auth_settings=_auth_settings,
|
3223
|
+
collection_formats=_collection_formats,
|
3224
|
+
_host=_host,
|
3225
|
+
_request_auth=_request_auth
|
3226
|
+
)
|
3227
|
+
|
3228
|
+
|
3229
|
+
|
3230
|
+
|
3231
|
+
@validate_call
|
3232
|
+
async def withdraw_history(
|
3233
|
+
self,
|
3234
|
+
account_index: StrictInt,
|
3235
|
+
cursor: Optional[StrictStr] = None,
|
3236
|
+
filter: Optional[StrictStr] = None,
|
3237
|
+
_request_timeout: Union[
|
3238
|
+
None,
|
3239
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3240
|
+
Tuple[
|
3241
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3242
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3243
|
+
]
|
3244
|
+
] = None,
|
3245
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3246
|
+
_content_type: Optional[StrictStr] = None,
|
3247
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3248
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3249
|
+
) -> WithdrawHistory:
|
3250
|
+
"""withdraw_history
|
3251
|
+
|
3252
|
+
Get withdraw history
|
3253
|
+
|
3254
|
+
:param account_index: (required)
|
3255
|
+
:type account_index: int
|
3256
|
+
:param cursor:
|
3257
|
+
:type cursor: str
|
3258
|
+
:param filter:
|
3259
|
+
:type filter: str
|
3260
|
+
:param _request_timeout: timeout setting for this request. If one
|
3261
|
+
number provided, it will be total request
|
3262
|
+
timeout. It can also be a pair (tuple) of
|
3263
|
+
(connection, read) timeouts.
|
3264
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3265
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3266
|
+
request; this effectively ignores the
|
3267
|
+
authentication in the spec for a single request.
|
3268
|
+
:type _request_auth: dict, optional
|
3269
|
+
:param _content_type: force content-type for the request.
|
3270
|
+
:type _content_type: str, Optional
|
3271
|
+
:param _headers: set to override the headers for a single
|
3272
|
+
request; this effectively ignores the headers
|
3273
|
+
in the spec for a single request.
|
3274
|
+
:type _headers: dict, optional
|
3275
|
+
:param _host_index: set to override the host_index for a single
|
3276
|
+
request; this effectively ignores the host_index
|
3277
|
+
in the spec for a single request.
|
3278
|
+
:type _host_index: int, optional
|
3279
|
+
:return: Returns the result object.
|
3280
|
+
""" # noqa: E501
|
3281
|
+
|
3282
|
+
_param = self._withdraw_history_serialize(
|
3283
|
+
account_index=account_index,
|
3284
|
+
cursor=cursor,
|
3285
|
+
filter=filter,
|
3286
|
+
_request_auth=_request_auth,
|
3287
|
+
_content_type=_content_type,
|
3288
|
+
_headers=_headers,
|
3289
|
+
_host_index=_host_index
|
3290
|
+
)
|
3291
|
+
|
3292
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3293
|
+
'200': "WithdrawHistory",
|
3294
|
+
'400': "ResultCode",
|
3295
|
+
}
|
3296
|
+
response_data = await self.api_client.call_api(
|
3297
|
+
*_param,
|
3298
|
+
_request_timeout=_request_timeout
|
3299
|
+
)
|
3300
|
+
await response_data.read()
|
3301
|
+
return self.api_client.response_deserialize(
|
3302
|
+
response_data=response_data,
|
3303
|
+
response_types_map=_response_types_map,
|
3304
|
+
).data
|
3305
|
+
|
3306
|
+
|
3307
|
+
@validate_call
|
3308
|
+
async def withdraw_history_with_http_info(
|
3309
|
+
self,
|
3310
|
+
account_index: StrictInt,
|
3311
|
+
cursor: Optional[StrictStr] = None,
|
3312
|
+
filter: Optional[StrictStr] = None,
|
3313
|
+
_request_timeout: Union[
|
3314
|
+
None,
|
3315
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3316
|
+
Tuple[
|
3317
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3318
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3319
|
+
]
|
3320
|
+
] = None,
|
3321
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3322
|
+
_content_type: Optional[StrictStr] = None,
|
3323
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3324
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3325
|
+
) -> ApiResponse[WithdrawHistory]:
|
3326
|
+
"""withdraw_history
|
3327
|
+
|
3328
|
+
Get withdraw history
|
3329
|
+
|
3330
|
+
:param account_index: (required)
|
3331
|
+
:type account_index: int
|
3332
|
+
:param cursor:
|
3333
|
+
:type cursor: str
|
3334
|
+
:param filter:
|
3335
|
+
:type filter: str
|
3336
|
+
:param _request_timeout: timeout setting for this request. If one
|
3337
|
+
number provided, it will be total request
|
3338
|
+
timeout. It can also be a pair (tuple) of
|
3339
|
+
(connection, read) timeouts.
|
3340
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3341
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3342
|
+
request; this effectively ignores the
|
3343
|
+
authentication in the spec for a single request.
|
3344
|
+
:type _request_auth: dict, optional
|
3345
|
+
:param _content_type: force content-type for the request.
|
3346
|
+
:type _content_type: str, Optional
|
3347
|
+
:param _headers: set to override the headers for a single
|
3348
|
+
request; this effectively ignores the headers
|
3349
|
+
in the spec for a single request.
|
3350
|
+
:type _headers: dict, optional
|
3351
|
+
:param _host_index: set to override the host_index for a single
|
3352
|
+
request; this effectively ignores the host_index
|
3353
|
+
in the spec for a single request.
|
3354
|
+
:type _host_index: int, optional
|
3355
|
+
:return: Returns the result object.
|
3356
|
+
""" # noqa: E501
|
3357
|
+
|
3358
|
+
_param = self._withdraw_history_serialize(
|
3359
|
+
account_index=account_index,
|
3360
|
+
cursor=cursor,
|
3361
|
+
filter=filter,
|
3362
|
+
_request_auth=_request_auth,
|
3363
|
+
_content_type=_content_type,
|
3364
|
+
_headers=_headers,
|
3365
|
+
_host_index=_host_index
|
3366
|
+
)
|
3367
|
+
|
3368
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3369
|
+
'200': "WithdrawHistory",
|
3370
|
+
'400': "ResultCode",
|
3371
|
+
}
|
3372
|
+
response_data = await self.api_client.call_api(
|
3373
|
+
*_param,
|
3374
|
+
_request_timeout=_request_timeout
|
3375
|
+
)
|
3376
|
+
await response_data.read()
|
3377
|
+
return self.api_client.response_deserialize(
|
3378
|
+
response_data=response_data,
|
3379
|
+
response_types_map=_response_types_map,
|
3380
|
+
)
|
3381
|
+
|
3382
|
+
|
3383
|
+
@validate_call
|
3384
|
+
async def withdraw_history_without_preload_content(
|
3385
|
+
self,
|
3386
|
+
account_index: StrictInt,
|
3387
|
+
cursor: Optional[StrictStr] = None,
|
3388
|
+
filter: Optional[StrictStr] = None,
|
3389
|
+
_request_timeout: Union[
|
3390
|
+
None,
|
3391
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3392
|
+
Tuple[
|
3393
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3394
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3395
|
+
]
|
3396
|
+
] = None,
|
3397
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3398
|
+
_content_type: Optional[StrictStr] = None,
|
3399
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3400
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3401
|
+
) -> RESTResponseType:
|
3402
|
+
"""withdraw_history
|
3403
|
+
|
3404
|
+
Get withdraw history
|
3405
|
+
|
3406
|
+
:param account_index: (required)
|
3407
|
+
:type account_index: int
|
3408
|
+
:param cursor:
|
3409
|
+
:type cursor: str
|
3410
|
+
:param filter:
|
3411
|
+
:type filter: str
|
3412
|
+
:param _request_timeout: timeout setting for this request. If one
|
3413
|
+
number provided, it will be total request
|
3414
|
+
timeout. It can also be a pair (tuple) of
|
3415
|
+
(connection, read) timeouts.
|
3416
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3417
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3418
|
+
request; this effectively ignores the
|
3419
|
+
authentication in the spec for a single request.
|
3420
|
+
:type _request_auth: dict, optional
|
3421
|
+
:param _content_type: force content-type for the request.
|
3422
|
+
:type _content_type: str, Optional
|
3423
|
+
:param _headers: set to override the headers for a single
|
3424
|
+
request; this effectively ignores the headers
|
3425
|
+
in the spec for a single request.
|
3426
|
+
:type _headers: dict, optional
|
3427
|
+
:param _host_index: set to override the host_index for a single
|
3428
|
+
request; this effectively ignores the host_index
|
3429
|
+
in the spec for a single request.
|
3430
|
+
:type _host_index: int, optional
|
3431
|
+
:return: Returns the result object.
|
3432
|
+
""" # noqa: E501
|
3433
|
+
|
3434
|
+
_param = self._withdraw_history_serialize(
|
3435
|
+
account_index=account_index,
|
3436
|
+
cursor=cursor,
|
3437
|
+
filter=filter,
|
3438
|
+
_request_auth=_request_auth,
|
3439
|
+
_content_type=_content_type,
|
3440
|
+
_headers=_headers,
|
3441
|
+
_host_index=_host_index
|
3442
|
+
)
|
3443
|
+
|
3444
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3445
|
+
'200': "WithdrawHistory",
|
3446
|
+
'400': "ResultCode",
|
3447
|
+
}
|
3448
|
+
response_data = await self.api_client.call_api(
|
3449
|
+
*_param,
|
3450
|
+
_request_timeout=_request_timeout
|
3451
|
+
)
|
3452
|
+
return response_data.response
|
3453
|
+
|
3454
|
+
|
3455
|
+
def _withdraw_history_serialize(
|
3456
|
+
self,
|
3457
|
+
account_index,
|
3458
|
+
cursor,
|
3459
|
+
filter,
|
3460
|
+
_request_auth,
|
3461
|
+
_content_type,
|
3462
|
+
_headers,
|
3463
|
+
_host_index,
|
3464
|
+
) -> RequestSerialized:
|
3465
|
+
|
3466
|
+
_host = None
|
3467
|
+
|
3468
|
+
_collection_formats: Dict[str, str] = {
|
3469
|
+
}
|
3470
|
+
|
3471
|
+
_path_params: Dict[str, str] = {}
|
3472
|
+
_query_params: List[Tuple[str, str]] = []
|
3473
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
3474
|
+
_form_params: List[Tuple[str, str]] = []
|
3475
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
3476
|
+
_body_params: Optional[bytes] = None
|
3477
|
+
|
3478
|
+
# process the path parameters
|
3479
|
+
# process the query parameters
|
3480
|
+
if account_index is not None:
|
3481
|
+
|
3482
|
+
_query_params.append(('account_index', account_index))
|
3483
|
+
|
3484
|
+
if cursor is not None:
|
3485
|
+
|
3486
|
+
_query_params.append(('cursor', cursor))
|
3487
|
+
|
3488
|
+
if filter is not None:
|
3489
|
+
|
3490
|
+
_query_params.append(('filter', filter))
|
3491
|
+
|
3492
|
+
# process the header parameters
|
3493
|
+
# process the form parameters
|
3494
|
+
# process the body parameter
|
3495
|
+
|
3496
|
+
|
3497
|
+
# set the HTTP header `Accept`
|
3498
|
+
if 'Accept' not in _header_params:
|
3499
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
3500
|
+
[
|
3501
|
+
'application/json'
|
3502
|
+
]
|
3503
|
+
)
|
3504
|
+
|
3505
|
+
|
3506
|
+
# authentication setting
|
3507
|
+
_auth_settings: List[str] = [
|
3508
|
+
]
|
3509
|
+
|
3510
|
+
return self.api_client.param_serialize(
|
3511
|
+
method='GET',
|
3512
|
+
resource_path='/api/v1/withdraw/history',
|
3513
|
+
path_params=_path_params,
|
3514
|
+
query_params=_query_params,
|
3515
|
+
header_params=_header_params,
|
3516
|
+
body=_body_params,
|
3517
|
+
post_params=_form_params,
|
3518
|
+
files=_files,
|
3519
|
+
auth_settings=_auth_settings,
|
3520
|
+
collection_formats=_collection_formats,
|
3521
|
+
_host=_host,
|
3522
|
+
_request_auth=_request_auth
|
3523
|
+
)
|
3524
|
+
|
3525
|
+
|