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
|
@@ -13,7 +13,9 @@ from pydantic import model_serializer
|
|
|
13
13
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsVaultStateTypedDict(
|
|
17
|
+
TypedDict
|
|
18
|
+
):
|
|
17
19
|
id: str
|
|
18
20
|
apy: float
|
|
19
21
|
net_apy: float
|
|
@@ -23,7 +25,7 @@ class CompassAPIBackendModelsMorphoReadResponseGetVaultsVaultStateTypedDict(Type
|
|
|
23
25
|
total_assets_usd: NotRequired[Nullable[float]]
|
|
24
26
|
|
|
25
27
|
|
|
26
|
-
class
|
|
28
|
+
class CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsVaultState(BaseModel):
|
|
27
29
|
id: str
|
|
28
30
|
|
|
29
31
|
apy: float
|
|
@@ -12,7 +12,7 @@ from pydantic import model_serializer
|
|
|
12
12
|
from typing_extensions import NotRequired, TypedDict
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class CompassAPIBackendV1ModelsPendleReadResponseMarketUserPositionTypedDict(TypedDict):
|
|
16
16
|
claimable_yield: str
|
|
17
17
|
r"""The amount of yield that can be claimed in the underlying token."""
|
|
18
18
|
sy_balance: str
|
|
@@ -29,7 +29,7 @@ class CompassAPIBackendModelsPendleReadResponseMarketUserPositionTypedDict(Typed
|
|
|
29
29
|
r"""The amount of accounting assets the user currently holds."""
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
class
|
|
32
|
+
class CompassAPIBackendV1ModelsPendleReadResponseMarketUserPosition(BaseModel):
|
|
33
33
|
claimable_yield: str
|
|
34
34
|
r"""The amount of yield that can be claimed in the underlying token."""
|
|
35
35
|
|
|
@@ -5,14 +5,14 @@ from compass_api_sdk.types import BaseModel
|
|
|
5
5
|
from typing_extensions import TypedDict
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class
|
|
8
|
+
class CompassAPIBackendV1ModelsPendleReadResponsePositionsTokenBalanceTypedDict(
|
|
9
9
|
TypedDict
|
|
10
10
|
):
|
|
11
11
|
valuation: float
|
|
12
12
|
balance: str
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class CompassAPIBackendV1ModelsPendleReadResponsePositionsTokenBalance(BaseModel):
|
|
16
16
|
valuation: float
|
|
17
17
|
|
|
18
18
|
balance: str
|
|
@@ -5,14 +5,14 @@ from compass_api_sdk.types import BaseModel
|
|
|
5
5
|
from typing_extensions import TypedDict
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class
|
|
8
|
+
class CompassAPIBackendV1ModelsVaultsReadResponseVaultUserPositionTypedDict(TypedDict):
|
|
9
9
|
amount_of_shares: str
|
|
10
10
|
r"""The number of vault share tokens representing the user’s proportional ownership of the assets in the vault."""
|
|
11
11
|
amount_in_underlying_token: str
|
|
12
12
|
r"""The equivalent value of the user’s vault shares, denominated in the vault’s underlying asset (deposit token)."""
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class CompassAPIBackendV1ModelsVaultsReadResponseVaultUserPosition(BaseModel):
|
|
16
16
|
amount_of_shares: str
|
|
17
17
|
r"""The number of vault share tokens representing the user’s proportional ownership of the assets in the vault."""
|
|
18
18
|
|
compass_api_sdk/models/compass_api_backend_v1_models_wildcat_read_response_market_userposition.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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 CompassAPIBackendV1ModelsWildcatReadResponseMarketUserPositionTypedDict(
|
|
9
|
+
TypedDict
|
|
10
|
+
):
|
|
11
|
+
market_token_balance: str
|
|
12
|
+
r"""The quantity of market share tokens the user holds."""
|
|
13
|
+
underlying_token_balance: str
|
|
14
|
+
r"""The total current value of the user's market tokens, denominated in the underlying asset."""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CompassAPIBackendV1ModelsWildcatReadResponseMarketUserPosition(BaseModel):
|
|
18
|
+
market_token_balance: str
|
|
19
|
+
r"""The quantity of market share tokens the user holds."""
|
|
20
|
+
|
|
21
|
+
underlying_token_balance: str
|
|
22
|
+
r"""The total current value of the user's market tokens, denominated in the underlying asset."""
|
compass_api_sdk/models/compass_api_backend_v2_models_earn_read_response_positions_vaultposition.py
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .depositevent import DepositEvent, DepositEventTypedDict
|
|
5
|
+
from .positionpnl import PositionPnL, PositionPnLTypedDict
|
|
6
|
+
from .withdrawalevent import WithdrawalEvent, WithdrawalEventTypedDict
|
|
7
|
+
from compass_api_sdk.types import (
|
|
8
|
+
BaseModel,
|
|
9
|
+
Nullable,
|
|
10
|
+
OptionalNullable,
|
|
11
|
+
UNSET,
|
|
12
|
+
UNSET_SENTINEL,
|
|
13
|
+
)
|
|
14
|
+
from compass_api_sdk.utils import validate_const
|
|
15
|
+
import pydantic
|
|
16
|
+
from pydantic import model_serializer
|
|
17
|
+
from pydantic.functional_validators import AfterValidator
|
|
18
|
+
from typing import List, Literal, Optional
|
|
19
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPositionTypedDict(
|
|
23
|
+
TypedDict
|
|
24
|
+
):
|
|
25
|
+
r"""ERC-4626 vault position."""
|
|
26
|
+
|
|
27
|
+
vault_address: str
|
|
28
|
+
r"""The vault address."""
|
|
29
|
+
vault_name: str
|
|
30
|
+
r"""Name of the vault token (share token)."""
|
|
31
|
+
underlying_symbol: str
|
|
32
|
+
r"""Symbol of the underlying token (e.g., USDC)."""
|
|
33
|
+
balance: str
|
|
34
|
+
r"""The user's position value in underlying token."""
|
|
35
|
+
type: Literal["VAULT"]
|
|
36
|
+
r"""The market type discriminator."""
|
|
37
|
+
pnl: NotRequired[Nullable[PositionPnLTypedDict]]
|
|
38
|
+
r"""PnL metrics for this position."""
|
|
39
|
+
deposits: NotRequired[List[DepositEventTypedDict]]
|
|
40
|
+
r"""All deposit events for this position."""
|
|
41
|
+
withdrawals: NotRequired[List[WithdrawalEventTypedDict]]
|
|
42
|
+
r"""All withdrawal events for this position."""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition(BaseModel):
|
|
46
|
+
r"""ERC-4626 vault position."""
|
|
47
|
+
|
|
48
|
+
vault_address: str
|
|
49
|
+
r"""The vault address."""
|
|
50
|
+
|
|
51
|
+
vault_name: str
|
|
52
|
+
r"""Name of the vault token (share token)."""
|
|
53
|
+
|
|
54
|
+
underlying_symbol: str
|
|
55
|
+
r"""Symbol of the underlying token (e.g., USDC)."""
|
|
56
|
+
|
|
57
|
+
balance: str
|
|
58
|
+
r"""The user's position value in underlying token."""
|
|
59
|
+
|
|
60
|
+
TYPE: Annotated[
|
|
61
|
+
Annotated[Literal["VAULT"], AfterValidator(validate_const("VAULT"))],
|
|
62
|
+
pydantic.Field(alias="type"),
|
|
63
|
+
] = "VAULT"
|
|
64
|
+
r"""The market type discriminator."""
|
|
65
|
+
|
|
66
|
+
pnl: OptionalNullable[PositionPnL] = UNSET
|
|
67
|
+
r"""PnL metrics for this position."""
|
|
68
|
+
|
|
69
|
+
deposits: Optional[List[DepositEvent]] = None
|
|
70
|
+
r"""All deposit events for this position."""
|
|
71
|
+
|
|
72
|
+
withdrawals: Optional[List[WithdrawalEvent]] = None
|
|
73
|
+
r"""All withdrawal events for this position."""
|
|
74
|
+
|
|
75
|
+
@model_serializer(mode="wrap")
|
|
76
|
+
def serialize_model(self, handler):
|
|
77
|
+
optional_fields = ["pnl", "deposits", "withdrawals"]
|
|
78
|
+
nullable_fields = ["pnl"]
|
|
79
|
+
null_default_fields = []
|
|
80
|
+
|
|
81
|
+
serialized = handler(self)
|
|
82
|
+
|
|
83
|
+
m = {}
|
|
84
|
+
|
|
85
|
+
for n, f in type(self).model_fields.items():
|
|
86
|
+
k = f.alias or n
|
|
87
|
+
val = serialized.get(k)
|
|
88
|
+
serialized.pop(k, None)
|
|
89
|
+
|
|
90
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
91
|
+
is_set = (
|
|
92
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
93
|
+
or k in null_default_fields
|
|
94
|
+
) # pylint: disable=no-member
|
|
95
|
+
|
|
96
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
97
|
+
m[k] = val
|
|
98
|
+
elif val != UNSET_SENTINEL and (
|
|
99
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
100
|
+
):
|
|
101
|
+
m[k] = val
|
|
102
|
+
|
|
103
|
+
return m
|
|
@@ -0,0 +1,36 @@
|
|
|
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 CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712DomainTypedDict(
|
|
13
|
+
TypedDict
|
|
14
|
+
):
|
|
15
|
+
chain_id: int
|
|
16
|
+
r"""EVM chain ID"""
|
|
17
|
+
verifying_contract: str
|
|
18
|
+
r"""Permit2 contract address"""
|
|
19
|
+
name: Literal["Permit2"]
|
|
20
|
+
r"""Must be 'Permit2'"""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain(BaseModel):
|
|
24
|
+
chain_id: Annotated[int, pydantic.Field(alias="chainId")]
|
|
25
|
+
r"""EVM chain ID"""
|
|
26
|
+
|
|
27
|
+
verifying_contract: Annotated[str, pydantic.Field(alias="verifyingContract")]
|
|
28
|
+
r"""Permit2 contract address"""
|
|
29
|
+
|
|
30
|
+
NAME: Annotated[
|
|
31
|
+
Annotated[
|
|
32
|
+
Optional[Literal["Permit2"]], AfterValidator(validate_const("Permit2"))
|
|
33
|
+
],
|
|
34
|
+
pydantic.Field(alias="name"),
|
|
35
|
+
] = "Permit2"
|
|
36
|
+
r"""Must be 'Permit2'"""
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .eip712field import Eip712Field, Eip712FieldTypedDict
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
import pydantic
|
|
7
|
+
from typing import List, Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712TypesTypedDict(
|
|
12
|
+
TypedDict
|
|
13
|
+
):
|
|
14
|
+
eip712_domain: NotRequired[List[Eip712FieldTypedDict]]
|
|
15
|
+
r"""Standard EIP-712 domain type"""
|
|
16
|
+
token_permissions: NotRequired[List[Eip712FieldTypedDict]]
|
|
17
|
+
r"""TokenPermissions struct"""
|
|
18
|
+
permit_transfer_from: NotRequired[List[Eip712FieldTypedDict]]
|
|
19
|
+
r"""Main permit message type"""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types(BaseModel):
|
|
23
|
+
eip712_domain: Annotated[
|
|
24
|
+
Optional[List[Eip712Field]], pydantic.Field(alias="EIP712Domain")
|
|
25
|
+
] = None
|
|
26
|
+
r"""Standard EIP-712 domain type"""
|
|
27
|
+
|
|
28
|
+
token_permissions: Annotated[
|
|
29
|
+
Optional[List[Eip712Field]], pydantic.Field(alias="TokenPermissions")
|
|
30
|
+
] = None
|
|
31
|
+
r"""TokenPermissions struct"""
|
|
32
|
+
|
|
33
|
+
permit_transfer_from: Annotated[
|
|
34
|
+
Optional[List[Eip712Field]], pydantic.Field(alias="PermitTransferFrom")
|
|
35
|
+
] = None
|
|
36
|
+
r"""Main permit message type"""
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
import pydantic
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712DomainTypedDict(
|
|
10
|
+
TypedDict
|
|
11
|
+
):
|
|
12
|
+
r"""The EIP-712 domain separator for ERC-20 Permit."""
|
|
13
|
+
|
|
14
|
+
name: str
|
|
15
|
+
r"""Token name"""
|
|
16
|
+
version: str
|
|
17
|
+
r"""Token version (usually '1' or '2')"""
|
|
18
|
+
chain_id: int
|
|
19
|
+
r"""Chain ID"""
|
|
20
|
+
verifying_contract: str
|
|
21
|
+
r"""Token contract address"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain(BaseModel):
|
|
25
|
+
r"""The EIP-712 domain separator for ERC-20 Permit."""
|
|
26
|
+
|
|
27
|
+
name: str
|
|
28
|
+
r"""Token name"""
|
|
29
|
+
|
|
30
|
+
version: str
|
|
31
|
+
r"""Token version (usually '1' or '2')"""
|
|
32
|
+
|
|
33
|
+
chain_id: Annotated[int, pydantic.Field(alias="chainId")]
|
|
34
|
+
r"""Chain ID"""
|
|
35
|
+
|
|
36
|
+
verifying_contract: Annotated[str, pydantic.Field(alias="verifyingContract")]
|
|
37
|
+
r"""Token contract address"""
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .eip712domainfield import Eip712DomainField, Eip712DomainFieldTypedDict
|
|
5
|
+
from .permitfield import PermitField, PermitFieldTypedDict
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
|
+
import pydantic
|
|
8
|
+
from typing import List
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712TypesTypedDict(
|
|
13
|
+
TypedDict
|
|
14
|
+
):
|
|
15
|
+
r"""The type definitions for EIP-712 structured data (ERC-20 Permit)."""
|
|
16
|
+
|
|
17
|
+
eip712_domain: List[Eip712DomainFieldTypedDict]
|
|
18
|
+
r"""EIP712Domain type definition"""
|
|
19
|
+
permit: List[PermitFieldTypedDict]
|
|
20
|
+
r"""Permit type definition"""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types(BaseModel):
|
|
24
|
+
r"""The type definitions for EIP-712 structured data (ERC-20 Permit)."""
|
|
25
|
+
|
|
26
|
+
eip712_domain: Annotated[
|
|
27
|
+
List[Eip712DomainField], pydantic.Field(alias="EIP712Domain")
|
|
28
|
+
]
|
|
29
|
+
r"""EIP712Domain type definition"""
|
|
30
|
+
|
|
31
|
+
permit: Annotated[List[PermitField], pydantic.Field(alias="Permit")]
|
|
32
|
+
r"""Permit type definition"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
import pydantic
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712DomainTypedDict(
|
|
10
|
+
TypedDict
|
|
11
|
+
):
|
|
12
|
+
r"""The EIP-712 domain separator."""
|
|
13
|
+
|
|
14
|
+
chain_id: int
|
|
15
|
+
r"""Chain ID"""
|
|
16
|
+
verifying_contract: str
|
|
17
|
+
r"""Address of the Product Account"""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain(
|
|
21
|
+
BaseModel
|
|
22
|
+
):
|
|
23
|
+
r"""The EIP-712 domain separator."""
|
|
24
|
+
|
|
25
|
+
chain_id: Annotated[int, pydantic.Field(alias="chainId")]
|
|
26
|
+
r"""Chain ID"""
|
|
27
|
+
|
|
28
|
+
verifying_contract: Annotated[str, pydantic.Field(alias="verifyingContract")]
|
|
29
|
+
r"""Address of the Product Account"""
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .eip712domainfield import Eip712DomainField, Eip712DomainFieldTypedDict
|
|
5
|
+
from .safetxfield import SafeTxField, SafeTxFieldTypedDict
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
|
+
import pydantic
|
|
8
|
+
from typing import List
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712TypesTypedDict(
|
|
13
|
+
TypedDict
|
|
14
|
+
):
|
|
15
|
+
r"""The type definitions for EIP-712 structured data."""
|
|
16
|
+
|
|
17
|
+
eip712_domain: List[Eip712DomainFieldTypedDict]
|
|
18
|
+
r"""EIP712Domain type definition"""
|
|
19
|
+
safe_tx: List[SafeTxFieldTypedDict]
|
|
20
|
+
r"""SafeTx type definition"""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types(
|
|
24
|
+
BaseModel
|
|
25
|
+
):
|
|
26
|
+
r"""The type definitions for EIP-712 structured data."""
|
|
27
|
+
|
|
28
|
+
eip712_domain: Annotated[
|
|
29
|
+
List[Eip712DomainField], pydantic.Field(alias="EIP712Domain")
|
|
30
|
+
]
|
|
31
|
+
r"""EIP712Domain type definition"""
|
|
32
|
+
|
|
33
|
+
safe_tx: Annotated[List[SafeTxField], pydantic.Field(alias="SafeTx")]
|
|
34
|
+
r"""SafeTx type definition"""
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
|
7
|
+
from typing_extensions import NotRequired, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CreateAccountRequestChain(str, Enum):
|
|
11
|
+
ARBITRUM = "arbitrum"
|
|
12
|
+
BASE = "base"
|
|
13
|
+
ETHEREUM = "ethereum"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class CreateAccountRequestTypedDict(TypedDict):
|
|
17
|
+
r"""Request to create a compass account."""
|
|
18
|
+
|
|
19
|
+
chain: CreateAccountRequestChain
|
|
20
|
+
sender: str
|
|
21
|
+
r"""The address of the transaction sender."""
|
|
22
|
+
owner: str
|
|
23
|
+
r"""The address that will own and control the compass account"""
|
|
24
|
+
estimate_gas: NotRequired[bool]
|
|
25
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class CreateAccountRequest(BaseModel):
|
|
29
|
+
r"""Request to create a compass account."""
|
|
30
|
+
|
|
31
|
+
chain: CreateAccountRequestChain
|
|
32
|
+
|
|
33
|
+
sender: str
|
|
34
|
+
r"""The address of the transaction sender."""
|
|
35
|
+
|
|
36
|
+
owner: str
|
|
37
|
+
r"""The address that will own and control the compass account"""
|
|
38
|
+
|
|
39
|
+
estimate_gas: Optional[bool] = None
|
|
40
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -0,0 +1,56 @@
|
|
|
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, Nullable, UNSET_SENTINEL
|
|
6
|
+
from pydantic import model_serializer
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CreateAccountResponseTypedDict(TypedDict):
|
|
11
|
+
r"""Response containing unsigned transaction to create compass Earn account."""
|
|
12
|
+
|
|
13
|
+
transaction: Nullable[UnsignedTransactionTypedDict]
|
|
14
|
+
r"""Transaction to create compass account"""
|
|
15
|
+
earn_account_address: str
|
|
16
|
+
r"""Predicted address of the compass earn account that will be deployed"""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class CreateAccountResponse(BaseModel):
|
|
20
|
+
r"""Response containing unsigned transaction to create compass Earn account."""
|
|
21
|
+
|
|
22
|
+
transaction: Nullable[UnsignedTransaction]
|
|
23
|
+
r"""Transaction to create compass account"""
|
|
24
|
+
|
|
25
|
+
earn_account_address: str
|
|
26
|
+
r"""Predicted address of the compass earn account that will be deployed"""
|
|
27
|
+
|
|
28
|
+
@model_serializer(mode="wrap")
|
|
29
|
+
def serialize_model(self, handler):
|
|
30
|
+
optional_fields = []
|
|
31
|
+
nullable_fields = ["transaction"]
|
|
32
|
+
null_default_fields = []
|
|
33
|
+
|
|
34
|
+
serialized = handler(self)
|
|
35
|
+
|
|
36
|
+
m = {}
|
|
37
|
+
|
|
38
|
+
for n, f in type(self).model_fields.items():
|
|
39
|
+
k = f.alias or n
|
|
40
|
+
val = serialized.get(k)
|
|
41
|
+
serialized.pop(k, None)
|
|
42
|
+
|
|
43
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
44
|
+
is_set = (
|
|
45
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
46
|
+
or k in null_default_fields
|
|
47
|
+
) # pylint: disable=no-member
|
|
48
|
+
|
|
49
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
50
|
+
m[k] = val
|
|
51
|
+
elif val != UNSET_SENTINEL and (
|
|
52
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
53
|
+
):
|
|
54
|
+
m[k] = val
|
|
55
|
+
|
|
56
|
+
return m
|
|
@@ -0,0 +1,61 @@
|
|
|
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 DepositEventTypedDict(TypedDict):
|
|
9
|
+
r"""Historical deposit event for position transparency.
|
|
10
|
+
|
|
11
|
+
Uses generic input/output format that works across all protocols:
|
|
12
|
+
- Vault: input=underlying, output=shares
|
|
13
|
+
- Aave: input=underlying, output=aTokens
|
|
14
|
+
- Pendle: input=token (varies), output=PT
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
block_number: int
|
|
18
|
+
r"""Block number when deposit occurred"""
|
|
19
|
+
transaction_hash: str
|
|
20
|
+
r"""Transaction hash of the deposit"""
|
|
21
|
+
input_amount: str
|
|
22
|
+
r"""Amount deposited (underlying asset or swap token)"""
|
|
23
|
+
input_symbol: str
|
|
24
|
+
r"""Symbol of token deposited"""
|
|
25
|
+
output_amount: str
|
|
26
|
+
r"""Units received (shares, aTokens, or PT)"""
|
|
27
|
+
output_symbol: str
|
|
28
|
+
r"""Symbol of units received"""
|
|
29
|
+
cost_per_unit: str
|
|
30
|
+
r"""Cost basis per unit at time of deposit"""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class DepositEvent(BaseModel):
|
|
34
|
+
r"""Historical deposit event for position transparency.
|
|
35
|
+
|
|
36
|
+
Uses generic input/output format that works across all protocols:
|
|
37
|
+
- Vault: input=underlying, output=shares
|
|
38
|
+
- Aave: input=underlying, output=aTokens
|
|
39
|
+
- Pendle: input=token (varies), output=PT
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
block_number: int
|
|
43
|
+
r"""Block number when deposit occurred"""
|
|
44
|
+
|
|
45
|
+
transaction_hash: str
|
|
46
|
+
r"""Transaction hash of the deposit"""
|
|
47
|
+
|
|
48
|
+
input_amount: str
|
|
49
|
+
r"""Amount deposited (underlying asset or swap token)"""
|
|
50
|
+
|
|
51
|
+
input_symbol: str
|
|
52
|
+
r"""Symbol of token deposited"""
|
|
53
|
+
|
|
54
|
+
output_amount: str
|
|
55
|
+
r"""Units received (shares, aTokens, or PT)"""
|
|
56
|
+
|
|
57
|
+
output_symbol: str
|
|
58
|
+
r"""Symbol of units received"""
|
|
59
|
+
|
|
60
|
+
cost_per_unit: str
|
|
61
|
+
r"""Cost basis per unit at time of deposit"""
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
class DepositForBurnRequestChain(str, Enum):
|
|
11
|
+
r"""The source chain where USDC will be burned."""
|
|
12
|
+
|
|
13
|
+
ETHEREUM = "ethereum"
|
|
14
|
+
ARBITRUM = "arbitrum"
|
|
15
|
+
BASE = "base"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
DepositForBurnRequestAmountTypedDict = TypeAliasType(
|
|
19
|
+
"DepositForBurnRequestAmountTypedDict", Union[float, str]
|
|
20
|
+
)
|
|
21
|
+
r"""The amount of USDC to bridge (in token units, e.g., 100.5 for 100.5 USDC)."""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
DepositForBurnRequestAmount = TypeAliasType(
|
|
25
|
+
"DepositForBurnRequestAmount", Union[float, str]
|
|
26
|
+
)
|
|
27
|
+
r"""The amount of USDC to bridge (in token units, e.g., 100.5 for 100.5 USDC)."""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class DestinationChain(str, Enum):
|
|
31
|
+
r"""The destination chain where USDC will be minted."""
|
|
32
|
+
|
|
33
|
+
ETHEREUM = "ethereum"
|
|
34
|
+
ARBITRUM = "arbitrum"
|
|
35
|
+
BASE = "base"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class DepositForBurnRequestTransferMode(str, Enum):
|
|
39
|
+
r"""Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'."""
|
|
40
|
+
|
|
41
|
+
FAST = "fast"
|
|
42
|
+
STANDARD = "standard"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class DepositForBurnRequestTypedDict(TypedDict):
|
|
46
|
+
owner: str
|
|
47
|
+
r"""The primary wallet address that owns and controls the Product Account."""
|
|
48
|
+
chain: DepositForBurnRequestChain
|
|
49
|
+
r"""The source chain where USDC will be burned."""
|
|
50
|
+
amount: DepositForBurnRequestAmountTypedDict
|
|
51
|
+
r"""The amount of USDC to bridge (in token units, e.g., 100.5 for 100.5 USDC)."""
|
|
52
|
+
destination_chain: DestinationChain
|
|
53
|
+
r"""The destination chain where USDC will be minted."""
|
|
54
|
+
gas_sponsorship: NotRequired[bool]
|
|
55
|
+
r"""Optionally request gas sponsorship. If set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`)."""
|
|
56
|
+
transfer_mode: NotRequired[DepositForBurnRequestTransferMode]
|
|
57
|
+
r"""Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'."""
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class DepositForBurnRequest(BaseModel):
|
|
61
|
+
owner: str
|
|
62
|
+
r"""The primary wallet address that owns and controls the Product Account."""
|
|
63
|
+
|
|
64
|
+
chain: DepositForBurnRequestChain
|
|
65
|
+
r"""The source chain where USDC will be burned."""
|
|
66
|
+
|
|
67
|
+
amount: DepositForBurnRequestAmount
|
|
68
|
+
r"""The amount of USDC to bridge (in token units, e.g., 100.5 for 100.5 USDC)."""
|
|
69
|
+
|
|
70
|
+
destination_chain: DestinationChain
|
|
71
|
+
r"""The destination chain where USDC will be minted."""
|
|
72
|
+
|
|
73
|
+
gas_sponsorship: Optional[bool] = None
|
|
74
|
+
r"""Optionally request gas sponsorship. If set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`)."""
|
|
75
|
+
|
|
76
|
+
transfer_mode: Optional[DepositForBurnRequestTransferMode] = None
|
|
77
|
+
r"""Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'."""
|