chainstream-sdk 0.1.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.
- chainstream/__init__.py +46 -0
- chainstream/client.py +104 -0
- chainstream/openapi_client/__init__.py +156 -0
- chainstream/openapi_client/api/__init__.py +20 -0
- chainstream/openapi_client/api/blockchain_api.py +549 -0
- chainstream/openapi_client/api/defi_sol_moonshot_api.py +590 -0
- chainstream/openapi_client/api/defi_sol_pumpfun_api.py +314 -0
- chainstream/openapi_client/api/dex_api.py +1576 -0
- chainstream/openapi_client/api/dex_pool_api.py +645 -0
- chainstream/openapi_client/api/endpoint_api.py +1934 -0
- chainstream/openapi_client/api/ipfs_api.py +283 -0
- chainstream/openapi_client/api/jobs_api.py +562 -0
- chainstream/openapi_client/api/kyt_api.py +3743 -0
- chainstream/openapi_client/api/ranking_api.py +2067 -0
- chainstream/openapi_client/api/red_packet_api.py +2444 -0
- chainstream/openapi_client/api/token_api.py +9211 -0
- chainstream/openapi_client/api/trade_api.py +1352 -0
- chainstream/openapi_client/api/transaction_api.py +882 -0
- chainstream/openapi_client/api/wallet_api.py +1608 -0
- chainstream/openapi_client/api/watchlist_api.py +316 -0
- chainstream/openapi_client/api_client.py +801 -0
- chainstream/openapi_client/api_response.py +21 -0
- chainstream/openapi_client/configuration.py +572 -0
- chainstream/openapi_client/exceptions.py +217 -0
- chainstream/openapi_client/models/__init__.py +122 -0
- chainstream/openapi_client/models/address_exposure.py +94 -0
- chainstream/openapi_client/models/address_risk_response_dto.py +112 -0
- chainstream/openapi_client/models/alert_detail.py +100 -0
- chainstream/openapi_client/models/alterya_identification.py +106 -0
- chainstream/openapi_client/models/balance_change_type.py +38 -0
- chainstream/openapi_client/models/balance_token_type.py +38 -0
- chainstream/openapi_client/models/balance_update_dto.py +130 -0
- chainstream/openapi_client/models/balance_update_page.py +104 -0
- chainstream/openapi_client/models/blockchain_dto.py +94 -0
- chainstream/openapi_client/models/blockchain_latest_block_dto.py +90 -0
- chainstream/openapi_client/models/boolean_result_dto.py +88 -0
- chainstream/openapi_client/models/calculate_pnl_input.py +88 -0
- chainstream/openapi_client/models/candle.py +101 -0
- chainstream/openapi_client/models/chain.py +39 -0
- chainstream/openapi_client/models/chain_symbol.py +39 -0
- chainstream/openapi_client/models/chainalysis_address_identification.py +92 -0
- chainstream/openapi_client/models/claim_red_packet_input.py +103 -0
- chainstream/openapi_client/models/create_endpoint_input.py +102 -0
- chainstream/openapi_client/models/create_red_packet_input.py +112 -0
- chainstream/openapi_client/models/create_red_packet_reply.py +90 -0
- chainstream/openapi_client/models/create_token_input.py +110 -0
- chainstream/openapi_client/models/create_token_reply.py +90 -0
- chainstream/openapi_client/models/dev_token_dto.py +106 -0
- chainstream/openapi_client/models/dex_dto.py +94 -0
- chainstream/openapi_client/models/dex_page.py +106 -0
- chainstream/openapi_client/models/dex_pool_dto.py +161 -0
- chainstream/openapi_client/models/dex_pool_snapshot_dto.py +111 -0
- chainstream/openapi_client/models/dex_pool_snapshot_page.py +104 -0
- chainstream/openapi_client/models/dex_pool_token_liquidity.py +100 -0
- chainstream/openapi_client/models/dex_pool_token_snapshot_dto.py +100 -0
- chainstream/openapi_client/models/dex_quote_response.py +98 -0
- chainstream/openapi_client/models/direct_exposure_detail.py +90 -0
- chainstream/openapi_client/models/endpoint_list_response.py +102 -0
- chainstream/openapi_client/models/endpoint_operation_response.py +88 -0
- chainstream/openapi_client/models/endpoint_response.py +108 -0
- chainstream/openapi_client/models/endpoint_secret_response.py +88 -0
- chainstream/openapi_client/models/estimate_gas_limit_input.py +94 -0
- chainstream/openapi_client/models/estimate_gas_limit_response.py +90 -0
- chainstream/openapi_client/models/filter_condition.py +102 -0
- chainstream/openapi_client/models/gas_price_response.py +90 -0
- chainstream/openapi_client/models/job_dto.py +90 -0
- chainstream/openapi_client/models/job_streaming_dto.py +90 -0
- chainstream/openapi_client/models/kyt_register_transfer_request.py +108 -0
- chainstream/openapi_client/models/kyt_register_withdrawal_request.py +111 -0
- chainstream/openapi_client/models/link.py +97 -0
- chainstream/openapi_client/models/moonshot_create_token_input.py +145 -0
- chainstream/openapi_client/models/moonshot_create_token_reply.py +90 -0
- chainstream/openapi_client/models/moonshot_submit_create_token200_response.py +90 -0
- chainstream/openapi_client/models/moonshot_submit_create_token_input.py +90 -0
- chainstream/openapi_client/models/network_identification_org.py +88 -0
- chainstream/openapi_client/models/on_chain_activity.py +88 -0
- chainstream/openapi_client/models/pump_create_token_input.py +155 -0
- chainstream/openapi_client/models/pump_create_token_reply.py +90 -0
- chainstream/openapi_client/models/red_packet_claim_dto.py +103 -0
- chainstream/openapi_client/models/red_packet_claims_page.py +104 -0
- chainstream/openapi_client/models/red_packet_dto.py +121 -0
- chainstream/openapi_client/models/red_packet_reply.py +88 -0
- chainstream/openapi_client/models/red_packet_send_tx_input.py +88 -0
- chainstream/openapi_client/models/red_packet_send_tx_response.py +88 -0
- chainstream/openapi_client/models/red_packets_page.py +104 -0
- chainstream/openapi_client/models/register_address_request.py +88 -0
- chainstream/openapi_client/models/register_address_response_dto.py +88 -0
- chainstream/openapi_client/models/resolution.py +46 -0
- chainstream/openapi_client/models/send_tx_input.py +102 -0
- chainstream/openapi_client/models/send_tx_response.py +92 -0
- chainstream/openapi_client/models/swap_input.py +119 -0
- chainstream/openapi_client/models/swap_reply.py +90 -0
- chainstream/openapi_client/models/swap_route_input.py +127 -0
- chainstream/openapi_client/models/swap_route_response.py +98 -0
- chainstream/openapi_client/models/token.py +158 -0
- chainstream/openapi_client/models/token_creation_dto.py +107 -0
- chainstream/openapi_client/models/token_creation_page.py +106 -0
- chainstream/openapi_client/models/token_creators_dto.py +92 -0
- chainstream/openapi_client/models/token_extra_dto.py +128 -0
- chainstream/openapi_client/models/token_holder.py +94 -0
- chainstream/openapi_client/models/token_holder_page.py +106 -0
- chainstream/openapi_client/models/token_liquidity_snapshot_dto.py +106 -0
- chainstream/openapi_client/models/token_liquidity_snapshot_page.py +104 -0
- chainstream/openapi_client/models/token_list_page.py +106 -0
- chainstream/openapi_client/models/token_market_data.py +174 -0
- chainstream/openapi_client/models/token_metadata.py +132 -0
- chainstream/openapi_client/models/token_page.py +108 -0
- chainstream/openapi_client/models/token_price_dto.py +94 -0
- chainstream/openapi_client/models/token_price_page.py +106 -0
- chainstream/openapi_client/models/token_social_medias_dto.py +112 -0
- chainstream/openapi_client/models/token_stat.py +340 -0
- chainstream/openapi_client/models/token_trader.py +113 -0
- chainstream/openapi_client/models/token_trader_tag.py +45 -0
- chainstream/openapi_client/models/top_traders_dto.py +110 -0
- chainstream/openapi_client/models/top_traders_page.py +106 -0
- chainstream/openapi_client/models/trade_detail_dto.py +136 -0
- chainstream/openapi_client/models/trade_event.py +113 -0
- chainstream/openapi_client/models/trade_page.py +106 -0
- chainstream/openapi_client/models/trade_type.py +38 -0
- chainstream/openapi_client/models/transfer_alerts_response_dto.py +96 -0
- chainstream/openapi_client/models/transfer_base_response_dto.py +112 -0
- chainstream/openapi_client/models/transfer_direct_exposure_response_dto.py +92 -0
- chainstream/openapi_client/models/transfer_network_identifications_response_dto.py +98 -0
- chainstream/openapi_client/models/update_endpoint_input.py +104 -0
- chainstream/openapi_client/models/wallet_balance_detail_dto.py +136 -0
- chainstream/openapi_client/models/wallet_balances_dto.py +100 -0
- chainstream/openapi_client/models/wallet_pnl_dto.py +132 -0
- chainstream/openapi_client/models/withdrawal_address_identifications_response_dto.py +98 -0
- chainstream/openapi_client/models/withdrawal_base_response_dto.py +106 -0
- chainstream/openapi_client/models/withdrawal_fraud_assessment_response_dto.py +96 -0
- chainstream/openapi_client/rest.py +213 -0
- chainstream/openapi_client/test/__init__.py +0 -0
- chainstream/openapi_client/test/test_address_exposure.py +59 -0
- chainstream/openapi_client/test/test_address_risk_response_dto.py +81 -0
- chainstream/openapi_client/test/test_alert_detail.py +65 -0
- chainstream/openapi_client/test/test_alterya_identification.py +69 -0
- chainstream/openapi_client/test/test_balance_change_type.py +34 -0
- chainstream/openapi_client/test/test_balance_token_type.py +34 -0
- chainstream/openapi_client/test/test_balance_update_dto.py +93 -0
- chainstream/openapi_client/test/test_balance_update_page.py +105 -0
- chainstream/openapi_client/test/test_blockchain_api.py +46 -0
- chainstream/openapi_client/test/test_blockchain_dto.py +59 -0
- chainstream/openapi_client/test/test_blockchain_latest_block_dto.py +55 -0
- chainstream/openapi_client/test/test_boolean_result_dto.py +53 -0
- chainstream/openapi_client/test/test_calculate_pnl_input.py +52 -0
- chainstream/openapi_client/test/test_candle.py +65 -0
- chainstream/openapi_client/test/test_chain.py +34 -0
- chainstream/openapi_client/test/test_chain_symbol.py +34 -0
- chainstream/openapi_client/test/test_chainalysis_address_identification.py +57 -0
- chainstream/openapi_client/test/test_claim_red_packet_input.py +58 -0
- chainstream/openapi_client/test/test_create_endpoint_input.py +63 -0
- chainstream/openapi_client/test/test_create_red_packet_input.py +64 -0
- chainstream/openapi_client/test/test_create_red_packet_reply.py +55 -0
- chainstream/openapi_client/test/test_create_token_input.py +63 -0
- chainstream/openapi_client/test/test_create_token_reply.py +55 -0
- chainstream/openapi_client/test/test_defi_sol_moonshot_api.py +46 -0
- chainstream/openapi_client/test/test_defi_sol_pumpfun_api.py +39 -0
- chainstream/openapi_client/test/test_dev_token_dto.py +441 -0
- chainstream/openapi_client/test/test_dex_api.py +67 -0
- chainstream/openapi_client/test/test_dex_dto.py +56 -0
- chainstream/openapi_client/test/test_dex_page.py +70 -0
- chainstream/openapi_client/test/test_dex_pool_api.py +46 -0
- chainstream/openapi_client/test/test_dex_pool_dto.py +88 -0
- chainstream/openapi_client/test/test_dex_pool_snapshot_dto.py +96 -0
- chainstream/openapi_client/test/test_dex_pool_snapshot_page.py +81 -0
- chainstream/openapi_client/test/test_dex_pool_token_liquidity.py +65 -0
- chainstream/openapi_client/test/test_dex_pool_token_snapshot_dto.py +65 -0
- chainstream/openapi_client/test/test_dex_quote_response.py +57 -0
- chainstream/openapi_client/test/test_direct_exposure_detail.py +55 -0
- chainstream/openapi_client/test/test_endpoint_api.py +81 -0
- chainstream/openapi_client/test/test_endpoint_list_response.py +72 -0
- chainstream/openapi_client/test/test_endpoint_operation_response.py +52 -0
- chainstream/openapi_client/test/test_endpoint_response.py +66 -0
- chainstream/openapi_client/test/test_endpoint_secret_response.py +52 -0
- chainstream/openapi_client/test/test_estimate_gas_limit_input.py +58 -0
- chainstream/openapi_client/test/test_estimate_gas_limit_response.py +55 -0
- chainstream/openapi_client/test/test_filter_condition.py +54 -0
- chainstream/openapi_client/test/test_gas_price_response.py +55 -0
- chainstream/openapi_client/test/test_ipfs_api.py +39 -0
- chainstream/openapi_client/test/test_job_dto.py +55 -0
- chainstream/openapi_client/test/test_job_streaming_dto.py +55 -0
- chainstream/openapi_client/test/test_jobs_api.py +46 -0
- chainstream/openapi_client/test/test_kyt_api.py +130 -0
- chainstream/openapi_client/test/test_kyt_register_transfer_request.py +59 -0
- chainstream/openapi_client/test/test_kyt_register_withdrawal_request.py +65 -0
- chainstream/openapi_client/test/test_link.py +55 -0
- chainstream/openapi_client/test/test_moonshot_create_token_input.py +79 -0
- chainstream/openapi_client/test/test_moonshot_create_token_reply.py +55 -0
- chainstream/openapi_client/test/test_moonshot_submit_create_token200_response.py +53 -0
- chainstream/openapi_client/test/test_moonshot_submit_create_token_input.py +54 -0
- chainstream/openapi_client/test/test_network_identification_org.py +53 -0
- chainstream/openapi_client/test/test_on_chain_activity.py +53 -0
- chainstream/openapi_client/test/test_pump_create_token_input.py +71 -0
- chainstream/openapi_client/test/test_pump_create_token_reply.py +54 -0
- chainstream/openapi_client/test/test_ranking_api.py +67 -0
- chainstream/openapi_client/test/test_red_packet_api.py +88 -0
- chainstream/openapi_client/test/test_red_packet_claim_dto.py +67 -0
- chainstream/openapi_client/test/test_red_packet_claims_page.py +81 -0
- chainstream/openapi_client/test/test_red_packet_dto.py +85 -0
- chainstream/openapi_client/test/test_red_packet_reply.py +53 -0
- chainstream/openapi_client/test/test_red_packet_send_tx_input.py +53 -0
- chainstream/openapi_client/test/test_red_packet_send_tx_response.py +53 -0
- chainstream/openapi_client/test/test_red_packets_page.py +99 -0
- chainstream/openapi_client/test/test_register_address_request.py +53 -0
- chainstream/openapi_client/test/test_register_address_response_dto.py +53 -0
- chainstream/openapi_client/test/test_resolution.py +34 -0
- chainstream/openapi_client/test/test_send_tx_input.py +55 -0
- chainstream/openapi_client/test/test_send_tx_response.py +57 -0
- chainstream/openapi_client/test/test_swap_input.py +65 -0
- chainstream/openapi_client/test/test_swap_reply.py +55 -0
- chainstream/openapi_client/test/test_swap_route_input.py +69 -0
- chainstream/openapi_client/test/test_swap_route_response.py +85 -0
- chainstream/openapi_client/test/test_token.py +352 -0
- chainstream/openapi_client/test/test_token_api.py +193 -0
- chainstream/openapi_client/test/test_token_creation_dto.py +64 -0
- chainstream/openapi_client/test/test_token_creation_page.py +76 -0
- chainstream/openapi_client/test/test_token_creators_dto.py +54 -0
- chainstream/openapi_client/test/test_token_extra_dto.py +72 -0
- chainstream/openapi_client/test/test_token_holder.py +59 -0
- chainstream/openapi_client/test/test_token_holder_page.py +70 -0
- chainstream/openapi_client/test/test_token_liquidity_snapshot_dto.py +71 -0
- chainstream/openapi_client/test/test_token_liquidity_snapshot_page.py +83 -0
- chainstream/openapi_client/test/test_token_list_page.py +154 -0
- chainstream/openapi_client/test/test_token_market_data.py +101 -0
- chainstream/openapi_client/test/test_token_metadata.py +110 -0
- chainstream/openapi_client/test/test_token_page.py +155 -0
- chainstream/openapi_client/test/test_token_price_dto.py +59 -0
- chainstream/openapi_client/test/test_token_price_page.py +70 -0
- chainstream/openapi_client/test/test_token_social_medias_dto.py +64 -0
- chainstream/openapi_client/test/test_token_stat.py +257 -0
- chainstream/openapi_client/test/test_token_trader.py +65 -0
- chainstream/openapi_client/test/test_token_trader_tag.py +34 -0
- chainstream/openapi_client/test/test_top_traders_dto.py +75 -0
- chainstream/openapi_client/test/test_top_traders_page.py +86 -0
- chainstream/openapi_client/test/test_trade_api.py +53 -0
- chainstream/openapi_client/test/test_trade_detail_dto.py +101 -0
- chainstream/openapi_client/test/test_trade_event.py +77 -0
- chainstream/openapi_client/test/test_trade_page.py +112 -0
- chainstream/openapi_client/test/test_trade_type.py +34 -0
- chainstream/openapi_client/test/test_transaction_api.py +53 -0
- chainstream/openapi_client/test/test_transfer_alerts_response_dto.py +71 -0
- chainstream/openapi_client/test/test_transfer_base_response_dto.py +77 -0
- chainstream/openapi_client/test/test_transfer_direct_exposure_response_dto.py +57 -0
- chainstream/openapi_client/test/test_transfer_network_identifications_response_dto.py +61 -0
- chainstream/openapi_client/test/test_update_endpoint_input.py +64 -0
- chainstream/openapi_client/test/test_wallet_api.py +67 -0
- chainstream/openapi_client/test/test_wallet_balance_detail_dto.py +101 -0
- chainstream/openapi_client/test/test_wallet_balances_dto.py +111 -0
- chainstream/openapi_client/test/test_wallet_pnl_dto.py +97 -0
- chainstream/openapi_client/test/test_watchlist_api.py +39 -0
- chainstream/openapi_client/test/test_withdrawal_address_identifications_response_dto.py +65 -0
- chainstream/openapi_client/test/test_withdrawal_base_response_dto.py +71 -0
- chainstream/openapi_client/test/test_withdrawal_fraud_assessment_response_dto.py +73 -0
- chainstream/stream/__init__.py +74 -0
- chainstream/stream/client.py +761 -0
- chainstream/stream/fields.py +284 -0
- chainstream/stream/models.py +415 -0
- chainstream_sdk-0.1.0.dist-info/METADATA +80 -0
- chainstream_sdk-0.1.0.dist-info/RECORD +261 -0
- chainstream_sdk-0.1.0.dist-info/WHEEL +4 -0
- chainstream_sdk-0.1.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,882 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Dex Aggregator API
|
|
5
|
+
|
|
6
|
+
Dex Aggregator API ⚡️
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: ai@sx.ai
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
import warnings
|
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from pydantic import Field, StrictStr, field_validator
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from chainstream.openapi_client.models.estimate_gas_limit_input import EstimateGasLimitInput
|
|
23
|
+
from chainstream.openapi_client.models.estimate_gas_limit_response import EstimateGasLimitResponse
|
|
24
|
+
from chainstream.openapi_client.models.gas_price_response import GasPriceResponse
|
|
25
|
+
from chainstream.openapi_client.models.send_tx_input import SendTxInput
|
|
26
|
+
from chainstream.openapi_client.models.send_tx_response import SendTxResponse
|
|
27
|
+
|
|
28
|
+
from chainstream.openapi_client.api_client import ApiClient, RequestSerialized
|
|
29
|
+
from chainstream.openapi_client.api_response import ApiResponse
|
|
30
|
+
from chainstream.openapi_client.rest import RESTResponseType
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class TransactionApi:
|
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
35
|
+
Ref: https://openapi-generator.tech
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, api_client=None) -> None:
|
|
41
|
+
if api_client is None:
|
|
42
|
+
api_client = ApiClient.get_default()
|
|
43
|
+
self.api_client = api_client
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@validate_call
|
|
47
|
+
async def get_gas_limit(
|
|
48
|
+
self,
|
|
49
|
+
chain: Annotated[StrictStr, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
50
|
+
estimate_gas_limit_input: Annotated[EstimateGasLimitInput, Field(description="CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.BODY")],
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> EstimateGasLimitResponse:
|
|
64
|
+
"""CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.SUMMARY
|
|
65
|
+
|
|
66
|
+
CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.DESCRIPTION
|
|
67
|
+
|
|
68
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
69
|
+
:type chain: str
|
|
70
|
+
:param estimate_gas_limit_input: CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.BODY (required)
|
|
71
|
+
:type estimate_gas_limit_input: EstimateGasLimitInput
|
|
72
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
73
|
+
number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
77
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
78
|
+
request; this effectively ignores the
|
|
79
|
+
authentication in the spec for a single request.
|
|
80
|
+
:type _request_auth: dict, optional
|
|
81
|
+
:param _content_type: force content-type for the request.
|
|
82
|
+
:type _content_type: str, Optional
|
|
83
|
+
:param _headers: set to override the headers for a single
|
|
84
|
+
request; this effectively ignores the headers
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _headers: dict, optional
|
|
87
|
+
:param _host_index: set to override the host_index for a single
|
|
88
|
+
request; this effectively ignores the host_index
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _host_index: int, optional
|
|
91
|
+
:return: Returns the result object.
|
|
92
|
+
""" # noqa: E501
|
|
93
|
+
|
|
94
|
+
_param = self._get_gas_limit_serialize(
|
|
95
|
+
chain=chain,
|
|
96
|
+
estimate_gas_limit_input=estimate_gas_limit_input,
|
|
97
|
+
_request_auth=_request_auth,
|
|
98
|
+
_content_type=_content_type,
|
|
99
|
+
_headers=_headers,
|
|
100
|
+
_host_index=_host_index
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
104
|
+
'200': "EstimateGasLimitResponse",
|
|
105
|
+
}
|
|
106
|
+
response_data = await self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=_request_timeout
|
|
109
|
+
)
|
|
110
|
+
await response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
async def get_gas_limit_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
chain: Annotated[StrictStr, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
121
|
+
estimate_gas_limit_input: Annotated[EstimateGasLimitInput, Field(description="CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.BODY")],
|
|
122
|
+
_request_timeout: Union[
|
|
123
|
+
None,
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Tuple[
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
128
|
+
]
|
|
129
|
+
] = None,
|
|
130
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_content_type: Optional[StrictStr] = None,
|
|
132
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
134
|
+
) -> ApiResponse[EstimateGasLimitResponse]:
|
|
135
|
+
"""CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.SUMMARY
|
|
136
|
+
|
|
137
|
+
CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.DESCRIPTION
|
|
138
|
+
|
|
139
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
140
|
+
:type chain: str
|
|
141
|
+
:param estimate_gas_limit_input: CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.BODY (required)
|
|
142
|
+
:type estimate_gas_limit_input: EstimateGasLimitInput
|
|
143
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
144
|
+
number provided, it will be total request
|
|
145
|
+
timeout. It can also be a pair (tuple) of
|
|
146
|
+
(connection, read) timeouts.
|
|
147
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
148
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
149
|
+
request; this effectively ignores the
|
|
150
|
+
authentication in the spec for a single request.
|
|
151
|
+
:type _request_auth: dict, optional
|
|
152
|
+
:param _content_type: force content-type for the request.
|
|
153
|
+
:type _content_type: str, Optional
|
|
154
|
+
:param _headers: set to override the headers for a single
|
|
155
|
+
request; this effectively ignores the headers
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _headers: dict, optional
|
|
158
|
+
:param _host_index: set to override the host_index for a single
|
|
159
|
+
request; this effectively ignores the host_index
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _host_index: int, optional
|
|
162
|
+
:return: Returns the result object.
|
|
163
|
+
""" # noqa: E501
|
|
164
|
+
|
|
165
|
+
_param = self._get_gas_limit_serialize(
|
|
166
|
+
chain=chain,
|
|
167
|
+
estimate_gas_limit_input=estimate_gas_limit_input,
|
|
168
|
+
_request_auth=_request_auth,
|
|
169
|
+
_content_type=_content_type,
|
|
170
|
+
_headers=_headers,
|
|
171
|
+
_host_index=_host_index
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
175
|
+
'200': "EstimateGasLimitResponse",
|
|
176
|
+
}
|
|
177
|
+
response_data = await self.api_client.call_api(
|
|
178
|
+
*_param,
|
|
179
|
+
_request_timeout=_request_timeout
|
|
180
|
+
)
|
|
181
|
+
await response_data.read()
|
|
182
|
+
return self.api_client.response_deserialize(
|
|
183
|
+
response_data=response_data,
|
|
184
|
+
response_types_map=_response_types_map,
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
@validate_call
|
|
189
|
+
async def get_gas_limit_without_preload_content(
|
|
190
|
+
self,
|
|
191
|
+
chain: Annotated[StrictStr, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
192
|
+
estimate_gas_limit_input: Annotated[EstimateGasLimitInput, Field(description="CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.BODY")],
|
|
193
|
+
_request_timeout: Union[
|
|
194
|
+
None,
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
196
|
+
Tuple[
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
198
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
199
|
+
]
|
|
200
|
+
] = None,
|
|
201
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
202
|
+
_content_type: Optional[StrictStr] = None,
|
|
203
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
205
|
+
) -> RESTResponseType:
|
|
206
|
+
"""CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.SUMMARY
|
|
207
|
+
|
|
208
|
+
CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.DESCRIPTION
|
|
209
|
+
|
|
210
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
211
|
+
:type chain: str
|
|
212
|
+
:param estimate_gas_limit_input: CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.BODY (required)
|
|
213
|
+
:type estimate_gas_limit_input: EstimateGasLimitInput
|
|
214
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
215
|
+
number provided, it will be total request
|
|
216
|
+
timeout. It can also be a pair (tuple) of
|
|
217
|
+
(connection, read) timeouts.
|
|
218
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
219
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
220
|
+
request; this effectively ignores the
|
|
221
|
+
authentication in the spec for a single request.
|
|
222
|
+
:type _request_auth: dict, optional
|
|
223
|
+
:param _content_type: force content-type for the request.
|
|
224
|
+
:type _content_type: str, Optional
|
|
225
|
+
:param _headers: set to override the headers for a single
|
|
226
|
+
request; this effectively ignores the headers
|
|
227
|
+
in the spec for a single request.
|
|
228
|
+
:type _headers: dict, optional
|
|
229
|
+
:param _host_index: set to override the host_index for a single
|
|
230
|
+
request; this effectively ignores the host_index
|
|
231
|
+
in the spec for a single request.
|
|
232
|
+
:type _host_index: int, optional
|
|
233
|
+
:return: Returns the result object.
|
|
234
|
+
""" # noqa: E501
|
|
235
|
+
|
|
236
|
+
_param = self._get_gas_limit_serialize(
|
|
237
|
+
chain=chain,
|
|
238
|
+
estimate_gas_limit_input=estimate_gas_limit_input,
|
|
239
|
+
_request_auth=_request_auth,
|
|
240
|
+
_content_type=_content_type,
|
|
241
|
+
_headers=_headers,
|
|
242
|
+
_host_index=_host_index
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
246
|
+
'200': "EstimateGasLimitResponse",
|
|
247
|
+
}
|
|
248
|
+
response_data = await self.api_client.call_api(
|
|
249
|
+
*_param,
|
|
250
|
+
_request_timeout=_request_timeout
|
|
251
|
+
)
|
|
252
|
+
return response_data.response
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def _get_gas_limit_serialize(
|
|
256
|
+
self,
|
|
257
|
+
chain,
|
|
258
|
+
estimate_gas_limit_input,
|
|
259
|
+
_request_auth,
|
|
260
|
+
_content_type,
|
|
261
|
+
_headers,
|
|
262
|
+
_host_index,
|
|
263
|
+
) -> RequestSerialized:
|
|
264
|
+
|
|
265
|
+
_host = None
|
|
266
|
+
|
|
267
|
+
_collection_formats: Dict[str, str] = {
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
_path_params: Dict[str, str] = {}
|
|
271
|
+
_query_params: List[Tuple[str, str]] = []
|
|
272
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
273
|
+
_form_params: List[Tuple[str, str]] = []
|
|
274
|
+
_files: Dict[
|
|
275
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
276
|
+
] = {}
|
|
277
|
+
_body_params: Optional[bytes] = None
|
|
278
|
+
|
|
279
|
+
# process the path parameters
|
|
280
|
+
if chain is not None:
|
|
281
|
+
_path_params['chain'] = chain
|
|
282
|
+
# process the query parameters
|
|
283
|
+
# process the header parameters
|
|
284
|
+
# process the form parameters
|
|
285
|
+
# process the body parameter
|
|
286
|
+
if estimate_gas_limit_input is not None:
|
|
287
|
+
_body_params = estimate_gas_limit_input
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
# set the HTTP header `Accept`
|
|
291
|
+
if 'Accept' not in _header_params:
|
|
292
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
293
|
+
[
|
|
294
|
+
'application/json'
|
|
295
|
+
]
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
# set the HTTP header `Content-Type`
|
|
299
|
+
if _content_type:
|
|
300
|
+
_header_params['Content-Type'] = _content_type
|
|
301
|
+
else:
|
|
302
|
+
_default_content_type = (
|
|
303
|
+
self.api_client.select_header_content_type(
|
|
304
|
+
[
|
|
305
|
+
'application/json'
|
|
306
|
+
]
|
|
307
|
+
)
|
|
308
|
+
)
|
|
309
|
+
if _default_content_type is not None:
|
|
310
|
+
_header_params['Content-Type'] = _default_content_type
|
|
311
|
+
|
|
312
|
+
# authentication setting
|
|
313
|
+
_auth_settings: List[str] = [
|
|
314
|
+
'bearer'
|
|
315
|
+
]
|
|
316
|
+
|
|
317
|
+
return self.api_client.param_serialize(
|
|
318
|
+
method='POST',
|
|
319
|
+
resource_path='/v1/transaction/{chain}/estimate-gas-limit',
|
|
320
|
+
path_params=_path_params,
|
|
321
|
+
query_params=_query_params,
|
|
322
|
+
header_params=_header_params,
|
|
323
|
+
body=_body_params,
|
|
324
|
+
post_params=_form_params,
|
|
325
|
+
files=_files,
|
|
326
|
+
auth_settings=_auth_settings,
|
|
327
|
+
collection_formats=_collection_formats,
|
|
328
|
+
_host=_host,
|
|
329
|
+
_request_auth=_request_auth
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
@validate_call
|
|
336
|
+
async def get_gas_price(
|
|
337
|
+
self,
|
|
338
|
+
chain: Annotated[StrictStr, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
339
|
+
_request_timeout: Union[
|
|
340
|
+
None,
|
|
341
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
342
|
+
Tuple[
|
|
343
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
344
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
345
|
+
]
|
|
346
|
+
] = None,
|
|
347
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
348
|
+
_content_type: Optional[StrictStr] = None,
|
|
349
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
350
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
351
|
+
) -> GasPriceResponse:
|
|
352
|
+
"""CONTROLLER.TRANSACTION.GET_GAS_PRICE.SUMMARY
|
|
353
|
+
|
|
354
|
+
CONTROLLER.TRANSACTION.GET_GAS_PRICE.DESCRIPTION
|
|
355
|
+
|
|
356
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
357
|
+
:type chain: str
|
|
358
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
359
|
+
number provided, it will be total request
|
|
360
|
+
timeout. It can also be a pair (tuple) of
|
|
361
|
+
(connection, read) timeouts.
|
|
362
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
363
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
364
|
+
request; this effectively ignores the
|
|
365
|
+
authentication in the spec for a single request.
|
|
366
|
+
:type _request_auth: dict, optional
|
|
367
|
+
:param _content_type: force content-type for the request.
|
|
368
|
+
:type _content_type: str, Optional
|
|
369
|
+
:param _headers: set to override the headers for a single
|
|
370
|
+
request; this effectively ignores the headers
|
|
371
|
+
in the spec for a single request.
|
|
372
|
+
:type _headers: dict, optional
|
|
373
|
+
:param _host_index: set to override the host_index for a single
|
|
374
|
+
request; this effectively ignores the host_index
|
|
375
|
+
in the spec for a single request.
|
|
376
|
+
:type _host_index: int, optional
|
|
377
|
+
:return: Returns the result object.
|
|
378
|
+
""" # noqa: E501
|
|
379
|
+
|
|
380
|
+
_param = self._get_gas_price_serialize(
|
|
381
|
+
chain=chain,
|
|
382
|
+
_request_auth=_request_auth,
|
|
383
|
+
_content_type=_content_type,
|
|
384
|
+
_headers=_headers,
|
|
385
|
+
_host_index=_host_index
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
389
|
+
'200': "GasPriceResponse",
|
|
390
|
+
}
|
|
391
|
+
response_data = await self.api_client.call_api(
|
|
392
|
+
*_param,
|
|
393
|
+
_request_timeout=_request_timeout
|
|
394
|
+
)
|
|
395
|
+
await response_data.read()
|
|
396
|
+
return self.api_client.response_deserialize(
|
|
397
|
+
response_data=response_data,
|
|
398
|
+
response_types_map=_response_types_map,
|
|
399
|
+
).data
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
@validate_call
|
|
403
|
+
async def get_gas_price_with_http_info(
|
|
404
|
+
self,
|
|
405
|
+
chain: Annotated[StrictStr, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
406
|
+
_request_timeout: Union[
|
|
407
|
+
None,
|
|
408
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
409
|
+
Tuple[
|
|
410
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
411
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
412
|
+
]
|
|
413
|
+
] = None,
|
|
414
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
415
|
+
_content_type: Optional[StrictStr] = None,
|
|
416
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
417
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
418
|
+
) -> ApiResponse[GasPriceResponse]:
|
|
419
|
+
"""CONTROLLER.TRANSACTION.GET_GAS_PRICE.SUMMARY
|
|
420
|
+
|
|
421
|
+
CONTROLLER.TRANSACTION.GET_GAS_PRICE.DESCRIPTION
|
|
422
|
+
|
|
423
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
424
|
+
:type chain: str
|
|
425
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
426
|
+
number provided, it will be total request
|
|
427
|
+
timeout. It can also be a pair (tuple) of
|
|
428
|
+
(connection, read) timeouts.
|
|
429
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
430
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
431
|
+
request; this effectively ignores the
|
|
432
|
+
authentication in the spec for a single request.
|
|
433
|
+
:type _request_auth: dict, optional
|
|
434
|
+
:param _content_type: force content-type for the request.
|
|
435
|
+
:type _content_type: str, Optional
|
|
436
|
+
:param _headers: set to override the headers for a single
|
|
437
|
+
request; this effectively ignores the headers
|
|
438
|
+
in the spec for a single request.
|
|
439
|
+
:type _headers: dict, optional
|
|
440
|
+
:param _host_index: set to override the host_index for a single
|
|
441
|
+
request; this effectively ignores the host_index
|
|
442
|
+
in the spec for a single request.
|
|
443
|
+
:type _host_index: int, optional
|
|
444
|
+
:return: Returns the result object.
|
|
445
|
+
""" # noqa: E501
|
|
446
|
+
|
|
447
|
+
_param = self._get_gas_price_serialize(
|
|
448
|
+
chain=chain,
|
|
449
|
+
_request_auth=_request_auth,
|
|
450
|
+
_content_type=_content_type,
|
|
451
|
+
_headers=_headers,
|
|
452
|
+
_host_index=_host_index
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
456
|
+
'200': "GasPriceResponse",
|
|
457
|
+
}
|
|
458
|
+
response_data = await self.api_client.call_api(
|
|
459
|
+
*_param,
|
|
460
|
+
_request_timeout=_request_timeout
|
|
461
|
+
)
|
|
462
|
+
await response_data.read()
|
|
463
|
+
return self.api_client.response_deserialize(
|
|
464
|
+
response_data=response_data,
|
|
465
|
+
response_types_map=_response_types_map,
|
|
466
|
+
)
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
@validate_call
|
|
470
|
+
async def get_gas_price_without_preload_content(
|
|
471
|
+
self,
|
|
472
|
+
chain: Annotated[StrictStr, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
473
|
+
_request_timeout: Union[
|
|
474
|
+
None,
|
|
475
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
476
|
+
Tuple[
|
|
477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
478
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
479
|
+
]
|
|
480
|
+
] = None,
|
|
481
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
482
|
+
_content_type: Optional[StrictStr] = None,
|
|
483
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
484
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
485
|
+
) -> RESTResponseType:
|
|
486
|
+
"""CONTROLLER.TRANSACTION.GET_GAS_PRICE.SUMMARY
|
|
487
|
+
|
|
488
|
+
CONTROLLER.TRANSACTION.GET_GAS_PRICE.DESCRIPTION
|
|
489
|
+
|
|
490
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
491
|
+
:type chain: str
|
|
492
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
493
|
+
number provided, it will be total request
|
|
494
|
+
timeout. It can also be a pair (tuple) of
|
|
495
|
+
(connection, read) timeouts.
|
|
496
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
497
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
498
|
+
request; this effectively ignores the
|
|
499
|
+
authentication in the spec for a single request.
|
|
500
|
+
:type _request_auth: dict, optional
|
|
501
|
+
:param _content_type: force content-type for the request.
|
|
502
|
+
:type _content_type: str, Optional
|
|
503
|
+
:param _headers: set to override the headers for a single
|
|
504
|
+
request; this effectively ignores the headers
|
|
505
|
+
in the spec for a single request.
|
|
506
|
+
:type _headers: dict, optional
|
|
507
|
+
:param _host_index: set to override the host_index for a single
|
|
508
|
+
request; this effectively ignores the host_index
|
|
509
|
+
in the spec for a single request.
|
|
510
|
+
:type _host_index: int, optional
|
|
511
|
+
:return: Returns the result object.
|
|
512
|
+
""" # noqa: E501
|
|
513
|
+
|
|
514
|
+
_param = self._get_gas_price_serialize(
|
|
515
|
+
chain=chain,
|
|
516
|
+
_request_auth=_request_auth,
|
|
517
|
+
_content_type=_content_type,
|
|
518
|
+
_headers=_headers,
|
|
519
|
+
_host_index=_host_index
|
|
520
|
+
)
|
|
521
|
+
|
|
522
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
523
|
+
'200': "GasPriceResponse",
|
|
524
|
+
}
|
|
525
|
+
response_data = await self.api_client.call_api(
|
|
526
|
+
*_param,
|
|
527
|
+
_request_timeout=_request_timeout
|
|
528
|
+
)
|
|
529
|
+
return response_data.response
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
def _get_gas_price_serialize(
|
|
533
|
+
self,
|
|
534
|
+
chain,
|
|
535
|
+
_request_auth,
|
|
536
|
+
_content_type,
|
|
537
|
+
_headers,
|
|
538
|
+
_host_index,
|
|
539
|
+
) -> RequestSerialized:
|
|
540
|
+
|
|
541
|
+
_host = None
|
|
542
|
+
|
|
543
|
+
_collection_formats: Dict[str, str] = {
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
_path_params: Dict[str, str] = {}
|
|
547
|
+
_query_params: List[Tuple[str, str]] = []
|
|
548
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
549
|
+
_form_params: List[Tuple[str, str]] = []
|
|
550
|
+
_files: Dict[
|
|
551
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
552
|
+
] = {}
|
|
553
|
+
_body_params: Optional[bytes] = None
|
|
554
|
+
|
|
555
|
+
# process the path parameters
|
|
556
|
+
if chain is not None:
|
|
557
|
+
_path_params['chain'] = chain
|
|
558
|
+
# process the query parameters
|
|
559
|
+
# process the header parameters
|
|
560
|
+
# process the form parameters
|
|
561
|
+
# process the body parameter
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
# set the HTTP header `Accept`
|
|
565
|
+
if 'Accept' not in _header_params:
|
|
566
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
567
|
+
[
|
|
568
|
+
'application/json'
|
|
569
|
+
]
|
|
570
|
+
)
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
# authentication setting
|
|
574
|
+
_auth_settings: List[str] = [
|
|
575
|
+
'bearer'
|
|
576
|
+
]
|
|
577
|
+
|
|
578
|
+
return self.api_client.param_serialize(
|
|
579
|
+
method='GET',
|
|
580
|
+
resource_path='/v1/transaction/{chain}/gas-price',
|
|
581
|
+
path_params=_path_params,
|
|
582
|
+
query_params=_query_params,
|
|
583
|
+
header_params=_header_params,
|
|
584
|
+
body=_body_params,
|
|
585
|
+
post_params=_form_params,
|
|
586
|
+
files=_files,
|
|
587
|
+
auth_settings=_auth_settings,
|
|
588
|
+
collection_formats=_collection_formats,
|
|
589
|
+
_host=_host,
|
|
590
|
+
_request_auth=_request_auth
|
|
591
|
+
)
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
@validate_call
|
|
597
|
+
async def send(
|
|
598
|
+
self,
|
|
599
|
+
chain: Annotated[StrictStr, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
600
|
+
send_tx_input: Annotated[SendTxInput, Field(description="CONTROLLER.TRANSACTION.SEND.BODY")],
|
|
601
|
+
_request_timeout: Union[
|
|
602
|
+
None,
|
|
603
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
604
|
+
Tuple[
|
|
605
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
606
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
607
|
+
]
|
|
608
|
+
] = None,
|
|
609
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
610
|
+
_content_type: Optional[StrictStr] = None,
|
|
611
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
612
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
613
|
+
) -> SendTxResponse:
|
|
614
|
+
"""CONTROLLER.TRANSACTION.SEND.SUMMARY
|
|
615
|
+
|
|
616
|
+
CONTROLLER.TRANSACTION.SEND.DESCRIPTION
|
|
617
|
+
|
|
618
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
619
|
+
:type chain: str
|
|
620
|
+
:param send_tx_input: CONTROLLER.TRANSACTION.SEND.BODY (required)
|
|
621
|
+
:type send_tx_input: SendTxInput
|
|
622
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
623
|
+
number provided, it will be total request
|
|
624
|
+
timeout. It can also be a pair (tuple) of
|
|
625
|
+
(connection, read) timeouts.
|
|
626
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
627
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
628
|
+
request; this effectively ignores the
|
|
629
|
+
authentication in the spec for a single request.
|
|
630
|
+
:type _request_auth: dict, optional
|
|
631
|
+
:param _content_type: force content-type for the request.
|
|
632
|
+
:type _content_type: str, Optional
|
|
633
|
+
:param _headers: set to override the headers for a single
|
|
634
|
+
request; this effectively ignores the headers
|
|
635
|
+
in the spec for a single request.
|
|
636
|
+
:type _headers: dict, optional
|
|
637
|
+
:param _host_index: set to override the host_index for a single
|
|
638
|
+
request; this effectively ignores the host_index
|
|
639
|
+
in the spec for a single request.
|
|
640
|
+
:type _host_index: int, optional
|
|
641
|
+
:return: Returns the result object.
|
|
642
|
+
""" # noqa: E501
|
|
643
|
+
|
|
644
|
+
_param = self._send_serialize(
|
|
645
|
+
chain=chain,
|
|
646
|
+
send_tx_input=send_tx_input,
|
|
647
|
+
_request_auth=_request_auth,
|
|
648
|
+
_content_type=_content_type,
|
|
649
|
+
_headers=_headers,
|
|
650
|
+
_host_index=_host_index
|
|
651
|
+
)
|
|
652
|
+
|
|
653
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
654
|
+
'200': "SendTxResponse",
|
|
655
|
+
}
|
|
656
|
+
response_data = await self.api_client.call_api(
|
|
657
|
+
*_param,
|
|
658
|
+
_request_timeout=_request_timeout
|
|
659
|
+
)
|
|
660
|
+
await response_data.read()
|
|
661
|
+
return self.api_client.response_deserialize(
|
|
662
|
+
response_data=response_data,
|
|
663
|
+
response_types_map=_response_types_map,
|
|
664
|
+
).data
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
@validate_call
|
|
668
|
+
async def send_with_http_info(
|
|
669
|
+
self,
|
|
670
|
+
chain: Annotated[StrictStr, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
671
|
+
send_tx_input: Annotated[SendTxInput, Field(description="CONTROLLER.TRANSACTION.SEND.BODY")],
|
|
672
|
+
_request_timeout: Union[
|
|
673
|
+
None,
|
|
674
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
675
|
+
Tuple[
|
|
676
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
677
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
678
|
+
]
|
|
679
|
+
] = None,
|
|
680
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
681
|
+
_content_type: Optional[StrictStr] = None,
|
|
682
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
683
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
684
|
+
) -> ApiResponse[SendTxResponse]:
|
|
685
|
+
"""CONTROLLER.TRANSACTION.SEND.SUMMARY
|
|
686
|
+
|
|
687
|
+
CONTROLLER.TRANSACTION.SEND.DESCRIPTION
|
|
688
|
+
|
|
689
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
690
|
+
:type chain: str
|
|
691
|
+
:param send_tx_input: CONTROLLER.TRANSACTION.SEND.BODY (required)
|
|
692
|
+
:type send_tx_input: SendTxInput
|
|
693
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
694
|
+
number provided, it will be total request
|
|
695
|
+
timeout. It can also be a pair (tuple) of
|
|
696
|
+
(connection, read) timeouts.
|
|
697
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
698
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
699
|
+
request; this effectively ignores the
|
|
700
|
+
authentication in the spec for a single request.
|
|
701
|
+
:type _request_auth: dict, optional
|
|
702
|
+
:param _content_type: force content-type for the request.
|
|
703
|
+
:type _content_type: str, Optional
|
|
704
|
+
:param _headers: set to override the headers for a single
|
|
705
|
+
request; this effectively ignores the headers
|
|
706
|
+
in the spec for a single request.
|
|
707
|
+
:type _headers: dict, optional
|
|
708
|
+
:param _host_index: set to override the host_index for a single
|
|
709
|
+
request; this effectively ignores the host_index
|
|
710
|
+
in the spec for a single request.
|
|
711
|
+
:type _host_index: int, optional
|
|
712
|
+
:return: Returns the result object.
|
|
713
|
+
""" # noqa: E501
|
|
714
|
+
|
|
715
|
+
_param = self._send_serialize(
|
|
716
|
+
chain=chain,
|
|
717
|
+
send_tx_input=send_tx_input,
|
|
718
|
+
_request_auth=_request_auth,
|
|
719
|
+
_content_type=_content_type,
|
|
720
|
+
_headers=_headers,
|
|
721
|
+
_host_index=_host_index
|
|
722
|
+
)
|
|
723
|
+
|
|
724
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
725
|
+
'200': "SendTxResponse",
|
|
726
|
+
}
|
|
727
|
+
response_data = await self.api_client.call_api(
|
|
728
|
+
*_param,
|
|
729
|
+
_request_timeout=_request_timeout
|
|
730
|
+
)
|
|
731
|
+
await response_data.read()
|
|
732
|
+
return self.api_client.response_deserialize(
|
|
733
|
+
response_data=response_data,
|
|
734
|
+
response_types_map=_response_types_map,
|
|
735
|
+
)
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
@validate_call
|
|
739
|
+
async def send_without_preload_content(
|
|
740
|
+
self,
|
|
741
|
+
chain: Annotated[StrictStr, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
742
|
+
send_tx_input: Annotated[SendTxInput, Field(description="CONTROLLER.TRANSACTION.SEND.BODY")],
|
|
743
|
+
_request_timeout: Union[
|
|
744
|
+
None,
|
|
745
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
746
|
+
Tuple[
|
|
747
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
748
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
749
|
+
]
|
|
750
|
+
] = None,
|
|
751
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
752
|
+
_content_type: Optional[StrictStr] = None,
|
|
753
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
754
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
755
|
+
) -> RESTResponseType:
|
|
756
|
+
"""CONTROLLER.TRANSACTION.SEND.SUMMARY
|
|
757
|
+
|
|
758
|
+
CONTROLLER.TRANSACTION.SEND.DESCRIPTION
|
|
759
|
+
|
|
760
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
761
|
+
:type chain: str
|
|
762
|
+
:param send_tx_input: CONTROLLER.TRANSACTION.SEND.BODY (required)
|
|
763
|
+
:type send_tx_input: SendTxInput
|
|
764
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
765
|
+
number provided, it will be total request
|
|
766
|
+
timeout. It can also be a pair (tuple) of
|
|
767
|
+
(connection, read) timeouts.
|
|
768
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
769
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
770
|
+
request; this effectively ignores the
|
|
771
|
+
authentication in the spec for a single request.
|
|
772
|
+
:type _request_auth: dict, optional
|
|
773
|
+
:param _content_type: force content-type for the request.
|
|
774
|
+
:type _content_type: str, Optional
|
|
775
|
+
:param _headers: set to override the headers for a single
|
|
776
|
+
request; this effectively ignores the headers
|
|
777
|
+
in the spec for a single request.
|
|
778
|
+
:type _headers: dict, optional
|
|
779
|
+
:param _host_index: set to override the host_index for a single
|
|
780
|
+
request; this effectively ignores the host_index
|
|
781
|
+
in the spec for a single request.
|
|
782
|
+
:type _host_index: int, optional
|
|
783
|
+
:return: Returns the result object.
|
|
784
|
+
""" # noqa: E501
|
|
785
|
+
|
|
786
|
+
_param = self._send_serialize(
|
|
787
|
+
chain=chain,
|
|
788
|
+
send_tx_input=send_tx_input,
|
|
789
|
+
_request_auth=_request_auth,
|
|
790
|
+
_content_type=_content_type,
|
|
791
|
+
_headers=_headers,
|
|
792
|
+
_host_index=_host_index
|
|
793
|
+
)
|
|
794
|
+
|
|
795
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
796
|
+
'200': "SendTxResponse",
|
|
797
|
+
}
|
|
798
|
+
response_data = await self.api_client.call_api(
|
|
799
|
+
*_param,
|
|
800
|
+
_request_timeout=_request_timeout
|
|
801
|
+
)
|
|
802
|
+
return response_data.response
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
def _send_serialize(
|
|
806
|
+
self,
|
|
807
|
+
chain,
|
|
808
|
+
send_tx_input,
|
|
809
|
+
_request_auth,
|
|
810
|
+
_content_type,
|
|
811
|
+
_headers,
|
|
812
|
+
_host_index,
|
|
813
|
+
) -> RequestSerialized:
|
|
814
|
+
|
|
815
|
+
_host = None
|
|
816
|
+
|
|
817
|
+
_collection_formats: Dict[str, str] = {
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
_path_params: Dict[str, str] = {}
|
|
821
|
+
_query_params: List[Tuple[str, str]] = []
|
|
822
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
823
|
+
_form_params: List[Tuple[str, str]] = []
|
|
824
|
+
_files: Dict[
|
|
825
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
826
|
+
] = {}
|
|
827
|
+
_body_params: Optional[bytes] = None
|
|
828
|
+
|
|
829
|
+
# process the path parameters
|
|
830
|
+
if chain is not None:
|
|
831
|
+
_path_params['chain'] = chain
|
|
832
|
+
# process the query parameters
|
|
833
|
+
# process the header parameters
|
|
834
|
+
# process the form parameters
|
|
835
|
+
# process the body parameter
|
|
836
|
+
if send_tx_input is not None:
|
|
837
|
+
_body_params = send_tx_input
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
# set the HTTP header `Accept`
|
|
841
|
+
if 'Accept' not in _header_params:
|
|
842
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
843
|
+
[
|
|
844
|
+
'application/json'
|
|
845
|
+
]
|
|
846
|
+
)
|
|
847
|
+
|
|
848
|
+
# set the HTTP header `Content-Type`
|
|
849
|
+
if _content_type:
|
|
850
|
+
_header_params['Content-Type'] = _content_type
|
|
851
|
+
else:
|
|
852
|
+
_default_content_type = (
|
|
853
|
+
self.api_client.select_header_content_type(
|
|
854
|
+
[
|
|
855
|
+
'application/json'
|
|
856
|
+
]
|
|
857
|
+
)
|
|
858
|
+
)
|
|
859
|
+
if _default_content_type is not None:
|
|
860
|
+
_header_params['Content-Type'] = _default_content_type
|
|
861
|
+
|
|
862
|
+
# authentication setting
|
|
863
|
+
_auth_settings: List[str] = [
|
|
864
|
+
'bearer'
|
|
865
|
+
]
|
|
866
|
+
|
|
867
|
+
return self.api_client.param_serialize(
|
|
868
|
+
method='POST',
|
|
869
|
+
resource_path='/v1/transaction/{chain}/send',
|
|
870
|
+
path_params=_path_params,
|
|
871
|
+
query_params=_query_params,
|
|
872
|
+
header_params=_header_params,
|
|
873
|
+
body=_body_params,
|
|
874
|
+
post_params=_form_params,
|
|
875
|
+
files=_files,
|
|
876
|
+
auth_settings=_auth_settings,
|
|
877
|
+
collection_formats=_collection_formats,
|
|
878
|
+
_host=_host,
|
|
879
|
+
_request_auth=_request_auth
|
|
880
|
+
)
|
|
881
|
+
|
|
882
|
+
|