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
|
@@ -0,0 +1,104 @@
|
|
|
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 enum import Enum
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from typing import Optional, Union
|
|
15
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
EarnTransferRequestAmountTypedDict = TypeAliasType(
|
|
19
|
+
"EarnTransferRequestAmountTypedDict", Union[float, str]
|
|
20
|
+
)
|
|
21
|
+
r"""The amount of 'token' to transfer."""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
EarnTransferRequestAmount = TypeAliasType(
|
|
25
|
+
"EarnTransferRequestAmount", Union[float, str]
|
|
26
|
+
)
|
|
27
|
+
r"""The amount of 'token' to transfer."""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class EarnTransferRequestAction(str, Enum):
|
|
31
|
+
r"""Whether you are depositing to or withdrawing from your earn account."""
|
|
32
|
+
|
|
33
|
+
DEPOSIT = "DEPOSIT"
|
|
34
|
+
WITHDRAW = "WITHDRAW"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class EarnTransferRequestTypedDict(TypedDict):
|
|
38
|
+
owner: str
|
|
39
|
+
r"""The owner's wallet address."""
|
|
40
|
+
chain: Chain
|
|
41
|
+
r"""The chain to use."""
|
|
42
|
+
token: str
|
|
43
|
+
r"""The token you would like to transfer."""
|
|
44
|
+
amount: EarnTransferRequestAmountTypedDict
|
|
45
|
+
r"""The amount of 'token' to transfer."""
|
|
46
|
+
action: EarnTransferRequestAction
|
|
47
|
+
r"""Whether you are depositing to or withdrawing from your earn account."""
|
|
48
|
+
gas_sponsorship: NotRequired[bool]
|
|
49
|
+
r"""Optionally request gas sponsorship. If set to `true`, EIP-712 signature data will be returned that must be signed by the `owner` and submitted to the `/gas_sponsorship/prepare` endpoint."""
|
|
50
|
+
spender: NotRequired[Nullable[str]]
|
|
51
|
+
r"""The address of the wallet which will send the transaction. This only needs to be set when `action` is 'DEPOSIT' and `gas_sponsorship` is `true`."""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class EarnTransferRequest(BaseModel):
|
|
55
|
+
owner: str
|
|
56
|
+
r"""The owner's wallet address."""
|
|
57
|
+
|
|
58
|
+
chain: Chain
|
|
59
|
+
r"""The chain to use."""
|
|
60
|
+
|
|
61
|
+
token: str
|
|
62
|
+
r"""The token you would like to transfer."""
|
|
63
|
+
|
|
64
|
+
amount: EarnTransferRequestAmount
|
|
65
|
+
r"""The amount of 'token' to transfer."""
|
|
66
|
+
|
|
67
|
+
action: EarnTransferRequestAction
|
|
68
|
+
r"""Whether you are depositing to or withdrawing from your earn account."""
|
|
69
|
+
|
|
70
|
+
gas_sponsorship: Optional[bool] = None
|
|
71
|
+
r"""Optionally request gas sponsorship. If set to `true`, EIP-712 signature data will be returned that must be signed by the `owner` and submitted to the `/gas_sponsorship/prepare` endpoint."""
|
|
72
|
+
|
|
73
|
+
spender: OptionalNullable[str] = UNSET
|
|
74
|
+
r"""The address of the wallet which will send the transaction. This only needs to be set when `action` is 'DEPOSIT' and `gas_sponsorship` is `true`."""
|
|
75
|
+
|
|
76
|
+
@model_serializer(mode="wrap")
|
|
77
|
+
def serialize_model(self, handler):
|
|
78
|
+
optional_fields = ["gas_sponsorship", "spender"]
|
|
79
|
+
nullable_fields = ["spender"]
|
|
80
|
+
null_default_fields = []
|
|
81
|
+
|
|
82
|
+
serialized = handler(self)
|
|
83
|
+
|
|
84
|
+
m = {}
|
|
85
|
+
|
|
86
|
+
for n, f in type(self).model_fields.items():
|
|
87
|
+
k = f.alias or n
|
|
88
|
+
val = serialized.get(k)
|
|
89
|
+
serialized.pop(k, None)
|
|
90
|
+
|
|
91
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
92
|
+
is_set = (
|
|
93
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
94
|
+
or k in null_default_fields
|
|
95
|
+
) # pylint: disable=no-member
|
|
96
|
+
|
|
97
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
98
|
+
m[k] = val
|
|
99
|
+
elif val != UNSET_SENTINEL and (
|
|
100
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
101
|
+
):
|
|
102
|
+
m[k] = val
|
|
103
|
+
|
|
104
|
+
return m
|
|
@@ -0,0 +1,71 @@
|
|
|
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 .permit2typeddata_output import (
|
|
9
|
+
Permit2TypedDataOutput,
|
|
10
|
+
Permit2TypedDataOutputTypedDict,
|
|
11
|
+
)
|
|
12
|
+
from .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
|
|
13
|
+
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
14
|
+
from pydantic import model_serializer
|
|
15
|
+
from typing import Union
|
|
16
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
EarnTransferResponseEip712TypedDict = TypeAliasType(
|
|
20
|
+
"EarnTransferResponseEip712TypedDict",
|
|
21
|
+
Union[
|
|
22
|
+
BatchedSafeOperationsResponseOutputTypedDict, Permit2TypedDataOutputTypedDict
|
|
23
|
+
],
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
EarnTransferResponseEip712 = TypeAliasType(
|
|
28
|
+
"EarnTransferResponseEip712",
|
|
29
|
+
Union[BatchedSafeOperationsResponseOutput, Permit2TypedDataOutput],
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class EarnTransferResponseTypedDict(TypedDict):
|
|
34
|
+
transaction: Nullable[UnsignedTransactionTypedDict]
|
|
35
|
+
eip_712: Nullable[EarnTransferResponseEip712TypedDict]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class EarnTransferResponse(BaseModel):
|
|
39
|
+
transaction: Nullable[UnsignedTransaction]
|
|
40
|
+
|
|
41
|
+
eip_712: Nullable[EarnTransferResponseEip712]
|
|
42
|
+
|
|
43
|
+
@model_serializer(mode="wrap")
|
|
44
|
+
def serialize_model(self, handler):
|
|
45
|
+
optional_fields = []
|
|
46
|
+
nullable_fields = ["transaction", "eip_712"]
|
|
47
|
+
null_default_fields = []
|
|
48
|
+
|
|
49
|
+
serialized = handler(self)
|
|
50
|
+
|
|
51
|
+
m = {}
|
|
52
|
+
|
|
53
|
+
for n, f in type(self).model_fields.items():
|
|
54
|
+
k = f.alias or n
|
|
55
|
+
val = serialized.get(k)
|
|
56
|
+
serialized.pop(k, None)
|
|
57
|
+
|
|
58
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
59
|
+
is_set = (
|
|
60
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
61
|
+
or k in null_default_fields
|
|
62
|
+
) # pylint: disable=no-member
|
|
63
|
+
|
|
64
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
65
|
+
m[k] = val
|
|
66
|
+
elif val != UNSET_SENTINEL and (
|
|
67
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
68
|
+
):
|
|
69
|
+
m[k] = val
|
|
70
|
+
|
|
71
|
+
return m
|
|
@@ -0,0 +1,20 @@
|
|
|
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 typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Eip712DomainFieldTypedDict(TypedDict):
|
|
9
|
+
r"""A field in the EIP712Domain type definition."""
|
|
10
|
+
|
|
11
|
+
name: str
|
|
12
|
+
type: str
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Eip712DomainField(BaseModel):
|
|
16
|
+
r"""A field in the EIP712Domain type definition."""
|
|
17
|
+
|
|
18
|
+
name: str
|
|
19
|
+
|
|
20
|
+
type: str
|
|
@@ -0,0 +1,20 @@
|
|
|
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 typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Eip712FieldTypedDict(TypedDict):
|
|
9
|
+
name: str
|
|
10
|
+
r"""Field name in the struct"""
|
|
11
|
+
type: str
|
|
12
|
+
r"""EVM type (e.g., address, uint256, TokenPermissions)"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Eip712Field(BaseModel):
|
|
16
|
+
name: str
|
|
17
|
+
r"""Field name in the struct"""
|
|
18
|
+
|
|
19
|
+
type: str
|
|
20
|
+
r"""EVM type (e.g., address, uint256, TokenPermissions)"""
|
|
@@ -42,6 +42,8 @@ class EthenaDepositRequestTypedDict(TypedDict):
|
|
|
42
42
|
action_type: Literal["ETHENA_DEPOSIT"]
|
|
43
43
|
receiver: NotRequired[Nullable[str]]
|
|
44
44
|
r"""The address which will receive the shares (sUSDe) from Ethena's vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
45
|
+
estimate_gas: NotRequired[bool]
|
|
46
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
45
47
|
|
|
46
48
|
|
|
47
49
|
class EthenaDepositRequest(BaseModel):
|
|
@@ -64,9 +66,12 @@ class EthenaDepositRequest(BaseModel):
|
|
|
64
66
|
receiver: OptionalNullable[str] = UNSET
|
|
65
67
|
r"""The address which will receive the shares (sUSDe) from Ethena's vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
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 = ["action_type", "receiver"]
|
|
74
|
+
optional_fields = ["action_type", "receiver", "estimate_gas"]
|
|
70
75
|
nullable_fields = ["receiver"]
|
|
71
76
|
null_default_fields = []
|
|
72
77
|
|
|
@@ -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 .cooldownposition import CooldownPosition, CooldownPositionTypedDict
|
|
10
10
|
from .underlyingtoken import UnderlyingToken, UnderlyingTokenTypedDict
|
|
@@ -37,7 +37,7 @@ class EthenaGetVaultResponseTypedDict(TypedDict):
|
|
|
37
37
|
cooldown_duration_days: int
|
|
38
38
|
r"""The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made."""
|
|
39
39
|
user_position: NotRequired[
|
|
40
|
-
Nullable[
|
|
40
|
+
Nullable[CompassAPIBackendV1ModelsVaultsReadResponseVaultUserPositionTypedDict]
|
|
41
41
|
]
|
|
42
42
|
r"""The user's position in the vault."""
|
|
43
43
|
cooldown_position: NotRequired[Nullable[CooldownPositionTypedDict]]
|
|
@@ -71,7 +71,7 @@ class EthenaGetVaultResponse(BaseModel):
|
|
|
71
71
|
r"""The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made."""
|
|
72
72
|
|
|
73
73
|
user_position: OptionalNullable[
|
|
74
|
-
|
|
74
|
+
CompassAPIBackendV1ModelsVaultsReadResponseVaultUserPosition
|
|
75
75
|
] = UNSET
|
|
76
76
|
r"""The user's position in the vault."""
|
|
77
77
|
|
|
@@ -7,7 +7,7 @@ from enum import Enum
|
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Any, Literal, Optional
|
|
10
|
-
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class EthenaRequestToWithdrawRequestChain(str, Enum):
|
|
@@ -21,6 +21,8 @@ class EthenaRequestToWithdrawRequestTypedDict(TypedDict):
|
|
|
21
21
|
sender: str
|
|
22
22
|
r"""The address of the transaction sender."""
|
|
23
23
|
action_type: Literal["ETHENA_REQUEST_WITHDRAW"]
|
|
24
|
+
estimate_gas: NotRequired[bool]
|
|
25
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
24
26
|
|
|
25
27
|
|
|
26
28
|
class EthenaRequestToWithdrawRequest(BaseModel):
|
|
@@ -39,3 +41,6 @@ class EthenaRequestToWithdrawRequest(BaseModel):
|
|
|
39
41
|
],
|
|
40
42
|
pydantic.Field(alias="action_type"),
|
|
41
43
|
] = "ETHENA_REQUEST_WITHDRAW"
|
|
44
|
+
|
|
45
|
+
estimate_gas: Optional[bool] = None
|
|
46
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -28,6 +28,8 @@ class EthenaUnstakeRequestTypedDict(TypedDict):
|
|
|
28
28
|
action_type: Literal["ETHENA_UNSTAKE"]
|
|
29
29
|
receiver: NotRequired[Nullable[str]]
|
|
30
30
|
r"""The address which will receive the unstaked USDe. Defaults to the sender."""
|
|
31
|
+
estimate_gas: NotRequired[bool]
|
|
32
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
31
33
|
|
|
32
34
|
|
|
33
35
|
class EthenaUnstakeRequest(BaseModel):
|
|
@@ -47,9 +49,12 @@ class EthenaUnstakeRequest(BaseModel):
|
|
|
47
49
|
receiver: OptionalNullable[str] = UNSET
|
|
48
50
|
r"""The address which will receive the unstaked USDe. Defaults to the sender."""
|
|
49
51
|
|
|
52
|
+
estimate_gas: Optional[bool] = None
|
|
53
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
54
|
+
|
|
50
55
|
@model_serializer(mode="wrap")
|
|
51
56
|
def serialize_model(self, handler):
|
|
52
|
-
optional_fields = ["action_type", "receiver"]
|
|
57
|
+
optional_fields = ["action_type", "receiver", "estimate_gas"]
|
|
53
58
|
nullable_fields = ["receiver"]
|
|
54
59
|
null_default_fields = []
|
|
55
60
|
|
|
@@ -0,0 +1,43 @@
|
|
|
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 enum import Enum
|
|
6
|
+
from typing import Optional, Union
|
|
7
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
FeeAmountTypedDict = TypeAliasType("FeeAmountTypedDict", Union[float, str])
|
|
11
|
+
r"""The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit)."""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
FeeAmount = TypeAliasType("FeeAmount", Union[float, str])
|
|
15
|
+
r"""The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit)."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Denomination(str, Enum):
|
|
19
|
+
r"""The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit)."""
|
|
20
|
+
|
|
21
|
+
PERCENTAGE = "PERCENTAGE"
|
|
22
|
+
FIXED = "FIXED"
|
|
23
|
+
PERFORMANCE = "PERFORMANCE"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class FeeTypedDict(TypedDict):
|
|
27
|
+
recipient: str
|
|
28
|
+
r"""The wallet address that will receive the fee."""
|
|
29
|
+
amount: FeeAmountTypedDict
|
|
30
|
+
r"""The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit)."""
|
|
31
|
+
denomination: NotRequired[Denomination]
|
|
32
|
+
r"""The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit)."""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class Fee(BaseModel):
|
|
36
|
+
recipient: str
|
|
37
|
+
r"""The wallet address that will receive the fee."""
|
|
38
|
+
|
|
39
|
+
amount: FeeAmount
|
|
40
|
+
r"""The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit)."""
|
|
41
|
+
|
|
42
|
+
denomination: Optional[Denomination] = None
|
|
43
|
+
r"""The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit)."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .tokenmarketdata import TokenMarketData, TokenMarketDataTypedDict
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from typing import Dict
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ListAaveMarketsResponseTypedDict(TypedDict):
|
|
11
|
+
r"""Response containing Aave market rates organized by token symbol."""
|
|
12
|
+
|
|
13
|
+
markets: Dict[str, TokenMarketDataTypedDict]
|
|
14
|
+
r"""Market data keyed by token symbol. Each token contains chain-specific data and information about which chain has the highest supply APY."""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ListAaveMarketsResponse(BaseModel):
|
|
18
|
+
r"""Response containing Aave market rates organized by token symbol."""
|
|
19
|
+
|
|
20
|
+
markets: Dict[str, TokenMarketData]
|
|
21
|
+
r"""Market data keyed by token symbol. Each token contains chain-specific data and information about which chain has the highest supply APY."""
|
|
@@ -1,9 +1,9 @@
|
|
|
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_marketstate import (
|
|
5
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionMarketState,
|
|
6
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionMarketStateTypedDict,
|
|
7
7
|
)
|
|
8
8
|
from .market import Market, MarketTypedDict
|
|
9
9
|
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
@@ -17,7 +17,7 @@ class MarketPositionTypedDict(TypedDict):
|
|
|
17
17
|
health_factor: Nullable[str]
|
|
18
18
|
price_variation_to_liquidation_price: Nullable[str]
|
|
19
19
|
state: (
|
|
20
|
-
|
|
20
|
+
CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionMarketStateTypedDict
|
|
21
21
|
)
|
|
22
22
|
|
|
23
23
|
|
|
@@ -30,7 +30,7 @@ class MarketPosition(BaseModel):
|
|
|
30
30
|
Nullable[str], pydantic.Field(alias="priceVariationToLiquidationPrice")
|
|
31
31
|
]
|
|
32
32
|
|
|
33
|
-
state:
|
|
33
|
+
state: CompassAPIBackendV1ModelsMorphoReadResponseCheckUserPositionMarketState
|
|
34
34
|
|
|
35
35
|
@model_serializer(mode="wrap")
|
|
36
36
|
def serialize_model(self, handler):
|
|
@@ -0,0 +1,34 @@
|
|
|
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 typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class MaxSupplyApyInfoTypedDict(TypedDict):
|
|
9
|
+
r"""Information about the chain with the highest supply APY for a token."""
|
|
10
|
+
|
|
11
|
+
chain: str
|
|
12
|
+
r"""Chain name with the highest supply APY for this token."""
|
|
13
|
+
address: str
|
|
14
|
+
r"""Token contract address on the chain with highest supply APY."""
|
|
15
|
+
supply_apy: str
|
|
16
|
+
r"""The highest supply APY for this token across all chains, in percentage."""
|
|
17
|
+
borrow_apy: str
|
|
18
|
+
r"""Borrow APY on the chain with the highest supply APY, in percentage."""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class MaxSupplyApyInfo(BaseModel):
|
|
22
|
+
r"""Information about the chain with the highest supply APY for a token."""
|
|
23
|
+
|
|
24
|
+
chain: str
|
|
25
|
+
r"""Chain name with the highest supply APY for this token."""
|
|
26
|
+
|
|
27
|
+
address: str
|
|
28
|
+
r"""Token contract address on the chain with highest supply APY."""
|
|
29
|
+
|
|
30
|
+
supply_apy: str
|
|
31
|
+
r"""The highest supply APY for this token across all chains, in percentage."""
|
|
32
|
+
|
|
33
|
+
borrow_apy: str
|
|
34
|
+
r"""Borrow APY on the chain with the highest supply APY, in percentage."""
|
|
@@ -0,0 +1,46 @@
|
|
|
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, Optional
|
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class MintPrepareCompletedResponseTypedDict(TypedDict):
|
|
13
|
+
r"""Response when the bridge has already been completed (minted).
|
|
14
|
+
|
|
15
|
+
This means someone has already called receiveMessage on the destination chain to
|
|
16
|
+
mint the USDC. No further action is required.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
bridge_id: str
|
|
20
|
+
r"""The bridge identifier."""
|
|
21
|
+
status: Literal["completed"]
|
|
22
|
+
r"""Indicates the bridge has already been completed and USDC minted."""
|
|
23
|
+
message: NotRequired[str]
|
|
24
|
+
r"""Human-readable message explaining the status."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class MintPrepareCompletedResponse(BaseModel):
|
|
28
|
+
r"""Response when the bridge has already been completed (minted).
|
|
29
|
+
|
|
30
|
+
This means someone has already called receiveMessage on the destination chain to
|
|
31
|
+
mint the USDC. No further action is required.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
bridge_id: str
|
|
35
|
+
r"""The bridge identifier."""
|
|
36
|
+
|
|
37
|
+
STATUS: Annotated[
|
|
38
|
+
Annotated[
|
|
39
|
+
Optional[Literal["completed"]], AfterValidator(validate_const("completed"))
|
|
40
|
+
],
|
|
41
|
+
pydantic.Field(alias="status"),
|
|
42
|
+
] = "completed"
|
|
43
|
+
r"""Indicates the bridge has already been completed and USDC minted."""
|
|
44
|
+
|
|
45
|
+
message: Optional[str] = None
|
|
46
|
+
r"""Human-readable message explaining the status."""
|
|
@@ -0,0 +1,65 @@
|
|
|
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, Optional
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class MintPreparePendingResponseTypedDict(TypedDict):
|
|
13
|
+
r"""Response when attestation is not yet ready.
|
|
14
|
+
|
|
15
|
+
Returned with 202 Accepted status code. The client should either:
|
|
16
|
+
- Connect to the SSE stream for real-time updates
|
|
17
|
+
- Poll the status endpoint periodically
|
|
18
|
+
- Call /mint/prepare again after some time
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
bridge_id: str
|
|
22
|
+
r"""The bridge identifier."""
|
|
23
|
+
message_hash: str
|
|
24
|
+
r"""The CCTP message hash being polled for attestation."""
|
|
25
|
+
sse_url: str
|
|
26
|
+
r"""SSE endpoint URL for real-time attestation updates."""
|
|
27
|
+
status_url: str
|
|
28
|
+
r"""HTTP endpoint URL for polling bridge status."""
|
|
29
|
+
estimated_wait_seconds: int
|
|
30
|
+
r"""Estimated wait time in seconds. Fast mode is typically ~30 seconds, standard mode is 15-19 minutes."""
|
|
31
|
+
status: Literal["pending"]
|
|
32
|
+
r"""Indicates the attestation is still being awaited."""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class MintPreparePendingResponse(BaseModel):
|
|
36
|
+
r"""Response when attestation is not yet ready.
|
|
37
|
+
|
|
38
|
+
Returned with 202 Accepted status code. The client should either:
|
|
39
|
+
- Connect to the SSE stream for real-time updates
|
|
40
|
+
- Poll the status endpoint periodically
|
|
41
|
+
- Call /mint/prepare again after some time
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
bridge_id: str
|
|
45
|
+
r"""The bridge identifier."""
|
|
46
|
+
|
|
47
|
+
message_hash: str
|
|
48
|
+
r"""The CCTP message hash being polled for attestation."""
|
|
49
|
+
|
|
50
|
+
sse_url: str
|
|
51
|
+
r"""SSE endpoint URL for real-time attestation updates."""
|
|
52
|
+
|
|
53
|
+
status_url: str
|
|
54
|
+
r"""HTTP endpoint URL for polling bridge status."""
|
|
55
|
+
|
|
56
|
+
estimated_wait_seconds: int
|
|
57
|
+
r"""Estimated wait time in seconds. Fast mode is typically ~30 seconds, standard mode is 15-19 minutes."""
|
|
58
|
+
|
|
59
|
+
STATUS: Annotated[
|
|
60
|
+
Annotated[
|
|
61
|
+
Optional[Literal["pending"]], AfterValidator(validate_const("pending"))
|
|
62
|
+
],
|
|
63
|
+
pydantic.Field(alias="status"),
|
|
64
|
+
] = "pending"
|
|
65
|
+
r"""Indicates the attestation is still being awaited."""
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional
|
|
10
|
+
from typing_extensions import Annotated, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class MintPrepareReadyResponseTypedDict(TypedDict):
|
|
14
|
+
r"""Response when attestation is ready and mint transaction can be built.
|
|
15
|
+
|
|
16
|
+
Returned with 200 OK status code. Contains an unsigned transaction that calls
|
|
17
|
+
receiveMessage on the MessageTransmitter contract.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
bridge_id: str
|
|
21
|
+
r"""The bridge identifier."""
|
|
22
|
+
transaction: UnsignedTransactionTypedDict
|
|
23
|
+
status: Literal["ready"]
|
|
24
|
+
r"""Indicates the attestation is ready and mint transaction is available."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class MintPrepareReadyResponse(BaseModel):
|
|
28
|
+
r"""Response when attestation is ready and mint transaction can be built.
|
|
29
|
+
|
|
30
|
+
Returned with 200 OK status code. Contains an unsigned transaction that calls
|
|
31
|
+
receiveMessage on the MessageTransmitter contract.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
bridge_id: str
|
|
35
|
+
r"""The bridge identifier."""
|
|
36
|
+
|
|
37
|
+
transaction: UnsignedTransaction
|
|
38
|
+
|
|
39
|
+
STATUS: Annotated[
|
|
40
|
+
Annotated[Optional[Literal["ready"]], AfterValidator(validate_const("ready"))],
|
|
41
|
+
pydantic.Field(alias="status"),
|
|
42
|
+
] = "ready"
|
|
43
|
+
r"""Indicates the attestation is ready and mint transaction is available."""
|
|
@@ -0,0 +1,25 @@
|
|
|
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 typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class MintPrepareRequestTypedDict(TypedDict):
|
|
9
|
+
bridge_id: str
|
|
10
|
+
r"""The bridge identifier returned from /burn endpoint. This is used to look up the bridge session."""
|
|
11
|
+
burn_tx_hash: str
|
|
12
|
+
r"""The transaction hash of the burn transaction on the source chain. This is used to find the DepositForBurn event and extract the CCTP message."""
|
|
13
|
+
sender: str
|
|
14
|
+
r"""The wallet address that will sign and send the mint transaction. This can be any wallet, the receiver of the minted USDC is not determined by this sender."""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class MintPrepareRequest(BaseModel):
|
|
18
|
+
bridge_id: str
|
|
19
|
+
r"""The bridge identifier returned from /burn endpoint. This is used to look up the bridge session."""
|
|
20
|
+
|
|
21
|
+
burn_tx_hash: str
|
|
22
|
+
r"""The transaction hash of the burn transaction on the source chain. This is used to find the DepositForBurn event and extract the CCTP message."""
|
|
23
|
+
|
|
24
|
+
sender: str
|
|
25
|
+
r"""The wallet address that will sign and send the mint transaction. This can be any wallet, the receiver of the minted USDC is not determined by this sender."""
|
|
@@ -48,6 +48,8 @@ class MorphoBorrowRequestTypedDict(TypedDict):
|
|
|
48
48
|
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
49
49
|
receiver: NotRequired[Nullable[str]]
|
|
50
50
|
r"""The address of the receiver of the tokens borrowed. Defaults to the transaction 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 MorphoBorrowRequest(BaseModel):
|
|
@@ -76,9 +78,12 @@ class MorphoBorrowRequest(BaseModel):
|
|
|
76
78
|
receiver: OptionalNullable[str] = UNSET
|
|
77
79
|
r"""The address of the receiver of the tokens borrowed. Defaults to the transaction 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
|
|