compass_api_sdk 1.1.1__py3-none-any.whl → 2.0.21rc1__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 +1780 -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 +446 -0
- compass_api_sdk/httpclient.py +0 -1
- compass_api_sdk/models/__init__.py +764 -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 +49 -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 +49 -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/depositforburnrequest.py +77 -0
- compass_api_sdk/models/depositforburnresponse.py +100 -0
- compass_api_sdk/models/earnmanageparams.py +74 -0
- compass_api_sdk/models/earnmanagerequest.py +130 -0
- compass_api_sdk/models/earnmanageresponse.py +52 -0
- compass_api_sdk/models/earnpositionsresponse.py +39 -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 +42 -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/pendlegetmarketresponse.py +5 -5
- compass_api_sdk/models/pendlemanageliquidityparams.py +2 -15
- compass_api_sdk/models/pendlemanageliquidityrequest.py +8 -16
- 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/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/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_positionsop.py +56 -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/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/uniswap_v3.py +152 -114
- compass_api_sdk/universal.py +44 -606
- compass_api_sdk/utils/annotations.py +32 -8
- compass_api_sdk/utils/forms.py +21 -10
- compass_api_sdk/utils/queryparams.py +14 -2
- compass_api_sdk/utils/retries.py +69 -5
- compass_api_sdk/utils/unmarshal_json_response.py +15 -1
- compass_api_sdk/wildcat.py +208 -0
- compass_api_sdk-2.0.21rc1.dist-info/METADATA +623 -0
- compass_api_sdk-2.0.21rc1.dist-info/RECORD +346 -0
- {compass_api_sdk-1.1.1.dist-info → compass_api_sdk-2.0.21rc1.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
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
|
+
from enum import Enum
|
|
7
|
+
from typing import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V2EarnPositionsChain(str, Enum):
|
|
12
|
+
ARBITRUM = "arbitrum"
|
|
13
|
+
BASE = "base"
|
|
14
|
+
ETHEREUM = "ethereum"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class V2EarnPositionsRequestTypedDict(TypedDict):
|
|
18
|
+
chain: V2EarnPositionsChain
|
|
19
|
+
user_address: str
|
|
20
|
+
r"""The address of the user to get vault positions for."""
|
|
21
|
+
offset: NotRequired[int]
|
|
22
|
+
r"""The offset of the first item to return."""
|
|
23
|
+
limit: NotRequired[int]
|
|
24
|
+
r"""The number of items to return."""
|
|
25
|
+
days: NotRequired[int]
|
|
26
|
+
r"""How many days back from the current time to include in the blockchain scan."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class V2EarnPositionsRequest(BaseModel):
|
|
30
|
+
chain: Annotated[
|
|
31
|
+
V2EarnPositionsChain,
|
|
32
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
user_address: Annotated[
|
|
36
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
37
|
+
]
|
|
38
|
+
r"""The address of the user to get vault positions for."""
|
|
39
|
+
|
|
40
|
+
offset: Annotated[
|
|
41
|
+
Optional[int],
|
|
42
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
43
|
+
] = None
|
|
44
|
+
r"""The offset of the first item to return."""
|
|
45
|
+
|
|
46
|
+
limit: Annotated[
|
|
47
|
+
Optional[int],
|
|
48
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
49
|
+
] = None
|
|
50
|
+
r"""The number of items to return."""
|
|
51
|
+
|
|
52
|
+
days: Annotated[
|
|
53
|
+
Optional[int],
|
|
54
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
55
|
+
] = None
|
|
56
|
+
r"""How many days back from the current time to include in the blockchain scan."""
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from compass_api_sdk.types import (
|
|
6
|
+
BaseModel,
|
|
7
|
+
Nullable,
|
|
8
|
+
OptionalNullable,
|
|
9
|
+
UNSET,
|
|
10
|
+
UNSET_SENTINEL,
|
|
11
|
+
)
|
|
12
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
13
|
+
from enum import Enum
|
|
14
|
+
from pydantic import model_serializer
|
|
15
|
+
from typing import Optional
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Direction(str, Enum):
|
|
20
|
+
r"""The direction to order the results by."""
|
|
21
|
+
|
|
22
|
+
ASC = "asc"
|
|
23
|
+
DESC = "desc"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class V2EarnVaultsRequestTypedDict(TypedDict):
|
|
27
|
+
order_by: str
|
|
28
|
+
r"""The field to order the results by."""
|
|
29
|
+
direction: NotRequired[Direction]
|
|
30
|
+
r"""The direction to order the results by."""
|
|
31
|
+
offset: NotRequired[int]
|
|
32
|
+
r"""The offset of the first item to return."""
|
|
33
|
+
limit: NotRequired[int]
|
|
34
|
+
r"""The number of items to return."""
|
|
35
|
+
chain: NotRequired[Nullable[Chain]]
|
|
36
|
+
r"""Optional chain filter. If not provided, returns vaults for all chains."""
|
|
37
|
+
asset_symbol: NotRequired[Nullable[str]]
|
|
38
|
+
r"""Filter vaults by underlying asset symbol (e.g., 'USDC', 'WETH')."""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class V2EarnVaultsRequest(BaseModel):
|
|
42
|
+
order_by: Annotated[
|
|
43
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
44
|
+
]
|
|
45
|
+
r"""The field to order the results by."""
|
|
46
|
+
|
|
47
|
+
direction: Annotated[
|
|
48
|
+
Optional[Direction],
|
|
49
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
50
|
+
] = None
|
|
51
|
+
r"""The direction to order the results by."""
|
|
52
|
+
|
|
53
|
+
offset: Annotated[
|
|
54
|
+
Optional[int],
|
|
55
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
56
|
+
] = None
|
|
57
|
+
r"""The offset of the first item to return."""
|
|
58
|
+
|
|
59
|
+
limit: Annotated[
|
|
60
|
+
Optional[int],
|
|
61
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
62
|
+
] = None
|
|
63
|
+
r"""The number of items to return."""
|
|
64
|
+
|
|
65
|
+
chain: Annotated[
|
|
66
|
+
OptionalNullable[Chain],
|
|
67
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
68
|
+
] = UNSET
|
|
69
|
+
r"""Optional chain filter. If not provided, returns vaults for all chains."""
|
|
70
|
+
|
|
71
|
+
asset_symbol: Annotated[
|
|
72
|
+
OptionalNullable[str],
|
|
73
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
74
|
+
] = UNSET
|
|
75
|
+
r"""Filter vaults by underlying asset symbol (e.g., 'USDC', 'WETH')."""
|
|
76
|
+
|
|
77
|
+
@model_serializer(mode="wrap")
|
|
78
|
+
def serialize_model(self, handler):
|
|
79
|
+
optional_fields = ["direction", "offset", "limit", "chain", "asset_symbol"]
|
|
80
|
+
nullable_fields = ["chain", "asset_symbol"]
|
|
81
|
+
null_default_fields = []
|
|
82
|
+
|
|
83
|
+
serialized = handler(self)
|
|
84
|
+
|
|
85
|
+
m = {}
|
|
86
|
+
|
|
87
|
+
for n, f in type(self).model_fields.items():
|
|
88
|
+
k = f.alias or n
|
|
89
|
+
val = serialized.get(k)
|
|
90
|
+
serialized.pop(k, None)
|
|
91
|
+
|
|
92
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
93
|
+
is_set = (
|
|
94
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
95
|
+
or k in null_default_fields
|
|
96
|
+
) # pylint: disable=no-member
|
|
97
|
+
|
|
98
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
99
|
+
m[k] = val
|
|
100
|
+
elif val != UNSET_SENTINEL and (
|
|
101
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
102
|
+
):
|
|
103
|
+
m[k] = val
|
|
104
|
+
|
|
105
|
+
return m
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from .v2useroperation import V2UserOperation, V2UserOperationTypedDict
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
|
+
from typing import List, Optional
|
|
8
|
+
from typing_extensions import NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V2BundleRequestTypedDict(TypedDict):
|
|
12
|
+
owner: str
|
|
13
|
+
r"""The owner's wallet address that controls the Earn Account."""
|
|
14
|
+
chain: Chain
|
|
15
|
+
r"""The chain to use."""
|
|
16
|
+
actions: List[V2UserOperationTypedDict]
|
|
17
|
+
r"""List of actions to bundle. Actions are executed in order."""
|
|
18
|
+
gas_sponsorship: NotRequired[bool]
|
|
19
|
+
r"""If true, returns EIP-712 typed data for gas sponsorship. The owner must sign this data and submit to /gas_sponsorship/prepare."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class V2BundleRequest(BaseModel):
|
|
23
|
+
owner: str
|
|
24
|
+
r"""The owner's wallet address that controls the Earn Account."""
|
|
25
|
+
|
|
26
|
+
chain: Chain
|
|
27
|
+
r"""The chain to use."""
|
|
28
|
+
|
|
29
|
+
actions: List[V2UserOperation]
|
|
30
|
+
r"""List of actions to bundle. Actions are executed in order."""
|
|
31
|
+
|
|
32
|
+
gas_sponsorship: Optional[bool] = None
|
|
33
|
+
r"""If true, returns EIP-712 typed data for gas sponsorship. The owner must sign this data and submit to /gas_sponsorship/prepare."""
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .batchedsafeoperationsresponse_output import (
|
|
5
|
+
BatchedSafeOperationsResponseOutput,
|
|
6
|
+
BatchedSafeOperationsResponseOutputTypedDict,
|
|
7
|
+
)
|
|
8
|
+
from .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
|
|
9
|
+
from compass_api_sdk.types import (
|
|
10
|
+
BaseModel,
|
|
11
|
+
Nullable,
|
|
12
|
+
OptionalNullable,
|
|
13
|
+
UNSET,
|
|
14
|
+
UNSET_SENTINEL,
|
|
15
|
+
)
|
|
16
|
+
from pydantic import model_serializer
|
|
17
|
+
from typing_extensions import NotRequired, TypedDict
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class V2BundleResponseTypedDict(TypedDict):
|
|
21
|
+
actions_count: int
|
|
22
|
+
r"""Number of individual transactions bundled in this execution."""
|
|
23
|
+
transaction: NotRequired[Nullable[UnsignedTransactionTypedDict]]
|
|
24
|
+
r"""Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false."""
|
|
25
|
+
eip_712: NotRequired[Nullable[BatchedSafeOperationsResponseOutputTypedDict]]
|
|
26
|
+
r"""EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. Owner must sign and submit to /gas_sponsorship/prepare."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class V2BundleResponse(BaseModel):
|
|
30
|
+
actions_count: int
|
|
31
|
+
r"""Number of individual transactions bundled in this execution."""
|
|
32
|
+
|
|
33
|
+
transaction: OptionalNullable[UnsignedTransaction] = UNSET
|
|
34
|
+
r"""Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false."""
|
|
35
|
+
|
|
36
|
+
eip_712: OptionalNullable[BatchedSafeOperationsResponseOutput] = UNSET
|
|
37
|
+
r"""EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. Owner must sign and submit to /gas_sponsorship/prepare."""
|
|
38
|
+
|
|
39
|
+
@model_serializer(mode="wrap")
|
|
40
|
+
def serialize_model(self, handler):
|
|
41
|
+
optional_fields = ["transaction", "eip_712"]
|
|
42
|
+
nullable_fields = ["transaction", "eip_712"]
|
|
43
|
+
null_default_fields = []
|
|
44
|
+
|
|
45
|
+
serialized = handler(self)
|
|
46
|
+
|
|
47
|
+
m = {}
|
|
48
|
+
|
|
49
|
+
for n, f in type(self).model_fields.items():
|
|
50
|
+
k = f.alias or n
|
|
51
|
+
val = serialized.get(k)
|
|
52
|
+
serialized.pop(k, None)
|
|
53
|
+
|
|
54
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
55
|
+
is_set = (
|
|
56
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
57
|
+
or k in null_default_fields
|
|
58
|
+
) # pylint: disable=no-member
|
|
59
|
+
|
|
60
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
61
|
+
m[k] = val
|
|
62
|
+
elif val != UNSET_SENTINEL and (
|
|
63
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
64
|
+
):
|
|
65
|
+
m[k] = val
|
|
66
|
+
|
|
67
|
+
return m
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .earnmanageparams import EarnManageParams, EarnManageParamsTypedDict
|
|
5
|
+
from .earnswapparams import EarnSwapParams, EarnSwapParamsTypedDict
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
|
+
from compass_api_sdk.utils import get_discriminator
|
|
8
|
+
from pydantic import Discriminator, Tag
|
|
9
|
+
from typing import Union
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
V2UserOperationBodyTypedDict = TypeAliasType(
|
|
14
|
+
"V2UserOperationBodyTypedDict",
|
|
15
|
+
Union[EarnManageParamsTypedDict, EarnSwapParamsTypedDict],
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
V2UserOperationBody = Annotated[
|
|
20
|
+
Union[
|
|
21
|
+
Annotated[EarnManageParams, Tag("V2_MANAGE")],
|
|
22
|
+
Annotated[EarnSwapParams, Tag("V2_SWAP")],
|
|
23
|
+
],
|
|
24
|
+
Discriminator(lambda m: get_discriminator(m, "action_type", "action_type")),
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class V2UserOperationTypedDict(TypedDict):
|
|
29
|
+
r"""A single operation in a V2 bundle."""
|
|
30
|
+
|
|
31
|
+
body: V2UserOperationBodyTypedDict
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class V2UserOperation(BaseModel):
|
|
35
|
+
r"""A single operation in a V2 bundle."""
|
|
36
|
+
|
|
37
|
+
body: V2UserOperationBody
|
compass_api_sdk/models/vault.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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_check_user_position_apydata import (
|
|
5
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionApyData,
|
|
6
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionApyDataTypedDict,
|
|
7
7
|
)
|
|
8
|
-
from .
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
from .compass_api_backend_v1_models_morpho_read_response_check_user_position_asset import (
|
|
9
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionAsset,
|
|
10
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionAssetTypedDict,
|
|
11
11
|
)
|
|
12
12
|
from compass_api_sdk.types import BaseModel
|
|
13
13
|
import pydantic
|
|
@@ -19,15 +19,15 @@ class VaultTypedDict(TypedDict):
|
|
|
19
19
|
name: str
|
|
20
20
|
symbol: str
|
|
21
21
|
whitelisted: bool
|
|
22
|
-
asset:
|
|
22
|
+
asset: CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionAssetTypedDict
|
|
23
23
|
daily_apys: (
|
|
24
|
-
|
|
24
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionApyDataTypedDict
|
|
25
25
|
)
|
|
26
26
|
weekly_apys: (
|
|
27
|
-
|
|
27
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionApyDataTypedDict
|
|
28
28
|
)
|
|
29
29
|
monthly_apys: (
|
|
30
|
-
|
|
30
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionApyDataTypedDict
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
|
|
@@ -40,19 +40,19 @@ class Vault(BaseModel):
|
|
|
40
40
|
|
|
41
41
|
whitelisted: bool
|
|
42
42
|
|
|
43
|
-
asset:
|
|
43
|
+
asset: CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionAsset
|
|
44
44
|
|
|
45
45
|
daily_apys: Annotated[
|
|
46
|
-
|
|
46
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionApyData,
|
|
47
47
|
pydantic.Field(alias="dailyApys"),
|
|
48
48
|
]
|
|
49
49
|
|
|
50
50
|
weekly_apys: Annotated[
|
|
51
|
-
|
|
51
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionApyData,
|
|
52
52
|
pydantic.Field(alias="weeklyApys"),
|
|
53
53
|
]
|
|
54
54
|
|
|
55
55
|
monthly_apys: Annotated[
|
|
56
|
-
|
|
56
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionApyData,
|
|
57
57
|
pydantic.Field(alias="monthlyApys"),
|
|
58
58
|
]
|
|
@@ -46,6 +46,8 @@ class VaultDepositRequestTypedDict(TypedDict):
|
|
|
46
46
|
action_type: Literal["VAULT_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 VaultDepositRequest(BaseModel):
|
|
@@ -71,9 +73,12 @@ class VaultDepositRequest(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
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .apy import Apy, ApyTypedDict
|
|
5
|
-
from .
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
from .compass_api_backend_v1_models_vaults_read_response_vault_userposition import (
|
|
6
|
+
CompassAPIBackendV1ModelsVaultsReadResponseVaultUserPosition,
|
|
7
|
+
CompassAPIBackendV1ModelsVaultsReadResponseVaultUserPositionTypedDict,
|
|
8
8
|
)
|
|
9
9
|
from .underlyingtoken import UnderlyingToken, UnderlyingTokenTypedDict
|
|
10
10
|
from compass_api_sdk.types import (
|
|
@@ -34,7 +34,7 @@ class VaultGetVaultResponseTypedDict(TypedDict):
|
|
|
34
34
|
underlying_token: UnderlyingTokenTypedDict
|
|
35
35
|
apy: ApyTypedDict
|
|
36
36
|
user_position: NotRequired[
|
|
37
|
-
Nullable[
|
|
37
|
+
Nullable[CompassAPIBackendV1ModelsVaultsReadResponseVaultUserPositionTypedDict]
|
|
38
38
|
]
|
|
39
39
|
r"""The user's position in the vault."""
|
|
40
40
|
|
|
@@ -63,7 +63,7 @@ class VaultGetVaultResponse(BaseModel):
|
|
|
63
63
|
apy: Apy
|
|
64
64
|
|
|
65
65
|
user_position: OptionalNullable[
|
|
66
|
-
|
|
66
|
+
CompassAPIBackendV1ModelsVaultsReadResponseVaultUserPosition
|
|
67
67
|
] = UNSET
|
|
68
68
|
r"""The user's position in the vault."""
|
|
69
69
|
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from pydantic import model_serializer
|
|
12
|
+
from typing_extensions import NotRequired, TypedDict
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class VaultInfoTypedDict(TypedDict):
|
|
16
|
+
r"""Information about a single ERC-4626 vault from the database."""
|
|
17
|
+
|
|
18
|
+
vault_address: str
|
|
19
|
+
r"""The vault contract address."""
|
|
20
|
+
chain: str
|
|
21
|
+
r"""Blockchain name (e.g., 'ethereum', 'base')."""
|
|
22
|
+
owner: str
|
|
23
|
+
r"""The vault owner address."""
|
|
24
|
+
asset: str
|
|
25
|
+
r"""The underlying asset contract address."""
|
|
26
|
+
name: NotRequired[Nullable[str]]
|
|
27
|
+
r"""The name of the vault."""
|
|
28
|
+
symbol: NotRequired[Nullable[str]]
|
|
29
|
+
r"""The vault share token symbol."""
|
|
30
|
+
asset_name: NotRequired[Nullable[str]]
|
|
31
|
+
r"""The name of the underlying asset."""
|
|
32
|
+
asset_symbol: NotRequired[Nullable[str]]
|
|
33
|
+
r"""The symbol of the underlying asset (e.g., 'USDC')."""
|
|
34
|
+
tvl_usd: NotRequired[Nullable[str]]
|
|
35
|
+
r"""Total Value Locked in USD."""
|
|
36
|
+
apy_7d: NotRequired[Nullable[str]]
|
|
37
|
+
r"""7-day APY as a percentage (e.g., 5.25 = 5.25%)."""
|
|
38
|
+
apy_30d: NotRequired[Nullable[str]]
|
|
39
|
+
r"""30-day APY as a percentage."""
|
|
40
|
+
apy_90d: NotRequired[Nullable[str]]
|
|
41
|
+
r"""90-day APY as a percentage."""
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class VaultInfo(BaseModel):
|
|
45
|
+
r"""Information about a single ERC-4626 vault from the database."""
|
|
46
|
+
|
|
47
|
+
vault_address: str
|
|
48
|
+
r"""The vault contract address."""
|
|
49
|
+
|
|
50
|
+
chain: str
|
|
51
|
+
r"""Blockchain name (e.g., 'ethereum', 'base')."""
|
|
52
|
+
|
|
53
|
+
owner: str
|
|
54
|
+
r"""The vault owner address."""
|
|
55
|
+
|
|
56
|
+
asset: str
|
|
57
|
+
r"""The underlying asset contract address."""
|
|
58
|
+
|
|
59
|
+
name: OptionalNullable[str] = UNSET
|
|
60
|
+
r"""The name of the vault."""
|
|
61
|
+
|
|
62
|
+
symbol: OptionalNullable[str] = UNSET
|
|
63
|
+
r"""The vault share token symbol."""
|
|
64
|
+
|
|
65
|
+
asset_name: OptionalNullable[str] = UNSET
|
|
66
|
+
r"""The name of the underlying asset."""
|
|
67
|
+
|
|
68
|
+
asset_symbol: OptionalNullable[str] = UNSET
|
|
69
|
+
r"""The symbol of the underlying asset (e.g., 'USDC')."""
|
|
70
|
+
|
|
71
|
+
tvl_usd: OptionalNullable[str] = UNSET
|
|
72
|
+
r"""Total Value Locked in USD."""
|
|
73
|
+
|
|
74
|
+
apy_7d: OptionalNullable[str] = UNSET
|
|
75
|
+
r"""7-day APY as a percentage (e.g., 5.25 = 5.25%)."""
|
|
76
|
+
|
|
77
|
+
apy_30d: OptionalNullable[str] = UNSET
|
|
78
|
+
r"""30-day APY as a percentage."""
|
|
79
|
+
|
|
80
|
+
apy_90d: OptionalNullable[str] = UNSET
|
|
81
|
+
r"""90-day APY as a percentage."""
|
|
82
|
+
|
|
83
|
+
@model_serializer(mode="wrap")
|
|
84
|
+
def serialize_model(self, handler):
|
|
85
|
+
optional_fields = [
|
|
86
|
+
"name",
|
|
87
|
+
"symbol",
|
|
88
|
+
"asset_name",
|
|
89
|
+
"asset_symbol",
|
|
90
|
+
"tvl_usd",
|
|
91
|
+
"apy_7d",
|
|
92
|
+
"apy_30d",
|
|
93
|
+
"apy_90d",
|
|
94
|
+
]
|
|
95
|
+
nullable_fields = [
|
|
96
|
+
"name",
|
|
97
|
+
"symbol",
|
|
98
|
+
"asset_name",
|
|
99
|
+
"asset_symbol",
|
|
100
|
+
"tvl_usd",
|
|
101
|
+
"apy_7d",
|
|
102
|
+
"apy_30d",
|
|
103
|
+
"apy_90d",
|
|
104
|
+
]
|
|
105
|
+
null_default_fields = []
|
|
106
|
+
|
|
107
|
+
serialized = handler(self)
|
|
108
|
+
|
|
109
|
+
m = {}
|
|
110
|
+
|
|
111
|
+
for n, f in type(self).model_fields.items():
|
|
112
|
+
k = f.alias or n
|
|
113
|
+
val = serialized.get(k)
|
|
114
|
+
serialized.pop(k, None)
|
|
115
|
+
|
|
116
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
117
|
+
is_set = (
|
|
118
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
119
|
+
or k in null_default_fields
|
|
120
|
+
) # pylint: disable=no-member
|
|
121
|
+
|
|
122
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
123
|
+
m[k] = val
|
|
124
|
+
elif val != UNSET_SENTINEL and (
|
|
125
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
126
|
+
):
|
|
127
|
+
m[k] = val
|
|
128
|
+
|
|
129
|
+
return m
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .vaultinfo import VaultInfo, VaultInfoTypedDict
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from typing import List
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class VaultsResponseTypedDict(TypedDict):
|
|
11
|
+
r"""Response model for a paginated list of ERC-4626 vaults."""
|
|
12
|
+
|
|
13
|
+
total: int
|
|
14
|
+
offset: int
|
|
15
|
+
limit: int
|
|
16
|
+
vaults: List[VaultInfoTypedDict]
|
|
17
|
+
r"""A list of vault information objects."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class VaultsResponse(BaseModel):
|
|
21
|
+
r"""Response model for a paginated list of ERC-4626 vaults."""
|
|
22
|
+
|
|
23
|
+
total: int
|
|
24
|
+
|
|
25
|
+
offset: int
|
|
26
|
+
|
|
27
|
+
limit: int
|
|
28
|
+
|
|
29
|
+
vaults: List[VaultInfo]
|
|
30
|
+
r"""A list of vault information objects."""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import Literal
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class VaultVenueTypedDict(TypedDict):
|
|
13
|
+
vault_address: str
|
|
14
|
+
r"""The vault address you are interacting with for this action."""
|
|
15
|
+
type: Literal["VAULT"]
|
|
16
|
+
r"""The venue type discriminator."""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class VaultVenue(BaseModel):
|
|
20
|
+
vault_address: str
|
|
21
|
+
r"""The vault address you are interacting with for this action."""
|
|
22
|
+
|
|
23
|
+
TYPE: Annotated[
|
|
24
|
+
Annotated[Literal["VAULT"], AfterValidator(validate_const("VAULT"))],
|
|
25
|
+
pydantic.Field(alias="type"),
|
|
26
|
+
] = "VAULT"
|
|
27
|
+
r"""The venue type discriminator."""
|
|
@@ -34,6 +34,8 @@ class VaultWithdrawRequestTypedDict(TypedDict):
|
|
|
34
34
|
action_type: Literal["VAULT_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 VaultWithdrawRequest(BaseModel):
|
|
@@ -59,9 +61,12 @@ class VaultWithdrawRequest(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
|
|