crypticorn 1.0.2rc3__py3-none-any.whl → 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. crypticorn/__init__.py +3 -3
  2. crypticorn/auth/__init__.py +2 -0
  3. crypticorn/auth/client/__init__.py +112 -0
  4. crypticorn/auth/client/api/__init__.py +8 -0
  5. crypticorn/auth/client/api/admin_api.py +522 -0
  6. crypticorn/auth/client/api/auth_api.py +2089 -0
  7. crypticorn/auth/client/api/service_api.py +309 -0
  8. crypticorn/auth/client/api/user_api.py +2540 -0
  9. crypticorn/auth/client/api/wallet_api.py +1698 -0
  10. crypticorn/auth/client/api_client.py +758 -0
  11. crypticorn/auth/client/api_response.py +20 -0
  12. crypticorn/auth/client/configuration.py +584 -0
  13. crypticorn/auth/client/exceptions.py +220 -0
  14. crypticorn/auth/client/models/__init__.py +91 -0
  15. crypticorn/auth/client/models/add_wallet200_response.py +86 -0
  16. crypticorn/auth/client/models/add_wallet_request.py +107 -0
  17. crypticorn/auth/client/models/authorize_user200_response.py +107 -0
  18. crypticorn/auth/client/models/authorize_user200_response_auth.py +101 -0
  19. crypticorn/auth/client/models/authorize_user_request.py +96 -0
  20. crypticorn/auth/client/models/create_user_request.py +114 -0
  21. crypticorn/auth/client/models/list_wallets200_response.py +137 -0
  22. crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +115 -0
  23. crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +115 -0
  24. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +168 -0
  25. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +191 -0
  26. crypticorn/auth/client/models/list_wallets200_response_data_inner.py +102 -0
  27. crypticorn/auth/client/models/list_wallets200_response_user_value.py +118 -0
  28. crypticorn/auth/client/models/logout_default_response.py +108 -0
  29. crypticorn/auth/client/models/logout_default_response_issues_inner.py +83 -0
  30. crypticorn/auth/client/models/refresh_token_info200_response.py +97 -0
  31. crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +105 -0
  32. crypticorn/auth/client/models/resend_verification_email_request.py +84 -0
  33. crypticorn/auth/client/models/revoke_user_tokens_request.py +83 -0
  34. crypticorn/auth/client/models/rotate_tokens200_response.py +110 -0
  35. crypticorn/auth/client/models/token_info200_response.py +97 -0
  36. crypticorn/auth/client/models/unlink_wallet_request.py +83 -0
  37. crypticorn/auth/client/models/update_user_request.py +93 -0
  38. crypticorn/auth/client/models/user_reset_password_request.py +87 -0
  39. crypticorn/auth/client/models/user_set_password_request.py +89 -0
  40. crypticorn/auth/client/models/verify200_response.py +110 -0
  41. crypticorn/auth/client/models/verify_email200_response.py +107 -0
  42. crypticorn/auth/client/models/verify_email200_response_auth.py +101 -0
  43. crypticorn/auth/client/models/verify_email200_response_auth_auth.py +110 -0
  44. crypticorn/auth/client/models/verify_email_request.py +83 -0
  45. crypticorn/auth/client/models/verify_wallet_request.py +91 -0
  46. crypticorn/auth/client/models/wallet_verified200_response.py +83 -0
  47. crypticorn/auth/client/models/whoami200_response.py +104 -0
  48. crypticorn/auth/client/rest.py +195 -0
  49. crypticorn/auth/main.py +45 -0
  50. crypticorn/client.py +46 -8
  51. crypticorn/common/__init__.py +5 -0
  52. crypticorn/common/auth.py +43 -0
  53. crypticorn/common/auth_client.py +163 -0
  54. crypticorn/common/errors.py +432 -0
  55. crypticorn/common/scopes.py +29 -0
  56. crypticorn/common/urls.py +25 -0
  57. crypticorn/hive/__init__.py +2 -1
  58. crypticorn/hive/client/__init__.py +57 -0
  59. crypticorn/hive/client/api/__init__.py +6 -0
  60. crypticorn/hive/client/api/data_api.py +594 -0
  61. crypticorn/hive/client/api/models_api.py +1680 -0
  62. crypticorn/hive/client/api/status_api.py +263 -0
  63. crypticorn/hive/client/api_client.py +758 -0
  64. crypticorn/hive/client/api_response.py +20 -0
  65. crypticorn/hive/client/configuration.py +612 -0
  66. crypticorn/hive/client/exceptions.py +220 -0
  67. crypticorn/hive/client/models/__init__.py +38 -0
  68. crypticorn/hive/client/models/coins.py +44 -0
  69. crypticorn/hive/client/models/data_download_response.py +113 -0
  70. crypticorn/hive/client/models/data_info.py +115 -0
  71. crypticorn/hive/client/models/data_value_value_value_inner.py +154 -0
  72. crypticorn/hive/client/models/data_version.py +35 -0
  73. crypticorn/hive/client/models/download_links.py +91 -0
  74. crypticorn/hive/client/models/evaluation.py +86 -0
  75. crypticorn/hive/client/models/evaluation_response.py +85 -0
  76. crypticorn/hive/client/models/feature_size.py +36 -0
  77. crypticorn/hive/client/models/http_validation_error.py +99 -0
  78. crypticorn/hive/client/models/model.py +133 -0
  79. crypticorn/hive/client/models/model_create.py +93 -0
  80. crypticorn/hive/client/models/model_status.py +35 -0
  81. crypticorn/hive/client/models/model_update.py +83 -0
  82. crypticorn/hive/client/models/target.py +36 -0
  83. crypticorn/hive/client/models/target_type.py +35 -0
  84. crypticorn/hive/client/models/validation_error.py +105 -0
  85. crypticorn/hive/client/models/validation_error_loc_inner.py +159 -0
  86. crypticorn/hive/client/py.typed +0 -0
  87. crypticorn/hive/client/rest.py +195 -0
  88. crypticorn/hive/main.py +27 -100
  89. crypticorn/klines/client/__init__.py +21 -7
  90. crypticorn/klines/client/api/__init__.py +0 -1
  91. crypticorn/klines/client/api/funding_rates_api.py +90 -79
  92. crypticorn/klines/client/api/health_check_api.py +29 -45
  93. crypticorn/klines/client/api/ohlcv_data_api.py +104 -87
  94. crypticorn/klines/client/api/symbols_api.py +36 -54
  95. crypticorn/klines/client/api/udf_api.py +228 -352
  96. crypticorn/klines/client/api_client.py +106 -148
  97. crypticorn/klines/client/api_response.py +2 -3
  98. crypticorn/klines/client/configuration.py +64 -50
  99. crypticorn/klines/client/exceptions.py +20 -16
  100. crypticorn/klines/client/models/__init__.py +21 -7
  101. crypticorn/klines/client/models/base_response_health_check_response.py +21 -15
  102. crypticorn/klines/client/models/base_response_list_funding_rate_response.py +21 -15
  103. crypticorn/klines/client/models/base_response_list_str.py +16 -14
  104. crypticorn/klines/client/models/base_response_ohlcv_response.py +21 -15
  105. crypticorn/klines/client/models/error_response.py +23 -15
  106. crypticorn/klines/client/models/exchange.py +11 -11
  107. crypticorn/klines/client/models/funding_rate_response.py +11 -11
  108. crypticorn/klines/client/models/health_check_response.py +14 -12
  109. crypticorn/klines/client/models/history_error_response.py +11 -11
  110. crypticorn/klines/client/models/history_no_data_response.py +16 -16
  111. crypticorn/klines/client/models/history_success_response.py +16 -16
  112. crypticorn/klines/client/models/http_validation_error.py +14 -10
  113. crypticorn/klines/client/models/market.py +2 -4
  114. crypticorn/klines/client/models/ohlcv_response.py +22 -15
  115. crypticorn/klines/client/models/resolution.py +5 -7
  116. crypticorn/klines/client/models/response_get_history_udf_history_get.py +71 -22
  117. crypticorn/klines/client/models/search_symbol_response.py +22 -15
  118. crypticorn/klines/client/models/sort_direction.py +2 -4
  119. crypticorn/klines/client/models/symbol_group_response.py +5 -9
  120. crypticorn/klines/client/models/symbol_info_response.py +40 -24
  121. crypticorn/klines/client/models/symbol_type.py +5 -10
  122. crypticorn/klines/client/models/timeframe.py +5 -7
  123. crypticorn/klines/client/models/udf_config_response.py +60 -21
  124. crypticorn/klines/client/models/validation_error.py +19 -13
  125. crypticorn/klines/client/models/validation_error_loc_inner.py +32 -11
  126. crypticorn/klines/client/rest.py +30 -41
  127. crypticorn/klines/main.py +52 -15
  128. crypticorn/pay/__init__.py +2 -0
  129. crypticorn/pay/client/__init__.py +52 -0
  130. crypticorn/pay/client/api/__init__.py +7 -0
  131. crypticorn/pay/client/api/now_payments_api.py +813 -0
  132. crypticorn/pay/client/api/payments_api.py +799 -0
  133. crypticorn/pay/client/api/products_api.py +891 -0
  134. crypticorn/pay/client/api/status_api.py +260 -0
  135. crypticorn/pay/client/api_client.py +758 -0
  136. crypticorn/pay/client/api_response.py +20 -0
  137. crypticorn/pay/client/configuration.py +612 -0
  138. crypticorn/pay/client/exceptions.py +220 -0
  139. crypticorn/pay/client/models/__init__.py +32 -0
  140. crypticorn/pay/client/models/api_status_res.py +83 -0
  141. crypticorn/pay/client/models/combined_payment_history.py +101 -0
  142. crypticorn/pay/client/models/create_invoice_req.py +188 -0
  143. crypticorn/pay/client/models/create_invoice_res.py +188 -0
  144. crypticorn/pay/client/models/currency.py +165 -0
  145. crypticorn/pay/client/models/estimate_price_req.py +91 -0
  146. crypticorn/pay/client/models/estimate_price_res.py +102 -0
  147. crypticorn/pay/client/models/get_currencies_res.py +99 -0
  148. crypticorn/pay/client/models/get_payment_status_res.py +222 -0
  149. crypticorn/pay/client/models/get_payments_list_res.py +109 -0
  150. crypticorn/pay/client/models/http_validation_error.py +99 -0
  151. crypticorn/pay/client/models/min_amount_req.py +124 -0
  152. crypticorn/pay/client/models/min_amount_res.py +105 -0
  153. crypticorn/pay/client/models/now_api_status_res.py +83 -0
  154. crypticorn/pay/client/models/now_create_invoice_req.py +188 -0
  155. crypticorn/pay/client/models/now_create_invoice_res.py +188 -0
  156. crypticorn/pay/client/models/now_fee_structure.py +104 -0
  157. crypticorn/pay/client/models/now_payment_model.py +124 -0
  158. crypticorn/pay/client/models/now_payment_status.py +42 -0
  159. crypticorn/pay/client/models/now_webhook_payload.py +181 -0
  160. crypticorn/pay/client/models/payment.py +231 -0
  161. crypticorn/pay/client/models/payment_status.py +40 -0
  162. crypticorn/pay/client/models/product.py +87 -0
  163. crypticorn/pay/client/models/product_model.py +119 -0
  164. crypticorn/pay/client/models/product_subs_model.py +108 -0
  165. crypticorn/pay/client/models/services.py +34 -0
  166. crypticorn/pay/client/models/unified_payment_model.py +112 -0
  167. crypticorn/pay/client/models/validation_error.py +105 -0
  168. crypticorn/pay/client/models/validation_error_loc_inner.py +159 -0
  169. crypticorn/pay/client/py.typed +0 -0
  170. crypticorn/pay/client/rest.py +195 -0
  171. crypticorn/pay/main.py +35 -0
  172. crypticorn/trade/client/__init__.py +9 -4
  173. crypticorn/trade/client/api/__init__.py +0 -1
  174. crypticorn/trade/client/api/api_keys_api.py +203 -304
  175. crypticorn/trade/client/api/bots_api.py +177 -250
  176. crypticorn/trade/client/api/exchanges_api.py +38 -57
  177. crypticorn/trade/client/api/futures_trading_panel_api.py +223 -321
  178. crypticorn/trade/client/api/notifications_api.py +247 -364
  179. crypticorn/trade/client/api/orders_api.py +44 -63
  180. crypticorn/trade/client/api/status_api.py +35 -53
  181. crypticorn/trade/client/api/strategies_api.py +852 -64
  182. crypticorn/trade/client/api/trading_actions_api.py +126 -203
  183. crypticorn/trade/client/api_client.py +115 -154
  184. crypticorn/trade/client/api_response.py +2 -3
  185. crypticorn/trade/client/configuration.py +128 -90
  186. crypticorn/trade/client/exceptions.py +21 -17
  187. crypticorn/trade/client/models/__init__.py +9 -4
  188. crypticorn/trade/client/models/action_model.py +114 -50
  189. crypticorn/trade/client/models/api_error_identifier.py +60 -51
  190. crypticorn/trade/client/models/api_error_level.py +37 -0
  191. crypticorn/trade/client/models/api_error_type.py +37 -0
  192. crypticorn/trade/client/models/api_key_model.py +49 -28
  193. crypticorn/trade/client/models/bot_model.py +76 -31
  194. crypticorn/trade/client/models/bot_status.py +37 -0
  195. crypticorn/trade/client/models/exchange.py +3 -5
  196. crypticorn/trade/client/models/execution_ids.py +14 -14
  197. crypticorn/trade/client/models/futures_balance.py +39 -23
  198. crypticorn/trade/client/models/futures_trading_action.py +98 -46
  199. crypticorn/trade/client/models/http_validation_error.py +15 -11
  200. crypticorn/trade/client/models/margin_mode.py +3 -5
  201. crypticorn/trade/client/models/market_type.py +3 -5
  202. crypticorn/trade/client/models/notification_model.py +60 -27
  203. crypticorn/trade/client/models/notification_type.py +4 -6
  204. crypticorn/trade/client/models/order_model.py +125 -65
  205. crypticorn/trade/client/models/order_status.py +6 -8
  206. crypticorn/trade/client/models/post_futures_action.py +16 -12
  207. crypticorn/trade/client/models/strategy_exchange_info.py +11 -12
  208. crypticorn/trade/client/models/strategy_model.py +66 -27
  209. crypticorn/trade/client/models/strategy_model_input.py +160 -0
  210. crypticorn/trade/client/models/strategy_model_output.py +160 -0
  211. crypticorn/trade/client/models/tpsl.py +35 -21
  212. crypticorn/trade/client/models/trading_action_type.py +5 -7
  213. crypticorn/trade/client/models/update_notification.py +17 -13
  214. crypticorn/trade/client/models/validation_error.py +20 -14
  215. crypticorn/trade/client/models/validation_error_loc_inner.py +33 -12
  216. crypticorn/trade/client/rest.py +108 -170
  217. crypticorn/trade/main.py +26 -19
  218. crypticorn-2.0.0.dist-info/METADATA +74 -0
  219. crypticorn-2.0.0.dist-info/RECORD +226 -0
  220. {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/WHEEL +1 -1
  221. crypticorn/hive/requirements.txt +0 -4
  222. crypticorn/hive/utils.py +0 -109
  223. crypticorn/klines/requirements.txt +0 -4
  224. crypticorn/klines/test/test_base_response_health_check_response.py +0 -56
  225. crypticorn/klines/test/test_base_response_list_funding_rate_response.py +0 -59
  226. crypticorn/klines/test/test_base_response_list_str.py +0 -56
  227. crypticorn/klines/test/test_base_response_ohlcv_response.py +0 -72
  228. crypticorn/klines/test/test_error_response.py +0 -57
  229. crypticorn/klines/test/test_exchange.py +0 -56
  230. crypticorn/klines/test/test_funding_rate_response.py +0 -56
  231. crypticorn/klines/test/test_funding_rates_api.py +0 -38
  232. crypticorn/klines/test/test_health_check_api.py +0 -38
  233. crypticorn/klines/test/test_health_check_response.py +0 -52
  234. crypticorn/klines/test/test_history_error_response.py +0 -53
  235. crypticorn/klines/test/test_history_no_data_response.py +0 -69
  236. crypticorn/klines/test/test_history_success_response.py +0 -87
  237. crypticorn/klines/test/test_http_validation_error.py +0 -58
  238. crypticorn/klines/test/test_market.py +0 -33
  239. crypticorn/klines/test/test_ohlcv_data_api.py +0 -38
  240. crypticorn/klines/test/test_ohlcv_response.py +0 -86
  241. crypticorn/klines/test/test_resolution.py +0 -33
  242. crypticorn/klines/test/test_response_get_history_udf_history_get.py +0 -89
  243. crypticorn/klines/test/test_search_symbol_response.py +0 -62
  244. crypticorn/klines/test/test_sort_direction.py +0 -33
  245. crypticorn/klines/test/test_symbol_group_response.py +0 -53
  246. crypticorn/klines/test/test_symbol_info_response.py +0 -84
  247. crypticorn/klines/test/test_symbol_type.py +0 -54
  248. crypticorn/klines/test/test_symbols_api.py +0 -38
  249. crypticorn/klines/test/test_timeframe.py +0 -33
  250. crypticorn/klines/test/test_udf_api.py +0 -80
  251. crypticorn/klines/test/test_udf_config_response.py +0 -95
  252. crypticorn/klines/test/test_validation_error.py +0 -60
  253. crypticorn/klines/test/test_validation_error_loc_inner.py +0 -50
  254. crypticorn/trade/requirements.txt +0 -4
  255. crypticorn-1.0.2rc3.dist-info/LICENSE.md +0 -19
  256. crypticorn-1.0.2rc3.dist-info/METADATA +0 -47
  257. crypticorn-1.0.2rc3.dist-info/RECORD +0 -128
  258. /crypticorn/{klines/test/__init__.py → auth/client/py.typed} +0 -0
  259. {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1698 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Crypticorn Auth API
5
+
6
+ OpenAPI compliant REST API built using tRPC with Express
7
+
8
+ The version of the OpenAPI document: 1.0.0
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, StrictFloat, StrictInt, StrictStr
20
+ from typing import Any, Optional, Union
21
+ from typing_extensions import Annotated
22
+ from crypticorn.auth.client.models.add_wallet200_response import AddWallet200Response
23
+ from crypticorn.auth.client.models.add_wallet_request import AddWalletRequest
24
+ from crypticorn.auth.client.models.list_wallets200_response import (
25
+ ListWallets200Response,
26
+ )
27
+ from crypticorn.auth.client.models.list_wallets200_response_user_value import (
28
+ ListWallets200ResponseUserValue,
29
+ )
30
+ from crypticorn.auth.client.models.unlink_wallet_request import UnlinkWalletRequest
31
+ from crypticorn.auth.client.models.verify_wallet_request import VerifyWalletRequest
32
+ from crypticorn.auth.client.models.wallet_verified200_response import (
33
+ WalletVerified200Response,
34
+ )
35
+
36
+ from crypticorn.auth.client.api_client import ApiClient, RequestSerialized
37
+ from crypticorn.auth.client.api_response import ApiResponse
38
+ from crypticorn.auth.client.rest import RESTResponseType
39
+
40
+
41
+ class WalletApi:
42
+ """NOTE: This class is auto generated by OpenAPI Generator
43
+ Ref: https://openapi-generator.tech
44
+
45
+ Do not edit the class manually.
46
+ """
47
+
48
+ def __init__(self, api_client=None) -> None:
49
+ if api_client is None:
50
+ api_client = ApiClient.get_default()
51
+ self.api_client = api_client
52
+
53
+ @validate_call
54
+ async def add_wallet(
55
+ self,
56
+ add_wallet_request: AddWalletRequest,
57
+ x_refresh_token: Annotated[
58
+ Optional[StrictStr],
59
+ Field(description="The refresh token for rotating the access token."),
60
+ ] = None,
61
+ _request_timeout: Union[
62
+ None,
63
+ Annotated[StrictFloat, Field(gt=0)],
64
+ Tuple[
65
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
66
+ ],
67
+ ] = None,
68
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
69
+ _content_type: Optional[StrictStr] = None,
70
+ _headers: Optional[Dict[StrictStr, Any]] = None,
71
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
72
+ ) -> AddWallet200Response:
73
+ """Add a wallet to the user
74
+
75
+ Add a wallet to the user
76
+
77
+ :param add_wallet_request: (required)
78
+ :type add_wallet_request: AddWalletRequest
79
+ :param x_refresh_token: The refresh token for rotating the access token.
80
+ :type x_refresh_token: str
81
+ :param _request_timeout: timeout setting for this request. If one
82
+ number provided, it will be total request
83
+ timeout. It can also be a pair (tuple) of
84
+ (connection, read) timeouts.
85
+ :type _request_timeout: int, tuple(int, int), optional
86
+ :param _request_auth: set to override the auth_settings for an a single
87
+ request; this effectively ignores the
88
+ authentication in the spec for a single request.
89
+ :type _request_auth: dict, optional
90
+ :param _content_type: force content-type for the request.
91
+ :type _content_type: str, Optional
92
+ :param _headers: set to override the headers for a single
93
+ request; this effectively ignores the headers
94
+ in the spec for a single request.
95
+ :type _headers: dict, optional
96
+ :param _host_index: set to override the host_index for a single
97
+ request; this effectively ignores the host_index
98
+ in the spec for a single request.
99
+ :type _host_index: int, optional
100
+ :return: Returns the result object.
101
+ """ # noqa: E501
102
+
103
+ _param = self._add_wallet_serialize(
104
+ add_wallet_request=add_wallet_request,
105
+ x_refresh_token=x_refresh_token,
106
+ _request_auth=_request_auth,
107
+ _content_type=_content_type,
108
+ _headers=_headers,
109
+ _host_index=_host_index,
110
+ )
111
+
112
+ _response_types_map: Dict[str, Optional[str]] = {
113
+ "200": "AddWallet200Response",
114
+ }
115
+ response_data = await self.api_client.call_api(
116
+ *_param, _request_timeout=_request_timeout
117
+ )
118
+ await response_data.read()
119
+ return self.api_client.response_deserialize(
120
+ response_data=response_data,
121
+ response_types_map=_response_types_map,
122
+ ).data
123
+
124
+ @validate_call
125
+ async def add_wallet_with_http_info(
126
+ self,
127
+ add_wallet_request: AddWalletRequest,
128
+ x_refresh_token: Annotated[
129
+ Optional[StrictStr],
130
+ Field(description="The refresh token for rotating the access token."),
131
+ ] = None,
132
+ _request_timeout: Union[
133
+ None,
134
+ Annotated[StrictFloat, Field(gt=0)],
135
+ Tuple[
136
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
137
+ ],
138
+ ] = None,
139
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
140
+ _content_type: Optional[StrictStr] = None,
141
+ _headers: Optional[Dict[StrictStr, Any]] = None,
142
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
143
+ ) -> ApiResponse[AddWallet200Response]:
144
+ """Add a wallet to the user
145
+
146
+ Add a wallet to the user
147
+
148
+ :param add_wallet_request: (required)
149
+ :type add_wallet_request: AddWalletRequest
150
+ :param x_refresh_token: The refresh token for rotating the access token.
151
+ :type x_refresh_token: str
152
+ :param _request_timeout: timeout setting for this request. If one
153
+ number provided, it will be total request
154
+ timeout. It can also be a pair (tuple) of
155
+ (connection, read) timeouts.
156
+ :type _request_timeout: int, tuple(int, int), optional
157
+ :param _request_auth: set to override the auth_settings for an a single
158
+ request; this effectively ignores the
159
+ authentication in the spec for a single request.
160
+ :type _request_auth: dict, optional
161
+ :param _content_type: force content-type for the request.
162
+ :type _content_type: str, Optional
163
+ :param _headers: set to override the headers for a single
164
+ request; this effectively ignores the headers
165
+ in the spec for a single request.
166
+ :type _headers: dict, optional
167
+ :param _host_index: set to override the host_index for a single
168
+ request; this effectively ignores the host_index
169
+ in the spec for a single request.
170
+ :type _host_index: int, optional
171
+ :return: Returns the result object.
172
+ """ # noqa: E501
173
+
174
+ _param = self._add_wallet_serialize(
175
+ add_wallet_request=add_wallet_request,
176
+ x_refresh_token=x_refresh_token,
177
+ _request_auth=_request_auth,
178
+ _content_type=_content_type,
179
+ _headers=_headers,
180
+ _host_index=_host_index,
181
+ )
182
+
183
+ _response_types_map: Dict[str, Optional[str]] = {
184
+ "200": "AddWallet200Response",
185
+ }
186
+ response_data = await self.api_client.call_api(
187
+ *_param, _request_timeout=_request_timeout
188
+ )
189
+ await response_data.read()
190
+ return self.api_client.response_deserialize(
191
+ response_data=response_data,
192
+ response_types_map=_response_types_map,
193
+ )
194
+
195
+ @validate_call
196
+ async def add_wallet_without_preload_content(
197
+ self,
198
+ add_wallet_request: AddWalletRequest,
199
+ x_refresh_token: Annotated[
200
+ Optional[StrictStr],
201
+ Field(description="The refresh token for rotating the access token."),
202
+ ] = None,
203
+ _request_timeout: Union[
204
+ None,
205
+ Annotated[StrictFloat, Field(gt=0)],
206
+ Tuple[
207
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
208
+ ],
209
+ ] = None,
210
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
211
+ _content_type: Optional[StrictStr] = None,
212
+ _headers: Optional[Dict[StrictStr, Any]] = None,
213
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
214
+ ) -> RESTResponseType:
215
+ """Add a wallet to the user
216
+
217
+ Add a wallet to the user
218
+
219
+ :param add_wallet_request: (required)
220
+ :type add_wallet_request: AddWalletRequest
221
+ :param x_refresh_token: The refresh token for rotating the access token.
222
+ :type x_refresh_token: str
223
+ :param _request_timeout: timeout setting for this request. If one
224
+ number provided, it will be total request
225
+ timeout. It can also be a pair (tuple) of
226
+ (connection, read) timeouts.
227
+ :type _request_timeout: int, tuple(int, int), optional
228
+ :param _request_auth: set to override the auth_settings for an a single
229
+ request; this effectively ignores the
230
+ authentication in the spec for a single request.
231
+ :type _request_auth: dict, optional
232
+ :param _content_type: force content-type for the request.
233
+ :type _content_type: str, Optional
234
+ :param _headers: set to override the headers for a single
235
+ request; this effectively ignores the headers
236
+ in the spec for a single request.
237
+ :type _headers: dict, optional
238
+ :param _host_index: set to override the host_index for a single
239
+ request; this effectively ignores the host_index
240
+ in the spec for a single request.
241
+ :type _host_index: int, optional
242
+ :return: Returns the result object.
243
+ """ # noqa: E501
244
+
245
+ _param = self._add_wallet_serialize(
246
+ add_wallet_request=add_wallet_request,
247
+ x_refresh_token=x_refresh_token,
248
+ _request_auth=_request_auth,
249
+ _content_type=_content_type,
250
+ _headers=_headers,
251
+ _host_index=_host_index,
252
+ )
253
+
254
+ _response_types_map: Dict[str, Optional[str]] = {
255
+ "200": "AddWallet200Response",
256
+ }
257
+ response_data = await self.api_client.call_api(
258
+ *_param, _request_timeout=_request_timeout
259
+ )
260
+ return response_data.response
261
+
262
+ def _add_wallet_serialize(
263
+ self,
264
+ add_wallet_request,
265
+ x_refresh_token,
266
+ _request_auth,
267
+ _content_type,
268
+ _headers,
269
+ _host_index,
270
+ ) -> RequestSerialized:
271
+
272
+ _host = None
273
+
274
+ _collection_formats: Dict[str, str] = {}
275
+
276
+ _path_params: Dict[str, str] = {}
277
+ _query_params: List[Tuple[str, str]] = []
278
+ _header_params: Dict[str, Optional[str]] = _headers or {}
279
+ _form_params: List[Tuple[str, str]] = []
280
+ _files: Dict[
281
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
282
+ ] = {}
283
+ _body_params: Optional[bytes] = None
284
+
285
+ # process the path parameters
286
+ # process the query parameters
287
+ # process the header parameters
288
+ if x_refresh_token is not None:
289
+ _header_params["X-Refresh-Token"] = x_refresh_token
290
+ # process the form parameters
291
+ # process the body parameter
292
+ if add_wallet_request is not None:
293
+ _body_params = add_wallet_request
294
+
295
+ # set the HTTP header `Accept`
296
+ if "Accept" not in _header_params:
297
+ _header_params["Accept"] = self.api_client.select_header_accept(
298
+ ["application/json"]
299
+ )
300
+
301
+ # set the HTTP header `Content-Type`
302
+ if _content_type:
303
+ _header_params["Content-Type"] = _content_type
304
+ else:
305
+ _default_content_type = self.api_client.select_header_content_type(
306
+ ["application/json"]
307
+ )
308
+ if _default_content_type is not None:
309
+ _header_params["Content-Type"] = _default_content_type
310
+
311
+ # authentication setting
312
+ _auth_settings: List[str] = ["HTTPBearer"]
313
+
314
+ return self.api_client.param_serialize(
315
+ method="POST",
316
+ resource_path="/wallet/add",
317
+ path_params=_path_params,
318
+ query_params=_query_params,
319
+ header_params=_header_params,
320
+ body=_body_params,
321
+ post_params=_form_params,
322
+ files=_files,
323
+ auth_settings=_auth_settings,
324
+ collection_formats=_collection_formats,
325
+ _host=_host,
326
+ _request_auth=_request_auth,
327
+ )
328
+
329
+ @validate_call
330
+ async def get_balances(
331
+ self,
332
+ x_refresh_token: Annotated[
333
+ Optional[StrictStr],
334
+ Field(description="The refresh token for rotating the access token."),
335
+ ] = None,
336
+ _request_timeout: Union[
337
+ None,
338
+ Annotated[StrictFloat, Field(gt=0)],
339
+ Tuple[
340
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
341
+ ],
342
+ ] = None,
343
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
344
+ _content_type: Optional[StrictStr] = None,
345
+ _headers: Optional[Dict[StrictStr, Any]] = None,
346
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
347
+ ) -> ListWallets200ResponseUserValue:
348
+ """Get the balances of the user
349
+
350
+ Get the balances of the user
351
+
352
+ :param x_refresh_token: The refresh token for rotating the access token.
353
+ :type x_refresh_token: str
354
+ :param _request_timeout: timeout setting for this request. If one
355
+ number provided, it will be total request
356
+ timeout. It can also be a pair (tuple) of
357
+ (connection, read) timeouts.
358
+ :type _request_timeout: int, tuple(int, int), optional
359
+ :param _request_auth: set to override the auth_settings for an a single
360
+ request; this effectively ignores the
361
+ authentication in the spec for a single request.
362
+ :type _request_auth: dict, optional
363
+ :param _content_type: force content-type for the request.
364
+ :type _content_type: str, Optional
365
+ :param _headers: set to override the headers for a single
366
+ request; this effectively ignores the headers
367
+ in the spec for a single request.
368
+ :type _headers: dict, optional
369
+ :param _host_index: set to override the host_index for a single
370
+ request; this effectively ignores the host_index
371
+ in the spec for a single request.
372
+ :type _host_index: int, optional
373
+ :return: Returns the result object.
374
+ """ # noqa: E501
375
+
376
+ _param = self._get_balances_serialize(
377
+ x_refresh_token=x_refresh_token,
378
+ _request_auth=_request_auth,
379
+ _content_type=_content_type,
380
+ _headers=_headers,
381
+ _host_index=_host_index,
382
+ )
383
+
384
+ _response_types_map: Dict[str, Optional[str]] = {
385
+ "200": "ListWallets200ResponseUserValue",
386
+ }
387
+ response_data = await self.api_client.call_api(
388
+ *_param, _request_timeout=_request_timeout
389
+ )
390
+ await response_data.read()
391
+ return self.api_client.response_deserialize(
392
+ response_data=response_data,
393
+ response_types_map=_response_types_map,
394
+ ).data
395
+
396
+ @validate_call
397
+ async def get_balances_with_http_info(
398
+ self,
399
+ x_refresh_token: Annotated[
400
+ Optional[StrictStr],
401
+ Field(description="The refresh token for rotating the access token."),
402
+ ] = None,
403
+ _request_timeout: Union[
404
+ None,
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Tuple[
407
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
408
+ ],
409
+ ] = None,
410
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
411
+ _content_type: Optional[StrictStr] = None,
412
+ _headers: Optional[Dict[StrictStr, Any]] = None,
413
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
414
+ ) -> ApiResponse[ListWallets200ResponseUserValue]:
415
+ """Get the balances of the user
416
+
417
+ Get the balances of the user
418
+
419
+ :param x_refresh_token: The refresh token for rotating the access token.
420
+ :type x_refresh_token: str
421
+ :param _request_timeout: timeout setting for this request. If one
422
+ number provided, it will be total request
423
+ timeout. It can also be a pair (tuple) of
424
+ (connection, read) timeouts.
425
+ :type _request_timeout: int, tuple(int, int), optional
426
+ :param _request_auth: set to override the auth_settings for an a single
427
+ request; this effectively ignores the
428
+ authentication in the spec for a single request.
429
+ :type _request_auth: dict, optional
430
+ :param _content_type: force content-type for the request.
431
+ :type _content_type: str, Optional
432
+ :param _headers: set to override the headers for a single
433
+ request; this effectively ignores the headers
434
+ in the spec for a single request.
435
+ :type _headers: dict, optional
436
+ :param _host_index: set to override the host_index for a single
437
+ request; this effectively ignores the host_index
438
+ in the spec for a single request.
439
+ :type _host_index: int, optional
440
+ :return: Returns the result object.
441
+ """ # noqa: E501
442
+
443
+ _param = self._get_balances_serialize(
444
+ x_refresh_token=x_refresh_token,
445
+ _request_auth=_request_auth,
446
+ _content_type=_content_type,
447
+ _headers=_headers,
448
+ _host_index=_host_index,
449
+ )
450
+
451
+ _response_types_map: Dict[str, Optional[str]] = {
452
+ "200": "ListWallets200ResponseUserValue",
453
+ }
454
+ response_data = await self.api_client.call_api(
455
+ *_param, _request_timeout=_request_timeout
456
+ )
457
+ await response_data.read()
458
+ return self.api_client.response_deserialize(
459
+ response_data=response_data,
460
+ response_types_map=_response_types_map,
461
+ )
462
+
463
+ @validate_call
464
+ async def get_balances_without_preload_content(
465
+ self,
466
+ x_refresh_token: Annotated[
467
+ Optional[StrictStr],
468
+ Field(description="The refresh token for rotating the access token."),
469
+ ] = None,
470
+ _request_timeout: Union[
471
+ None,
472
+ Annotated[StrictFloat, Field(gt=0)],
473
+ Tuple[
474
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
475
+ ],
476
+ ] = None,
477
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
478
+ _content_type: Optional[StrictStr] = None,
479
+ _headers: Optional[Dict[StrictStr, Any]] = None,
480
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
481
+ ) -> RESTResponseType:
482
+ """Get the balances of the user
483
+
484
+ Get the balances of the user
485
+
486
+ :param x_refresh_token: The refresh token for rotating the access token.
487
+ :type x_refresh_token: str
488
+ :param _request_timeout: timeout setting for this request. If one
489
+ number provided, it will be total request
490
+ timeout. It can also be a pair (tuple) of
491
+ (connection, read) timeouts.
492
+ :type _request_timeout: int, tuple(int, int), optional
493
+ :param _request_auth: set to override the auth_settings for an a single
494
+ request; this effectively ignores the
495
+ authentication in the spec for a single request.
496
+ :type _request_auth: dict, optional
497
+ :param _content_type: force content-type for the request.
498
+ :type _content_type: str, Optional
499
+ :param _headers: set to override the headers for a single
500
+ request; this effectively ignores the headers
501
+ in the spec for a single request.
502
+ :type _headers: dict, optional
503
+ :param _host_index: set to override the host_index for a single
504
+ request; this effectively ignores the host_index
505
+ in the spec for a single request.
506
+ :type _host_index: int, optional
507
+ :return: Returns the result object.
508
+ """ # noqa: E501
509
+
510
+ _param = self._get_balances_serialize(
511
+ x_refresh_token=x_refresh_token,
512
+ _request_auth=_request_auth,
513
+ _content_type=_content_type,
514
+ _headers=_headers,
515
+ _host_index=_host_index,
516
+ )
517
+
518
+ _response_types_map: Dict[str, Optional[str]] = {
519
+ "200": "ListWallets200ResponseUserValue",
520
+ }
521
+ response_data = await self.api_client.call_api(
522
+ *_param, _request_timeout=_request_timeout
523
+ )
524
+ return response_data.response
525
+
526
+ def _get_balances_serialize(
527
+ self,
528
+ x_refresh_token,
529
+ _request_auth,
530
+ _content_type,
531
+ _headers,
532
+ _host_index,
533
+ ) -> RequestSerialized:
534
+
535
+ _host = None
536
+
537
+ _collection_formats: Dict[str, str] = {}
538
+
539
+ _path_params: Dict[str, str] = {}
540
+ _query_params: List[Tuple[str, str]] = []
541
+ _header_params: Dict[str, Optional[str]] = _headers or {}
542
+ _form_params: List[Tuple[str, str]] = []
543
+ _files: Dict[
544
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
545
+ ] = {}
546
+ _body_params: Optional[bytes] = None
547
+
548
+ # process the path parameters
549
+ # process the query parameters
550
+ # process the header parameters
551
+ if x_refresh_token is not None:
552
+ _header_params["X-Refresh-Token"] = x_refresh_token
553
+ # process the form parameters
554
+ # process the body parameter
555
+
556
+ # set the HTTP header `Accept`
557
+ if "Accept" not in _header_params:
558
+ _header_params["Accept"] = self.api_client.select_header_accept(
559
+ ["application/json"]
560
+ )
561
+
562
+ # authentication setting
563
+ _auth_settings: List[str] = ["HTTPBearer"]
564
+
565
+ return self.api_client.param_serialize(
566
+ method="GET",
567
+ resource_path="/wallet/balances",
568
+ path_params=_path_params,
569
+ query_params=_query_params,
570
+ header_params=_header_params,
571
+ body=_body_params,
572
+ post_params=_form_params,
573
+ files=_files,
574
+ auth_settings=_auth_settings,
575
+ collection_formats=_collection_formats,
576
+ _host=_host,
577
+ _request_auth=_request_auth,
578
+ )
579
+
580
+ @validate_call
581
+ async def list_wallets(
582
+ self,
583
+ x_refresh_token: Annotated[
584
+ Optional[StrictStr],
585
+ Field(description="The refresh token for rotating the access token."),
586
+ ] = None,
587
+ limit: Optional[
588
+ Union[
589
+ Annotated[float, Field(le=100, strict=True)],
590
+ Annotated[int, Field(le=100, strict=True)],
591
+ ]
592
+ ] = None,
593
+ offset: Optional[Union[StrictFloat, StrictInt]] = None,
594
+ _request_timeout: Union[
595
+ None,
596
+ Annotated[StrictFloat, Field(gt=0)],
597
+ Tuple[
598
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
599
+ ],
600
+ ] = None,
601
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
602
+ _content_type: Optional[StrictStr] = None,
603
+ _headers: Optional[Dict[StrictStr, Any]] = None,
604
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
605
+ ) -> ListWallets200Response:
606
+ """List wallets
607
+
608
+ List the wallets of the user
609
+
610
+ :param x_refresh_token: The refresh token for rotating the access token.
611
+ :type x_refresh_token: str
612
+ :param limit:
613
+ :type limit: float
614
+ :param offset:
615
+ :type offset: float
616
+ :param _request_timeout: timeout setting for this request. If one
617
+ number provided, it will be total request
618
+ timeout. It can also be a pair (tuple) of
619
+ (connection, read) timeouts.
620
+ :type _request_timeout: int, tuple(int, int), optional
621
+ :param _request_auth: set to override the auth_settings for an a single
622
+ request; this effectively ignores the
623
+ authentication in the spec for a single request.
624
+ :type _request_auth: dict, optional
625
+ :param _content_type: force content-type for the request.
626
+ :type _content_type: str, Optional
627
+ :param _headers: set to override the headers for a single
628
+ request; this effectively ignores the headers
629
+ in the spec for a single request.
630
+ :type _headers: dict, optional
631
+ :param _host_index: set to override the host_index for a single
632
+ request; this effectively ignores the host_index
633
+ in the spec for a single request.
634
+ :type _host_index: int, optional
635
+ :return: Returns the result object.
636
+ """ # noqa: E501
637
+
638
+ _param = self._list_wallets_serialize(
639
+ x_refresh_token=x_refresh_token,
640
+ limit=limit,
641
+ offset=offset,
642
+ _request_auth=_request_auth,
643
+ _content_type=_content_type,
644
+ _headers=_headers,
645
+ _host_index=_host_index,
646
+ )
647
+
648
+ _response_types_map: Dict[str, Optional[str]] = {
649
+ "200": "ListWallets200Response",
650
+ }
651
+ response_data = await self.api_client.call_api(
652
+ *_param, _request_timeout=_request_timeout
653
+ )
654
+ await response_data.read()
655
+ return self.api_client.response_deserialize(
656
+ response_data=response_data,
657
+ response_types_map=_response_types_map,
658
+ ).data
659
+
660
+ @validate_call
661
+ async def list_wallets_with_http_info(
662
+ self,
663
+ x_refresh_token: Annotated[
664
+ Optional[StrictStr],
665
+ Field(description="The refresh token for rotating the access token."),
666
+ ] = None,
667
+ limit: Optional[
668
+ Union[
669
+ Annotated[float, Field(le=100, strict=True)],
670
+ Annotated[int, Field(le=100, strict=True)],
671
+ ]
672
+ ] = None,
673
+ offset: Optional[Union[StrictFloat, StrictInt]] = None,
674
+ _request_timeout: Union[
675
+ None,
676
+ Annotated[StrictFloat, Field(gt=0)],
677
+ Tuple[
678
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
679
+ ],
680
+ ] = None,
681
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
682
+ _content_type: Optional[StrictStr] = None,
683
+ _headers: Optional[Dict[StrictStr, Any]] = None,
684
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
685
+ ) -> ApiResponse[ListWallets200Response]:
686
+ """List wallets
687
+
688
+ List the wallets of the user
689
+
690
+ :param x_refresh_token: The refresh token for rotating the access token.
691
+ :type x_refresh_token: str
692
+ :param limit:
693
+ :type limit: float
694
+ :param offset:
695
+ :type offset: float
696
+ :param _request_timeout: timeout setting for this request. If one
697
+ number provided, it will be total request
698
+ timeout. It can also be a pair (tuple) of
699
+ (connection, read) timeouts.
700
+ :type _request_timeout: int, tuple(int, int), optional
701
+ :param _request_auth: set to override the auth_settings for an a single
702
+ request; this effectively ignores the
703
+ authentication in the spec for a single request.
704
+ :type _request_auth: dict, optional
705
+ :param _content_type: force content-type for the request.
706
+ :type _content_type: str, Optional
707
+ :param _headers: set to override the headers for a single
708
+ request; this effectively ignores the headers
709
+ in the spec for a single request.
710
+ :type _headers: dict, optional
711
+ :param _host_index: set to override the host_index for a single
712
+ request; this effectively ignores the host_index
713
+ in the spec for a single request.
714
+ :type _host_index: int, optional
715
+ :return: Returns the result object.
716
+ """ # noqa: E501
717
+
718
+ _param = self._list_wallets_serialize(
719
+ x_refresh_token=x_refresh_token,
720
+ limit=limit,
721
+ offset=offset,
722
+ _request_auth=_request_auth,
723
+ _content_type=_content_type,
724
+ _headers=_headers,
725
+ _host_index=_host_index,
726
+ )
727
+
728
+ _response_types_map: Dict[str, Optional[str]] = {
729
+ "200": "ListWallets200Response",
730
+ }
731
+ response_data = await self.api_client.call_api(
732
+ *_param, _request_timeout=_request_timeout
733
+ )
734
+ await response_data.read()
735
+ return self.api_client.response_deserialize(
736
+ response_data=response_data,
737
+ response_types_map=_response_types_map,
738
+ )
739
+
740
+ @validate_call
741
+ async def list_wallets_without_preload_content(
742
+ self,
743
+ x_refresh_token: Annotated[
744
+ Optional[StrictStr],
745
+ Field(description="The refresh token for rotating the access token."),
746
+ ] = None,
747
+ limit: Optional[
748
+ Union[
749
+ Annotated[float, Field(le=100, strict=True)],
750
+ Annotated[int, Field(le=100, strict=True)],
751
+ ]
752
+ ] = None,
753
+ offset: Optional[Union[StrictFloat, StrictInt]] = None,
754
+ _request_timeout: Union[
755
+ None,
756
+ Annotated[StrictFloat, Field(gt=0)],
757
+ Tuple[
758
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
759
+ ],
760
+ ] = None,
761
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
762
+ _content_type: Optional[StrictStr] = None,
763
+ _headers: Optional[Dict[StrictStr, Any]] = None,
764
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
765
+ ) -> RESTResponseType:
766
+ """List wallets
767
+
768
+ List the wallets of the user
769
+
770
+ :param x_refresh_token: The refresh token for rotating the access token.
771
+ :type x_refresh_token: str
772
+ :param limit:
773
+ :type limit: float
774
+ :param offset:
775
+ :type offset: float
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._list_wallets_serialize(
799
+ x_refresh_token=x_refresh_token,
800
+ limit=limit,
801
+ offset=offset,
802
+ _request_auth=_request_auth,
803
+ _content_type=_content_type,
804
+ _headers=_headers,
805
+ _host_index=_host_index,
806
+ )
807
+
808
+ _response_types_map: Dict[str, Optional[str]] = {
809
+ "200": "ListWallets200Response",
810
+ }
811
+ response_data = await self.api_client.call_api(
812
+ *_param, _request_timeout=_request_timeout
813
+ )
814
+ return response_data.response
815
+
816
+ def _list_wallets_serialize(
817
+ self,
818
+ x_refresh_token,
819
+ limit,
820
+ offset,
821
+ _request_auth,
822
+ _content_type,
823
+ _headers,
824
+ _host_index,
825
+ ) -> RequestSerialized:
826
+
827
+ _host = None
828
+
829
+ _collection_formats: Dict[str, str] = {}
830
+
831
+ _path_params: Dict[str, str] = {}
832
+ _query_params: List[Tuple[str, str]] = []
833
+ _header_params: Dict[str, Optional[str]] = _headers or {}
834
+ _form_params: List[Tuple[str, str]] = []
835
+ _files: Dict[
836
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
837
+ ] = {}
838
+ _body_params: Optional[bytes] = None
839
+
840
+ # process the path parameters
841
+ # process the query parameters
842
+ if limit is not None:
843
+
844
+ _query_params.append(("limit", limit))
845
+
846
+ if offset is not None:
847
+
848
+ _query_params.append(("offset", offset))
849
+
850
+ # process the header parameters
851
+ if x_refresh_token is not None:
852
+ _header_params["X-Refresh-Token"] = x_refresh_token
853
+ # process the form parameters
854
+ # process the body parameter
855
+
856
+ # set the HTTP header `Accept`
857
+ if "Accept" not in _header_params:
858
+ _header_params["Accept"] = self.api_client.select_header_accept(
859
+ ["application/json"]
860
+ )
861
+
862
+ # authentication setting
863
+ _auth_settings: List[str] = ["HTTPBearer"]
864
+
865
+ return self.api_client.param_serialize(
866
+ method="GET",
867
+ resource_path="/wallet/list",
868
+ path_params=_path_params,
869
+ query_params=_query_params,
870
+ header_params=_header_params,
871
+ body=_body_params,
872
+ post_params=_form_params,
873
+ files=_files,
874
+ auth_settings=_auth_settings,
875
+ collection_formats=_collection_formats,
876
+ _host=_host,
877
+ _request_auth=_request_auth,
878
+ )
879
+
880
+ @validate_call
881
+ async def unlink_wallet(
882
+ self,
883
+ unlink_wallet_request: UnlinkWalletRequest,
884
+ x_refresh_token: Annotated[
885
+ Optional[StrictStr],
886
+ Field(description="The refresh token for rotating the access token."),
887
+ ] = None,
888
+ _request_timeout: Union[
889
+ None,
890
+ Annotated[StrictFloat, Field(gt=0)],
891
+ Tuple[
892
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
893
+ ],
894
+ ] = None,
895
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
896
+ _content_type: Optional[StrictStr] = None,
897
+ _headers: Optional[Dict[StrictStr, Any]] = None,
898
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
899
+ ) -> object:
900
+ """Unlink a wallet
901
+
902
+ Unlink a wallet from the user
903
+
904
+ :param unlink_wallet_request: (required)
905
+ :type unlink_wallet_request: UnlinkWalletRequest
906
+ :param x_refresh_token: The refresh token for rotating the access token.
907
+ :type x_refresh_token: str
908
+ :param _request_timeout: timeout setting for this request. If one
909
+ number provided, it will be total request
910
+ timeout. It can also be a pair (tuple) of
911
+ (connection, read) timeouts.
912
+ :type _request_timeout: int, tuple(int, int), optional
913
+ :param _request_auth: set to override the auth_settings for an a single
914
+ request; this effectively ignores the
915
+ authentication in the spec for a single request.
916
+ :type _request_auth: dict, optional
917
+ :param _content_type: force content-type for the request.
918
+ :type _content_type: str, Optional
919
+ :param _headers: set to override the headers for a single
920
+ request; this effectively ignores the headers
921
+ in the spec for a single request.
922
+ :type _headers: dict, optional
923
+ :param _host_index: set to override the host_index for a single
924
+ request; this effectively ignores the host_index
925
+ in the spec for a single request.
926
+ :type _host_index: int, optional
927
+ :return: Returns the result object.
928
+ """ # noqa: E501
929
+
930
+ _param = self._unlink_wallet_serialize(
931
+ unlink_wallet_request=unlink_wallet_request,
932
+ x_refresh_token=x_refresh_token,
933
+ _request_auth=_request_auth,
934
+ _content_type=_content_type,
935
+ _headers=_headers,
936
+ _host_index=_host_index,
937
+ )
938
+
939
+ _response_types_map: Dict[str, Optional[str]] = {
940
+ "200": "object",
941
+ }
942
+ response_data = await self.api_client.call_api(
943
+ *_param, _request_timeout=_request_timeout
944
+ )
945
+ await response_data.read()
946
+ return self.api_client.response_deserialize(
947
+ response_data=response_data,
948
+ response_types_map=_response_types_map,
949
+ ).data
950
+
951
+ @validate_call
952
+ async def unlink_wallet_with_http_info(
953
+ self,
954
+ unlink_wallet_request: UnlinkWalletRequest,
955
+ x_refresh_token: Annotated[
956
+ Optional[StrictStr],
957
+ Field(description="The refresh token for rotating the access token."),
958
+ ] = None,
959
+ _request_timeout: Union[
960
+ None,
961
+ Annotated[StrictFloat, Field(gt=0)],
962
+ Tuple[
963
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
964
+ ],
965
+ ] = None,
966
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
967
+ _content_type: Optional[StrictStr] = None,
968
+ _headers: Optional[Dict[StrictStr, Any]] = None,
969
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
970
+ ) -> ApiResponse[object]:
971
+ """Unlink a wallet
972
+
973
+ Unlink a wallet from the user
974
+
975
+ :param unlink_wallet_request: (required)
976
+ :type unlink_wallet_request: UnlinkWalletRequest
977
+ :param x_refresh_token: The refresh token for rotating the access token.
978
+ :type x_refresh_token: str
979
+ :param _request_timeout: timeout setting for this request. If one
980
+ number provided, it will be total request
981
+ timeout. It can also be a pair (tuple) of
982
+ (connection, read) timeouts.
983
+ :type _request_timeout: int, tuple(int, int), optional
984
+ :param _request_auth: set to override the auth_settings for an a single
985
+ request; this effectively ignores the
986
+ authentication in the spec for a single request.
987
+ :type _request_auth: dict, optional
988
+ :param _content_type: force content-type for the request.
989
+ :type _content_type: str, Optional
990
+ :param _headers: set to override the headers for a single
991
+ request; this effectively ignores the headers
992
+ in the spec for a single request.
993
+ :type _headers: dict, optional
994
+ :param _host_index: set to override the host_index for a single
995
+ request; this effectively ignores the host_index
996
+ in the spec for a single request.
997
+ :type _host_index: int, optional
998
+ :return: Returns the result object.
999
+ """ # noqa: E501
1000
+
1001
+ _param = self._unlink_wallet_serialize(
1002
+ unlink_wallet_request=unlink_wallet_request,
1003
+ x_refresh_token=x_refresh_token,
1004
+ _request_auth=_request_auth,
1005
+ _content_type=_content_type,
1006
+ _headers=_headers,
1007
+ _host_index=_host_index,
1008
+ )
1009
+
1010
+ _response_types_map: Dict[str, Optional[str]] = {
1011
+ "200": "object",
1012
+ }
1013
+ response_data = await self.api_client.call_api(
1014
+ *_param, _request_timeout=_request_timeout
1015
+ )
1016
+ await response_data.read()
1017
+ return self.api_client.response_deserialize(
1018
+ response_data=response_data,
1019
+ response_types_map=_response_types_map,
1020
+ )
1021
+
1022
+ @validate_call
1023
+ async def unlink_wallet_without_preload_content(
1024
+ self,
1025
+ unlink_wallet_request: UnlinkWalletRequest,
1026
+ x_refresh_token: Annotated[
1027
+ Optional[StrictStr],
1028
+ Field(description="The refresh token for rotating the access token."),
1029
+ ] = None,
1030
+ _request_timeout: Union[
1031
+ None,
1032
+ Annotated[StrictFloat, Field(gt=0)],
1033
+ Tuple[
1034
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1035
+ ],
1036
+ ] = None,
1037
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1038
+ _content_type: Optional[StrictStr] = None,
1039
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1040
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1041
+ ) -> RESTResponseType:
1042
+ """Unlink a wallet
1043
+
1044
+ Unlink a wallet from the user
1045
+
1046
+ :param unlink_wallet_request: (required)
1047
+ :type unlink_wallet_request: UnlinkWalletRequest
1048
+ :param x_refresh_token: The refresh token for rotating the access token.
1049
+ :type x_refresh_token: str
1050
+ :param _request_timeout: timeout setting for this request. If one
1051
+ number provided, it will be total request
1052
+ timeout. It can also be a pair (tuple) of
1053
+ (connection, read) timeouts.
1054
+ :type _request_timeout: int, tuple(int, int), optional
1055
+ :param _request_auth: set to override the auth_settings for an a single
1056
+ request; this effectively ignores the
1057
+ authentication in the spec for a single request.
1058
+ :type _request_auth: dict, optional
1059
+ :param _content_type: force content-type for the request.
1060
+ :type _content_type: str, Optional
1061
+ :param _headers: set to override the headers for a single
1062
+ request; this effectively ignores the headers
1063
+ in the spec for a single request.
1064
+ :type _headers: dict, optional
1065
+ :param _host_index: set to override the host_index for a single
1066
+ request; this effectively ignores the host_index
1067
+ in the spec for a single request.
1068
+ :type _host_index: int, optional
1069
+ :return: Returns the result object.
1070
+ """ # noqa: E501
1071
+
1072
+ _param = self._unlink_wallet_serialize(
1073
+ unlink_wallet_request=unlink_wallet_request,
1074
+ x_refresh_token=x_refresh_token,
1075
+ _request_auth=_request_auth,
1076
+ _content_type=_content_type,
1077
+ _headers=_headers,
1078
+ _host_index=_host_index,
1079
+ )
1080
+
1081
+ _response_types_map: Dict[str, Optional[str]] = {
1082
+ "200": "object",
1083
+ }
1084
+ response_data = await self.api_client.call_api(
1085
+ *_param, _request_timeout=_request_timeout
1086
+ )
1087
+ return response_data.response
1088
+
1089
+ def _unlink_wallet_serialize(
1090
+ self,
1091
+ unlink_wallet_request,
1092
+ x_refresh_token,
1093
+ _request_auth,
1094
+ _content_type,
1095
+ _headers,
1096
+ _host_index,
1097
+ ) -> RequestSerialized:
1098
+
1099
+ _host = None
1100
+
1101
+ _collection_formats: Dict[str, str] = {}
1102
+
1103
+ _path_params: Dict[str, str] = {}
1104
+ _query_params: List[Tuple[str, str]] = []
1105
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1106
+ _form_params: List[Tuple[str, str]] = []
1107
+ _files: Dict[
1108
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1109
+ ] = {}
1110
+ _body_params: Optional[bytes] = None
1111
+
1112
+ # process the path parameters
1113
+ # process the query parameters
1114
+ # process the header parameters
1115
+ if x_refresh_token is not None:
1116
+ _header_params["X-Refresh-Token"] = x_refresh_token
1117
+ # process the form parameters
1118
+ # process the body parameter
1119
+ if unlink_wallet_request is not None:
1120
+ _body_params = unlink_wallet_request
1121
+
1122
+ # set the HTTP header `Accept`
1123
+ if "Accept" not in _header_params:
1124
+ _header_params["Accept"] = self.api_client.select_header_accept(
1125
+ ["application/json"]
1126
+ )
1127
+
1128
+ # set the HTTP header `Content-Type`
1129
+ if _content_type:
1130
+ _header_params["Content-Type"] = _content_type
1131
+ else:
1132
+ _default_content_type = self.api_client.select_header_content_type(
1133
+ ["application/json"]
1134
+ )
1135
+ if _default_content_type is not None:
1136
+ _header_params["Content-Type"] = _default_content_type
1137
+
1138
+ # authentication setting
1139
+ _auth_settings: List[str] = ["HTTPBearer"]
1140
+
1141
+ return self.api_client.param_serialize(
1142
+ method="POST",
1143
+ resource_path="/wallet/unlink",
1144
+ path_params=_path_params,
1145
+ query_params=_query_params,
1146
+ header_params=_header_params,
1147
+ body=_body_params,
1148
+ post_params=_form_params,
1149
+ files=_files,
1150
+ auth_settings=_auth_settings,
1151
+ collection_formats=_collection_formats,
1152
+ _host=_host,
1153
+ _request_auth=_request_auth,
1154
+ )
1155
+
1156
+ @validate_call
1157
+ async def verify_wallet(
1158
+ self,
1159
+ verify_wallet_request: VerifyWalletRequest,
1160
+ x_refresh_token: Annotated[
1161
+ Optional[StrictStr],
1162
+ Field(description="The refresh token for rotating the access token."),
1163
+ ] = None,
1164
+ _request_timeout: Union[
1165
+ None,
1166
+ Annotated[StrictFloat, Field(gt=0)],
1167
+ Tuple[
1168
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1169
+ ],
1170
+ ] = None,
1171
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1172
+ _content_type: Optional[StrictStr] = None,
1173
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1174
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1175
+ ) -> object:
1176
+ """Verify a wallet
1177
+
1178
+ Verify a wallet by signing a message
1179
+
1180
+ :param verify_wallet_request: (required)
1181
+ :type verify_wallet_request: VerifyWalletRequest
1182
+ :param x_refresh_token: The refresh token for rotating the access token.
1183
+ :type x_refresh_token: str
1184
+ :param _request_timeout: timeout setting for this request. If one
1185
+ number provided, it will be total request
1186
+ timeout. It can also be a pair (tuple) of
1187
+ (connection, read) timeouts.
1188
+ :type _request_timeout: int, tuple(int, int), optional
1189
+ :param _request_auth: set to override the auth_settings for an a single
1190
+ request; this effectively ignores the
1191
+ authentication in the spec for a single request.
1192
+ :type _request_auth: dict, optional
1193
+ :param _content_type: force content-type for the request.
1194
+ :type _content_type: str, Optional
1195
+ :param _headers: set to override the headers for a single
1196
+ request; this effectively ignores the headers
1197
+ in the spec for a single request.
1198
+ :type _headers: dict, optional
1199
+ :param _host_index: set to override the host_index for a single
1200
+ request; this effectively ignores the host_index
1201
+ in the spec for a single request.
1202
+ :type _host_index: int, optional
1203
+ :return: Returns the result object.
1204
+ """ # noqa: E501
1205
+
1206
+ _param = self._verify_wallet_serialize(
1207
+ verify_wallet_request=verify_wallet_request,
1208
+ x_refresh_token=x_refresh_token,
1209
+ _request_auth=_request_auth,
1210
+ _content_type=_content_type,
1211
+ _headers=_headers,
1212
+ _host_index=_host_index,
1213
+ )
1214
+
1215
+ _response_types_map: Dict[str, Optional[str]] = {
1216
+ "200": "object",
1217
+ }
1218
+ response_data = await self.api_client.call_api(
1219
+ *_param, _request_timeout=_request_timeout
1220
+ )
1221
+ await response_data.read()
1222
+ return self.api_client.response_deserialize(
1223
+ response_data=response_data,
1224
+ response_types_map=_response_types_map,
1225
+ ).data
1226
+
1227
+ @validate_call
1228
+ async def verify_wallet_with_http_info(
1229
+ self,
1230
+ verify_wallet_request: VerifyWalletRequest,
1231
+ x_refresh_token: Annotated[
1232
+ Optional[StrictStr],
1233
+ Field(description="The refresh token for rotating the access token."),
1234
+ ] = None,
1235
+ _request_timeout: Union[
1236
+ None,
1237
+ Annotated[StrictFloat, Field(gt=0)],
1238
+ Tuple[
1239
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1240
+ ],
1241
+ ] = None,
1242
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1243
+ _content_type: Optional[StrictStr] = None,
1244
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1245
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1246
+ ) -> ApiResponse[object]:
1247
+ """Verify a wallet
1248
+
1249
+ Verify a wallet by signing a message
1250
+
1251
+ :param verify_wallet_request: (required)
1252
+ :type verify_wallet_request: VerifyWalletRequest
1253
+ :param x_refresh_token: The refresh token for rotating the access token.
1254
+ :type x_refresh_token: str
1255
+ :param _request_timeout: timeout setting for this request. If one
1256
+ number provided, it will be total request
1257
+ timeout. It can also be a pair (tuple) of
1258
+ (connection, read) timeouts.
1259
+ :type _request_timeout: int, tuple(int, int), optional
1260
+ :param _request_auth: set to override the auth_settings for an a single
1261
+ request; this effectively ignores the
1262
+ authentication in the spec for a single request.
1263
+ :type _request_auth: dict, optional
1264
+ :param _content_type: force content-type for the request.
1265
+ :type _content_type: str, Optional
1266
+ :param _headers: set to override the headers for a single
1267
+ request; this effectively ignores the headers
1268
+ in the spec for a single request.
1269
+ :type _headers: dict, optional
1270
+ :param _host_index: set to override the host_index for a single
1271
+ request; this effectively ignores the host_index
1272
+ in the spec for a single request.
1273
+ :type _host_index: int, optional
1274
+ :return: Returns the result object.
1275
+ """ # noqa: E501
1276
+
1277
+ _param = self._verify_wallet_serialize(
1278
+ verify_wallet_request=verify_wallet_request,
1279
+ x_refresh_token=x_refresh_token,
1280
+ _request_auth=_request_auth,
1281
+ _content_type=_content_type,
1282
+ _headers=_headers,
1283
+ _host_index=_host_index,
1284
+ )
1285
+
1286
+ _response_types_map: Dict[str, Optional[str]] = {
1287
+ "200": "object",
1288
+ }
1289
+ response_data = await self.api_client.call_api(
1290
+ *_param, _request_timeout=_request_timeout
1291
+ )
1292
+ await response_data.read()
1293
+ return self.api_client.response_deserialize(
1294
+ response_data=response_data,
1295
+ response_types_map=_response_types_map,
1296
+ )
1297
+
1298
+ @validate_call
1299
+ async def verify_wallet_without_preload_content(
1300
+ self,
1301
+ verify_wallet_request: VerifyWalletRequest,
1302
+ x_refresh_token: Annotated[
1303
+ Optional[StrictStr],
1304
+ Field(description="The refresh token for rotating the access token."),
1305
+ ] = None,
1306
+ _request_timeout: Union[
1307
+ None,
1308
+ Annotated[StrictFloat, Field(gt=0)],
1309
+ Tuple[
1310
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1311
+ ],
1312
+ ] = None,
1313
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1314
+ _content_type: Optional[StrictStr] = None,
1315
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1316
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1317
+ ) -> RESTResponseType:
1318
+ """Verify a wallet
1319
+
1320
+ Verify a wallet by signing a message
1321
+
1322
+ :param verify_wallet_request: (required)
1323
+ :type verify_wallet_request: VerifyWalletRequest
1324
+ :param x_refresh_token: The refresh token for rotating the access token.
1325
+ :type x_refresh_token: str
1326
+ :param _request_timeout: timeout setting for this request. If one
1327
+ number provided, it will be total request
1328
+ timeout. It can also be a pair (tuple) of
1329
+ (connection, read) timeouts.
1330
+ :type _request_timeout: int, tuple(int, int), optional
1331
+ :param _request_auth: set to override the auth_settings for an a single
1332
+ request; this effectively ignores the
1333
+ authentication in the spec for a single request.
1334
+ :type _request_auth: dict, optional
1335
+ :param _content_type: force content-type for the request.
1336
+ :type _content_type: str, Optional
1337
+ :param _headers: set to override the headers for a single
1338
+ request; this effectively ignores the headers
1339
+ in the spec for a single request.
1340
+ :type _headers: dict, optional
1341
+ :param _host_index: set to override the host_index for a single
1342
+ request; this effectively ignores the host_index
1343
+ in the spec for a single request.
1344
+ :type _host_index: int, optional
1345
+ :return: Returns the result object.
1346
+ """ # noqa: E501
1347
+
1348
+ _param = self._verify_wallet_serialize(
1349
+ verify_wallet_request=verify_wallet_request,
1350
+ x_refresh_token=x_refresh_token,
1351
+ _request_auth=_request_auth,
1352
+ _content_type=_content_type,
1353
+ _headers=_headers,
1354
+ _host_index=_host_index,
1355
+ )
1356
+
1357
+ _response_types_map: Dict[str, Optional[str]] = {
1358
+ "200": "object",
1359
+ }
1360
+ response_data = await self.api_client.call_api(
1361
+ *_param, _request_timeout=_request_timeout
1362
+ )
1363
+ return response_data.response
1364
+
1365
+ def _verify_wallet_serialize(
1366
+ self,
1367
+ verify_wallet_request,
1368
+ x_refresh_token,
1369
+ _request_auth,
1370
+ _content_type,
1371
+ _headers,
1372
+ _host_index,
1373
+ ) -> RequestSerialized:
1374
+
1375
+ _host = None
1376
+
1377
+ _collection_formats: Dict[str, str] = {}
1378
+
1379
+ _path_params: Dict[str, str] = {}
1380
+ _query_params: List[Tuple[str, str]] = []
1381
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1382
+ _form_params: List[Tuple[str, str]] = []
1383
+ _files: Dict[
1384
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1385
+ ] = {}
1386
+ _body_params: Optional[bytes] = None
1387
+
1388
+ # process the path parameters
1389
+ # process the query parameters
1390
+ # process the header parameters
1391
+ if x_refresh_token is not None:
1392
+ _header_params["X-Refresh-Token"] = x_refresh_token
1393
+ # process the form parameters
1394
+ # process the body parameter
1395
+ if verify_wallet_request is not None:
1396
+ _body_params = verify_wallet_request
1397
+
1398
+ # set the HTTP header `Accept`
1399
+ if "Accept" not in _header_params:
1400
+ _header_params["Accept"] = self.api_client.select_header_accept(
1401
+ ["application/json"]
1402
+ )
1403
+
1404
+ # set the HTTP header `Content-Type`
1405
+ if _content_type:
1406
+ _header_params["Content-Type"] = _content_type
1407
+ else:
1408
+ _default_content_type = self.api_client.select_header_content_type(
1409
+ ["application/json"]
1410
+ )
1411
+ if _default_content_type is not None:
1412
+ _header_params["Content-Type"] = _default_content_type
1413
+
1414
+ # authentication setting
1415
+ _auth_settings: List[str] = ["HTTPBearer"]
1416
+
1417
+ return self.api_client.param_serialize(
1418
+ method="POST",
1419
+ resource_path="/wallet/verify",
1420
+ path_params=_path_params,
1421
+ query_params=_query_params,
1422
+ header_params=_header_params,
1423
+ body=_body_params,
1424
+ post_params=_form_params,
1425
+ files=_files,
1426
+ auth_settings=_auth_settings,
1427
+ collection_formats=_collection_formats,
1428
+ _host=_host,
1429
+ _request_auth=_request_auth,
1430
+ )
1431
+
1432
+ @validate_call
1433
+ async def wallet_verified(
1434
+ self,
1435
+ address: StrictStr,
1436
+ x_refresh_token: Annotated[
1437
+ Optional[StrictStr],
1438
+ Field(description="The refresh token for rotating the access token."),
1439
+ ] = None,
1440
+ _request_timeout: Union[
1441
+ None,
1442
+ Annotated[StrictFloat, Field(gt=0)],
1443
+ Tuple[
1444
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1445
+ ],
1446
+ ] = None,
1447
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1448
+ _content_type: Optional[StrictStr] = None,
1449
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1450
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1451
+ ) -> WalletVerified200Response:
1452
+ """Check if a wallet is verified
1453
+
1454
+ Check if a wallet is verified
1455
+
1456
+ :param address: (required)
1457
+ :type address: str
1458
+ :param x_refresh_token: The refresh token for rotating the access token.
1459
+ :type x_refresh_token: str
1460
+ :param _request_timeout: timeout setting for this request. If one
1461
+ number provided, it will be total request
1462
+ timeout. It can also be a pair (tuple) of
1463
+ (connection, read) timeouts.
1464
+ :type _request_timeout: int, tuple(int, int), optional
1465
+ :param _request_auth: set to override the auth_settings for an a single
1466
+ request; this effectively ignores the
1467
+ authentication in the spec for a single request.
1468
+ :type _request_auth: dict, optional
1469
+ :param _content_type: force content-type for the request.
1470
+ :type _content_type: str, Optional
1471
+ :param _headers: set to override the headers for a single
1472
+ request; this effectively ignores the headers
1473
+ in the spec for a single request.
1474
+ :type _headers: dict, optional
1475
+ :param _host_index: set to override the host_index for a single
1476
+ request; this effectively ignores the host_index
1477
+ in the spec for a single request.
1478
+ :type _host_index: int, optional
1479
+ :return: Returns the result object.
1480
+ """ # noqa: E501
1481
+
1482
+ _param = self._wallet_verified_serialize(
1483
+ address=address,
1484
+ x_refresh_token=x_refresh_token,
1485
+ _request_auth=_request_auth,
1486
+ _content_type=_content_type,
1487
+ _headers=_headers,
1488
+ _host_index=_host_index,
1489
+ )
1490
+
1491
+ _response_types_map: Dict[str, Optional[str]] = {
1492
+ "200": "WalletVerified200Response",
1493
+ }
1494
+ response_data = await self.api_client.call_api(
1495
+ *_param, _request_timeout=_request_timeout
1496
+ )
1497
+ await response_data.read()
1498
+ return self.api_client.response_deserialize(
1499
+ response_data=response_data,
1500
+ response_types_map=_response_types_map,
1501
+ ).data
1502
+
1503
+ @validate_call
1504
+ async def wallet_verified_with_http_info(
1505
+ self,
1506
+ address: StrictStr,
1507
+ x_refresh_token: Annotated[
1508
+ Optional[StrictStr],
1509
+ Field(description="The refresh token for rotating the access token."),
1510
+ ] = None,
1511
+ _request_timeout: Union[
1512
+ None,
1513
+ Annotated[StrictFloat, Field(gt=0)],
1514
+ Tuple[
1515
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1516
+ ],
1517
+ ] = None,
1518
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1519
+ _content_type: Optional[StrictStr] = None,
1520
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1521
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1522
+ ) -> ApiResponse[WalletVerified200Response]:
1523
+ """Check if a wallet is verified
1524
+
1525
+ Check if a wallet is verified
1526
+
1527
+ :param address: (required)
1528
+ :type address: str
1529
+ :param x_refresh_token: The refresh token for rotating the access token.
1530
+ :type x_refresh_token: str
1531
+ :param _request_timeout: timeout setting for this request. If one
1532
+ number provided, it will be total request
1533
+ timeout. It can also be a pair (tuple) of
1534
+ (connection, read) timeouts.
1535
+ :type _request_timeout: int, tuple(int, int), optional
1536
+ :param _request_auth: set to override the auth_settings for an a single
1537
+ request; this effectively ignores the
1538
+ authentication in the spec for a single request.
1539
+ :type _request_auth: dict, optional
1540
+ :param _content_type: force content-type for the request.
1541
+ :type _content_type: str, Optional
1542
+ :param _headers: set to override the headers for a single
1543
+ request; this effectively ignores the headers
1544
+ in the spec for a single request.
1545
+ :type _headers: dict, optional
1546
+ :param _host_index: set to override the host_index for a single
1547
+ request; this effectively ignores the host_index
1548
+ in the spec for a single request.
1549
+ :type _host_index: int, optional
1550
+ :return: Returns the result object.
1551
+ """ # noqa: E501
1552
+
1553
+ _param = self._wallet_verified_serialize(
1554
+ address=address,
1555
+ x_refresh_token=x_refresh_token,
1556
+ _request_auth=_request_auth,
1557
+ _content_type=_content_type,
1558
+ _headers=_headers,
1559
+ _host_index=_host_index,
1560
+ )
1561
+
1562
+ _response_types_map: Dict[str, Optional[str]] = {
1563
+ "200": "WalletVerified200Response",
1564
+ }
1565
+ response_data = await self.api_client.call_api(
1566
+ *_param, _request_timeout=_request_timeout
1567
+ )
1568
+ await response_data.read()
1569
+ return self.api_client.response_deserialize(
1570
+ response_data=response_data,
1571
+ response_types_map=_response_types_map,
1572
+ )
1573
+
1574
+ @validate_call
1575
+ async def wallet_verified_without_preload_content(
1576
+ self,
1577
+ address: StrictStr,
1578
+ x_refresh_token: Annotated[
1579
+ Optional[StrictStr],
1580
+ Field(description="The refresh token for rotating the access token."),
1581
+ ] = None,
1582
+ _request_timeout: Union[
1583
+ None,
1584
+ Annotated[StrictFloat, Field(gt=0)],
1585
+ Tuple[
1586
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1587
+ ],
1588
+ ] = None,
1589
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1590
+ _content_type: Optional[StrictStr] = None,
1591
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1592
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1593
+ ) -> RESTResponseType:
1594
+ """Check if a wallet is verified
1595
+
1596
+ Check if a wallet is verified
1597
+
1598
+ :param address: (required)
1599
+ :type address: str
1600
+ :param x_refresh_token: The refresh token for rotating the access token.
1601
+ :type x_refresh_token: str
1602
+ :param _request_timeout: timeout setting for this request. If one
1603
+ number provided, it will be total request
1604
+ timeout. It can also be a pair (tuple) of
1605
+ (connection, read) timeouts.
1606
+ :type _request_timeout: int, tuple(int, int), optional
1607
+ :param _request_auth: set to override the auth_settings for an a single
1608
+ request; this effectively ignores the
1609
+ authentication in the spec for a single request.
1610
+ :type _request_auth: dict, optional
1611
+ :param _content_type: force content-type for the request.
1612
+ :type _content_type: str, Optional
1613
+ :param _headers: set to override the headers for a single
1614
+ request; this effectively ignores the headers
1615
+ in the spec for a single request.
1616
+ :type _headers: dict, optional
1617
+ :param _host_index: set to override the host_index for a single
1618
+ request; this effectively ignores the host_index
1619
+ in the spec for a single request.
1620
+ :type _host_index: int, optional
1621
+ :return: Returns the result object.
1622
+ """ # noqa: E501
1623
+
1624
+ _param = self._wallet_verified_serialize(
1625
+ address=address,
1626
+ x_refresh_token=x_refresh_token,
1627
+ _request_auth=_request_auth,
1628
+ _content_type=_content_type,
1629
+ _headers=_headers,
1630
+ _host_index=_host_index,
1631
+ )
1632
+
1633
+ _response_types_map: Dict[str, Optional[str]] = {
1634
+ "200": "WalletVerified200Response",
1635
+ }
1636
+ response_data = await self.api_client.call_api(
1637
+ *_param, _request_timeout=_request_timeout
1638
+ )
1639
+ return response_data.response
1640
+
1641
+ def _wallet_verified_serialize(
1642
+ self,
1643
+ address,
1644
+ x_refresh_token,
1645
+ _request_auth,
1646
+ _content_type,
1647
+ _headers,
1648
+ _host_index,
1649
+ ) -> RequestSerialized:
1650
+
1651
+ _host = None
1652
+
1653
+ _collection_formats: Dict[str, str] = {}
1654
+
1655
+ _path_params: Dict[str, str] = {}
1656
+ _query_params: List[Tuple[str, str]] = []
1657
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1658
+ _form_params: List[Tuple[str, str]] = []
1659
+ _files: Dict[
1660
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1661
+ ] = {}
1662
+ _body_params: Optional[bytes] = None
1663
+
1664
+ # process the path parameters
1665
+ # process the query parameters
1666
+ if address is not None:
1667
+
1668
+ _query_params.append(("address", address))
1669
+
1670
+ # process the header parameters
1671
+ if x_refresh_token is not None:
1672
+ _header_params["X-Refresh-Token"] = x_refresh_token
1673
+ # process the form parameters
1674
+ # process the body parameter
1675
+
1676
+ # set the HTTP header `Accept`
1677
+ if "Accept" not in _header_params:
1678
+ _header_params["Accept"] = self.api_client.select_header_accept(
1679
+ ["application/json"]
1680
+ )
1681
+
1682
+ # authentication setting
1683
+ _auth_settings: List[str] = ["HTTPBearer"]
1684
+
1685
+ return self.api_client.param_serialize(
1686
+ method="GET",
1687
+ resource_path="/wallet/verified",
1688
+ path_params=_path_params,
1689
+ query_params=_query_params,
1690
+ header_params=_header_params,
1691
+ body=_body_params,
1692
+ post_params=_form_params,
1693
+ files=_files,
1694
+ auth_settings=_auth_settings,
1695
+ collection_formats=_collection_formats,
1696
+ _host=_host,
1697
+ _request_auth=_request_auth,
1698
+ )