compass_api_sdk 1.1.1__py3-none-any.whl → 2.2.1rc3__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.
- compass_api_sdk/_hooks/sdkhooks.py +4 -4
- compass_api_sdk/_hooks/types.py +1 -2
- compass_api_sdk/_version.py +3 -3
- compass_api_sdk/aave_v3.py +386 -114
- compass_api_sdk/aerodrome_slipstream.py +104 -54
- compass_api_sdk/basesdk.py +6 -0
- compass_api_sdk/bridge.py +536 -0
- compass_api_sdk/earn.py +2026 -0
- compass_api_sdk/erc_4626_vaults.py +28 -10
- compass_api_sdk/errors/__init__.py +8 -0
- compass_api_sdk/errors/apierror.py +1 -1
- compass_api_sdk/errors/compassapierror.py +1 -1
- compass_api_sdk/errors/httpvalidationerror.py +1 -1
- compass_api_sdk/errors/mintpreparenotfoundresponse_error.py +49 -0
- compass_api_sdk/errors/no_response_error.py +1 -1
- compass_api_sdk/errors/responsevalidationerror.py +1 -1
- compass_api_sdk/ethena.py +36 -10
- compass_api_sdk/gas_sponsorship.py +458 -0
- compass_api_sdk/httpclient.py +0 -1
- compass_api_sdk/models/__init__.py +820 -392
- compass_api_sdk/models/aaveborrowparams.py +4 -13
- compass_api_sdk/models/aaveborrowrequest.py +10 -14
- compass_api_sdk/models/aavehistoricaltransactionsresponse.py +3 -3
- compass_api_sdk/models/aavelooprequest.py +32 -28
- compass_api_sdk/models/aaveposition.py +104 -0
- compass_api_sdk/models/aaverepayparams.py +4 -13
- compass_api_sdk/models/aaverepayrequest.py +10 -14
- compass_api_sdk/models/aavesetuseremodeparams.py +28 -0
- compass_api_sdk/models/aavesetuseremoderequest.py +48 -0
- compass_api_sdk/models/aavesupplyparams.py +4 -13
- compass_api_sdk/models/aavesupplyrequest.py +10 -14
- compass_api_sdk/models/aavevenue.py +27 -0
- compass_api_sdk/models/aavewithdrawparams.py +4 -13
- compass_api_sdk/models/aavewithdrawrequest.py +10 -14
- compass_api_sdk/models/aerodromeenrichedposition.py +109 -0
- compass_api_sdk/models/aerodromelppositionsresponse.py +10 -7
- compass_api_sdk/models/aerodromeslipstreambuyexactlyparams.py +8 -25
- compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +14 -26
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionparams.py +8 -25
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +14 -26
- compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +8 -25
- compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py +8 -25
- compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +13 -25
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/approvetransferrequest.py +32 -0
- compass_api_sdk/models/approvetransferresponse.py +52 -0
- compass_api_sdk/models/batchedsafeoperationsresponse_input.py +52 -0
- compass_api_sdk/models/batchedsafeoperationsresponse_output.py +52 -0
- compass_api_sdk/models/batcheduseroperationsrequest.py +15 -4
- compass_api_sdk/models/chainmarketinfo.py +29 -0
- compass_api_sdk/models/{compass_api_backend_models_generic_read_response_portfolio_tokenbalance.py → compass_api_backend_v1_models_generic_read_response_portfolio_tokenbalance.py} +6 -15
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_apydata.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_apydata.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_asset.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_asset.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_marketstate.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_marketstate.py} +4 -2
- compass_api_sdk/models/compass_api_backend_v1_models_morpho_read_response_check_user_position_vaultposition.py +30 -0
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_vaultstate.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_vaultstate.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_apydata.py → compass_api_backend_v1_models_morpho_read_response_get_market_apydata.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_asset.py → compass_api_backend_v1_models_morpho_read_response_get_market_asset.py} +5 -5
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_marketstate.py → compass_api_backend_v1_models_morpho_read_response_get_market_marketstate.py} +4 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_markets_asset.py → compass_api_backend_v1_models_morpho_read_response_get_markets_asset.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_markets_marketstate.py → compass_api_backend_v1_models_morpho_read_response_get_markets_marketstate.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vaults_asset.py → compass_api_backend_v1_models_morpho_read_response_get_vaults_asset.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vaults_vaultstate.py → compass_api_backend_v1_models_morpho_read_response_get_vaults_vaultstate.py} +4 -2
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_market_userposition.py → compass_api_backend_v1_models_pendle_read_response_market_userposition.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_positions_tokenbalance.py → compass_api_backend_v1_models_pendle_read_response_positions_tokenbalance.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_vaults_read_response_vault_userposition.py → compass_api_backend_v1_models_vaults_read_response_vault_userposition.py} +2 -2
- compass_api_sdk/models/compass_api_backend_v1_models_wildcat_read_response_market_userposition.py +22 -0
- compass_api_sdk/models/compass_api_backend_v2_models_earn_read_response_positions_vaultposition.py +103 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_2_typed_data_eip712domain.py +36 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_2_typed_data_eip712types.py +36 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_typed_data_eip712domain.py +37 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_typed_data_eip712types.py +32 -0
- compass_api_sdk/models/compass_api_backend_v2_models_safe_transact_response_batched_safe_operations_eip712domain.py +29 -0
- compass_api_sdk/models/compass_api_backend_v2_models_safe_transact_response_batched_safe_operations_eip712types.py +34 -0
- compass_api_sdk/models/createaccountrequest.py +40 -0
- compass_api_sdk/models/createaccountresponse.py +56 -0
- compass_api_sdk/models/depositevent.py +61 -0
- compass_api_sdk/models/depositforburnrequest.py +77 -0
- compass_api_sdk/models/depositforburnresponse.py +100 -0
- compass_api_sdk/models/earnmanageparams.py +76 -0
- compass_api_sdk/models/earnmanagerequest.py +132 -0
- compass_api_sdk/models/earnmanageresponse.py +52 -0
- compass_api_sdk/models/earnpositionsresponse.py +48 -0
- compass_api_sdk/models/earnswapparams.py +74 -0
- compass_api_sdk/models/earnswaprequest.py +90 -0
- compass_api_sdk/models/earnswapresponse.py +55 -0
- compass_api_sdk/models/earntransferrequest.py +104 -0
- compass_api_sdk/models/earntransferresponse.py +71 -0
- compass_api_sdk/models/eip712domainfield.py +20 -0
- compass_api_sdk/models/eip712field.py +20 -0
- compass_api_sdk/models/ethenadepositrequest.py +6 -1
- compass_api_sdk/models/ethenagetvaultresponse.py +5 -5
- compass_api_sdk/models/ethenarequesttowithdrawrequest.py +6 -1
- compass_api_sdk/models/ethenaunstakerequest.py +6 -1
- compass_api_sdk/models/fee.py +43 -0
- compass_api_sdk/models/listaavemarketsresponse.py +21 -0
- compass_api_sdk/models/marketposition.py +5 -5
- compass_api_sdk/models/maxsupplyapyinfo.py +34 -0
- compass_api_sdk/models/mintpreparecompletedresponse.py +46 -0
- compass_api_sdk/models/mintpreparependingresponse.py +65 -0
- compass_api_sdk/models/mintpreparereadyresponse.py +43 -0
- compass_api_sdk/models/mintpreparerequest.py +25 -0
- compass_api_sdk/models/morphoborrowrequest.py +6 -1
- compass_api_sdk/models/morphocheckuserpositionresponse.py +9 -3
- compass_api_sdk/models/morphodepositrequest.py +6 -1
- compass_api_sdk/models/morphogetmarketresponse.py +72 -31
- compass_api_sdk/models/morphomarket.py +26 -20
- compass_api_sdk/models/morphorepayrequest.py +11 -1
- compass_api_sdk/models/morphosupplycollateralrequest.py +11 -1
- compass_api_sdk/models/morphovault.py +10 -10
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +6 -1
- compass_api_sdk/models/morphowithdrawrequest.py +6 -1
- compass_api_sdk/models/multicallexecuterequest.py +7 -2
- compass_api_sdk/models/odosswapparams.py +9 -30
- compass_api_sdk/models/odosswaprequest.py +15 -33
- compass_api_sdk/models/oneinchswapparams.py +59 -0
- compass_api_sdk/models/openposition.py +7 -7
- compass_api_sdk/models/operationtype.py +11 -0
- compass_api_sdk/models/pendledepositevent.py +49 -0
- compass_api_sdk/models/pendlegetmarketresponse.py +5 -5
- compass_api_sdk/models/pendlemanageliquidityparams.py +2 -15
- compass_api_sdk/models/pendlemanageliquidityrequest.py +8 -16
- compass_api_sdk/models/pendlemarketinfo.py +138 -0
- compass_api_sdk/models/pendlemarketsresponse.py +30 -0
- compass_api_sdk/models/pendleptposition.py +111 -0
- compass_api_sdk/models/pendleptvenue.py +78 -0
- compass_api_sdk/models/pendleredeemyieldrequest.py +6 -1
- compass_api_sdk/models/pendletradeptparams.py +2 -15
- compass_api_sdk/models/pendletradeptrequest.py +8 -16
- compass_api_sdk/models/pendletradeytparams.py +2 -15
- compass_api_sdk/models/pendletradeytrequest.py +8 -16
- compass_api_sdk/models/pendlewithdrawalevent.py +54 -0
- compass_api_sdk/models/permit2typeddata_input.py +46 -0
- compass_api_sdk/models/permit2typeddata_output.py +46 -0
- compass_api_sdk/models/permitfield.py +20 -0
- compass_api_sdk/models/permitmessage.py +39 -0
- compass_api_sdk/models/permittransferfrommessage.py +29 -0
- compass_api_sdk/models/permittypeddataresponse_input.py +50 -0
- compass_api_sdk/models/permittypeddataresponse_output.py +50 -0
- compass_api_sdk/models/portfolio.py +5 -5
- compass_api_sdk/models/positionpnl.py +52 -0
- compass_api_sdk/models/reserve.py +6 -15
- compass_api_sdk/models/safetransactionparams.py +78 -0
- compass_api_sdk/models/safetransactionresponse.py +28 -0
- compass_api_sdk/models/safetxfield.py +20 -0
- compass_api_sdk/models/safetxmessage.py +66 -0
- compass_api_sdk/models/setallowanceparams.py +3 -16
- compass_api_sdk/models/setallowancerequest.py +9 -17
- compass_api_sdk/models/skybuyrequest.py +6 -1
- compass_api_sdk/models/skydepositrequest.py +7 -2
- compass_api_sdk/models/skysellrequest.py +7 -2
- compass_api_sdk/models/skywithdrawrequest.py +7 -2
- compass_api_sdk/models/sponsorgasrequest.py +71 -0
- compass_api_sdk/models/sponsorgasresponse.py +14 -0
- compass_api_sdk/models/tokenbalanceresponse.py +5 -15
- compass_api_sdk/models/tokenconfig.py +30 -0
- compass_api_sdk/models/tokenlistresponse.py +21 -0
- compass_api_sdk/models/tokenmarketdata.py +27 -0
- compass_api_sdk/models/tokenpermissions.py +20 -0
- compass_api_sdk/models/tokentransferparams.py +2 -15
- compass_api_sdk/models/tokentransferrequest.py +8 -16
- compass_api_sdk/models/uniswapbuyexactlyparams.py +8 -33
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +14 -34
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/uniswapmintliquidityprovisionparams.py +8 -25
- compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +14 -26
- compass_api_sdk/models/uniswappoolpriceresponse.py +8 -25
- compass_api_sdk/models/uniswapsellexactlyparams.py +4 -29
- compass_api_sdk/models/uniswapsellexactlyrequest.py +10 -30
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/unsignedmulticalltransaction.py +34 -3
- compass_api_sdk/models/unsignedtransaction.py +34 -3
- compass_api_sdk/models/unwrapwethrequest.py +6 -1
- compass_api_sdk/models/useroperation.py +33 -24
- compass_api_sdk/models/v1_aave_aave_supported_tokensop.py +1 -1
- compass_api_sdk/models/v1_aave_avg_rateop.py +15 -93
- compass_api_sdk/models/v1_aave_historical_transactionsop.py +15 -15
- compass_api_sdk/models/v1_aave_liquidity_changeop.py +8 -86
- compass_api_sdk/models/v1_aave_rateop.py +8 -86
- compass_api_sdk/models/v1_aave_reserve_overviewop.py +8 -86
- compass_api_sdk/models/v1_aave_std_rateop.py +15 -93
- compass_api_sdk/models/v1_aave_token_priceop.py +8 -86
- compass_api_sdk/models/v1_aave_user_position_per_tokenop.py +14 -92
- compass_api_sdk/models/v1_aave_user_position_summaryop.py +8 -8
- compass_api_sdk/models/v1_aerodrome_slipstream_liquidity_provision_positionsop.py +48 -3
- compass_api_sdk/models/v1_aerodrome_slipstream_pool_priceop.py +12 -168
- compass_api_sdk/models/v1_ethena_vaultop.py +1 -1
- compass_api_sdk/models/v1_generic_allowanceop.py +12 -26
- compass_api_sdk/models/v1_generic_ensop.py +2 -2
- compass_api_sdk/models/v1_generic_portfolioop.py +2 -2
- compass_api_sdk/models/v1_morpho_market_positionop.py +3 -3
- compass_api_sdk/models/v1_morpho_marketop.py +2 -2
- compass_api_sdk/models/v1_morpho_marketsop.py +10 -30
- compass_api_sdk/models/v1_morpho_user_positionop.py +2 -2
- compass_api_sdk/models/v1_morpho_vaultop.py +8 -8
- compass_api_sdk/models/v1_morpho_vaultsop.py +6 -16
- compass_api_sdk/models/v1_pendle_marketop.py +8 -8
- compass_api_sdk/models/v1_pendle_marketsop.py +1 -1
- compass_api_sdk/models/v1_pendle_positionsop.py +2 -2
- compass_api_sdk/models/v1_sky_positionop.py +5 -6
- compass_api_sdk/models/v1_token_balanceop.py +12 -25
- compass_api_sdk/models/{v1_generic_supported_tokensop.py → v1_token_listop.py} +6 -6
- compass_api_sdk/models/v1_token_priceop.py +8 -9
- compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +6 -6
- compass_api_sdk/models/v1_uniswap_liquidity_provision_in_rangeop.py +2 -2
- compass_api_sdk/models/v1_uniswap_liquidity_provision_positionsop.py +2 -2
- compass_api_sdk/models/v1_uniswap_pool_priceop.py +12 -168
- compass_api_sdk/models/v1_uniswap_quote_buy_exactlyop.py +20 -176
- compass_api_sdk/models/v1_uniswap_quote_sell_exactlyop.py +20 -176
- compass_api_sdk/models/v1_vaults_vaultop.py +8 -8
- compass_api_sdk/models/v1_wildcat_marketop.py +82 -0
- compass_api_sdk/models/v2_cctp_mintop.py +47 -0
- compass_api_sdk/models/v2_earn_aave_marketsop.py +57 -0
- compass_api_sdk/models/v2_earn_pendle_marketsop.py +105 -0
- compass_api_sdk/models/v2_earn_positionsop.py +31 -0
- compass_api_sdk/models/v2_earn_vaultsop.py +105 -0
- compass_api_sdk/models/v2bundlerequest.py +33 -0
- compass_api_sdk/models/v2bundleresponse.py +67 -0
- compass_api_sdk/models/v2useroperation.py +37 -0
- compass_api_sdk/models/vault.py +14 -14
- compass_api_sdk/models/vaultdepositrequest.py +6 -1
- compass_api_sdk/models/vaultgetvaultresponse.py +5 -5
- compass_api_sdk/models/vaultinfo.py +129 -0
- compass_api_sdk/models/vaultsresponse.py +30 -0
- compass_api_sdk/models/vaultvenue.py +27 -0
- compass_api_sdk/models/vaultwithdrawrequest.py +6 -1
- compass_api_sdk/models/wildcatgetmarketresponse.py +151 -0
- compass_api_sdk/models/{redeemunderlying.py → withdraw.py} +2 -2
- compass_api_sdk/models/withdrawalevent.py +61 -0
- compass_api_sdk/models/wrapethrequest.py +6 -1
- compass_api_sdk/morpho.py +126 -78
- compass_api_sdk/pendle.py +68 -44
- compass_api_sdk/sdk.py +18 -11
- compass_api_sdk/sky.py +62 -38
- compass_api_sdk/smart_account.py +10 -2
- compass_api_sdk/swap.py +22 -22
- compass_api_sdk/{token_sdk.py → token.py} +511 -103
- compass_api_sdk/transaction_bundler.py +46 -16
- compass_api_sdk/types/basemodel.py +41 -3
- compass_api_sdk/uniswap_v3.py +152 -114
- compass_api_sdk/universal.py +44 -606
- compass_api_sdk/utils/__init__.py +0 -3
- compass_api_sdk/utils/annotations.py +32 -8
- compass_api_sdk/utils/enums.py +60 -0
- compass_api_sdk/utils/forms.py +21 -10
- compass_api_sdk/utils/queryparams.py +14 -2
- compass_api_sdk/utils/requestbodies.py +3 -3
- compass_api_sdk/utils/retries.py +69 -5
- compass_api_sdk/utils/serializers.py +0 -20
- compass_api_sdk/utils/unmarshal_json_response.py +15 -1
- compass_api_sdk/wildcat.py +208 -0
- compass_api_sdk-2.2.1rc3.dist-info/METADATA +624 -0
- compass_api_sdk-2.2.1rc3.dist-info/RECORD +356 -0
- {compass_api_sdk-1.1.1.dist-info → compass_api_sdk-2.2.1rc3.dist-info}/WHEEL +1 -1
- compass_api_sdk/models/aerodromeposition.py +0 -70
- compass_api_sdk/models/token_enum.py +0 -81
- compass_api_sdk/models/tokenaddressresponse.py +0 -15
- compass_api_sdk/models/tokeninfo.py +0 -17
- compass_api_sdk/models/v1_token_addressop.py +0 -109
- compass_api_sdk/models/vaultposition.py +0 -24
- compass_api_sdk-1.1.1.dist-info/METADATA +0 -592
- compass_api_sdk-1.1.1.dist-info/RECORD +0 -275
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .compass_api_backend_v1_models_morpho_read_response_check_user_position_vaultposition import (
|
|
5
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionVaultPosition,
|
|
6
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionVaultPositionTypedDict,
|
|
7
|
+
)
|
|
4
8
|
from .marketposition import MarketPosition, MarketPositionTypedDict
|
|
5
9
|
from .userstate import UserState, UserStateTypedDict
|
|
6
|
-
from .vaultposition import VaultPosition, VaultPositionTypedDict
|
|
7
10
|
from compass_api_sdk.types import BaseModel
|
|
8
11
|
import pydantic
|
|
9
12
|
from typing import List
|
|
@@ -12,7 +15,9 @@ from typing_extensions import Annotated, TypedDict
|
|
|
12
15
|
|
|
13
16
|
class MorphoCheckUserPositionResponseTypedDict(TypedDict):
|
|
14
17
|
state: UserStateTypedDict
|
|
15
|
-
vault_positions: List[
|
|
18
|
+
vault_positions: List[
|
|
19
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionVaultPositionTypedDict
|
|
20
|
+
]
|
|
16
21
|
r"""A list of the user's vault positions."""
|
|
17
22
|
market_positions: List[MarketPositionTypedDict]
|
|
18
23
|
r"""A list of the user's market positions."""
|
|
@@ -22,7 +27,8 @@ class MorphoCheckUserPositionResponse(BaseModel):
|
|
|
22
27
|
state: UserState
|
|
23
28
|
|
|
24
29
|
vault_positions: Annotated[
|
|
25
|
-
List[
|
|
30
|
+
List[CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionVaultPosition],
|
|
31
|
+
pydantic.Field(alias="vaultPositions"),
|
|
26
32
|
]
|
|
27
33
|
r"""A list of the user's vault positions."""
|
|
28
34
|
|
|
@@ -46,6 +46,8 @@ class MorphoDepositRequestTypedDict(TypedDict):
|
|
|
46
46
|
action_type: Literal["MORPHO_DEPOSIT"]
|
|
47
47
|
receiver: NotRequired[Nullable[str]]
|
|
48
48
|
r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
49
|
+
estimate_gas: NotRequired[bool]
|
|
50
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
49
51
|
|
|
50
52
|
|
|
51
53
|
class MorphoDepositRequest(BaseModel):
|
|
@@ -71,9 +73,12 @@ class MorphoDepositRequest(BaseModel):
|
|
|
71
73
|
receiver: OptionalNullable[str] = UNSET
|
|
72
74
|
r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
73
75
|
|
|
76
|
+
estimate_gas: Optional[bool] = None
|
|
77
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
78
|
+
|
|
74
79
|
@model_serializer(mode="wrap")
|
|
75
80
|
def serialize_model(self, handler):
|
|
76
|
-
optional_fields = ["action_type", "receiver"]
|
|
81
|
+
optional_fields = ["action_type", "receiver", "estimate_gas"]
|
|
77
82
|
nullable_fields = ["receiver"]
|
|
78
83
|
null_default_fields = []
|
|
79
84
|
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
from .compass_api_backend_v1_models_morpho_read_response_get_market_apydata import (
|
|
5
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyData,
|
|
6
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyDataTypedDict,
|
|
7
7
|
)
|
|
8
|
-
from .
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
from .compass_api_backend_v1_models_morpho_read_response_get_market_asset import (
|
|
9
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketAsset,
|
|
10
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketAssetTypedDict,
|
|
11
11
|
)
|
|
12
|
-
from .
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
from .compass_api_backend_v1_models_morpho_read_response_get_market_marketstate import (
|
|
13
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketMarketState,
|
|
14
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketMarketStateTypedDict,
|
|
15
|
+
)
|
|
16
|
+
from compass_api_sdk.types import (
|
|
17
|
+
BaseModel,
|
|
18
|
+
Nullable,
|
|
19
|
+
OptionalNullable,
|
|
20
|
+
UNSET,
|
|
21
|
+
UNSET_SENTINEL,
|
|
15
22
|
)
|
|
16
|
-
from compass_api_sdk.types import BaseModel
|
|
17
23
|
import pydantic
|
|
18
|
-
from
|
|
24
|
+
from pydantic import model_serializer
|
|
25
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
19
26
|
|
|
20
27
|
|
|
21
28
|
class MorphoGetMarketResponseTypedDict(TypedDict):
|
|
@@ -23,14 +30,17 @@ class MorphoGetMarketResponseTypedDict(TypedDict):
|
|
|
23
30
|
r"""Whether the market is whitelisted or not."""
|
|
24
31
|
lltv: str
|
|
25
32
|
r"""(Liquidation Loan-To-Value) Maximum borrowing percentage before liquidation risk. Scaled by 1e18."""
|
|
26
|
-
daily_apys:
|
|
27
|
-
weekly_apys:
|
|
28
|
-
monthly_apys:
|
|
29
|
-
yearly_apys:
|
|
30
|
-
all_time_apys:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
daily_apys: CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyDataTypedDict
|
|
34
|
+
weekly_apys: CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyDataTypedDict
|
|
35
|
+
monthly_apys: CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyDataTypedDict
|
|
36
|
+
yearly_apys: CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyDataTypedDict
|
|
37
|
+
all_time_apys: CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyDataTypedDict
|
|
38
|
+
loan_asset: CompassAPIBackendV1ModelsMorphoReadResponseGetMarketAssetTypedDict
|
|
39
|
+
state: CompassAPIBackendV1ModelsMorphoReadResponseGetMarketMarketStateTypedDict
|
|
40
|
+
collateral_asset: NotRequired[
|
|
41
|
+
Nullable[CompassAPIBackendV1ModelsMorphoReadResponseGetMarketAssetTypedDict]
|
|
42
|
+
]
|
|
43
|
+
r"""Data of the underlying collateral asset of the market."""
|
|
34
44
|
|
|
35
45
|
|
|
36
46
|
class MorphoGetMarketResponse(BaseModel):
|
|
@@ -41,38 +51,69 @@ class MorphoGetMarketResponse(BaseModel):
|
|
|
41
51
|
r"""(Liquidation Loan-To-Value) Maximum borrowing percentage before liquidation risk. Scaled by 1e18."""
|
|
42
52
|
|
|
43
53
|
daily_apys: Annotated[
|
|
44
|
-
|
|
54
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyData,
|
|
45
55
|
pydantic.Field(alias="dailyApys"),
|
|
46
56
|
]
|
|
47
57
|
|
|
48
58
|
weekly_apys: Annotated[
|
|
49
|
-
|
|
59
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyData,
|
|
50
60
|
pydantic.Field(alias="weeklyApys"),
|
|
51
61
|
]
|
|
52
62
|
|
|
53
63
|
monthly_apys: Annotated[
|
|
54
|
-
|
|
64
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyData,
|
|
55
65
|
pydantic.Field(alias="monthlyApys"),
|
|
56
66
|
]
|
|
57
67
|
|
|
58
68
|
yearly_apys: Annotated[
|
|
59
|
-
|
|
69
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyData,
|
|
60
70
|
pydantic.Field(alias="yearlyApys"),
|
|
61
71
|
]
|
|
62
72
|
|
|
63
73
|
all_time_apys: Annotated[
|
|
64
|
-
|
|
74
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketApyData,
|
|
65
75
|
pydantic.Field(alias="allTimeApys"),
|
|
66
76
|
]
|
|
67
77
|
|
|
68
|
-
collateral_asset: Annotated[
|
|
69
|
-
CompassAPIBackendModelsMorphoReadResponseGetMarketAsset,
|
|
70
|
-
pydantic.Field(alias="collateralAsset"),
|
|
71
|
-
]
|
|
72
|
-
|
|
73
78
|
loan_asset: Annotated[
|
|
74
|
-
|
|
79
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketAsset,
|
|
75
80
|
pydantic.Field(alias="loanAsset"),
|
|
76
81
|
]
|
|
77
82
|
|
|
78
|
-
state:
|
|
83
|
+
state: CompassAPIBackendV1ModelsMorphoReadResponseGetMarketMarketState
|
|
84
|
+
|
|
85
|
+
collateral_asset: Annotated[
|
|
86
|
+
OptionalNullable[CompassAPIBackendV1ModelsMorphoReadResponseGetMarketAsset],
|
|
87
|
+
pydantic.Field(alias="collateralAsset"),
|
|
88
|
+
] = UNSET
|
|
89
|
+
r"""Data of the underlying collateral asset of the market."""
|
|
90
|
+
|
|
91
|
+
@model_serializer(mode="wrap")
|
|
92
|
+
def serialize_model(self, handler):
|
|
93
|
+
optional_fields = ["collateralAsset"]
|
|
94
|
+
nullable_fields = ["collateralAsset"]
|
|
95
|
+
null_default_fields = []
|
|
96
|
+
|
|
97
|
+
serialized = handler(self)
|
|
98
|
+
|
|
99
|
+
m = {}
|
|
100
|
+
|
|
101
|
+
for n, f in type(self).model_fields.items():
|
|
102
|
+
k = f.alias or n
|
|
103
|
+
val = serialized.get(k)
|
|
104
|
+
serialized.pop(k, None)
|
|
105
|
+
|
|
106
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
107
|
+
is_set = (
|
|
108
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
109
|
+
or k in null_default_fields
|
|
110
|
+
) # pylint: disable=no-member
|
|
111
|
+
|
|
112
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
113
|
+
m[k] = val
|
|
114
|
+
elif val != UNSET_SENTINEL and (
|
|
115
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
116
|
+
):
|
|
117
|
+
m[k] = val
|
|
118
|
+
|
|
119
|
+
return m
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
from .compass_api_backend_v1_models_morpho_read_response_get_markets_asset import (
|
|
5
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketsAsset,
|
|
6
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketsAssetTypedDict,
|
|
7
7
|
)
|
|
8
|
-
from .
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
from .compass_api_backend_v1_models_morpho_read_response_get_markets_marketstate import (
|
|
9
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketsMarketState,
|
|
10
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketsMarketStateTypedDict,
|
|
11
11
|
)
|
|
12
12
|
from .weeklyapys import WeeklyApys, WeeklyApysTypedDict
|
|
13
|
-
from compass_api_sdk.types import
|
|
13
|
+
from compass_api_sdk.types import (
|
|
14
|
+
BaseModel,
|
|
15
|
+
Nullable,
|
|
16
|
+
OptionalNullable,
|
|
17
|
+
UNSET,
|
|
18
|
+
UNSET_SENTINEL,
|
|
19
|
+
)
|
|
14
20
|
import pydantic
|
|
15
21
|
from pydantic import model_serializer
|
|
16
|
-
from typing_extensions import Annotated, TypedDict
|
|
22
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
17
23
|
|
|
18
24
|
|
|
19
25
|
class MorphoMarketTypedDict(TypedDict):
|
|
@@ -21,12 +27,12 @@ class MorphoMarketTypedDict(TypedDict):
|
|
|
21
27
|
lltv: int
|
|
22
28
|
oracle_address: str
|
|
23
29
|
irm_address: str
|
|
24
|
-
state:
|
|
30
|
+
state: CompassAPIBackendV1ModelsMorphoReadResponseGetMarketsMarketStateTypedDict
|
|
25
31
|
weekly_apys: WeeklyApysTypedDict
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
loan_asset: CompassAPIBackendV1ModelsMorphoReadResponseGetMarketsAssetTypedDict
|
|
33
|
+
collateral_asset: NotRequired[
|
|
34
|
+
Nullable[CompassAPIBackendV1ModelsMorphoReadResponseGetMarketsAssetTypedDict]
|
|
28
35
|
]
|
|
29
|
-
loan_asset: CompassAPIBackendModelsMorphoReadResponseGetMarketsAssetTypedDict
|
|
30
36
|
|
|
31
37
|
|
|
32
38
|
class MorphoMarket(BaseModel):
|
|
@@ -38,23 +44,23 @@ class MorphoMarket(BaseModel):
|
|
|
38
44
|
|
|
39
45
|
irm_address: Annotated[str, pydantic.Field(alias="irmAddress")]
|
|
40
46
|
|
|
41
|
-
state:
|
|
47
|
+
state: CompassAPIBackendV1ModelsMorphoReadResponseGetMarketsMarketState
|
|
42
48
|
|
|
43
49
|
weekly_apys: Annotated[WeeklyApys, pydantic.Field(alias="weeklyApys")]
|
|
44
50
|
|
|
45
|
-
collateral_asset: Annotated[
|
|
46
|
-
Nullable[CompassAPIBackendModelsMorphoReadResponseGetMarketsAsset],
|
|
47
|
-
pydantic.Field(alias="collateralAsset"),
|
|
48
|
-
]
|
|
49
|
-
|
|
50
51
|
loan_asset: Annotated[
|
|
51
|
-
|
|
52
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetMarketsAsset,
|
|
52
53
|
pydantic.Field(alias="loanAsset"),
|
|
53
54
|
]
|
|
54
55
|
|
|
56
|
+
collateral_asset: Annotated[
|
|
57
|
+
OptionalNullable[CompassAPIBackendV1ModelsMorphoReadResponseGetMarketsAsset],
|
|
58
|
+
pydantic.Field(alias="collateralAsset"),
|
|
59
|
+
] = UNSET
|
|
60
|
+
|
|
55
61
|
@model_serializer(mode="wrap")
|
|
56
62
|
def serialize_model(self, handler):
|
|
57
|
-
optional_fields = []
|
|
63
|
+
optional_fields = ["collateralAsset"]
|
|
58
64
|
nullable_fields = ["collateralAsset"]
|
|
59
65
|
null_default_fields = []
|
|
60
66
|
|
|
@@ -36,6 +36,8 @@ class MorphoRepayRequestTypedDict(TypedDict):
|
|
|
36
36
|
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
37
37
|
callback_data: NotRequired[Nullable[bytes]]
|
|
38
38
|
r"""An optional field for callback byte data that will be triggered upon successful repaying of debt."""
|
|
39
|
+
estimate_gas: NotRequired[bool]
|
|
40
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
39
41
|
|
|
40
42
|
|
|
41
43
|
class MorphoRepayRequest(BaseModel):
|
|
@@ -64,9 +66,17 @@ class MorphoRepayRequest(BaseModel):
|
|
|
64
66
|
callback_data: OptionalNullable[bytes] = UNSET
|
|
65
67
|
r"""An optional field for callback byte data that will be triggered upon successful repaying of debt."""
|
|
66
68
|
|
|
69
|
+
estimate_gas: Optional[bool] = None
|
|
70
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
71
|
+
|
|
67
72
|
@model_serializer(mode="wrap")
|
|
68
73
|
def serialize_model(self, handler):
|
|
69
|
-
optional_fields = [
|
|
74
|
+
optional_fields = [
|
|
75
|
+
"action_type",
|
|
76
|
+
"on_behalf_of",
|
|
77
|
+
"callback_data",
|
|
78
|
+
"estimate_gas",
|
|
79
|
+
]
|
|
70
80
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
71
81
|
null_default_fields = []
|
|
72
82
|
|
|
@@ -48,6 +48,8 @@ class MorphoSupplyCollateralRequestTypedDict(TypedDict):
|
|
|
48
48
|
r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
|
|
49
49
|
callback_data: NotRequired[Nullable[bytes]]
|
|
50
50
|
r"""An optional field for callback byte data that will be triggered upon successful supplying of collateral."""
|
|
51
|
+
estimate_gas: NotRequired[bool]
|
|
52
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
class MorphoSupplyCollateralRequest(BaseModel):
|
|
@@ -76,9 +78,17 @@ class MorphoSupplyCollateralRequest(BaseModel):
|
|
|
76
78
|
callback_data: OptionalNullable[bytes] = UNSET
|
|
77
79
|
r"""An optional field for callback byte data that will be triggered upon successful supplying of collateral."""
|
|
78
80
|
|
|
81
|
+
estimate_gas: Optional[bool] = None
|
|
82
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
83
|
+
|
|
79
84
|
@model_serializer(mode="wrap")
|
|
80
85
|
def serialize_model(self, handler):
|
|
81
|
-
optional_fields = [
|
|
86
|
+
optional_fields = [
|
|
87
|
+
"action_type",
|
|
88
|
+
"on_behalf_of",
|
|
89
|
+
"callback_data",
|
|
90
|
+
"estimate_gas",
|
|
91
|
+
]
|
|
82
92
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
83
93
|
null_default_fields = []
|
|
84
94
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .chaininfo import ChainInfo, ChainInfoTypedDict
|
|
5
|
-
from .
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
from .compass_api_backend_v1_models_morpho_read_response_get_vaults_asset import (
|
|
6
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsAsset,
|
|
7
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsAssetTypedDict,
|
|
8
8
|
)
|
|
9
|
-
from .
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
from .compass_api_backend_v1_models_morpho_read_response_get_vaults_vaultstate import (
|
|
10
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsVaultState,
|
|
11
|
+
CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsVaultStateTypedDict,
|
|
12
12
|
)
|
|
13
13
|
from compass_api_sdk.types import BaseModel
|
|
14
14
|
import pydantic
|
|
@@ -23,9 +23,9 @@ class MorphoVaultTypedDict(TypedDict):
|
|
|
23
23
|
creation_timestamp: int
|
|
24
24
|
creator_address: str
|
|
25
25
|
whitelisted: bool
|
|
26
|
-
asset:
|
|
26
|
+
asset: CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsAssetTypedDict
|
|
27
27
|
chain: ChainInfoTypedDict
|
|
28
|
-
state:
|
|
28
|
+
state: CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsVaultStateTypedDict
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class MorphoVault(BaseModel):
|
|
@@ -43,8 +43,8 @@ class MorphoVault(BaseModel):
|
|
|
43
43
|
|
|
44
44
|
whitelisted: bool
|
|
45
45
|
|
|
46
|
-
asset:
|
|
46
|
+
asset: CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsAsset
|
|
47
47
|
|
|
48
48
|
chain: ChainInfo
|
|
49
49
|
|
|
50
|
-
state:
|
|
50
|
+
state: CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsVaultState
|
|
@@ -48,6 +48,8 @@ class MorphoWithdrawCollateralRequestTypedDict(TypedDict):
|
|
|
48
48
|
r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
|
|
49
49
|
receiver: NotRequired[Nullable[str]]
|
|
50
50
|
r"""The address where the withdrawn collateral will be received. Defaults to sender."""
|
|
51
|
+
estimate_gas: NotRequired[bool]
|
|
52
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
class MorphoWithdrawCollateralRequest(BaseModel):
|
|
@@ -76,9 +78,12 @@ class MorphoWithdrawCollateralRequest(BaseModel):
|
|
|
76
78
|
receiver: OptionalNullable[str] = UNSET
|
|
77
79
|
r"""The address where the withdrawn collateral will be received. Defaults to sender."""
|
|
78
80
|
|
|
81
|
+
estimate_gas: Optional[bool] = None
|
|
82
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
83
|
+
|
|
79
84
|
@model_serializer(mode="wrap")
|
|
80
85
|
def serialize_model(self, handler):
|
|
81
|
-
optional_fields = ["action_type", "on_behalf_of", "receiver"]
|
|
86
|
+
optional_fields = ["action_type", "on_behalf_of", "receiver", "estimate_gas"]
|
|
82
87
|
nullable_fields = ["on_behalf_of", "receiver"]
|
|
83
88
|
null_default_fields = []
|
|
84
89
|
|
|
@@ -34,6 +34,8 @@ class MorphoWithdrawRequestTypedDict(TypedDict):
|
|
|
34
34
|
action_type: Literal["MORPHO_WITHDRAW"]
|
|
35
35
|
receiver: NotRequired[Nullable[str]]
|
|
36
36
|
r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
|
|
37
|
+
estimate_gas: NotRequired[bool]
|
|
38
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
37
39
|
|
|
38
40
|
|
|
39
41
|
class MorphoWithdrawRequest(BaseModel):
|
|
@@ -59,9 +61,12 @@ class MorphoWithdrawRequest(BaseModel):
|
|
|
59
61
|
receiver: OptionalNullable[str] = UNSET
|
|
60
62
|
r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
|
|
61
63
|
|
|
64
|
+
estimate_gas: Optional[bool] = None
|
|
65
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
66
|
+
|
|
62
67
|
@model_serializer(mode="wrap")
|
|
63
68
|
def serialize_model(self, handler):
|
|
64
|
-
optional_fields = ["action_type", "receiver"]
|
|
69
|
+
optional_fields = ["action_type", "receiver", "estimate_gas"]
|
|
65
70
|
nullable_fields = ["receiver"]
|
|
66
71
|
null_default_fields = []
|
|
67
72
|
|
|
@@ -12,7 +12,7 @@ from compass_api_sdk.types import (
|
|
|
12
12
|
)
|
|
13
13
|
from enum import Enum
|
|
14
14
|
from pydantic import model_serializer
|
|
15
|
-
from typing import List
|
|
15
|
+
from typing import List, Optional
|
|
16
16
|
from typing_extensions import NotRequired, TypedDict
|
|
17
17
|
|
|
18
18
|
|
|
@@ -30,6 +30,8 @@ class MulticallExecuteRequestTypedDict(TypedDict):
|
|
|
30
30
|
r"""The address of the transaction sender."""
|
|
31
31
|
actions: List[UserOperationTypedDict]
|
|
32
32
|
r"""List of possible actions for multicall"""
|
|
33
|
+
estimate_gas: NotRequired[bool]
|
|
34
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
33
35
|
signed_authorization: NotRequired[Nullable[SignedAuthorizationTypedDict]]
|
|
34
36
|
r"""EIP-7702 authorization"""
|
|
35
37
|
|
|
@@ -45,12 +47,15 @@ class MulticallExecuteRequest(BaseModel):
|
|
|
45
47
|
actions: List[UserOperation]
|
|
46
48
|
r"""List of possible actions for multicall"""
|
|
47
49
|
|
|
50
|
+
estimate_gas: Optional[bool] = None
|
|
51
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
52
|
+
|
|
48
53
|
signed_authorization: OptionalNullable[SignedAuthorization] = UNSET
|
|
49
54
|
r"""EIP-7702 authorization"""
|
|
50
55
|
|
|
51
56
|
@model_serializer(mode="wrap")
|
|
52
57
|
def serialize_model(self, handler):
|
|
53
|
-
optional_fields = ["signed_authorization"]
|
|
58
|
+
optional_fields = ["estimate_gas", "signed_authorization"]
|
|
54
59
|
nullable_fields = ["signed_authorization"]
|
|
55
60
|
null_default_fields = []
|
|
56
61
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .token_enum import TokenEnum
|
|
5
4
|
from compass_api_sdk.types import BaseModel
|
|
6
5
|
from compass_api_sdk.utils import validate_const
|
|
7
6
|
import pydantic
|
|
@@ -10,42 +9,22 @@ from typing import Literal, Optional, Union
|
|
|
10
9
|
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
11
10
|
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
)
|
|
16
|
-
r"""The symbol or address of the token that is to be sold."""
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
OdosSwapParamsTokenIn = TypeAliasType("OdosSwapParamsTokenIn", Union[TokenEnum, str])
|
|
20
|
-
r"""The symbol or address of the token that is to be sold."""
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
OdosSwapParamsTokenOutTypedDict = TypeAliasType(
|
|
24
|
-
"OdosSwapParamsTokenOutTypedDict", Union[TokenEnum, str]
|
|
25
|
-
)
|
|
26
|
-
r"""The symbol or address of the token that is to be bought."""
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
OdosSwapParamsTokenOut = TypeAliasType("OdosSwapParamsTokenOut", Union[TokenEnum, str])
|
|
30
|
-
r"""The symbol or address of the token that is to be bought."""
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
OdosSwapParamsAmountTypedDict = TypeAliasType(
|
|
34
|
-
"OdosSwapParamsAmountTypedDict", Union[float, str]
|
|
12
|
+
OdosSwapParamsAmountInTypedDict = TypeAliasType(
|
|
13
|
+
"OdosSwapParamsAmountInTypedDict", Union[float, str]
|
|
35
14
|
)
|
|
36
15
|
r"""The amount of token_in to be sold."""
|
|
37
16
|
|
|
38
17
|
|
|
39
|
-
|
|
18
|
+
OdosSwapParamsAmountIn = TypeAliasType("OdosSwapParamsAmountIn", Union[float, str])
|
|
40
19
|
r"""The amount of token_in to be sold."""
|
|
41
20
|
|
|
42
21
|
|
|
43
22
|
class OdosSwapParamsTypedDict(TypedDict):
|
|
44
|
-
token_in:
|
|
23
|
+
token_in: str
|
|
45
24
|
r"""The symbol or address of the token that is to be sold."""
|
|
46
|
-
token_out:
|
|
25
|
+
token_out: str
|
|
47
26
|
r"""The symbol or address of the token that is to be bought."""
|
|
48
|
-
|
|
27
|
+
amount_in: OdosSwapParamsAmountInTypedDict
|
|
49
28
|
r"""The amount of token_in to be sold."""
|
|
50
29
|
max_slippage_percent: float
|
|
51
30
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
@@ -53,13 +32,13 @@ class OdosSwapParamsTypedDict(TypedDict):
|
|
|
53
32
|
|
|
54
33
|
|
|
55
34
|
class OdosSwapParams(BaseModel):
|
|
56
|
-
token_in:
|
|
35
|
+
token_in: str
|
|
57
36
|
r"""The symbol or address of the token that is to be sold."""
|
|
58
37
|
|
|
59
|
-
token_out:
|
|
38
|
+
token_out: str
|
|
60
39
|
r"""The symbol or address of the token that is to be bought."""
|
|
61
40
|
|
|
62
|
-
|
|
41
|
+
amount_in: OdosSwapParamsAmountIn
|
|
63
42
|
r"""The amount of token_in to be sold."""
|
|
64
43
|
|
|
65
44
|
max_slippage_percent: float
|
|
@@ -1,45 +1,22 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .token_enum import TokenEnum
|
|
5
4
|
from compass_api_sdk.types import BaseModel
|
|
6
5
|
from compass_api_sdk.utils import validate_const
|
|
7
6
|
from enum import Enum
|
|
8
7
|
import pydantic
|
|
9
8
|
from pydantic.functional_validators import AfterValidator
|
|
10
9
|
from typing import Literal, Optional, Union
|
|
11
|
-
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
)
|
|
17
|
-
r"""The symbol or address of the token that is to be sold."""
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
OdosSwapRequestTokenIn = TypeAliasType("OdosSwapRequestTokenIn", Union[TokenEnum, str])
|
|
21
|
-
r"""The symbol or address of the token that is to be sold."""
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
OdosSwapRequestTokenOutTypedDict = TypeAliasType(
|
|
25
|
-
"OdosSwapRequestTokenOutTypedDict", Union[TokenEnum, str]
|
|
26
|
-
)
|
|
27
|
-
r"""The symbol or address of the token that is to be bought."""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
OdosSwapRequestTokenOut = TypeAliasType(
|
|
31
|
-
"OdosSwapRequestTokenOut", Union[TokenEnum, str]
|
|
32
|
-
)
|
|
33
|
-
r"""The symbol or address of the token that is to be bought."""
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
OdosSwapRequestAmountTypedDict = TypeAliasType(
|
|
37
|
-
"OdosSwapRequestAmountTypedDict", Union[float, str]
|
|
13
|
+
OdosSwapRequestAmountInTypedDict = TypeAliasType(
|
|
14
|
+
"OdosSwapRequestAmountInTypedDict", Union[float, str]
|
|
38
15
|
)
|
|
39
16
|
r"""The amount of token_in to be sold."""
|
|
40
17
|
|
|
41
18
|
|
|
42
|
-
|
|
19
|
+
OdosSwapRequestAmountIn = TypeAliasType("OdosSwapRequestAmountIn", Union[float, str])
|
|
43
20
|
r"""The amount of token_in to be sold."""
|
|
44
21
|
|
|
45
22
|
|
|
@@ -50,11 +27,11 @@ class OdosSwapRequestChain(str, Enum):
|
|
|
50
27
|
|
|
51
28
|
|
|
52
29
|
class OdosSwapRequestTypedDict(TypedDict):
|
|
53
|
-
token_in:
|
|
30
|
+
token_in: str
|
|
54
31
|
r"""The symbol or address of the token that is to be sold."""
|
|
55
|
-
token_out:
|
|
32
|
+
token_out: str
|
|
56
33
|
r"""The symbol or address of the token that is to be bought."""
|
|
57
|
-
|
|
34
|
+
amount_in: OdosSwapRequestAmountInTypedDict
|
|
58
35
|
r"""The amount of token_in to be sold."""
|
|
59
36
|
max_slippage_percent: float
|
|
60
37
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
@@ -62,16 +39,18 @@ class OdosSwapRequestTypedDict(TypedDict):
|
|
|
62
39
|
sender: str
|
|
63
40
|
r"""The address of the transaction sender."""
|
|
64
41
|
action_type: Literal["ODOS_SWAP"]
|
|
42
|
+
estimate_gas: NotRequired[bool]
|
|
43
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
65
44
|
|
|
66
45
|
|
|
67
46
|
class OdosSwapRequest(BaseModel):
|
|
68
|
-
token_in:
|
|
47
|
+
token_in: str
|
|
69
48
|
r"""The symbol or address of the token that is to be sold."""
|
|
70
49
|
|
|
71
|
-
token_out:
|
|
50
|
+
token_out: str
|
|
72
51
|
r"""The symbol or address of the token that is to be bought."""
|
|
73
52
|
|
|
74
|
-
|
|
53
|
+
amount_in: OdosSwapRequestAmountIn
|
|
75
54
|
r"""The amount of token_in to be sold."""
|
|
76
55
|
|
|
77
56
|
max_slippage_percent: float
|
|
@@ -88,3 +67,6 @@ class OdosSwapRequest(BaseModel):
|
|
|
88
67
|
],
|
|
89
68
|
pydantic.Field(alias="action_type"),
|
|
90
69
|
] = "ODOS_SWAP"
|
|
70
|
+
|
|
71
|
+
estimate_gas: Optional[bool] = None
|
|
72
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|