compass_api_sdk 0.9.52__py3-none-any.whl → 1.0.1__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.
Potentially problematic release.
This version of compass_api_sdk might be problematic. Click here for more details.
- compass_api_sdk/_version.py +3 -3
- compass_api_sdk/aave_v3.py +78 -124
- compass_api_sdk/aerodrome_slipstream.py +86 -88
- compass_api_sdk/erc_4626_vaults.py +18 -42
- compass_api_sdk/ethena.py +880 -0
- compass_api_sdk/models/__init__.py +1050 -989
- compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_borrow_aaveborrowrequest.py → aaveborrowrequest.py} +10 -18
- compass_api_sdk/models/aavehistoricaltransactionsresponse.py +65 -0
- compass_api_sdk/models/{compass_api_backend_models_multicall_transact_request_aave_loop_request_aavelooprequest.py → aavelooprequest.py} +5 -11
- compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_repay_aaverepayrequest.py → aaverepayrequest.py} +10 -18
- compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_supply_aavesupplyrequest.py → aavesupplyrequest.py} +10 -18
- compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_withdraw_aavewithdrawrequest.py → aavewithdrawrequest.py} +11 -19
- compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_read_response_positions_aerodromelppositionsresponse.py → aerodromelppositionsresponse.py} +2 -6
- compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_transact_request_swap_buy_exactly_aerodromeslipstreambuyexactlyrequest.py → aerodromeslipstreambuyexactlyrequest.py} +17 -27
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +125 -0
- compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_transact_request_liquidity_provision_mint_aerodromeslipstreammintliquidityprovisionrequest.py → aerodromeslipstreammintliquidityprovisionrequest.py} +33 -39
- compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_transact_request_swap_sell_exactly_aerodromeslipstreamsellexactlyrequest.py → aerodromeslipstreamsellexactlyrequest.py} +17 -27
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +66 -0
- compass_api_sdk/models/batcheduseroperationsrequest.py +36 -0
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_borrow.py → borrow.py} +2 -4
- compass_api_sdk/models/bundlertransactionresponse.py +17 -0
- compass_api_sdk/models/{compass_api_backend_config_chain_chain.py → chain.py} +1 -1
- compass_api_sdk/models/compass_api_backend_models_vaults_read_response_vault_userposition.py +8 -4
- compass_api_sdk/models/cooldownposition.py +35 -0
- compass_api_sdk/models/ethenadepositparams.py +82 -0
- compass_api_sdk/models/ethenadepositrequest.py +95 -0
- compass_api_sdk/models/ethenagetvaultresponse.py +109 -0
- compass_api_sdk/models/ethenarequesttowithdrawparams.py +28 -0
- compass_api_sdk/models/ethenarequesttowithdrawrequest.py +41 -0
- compass_api_sdk/models/ethenarequesttowithdrawtransactionresponse.py +37 -0
- compass_api_sdk/models/ethenawithdrawparams.py +70 -0
- compass_api_sdk/models/ethenawithdrawrequest.py +83 -0
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_liquidationcall.py → liquidationcall.py} +2 -6
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_marketposition.py → marketposition.py} +2 -6
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_borrow_morphoborrowrequest.py → morphoborrowrequest.py} +11 -19
- compass_api_sdk/models/morphocheckuserpositionresponse.py +32 -0
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_deposit_morphodepositrequest.py → morphodepositrequest.py} +11 -23
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_morphogetmarketresponse.py → morphogetmarketresponse.py} +2 -6
- compass_api_sdk/models/morphogetmarketsresponse.py +17 -0
- compass_api_sdk/models/morphogetvaultsresponse.py +17 -0
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_markets_morphomarket.py → morphomarket.py} +2 -4
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_repay_morphorepayrequest.py → morphorepayrequest.py} +5 -9
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_supply_collateral_morphosupplycollateralrequest.py → morphosupplycollateralrequest.py} +11 -19
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vaults_morphovault.py → morphovault.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_withdraw_collateral_morphowithdrawcollateralrequest.py → morphowithdrawcollateralrequest.py} +11 -19
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_withdraw_morphowithdrawrequest.py → morphowithdrawrequest.py} +5 -15
- compass_api_sdk/models/{compass_api_backend_models_multicall_read_request_get_authorization_multicallauthorizationrequest.py → multicallauthorizationrequest.py} +5 -11
- compass_api_sdk/models/{compass_api_backend_models_multicall_transact_request_multicall_execution_request_multicallexecuterequest.py → multicallexecuterequest.py} +8 -21
- compass_api_sdk/models/odosswaprequest.py +90 -0
- compass_api_sdk/models/odostransactionresponse.py +37 -0
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_positions_openposition.py → openposition.py} +2 -4
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_market_pendlegetmarketresponse.py → pendlegetmarketresponse.py} +2 -4
- compass_api_sdk/models/pendlelistmarketsresponse.py +17 -0
- compass_api_sdk/models/pendlelistuserpositionsresponse.py +17 -0
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_markets_pendlemarket.py → pendlemarket.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_pendle_transact_request_redeem_yield_pendleredeemyieldrequest.py → pendleredeemyieldrequest.py} +5 -11
- compass_api_sdk/models/pendletxresponse.py +2 -11
- compass_api_sdk/models/{compass_api_backend_models_generic_read_response_portfolio_portfolio.py → portfolio.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_positions_position.py → position.py} +7 -18
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_redeemunderlying.py → redeemunderlying.py} +2 -6
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_repay.py → repay.py} +2 -4
- compass_api_sdk/models/setallowanceparams.py +1 -0
- compass_api_sdk/models/setallowancerequest.py +113 -0
- compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_buy_skybuyrequest.py → skybuyrequest.py} +13 -18
- compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_deposit_skydepositrequest.py → skydepositrequest.py} +10 -22
- compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_sell_skysellrequest.py → skysellrequest.py} +13 -21
- compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_withdraw_skywithdrawrequest.py → skywithdrawrequest.py} +5 -13
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_supply.py → supply.py} +2 -4
- compass_api_sdk/models/supportedchaininfo.py +19 -0
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_swapborrowrate.py → swapborrowrate.py} +2 -6
- compass_api_sdk/models/token_enum.py +31 -25
- compass_api_sdk/models/tokentransferparams.py +21 -21
- compass_api_sdk/models/tokentransferrequest.py +82 -0
- compass_api_sdk/models/transactionresponse.py +2 -11
- compass_api_sdk/models/{compass_api_backend_models_vaults_read_response_vault_asset.py → underlyingtoken.py} +2 -2
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +111 -0
- compass_api_sdk/models/uniswapbuyexactlytransactionresponse.py +2 -10
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +115 -0
- compass_api_sdk/models/{compass_api_backend_models_uniswap_transact_liquidity_provision_request_mint_uniswapmintliquidityprovisionrequest.py → uniswapmintliquidityprovisionrequest.py} +29 -43
- compass_api_sdk/models/uniswapsellexactlyrequest.py +111 -0
- compass_api_sdk/models/uniswapsellexactlytransactionresponse.py +2 -10
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +67 -0
- compass_api_sdk/models/{compass_api_backend_models_generic_transact_request_unwrap_weth_unwrapwethrequest.py → unwrapwethrequest.py} +10 -22
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_usageascollateral.py → usageascollateral.py} +2 -6
- compass_api_sdk/models/{compass_api_backend_models_multicall_transact_request_multicall_execution_request_useroperation.py → useroperation.py} +27 -25
- compass_api_sdk/models/v1_aave_avg_rateop.py +31 -25
- compass_api_sdk/models/v1_aave_liquidity_changeop.py +31 -25
- compass_api_sdk/models/v1_aave_rateop.py +31 -25
- compass_api_sdk/models/v1_aave_reserve_overviewop.py +31 -25
- compass_api_sdk/models/v1_aave_std_rateop.py +31 -25
- compass_api_sdk/models/v1_aave_token_priceop.py +31 -25
- compass_api_sdk/models/v1_aave_user_position_per_tokenop.py +31 -25
- compass_api_sdk/models/v1_aerodrome_slipstream_pool_priceop.py +62 -50
- compass_api_sdk/models/v1_ethena_vaultop.py +75 -0
- compass_api_sdk/models/v1_generic_allowanceop.py +1 -0
- compass_api_sdk/models/v1_token_addressop.py +31 -25
- compass_api_sdk/models/v1_token_priceop.py +4 -16
- compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +6 -3
- compass_api_sdk/models/v1_uniswap_pool_priceop.py +62 -50
- compass_api_sdk/models/v1_uniswap_quote_buy_exactlyop.py +62 -50
- compass_api_sdk/models/v1_uniswap_quote_sell_exactlyop.py +62 -50
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_vault.py → vault.py} +2 -4
- compass_api_sdk/models/{compass_api_backend_models_vaults_transact_request_deposit_vaultdepositrequest.py → vaultdepositrequest.py} +11 -19
- compass_api_sdk/models/{compass_api_backend_models_vaults_read_response_vault_vaultgetvaultresponse.py → vaultgetvaultresponse.py} +5 -10
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_vaultposition.py → vaultposition.py} +5 -12
- compass_api_sdk/models/{compass_api_backend_models_vaults_transact_request_withdraw_vaultwithdrawrequest.py → vaultwithdrawrequest.py} +5 -11
- compass_api_sdk/models/{compass_api_backend_models_generic_transact_request_wrap_eth_wrapethrequest.py → wrapethrequest.py} +10 -20
- compass_api_sdk/morpho.py +82 -170
- compass_api_sdk/pendle.py +18 -56
- compass_api_sdk/sdk.py +3 -0
- compass_api_sdk/sky.py +56 -106
- compass_api_sdk/smart_account.py +10 -38
- compass_api_sdk/swap.py +16 -30
- compass_api_sdk/token_sdk.py +30 -40
- compass_api_sdk/transaction_bundler.py +26 -74
- compass_api_sdk/uniswap_v3.py +90 -106
- compass_api_sdk/universal.py +44 -92
- {compass_api_sdk-0.9.52.dist-info → compass_api_sdk-1.0.1.dist-info}/METADATA +150 -135
- {compass_api_sdk-0.9.52.dist-info → compass_api_sdk-1.0.1.dist-info}/RECORD +120 -108
- compass_api_sdk/models/compass_api_backend_models_aave_read_response_historical_transactions_aavehistoricaltransactionsresponse.py +0 -115
- compass_api_sdk/models/compass_api_backend_models_aerodrome_slipstream_transact_request_liquidity_provision_increase_aerodromeslipstreamincreaseliquidityprovisionrequest.py +0 -125
- compass_api_sdk/models/compass_api_backend_models_aerodrome_slipstream_transact_request_liquidity_provision_withdraw_aerodromeslipstreamwithdrawliquidityprovisionrequest.py +0 -68
- compass_api_sdk/models/compass_api_backend_models_generic_read_response_chains_supportedchaininfo.py +0 -21
- compass_api_sdk/models/compass_api_backend_models_generic_transact_request_allowance_setallowancerequest.py +0 -139
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_check_user_position_morphocheckuserpositionresponse.py +0 -48
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_morphogetmarketsresponse.py +0 -26
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_morphogetvaultsresponse.py +0 -24
- compass_api_sdk/models/compass_api_backend_models_pendle_read_response_markets_pendlelistmarketsresponse.py +0 -24
- compass_api_sdk/models/compass_api_backend_models_pendle_read_response_positions_pendlelistuserpositionsresponse.py +0 -24
- compass_api_sdk/models/compass_api_backend_models_smart_account_transact_request_user_operations_batcheduseroperationsrequest.py +0 -49
- compass_api_sdk/models/compass_api_backend_models_swap_transact_request_odos_odosswaprequest.py +0 -108
- compass_api_sdk/models/compass_api_backend_models_token_transact_request_transfer_tokentransferrequest.py +0 -98
- compass_api_sdk/models/compass_api_backend_models_uniswap_transact_liquidity_provision_request_increase_uniswapincreaseliquidityprovisionrequest.py +0 -129
- compass_api_sdk/models/compass_api_backend_models_uniswap_transact_liquidity_provision_request_withdraw_uniswapwithdrawliquidityprovisionrequest.py +0 -68
- compass_api_sdk/models/compass_api_backend_models_uniswap_transact_swap_request_buy_exactly_uniswapbuyexactlyrequest.py +0 -123
- compass_api_sdk/models/compass_api_backend_models_uniswap_transact_swap_request_sell_exactly_uniswapsellexactlyrequest.py +0 -123
- compass_api_sdk/models/tokentransfererc20params.py +0 -63
- {compass_api_sdk-0.9.52.dist-info → compass_api_sdk-1.0.1.dist-info}/WHEEL +0 -0
|
@@ -18,71 +18,63 @@ from typing import Literal, Optional, Union
|
|
|
18
18
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
"
|
|
21
|
+
AerodromeSlipstreamMintLiquidityProvisionRequestAmount0DesiredTypedDict = TypeAliasType(
|
|
22
|
+
"AerodromeSlipstreamMintLiquidityProvisionRequestAmount0DesiredTypedDict",
|
|
23
23
|
Union[float, str],
|
|
24
24
|
)
|
|
25
25
|
r"""The desired amount of the first token to deposit"""
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
Union[float, str],
|
|
28
|
+
AerodromeSlipstreamMintLiquidityProvisionRequestAmount0Desired = TypeAliasType(
|
|
29
|
+
"AerodromeSlipstreamMintLiquidityProvisionRequestAmount0Desired", Union[float, str]
|
|
31
30
|
)
|
|
32
31
|
r"""The desired amount of the first token to deposit"""
|
|
33
32
|
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
"
|
|
34
|
+
AerodromeSlipstreamMintLiquidityProvisionRequestAmount1DesiredTypedDict = TypeAliasType(
|
|
35
|
+
"AerodromeSlipstreamMintLiquidityProvisionRequestAmount1DesiredTypedDict",
|
|
37
36
|
Union[float, str],
|
|
38
37
|
)
|
|
39
38
|
r"""The desired amount of the second token to deposit"""
|
|
40
39
|
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
Union[float, str],
|
|
41
|
+
AerodromeSlipstreamMintLiquidityProvisionRequestAmount1Desired = TypeAliasType(
|
|
42
|
+
"AerodromeSlipstreamMintLiquidityProvisionRequestAmount1Desired", Union[float, str]
|
|
45
43
|
)
|
|
46
44
|
r"""The desired amount of the second token to deposit"""
|
|
47
45
|
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
"
|
|
47
|
+
AerodromeSlipstreamMintLiquidityProvisionRequestAmount0MinTypedDict = TypeAliasType(
|
|
48
|
+
"AerodromeSlipstreamMintLiquidityProvisionRequestAmount0MinTypedDict",
|
|
51
49
|
Union[float, str],
|
|
52
50
|
)
|
|
53
51
|
r"""The minimum amount of the first token to deposit"""
|
|
54
52
|
|
|
55
53
|
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
Union[float, str],
|
|
54
|
+
AerodromeSlipstreamMintLiquidityProvisionRequestAmount0Min = TypeAliasType(
|
|
55
|
+
"AerodromeSlipstreamMintLiquidityProvisionRequestAmount0Min", Union[float, str]
|
|
59
56
|
)
|
|
60
57
|
r"""The minimum amount of the first token to deposit"""
|
|
61
58
|
|
|
62
59
|
|
|
63
|
-
|
|
64
|
-
"
|
|
60
|
+
AerodromeSlipstreamMintLiquidityProvisionRequestAmount1MinTypedDict = TypeAliasType(
|
|
61
|
+
"AerodromeSlipstreamMintLiquidityProvisionRequestAmount1MinTypedDict",
|
|
65
62
|
Union[float, str],
|
|
66
63
|
)
|
|
67
64
|
r"""The minimum amount of the second token to deposit"""
|
|
68
65
|
|
|
69
66
|
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
Union[float, str],
|
|
67
|
+
AerodromeSlipstreamMintLiquidityProvisionRequestAmount1Min = TypeAliasType(
|
|
68
|
+
"AerodromeSlipstreamMintLiquidityProvisionRequestAmount1Min", Union[float, str]
|
|
73
69
|
)
|
|
74
70
|
r"""The minimum amount of the second token to deposit"""
|
|
75
71
|
|
|
76
72
|
|
|
77
|
-
class
|
|
78
|
-
str, Enum
|
|
79
|
-
):
|
|
73
|
+
class AerodromeSlipstreamMintLiquidityProvisionRequestChain(str, Enum):
|
|
80
74
|
BASE = "base"
|
|
81
75
|
|
|
82
76
|
|
|
83
|
-
class
|
|
84
|
-
TypedDict
|
|
85
|
-
):
|
|
77
|
+
class AerodromeSlipstreamMintLiquidityProvisionRequestTypedDict(TypedDict):
|
|
86
78
|
r"""Request model for minting a new liquidity position."""
|
|
87
79
|
|
|
88
80
|
token0: TokenEnum
|
|
@@ -103,15 +95,19 @@ class CompassAPIBackendModelsAerodromeSlipstreamTransactRequestLiquidityProvisio
|
|
|
103
95
|
r"""The lower tick of the range to mint the position in"""
|
|
104
96
|
tick_upper: int
|
|
105
97
|
r"""The upper tick of the range to mint the position in"""
|
|
106
|
-
amount0_desired:
|
|
98
|
+
amount0_desired: (
|
|
99
|
+
AerodromeSlipstreamMintLiquidityProvisionRequestAmount0DesiredTypedDict
|
|
100
|
+
)
|
|
107
101
|
r"""The desired amount of the first token to deposit"""
|
|
108
|
-
amount1_desired:
|
|
102
|
+
amount1_desired: (
|
|
103
|
+
AerodromeSlipstreamMintLiquidityProvisionRequestAmount1DesiredTypedDict
|
|
104
|
+
)
|
|
109
105
|
r"""The desired amount of the second token to deposit"""
|
|
110
|
-
amount0_min:
|
|
106
|
+
amount0_min: AerodromeSlipstreamMintLiquidityProvisionRequestAmount0MinTypedDict
|
|
111
107
|
r"""The minimum amount of the first token to deposit"""
|
|
112
|
-
amount1_min:
|
|
108
|
+
amount1_min: AerodromeSlipstreamMintLiquidityProvisionRequestAmount1MinTypedDict
|
|
113
109
|
r"""The minimum amount of the second token to deposit"""
|
|
114
|
-
chain:
|
|
110
|
+
chain: AerodromeSlipstreamMintLiquidityProvisionRequestChain
|
|
115
111
|
sender: str
|
|
116
112
|
r"""The address of the transaction sender."""
|
|
117
113
|
action_type: Literal["AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION"]
|
|
@@ -119,9 +115,7 @@ class CompassAPIBackendModelsAerodromeSlipstreamTransactRequestLiquidityProvisio
|
|
|
119
115
|
r"""The address that will receive the LP tokens"""
|
|
120
116
|
|
|
121
117
|
|
|
122
|
-
class
|
|
123
|
-
BaseModel
|
|
124
|
-
):
|
|
118
|
+
class AerodromeSlipstreamMintLiquidityProvisionRequest(BaseModel):
|
|
125
119
|
r"""Request model for minting a new liquidity position."""
|
|
126
120
|
|
|
127
121
|
token0: TokenEnum
|
|
@@ -147,19 +141,19 @@ class CompassAPIBackendModelsAerodromeSlipstreamTransactRequestLiquidityProvisio
|
|
|
147
141
|
tick_upper: int
|
|
148
142
|
r"""The upper tick of the range to mint the position in"""
|
|
149
143
|
|
|
150
|
-
amount0_desired:
|
|
144
|
+
amount0_desired: AerodromeSlipstreamMintLiquidityProvisionRequestAmount0Desired
|
|
151
145
|
r"""The desired amount of the first token to deposit"""
|
|
152
146
|
|
|
153
|
-
amount1_desired:
|
|
147
|
+
amount1_desired: AerodromeSlipstreamMintLiquidityProvisionRequestAmount1Desired
|
|
154
148
|
r"""The desired amount of the second token to deposit"""
|
|
155
149
|
|
|
156
|
-
amount0_min:
|
|
150
|
+
amount0_min: AerodromeSlipstreamMintLiquidityProvisionRequestAmount0Min
|
|
157
151
|
r"""The minimum amount of the first token to deposit"""
|
|
158
152
|
|
|
159
|
-
amount1_min:
|
|
153
|
+
amount1_min: AerodromeSlipstreamMintLiquidityProvisionRequestAmount1Min
|
|
160
154
|
r"""The minimum amount of the second token to deposit"""
|
|
161
155
|
|
|
162
|
-
chain:
|
|
156
|
+
chain: AerodromeSlipstreamMintLiquidityProvisionRequestChain
|
|
163
157
|
|
|
164
158
|
sender: str
|
|
165
159
|
r"""The address of the transaction sender."""
|
|
@@ -11,43 +11,35 @@ from typing import Literal, Optional, Union
|
|
|
11
11
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
Union[float, str],
|
|
14
|
+
AerodromeSlipstreamSellExactlyRequestAmountInTypedDict = TypeAliasType(
|
|
15
|
+
"AerodromeSlipstreamSellExactlyRequestAmountInTypedDict", Union[float, str]
|
|
17
16
|
)
|
|
18
17
|
r"""The amount of the token to swap from"""
|
|
19
18
|
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
Union[float, str],
|
|
20
|
+
AerodromeSlipstreamSellExactlyRequestAmountIn = TypeAliasType(
|
|
21
|
+
"AerodromeSlipstreamSellExactlyRequestAmountIn", Union[float, str]
|
|
24
22
|
)
|
|
25
23
|
r"""The amount of the token to swap from"""
|
|
26
24
|
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
Union[float, str],
|
|
26
|
+
AerodromeSlipstreamSellExactlyRequestAmountOutMinimumTypedDict = TypeAliasType(
|
|
27
|
+
"AerodromeSlipstreamSellExactlyRequestAmountOutMinimumTypedDict", Union[float, str]
|
|
31
28
|
)
|
|
32
29
|
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
33
30
|
|
|
34
31
|
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
Union[float, str],
|
|
32
|
+
AerodromeSlipstreamSellExactlyRequestAmountOutMinimum = TypeAliasType(
|
|
33
|
+
"AerodromeSlipstreamSellExactlyRequestAmountOutMinimum", Union[float, str]
|
|
38
34
|
)
|
|
39
35
|
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
40
36
|
|
|
41
37
|
|
|
42
|
-
class
|
|
43
|
-
str, Enum
|
|
44
|
-
):
|
|
38
|
+
class AerodromeSlipstreamSellExactlyRequestChain(str, Enum):
|
|
45
39
|
BASE = "base"
|
|
46
40
|
|
|
47
41
|
|
|
48
|
-
class
|
|
49
|
-
TypedDict
|
|
50
|
-
):
|
|
42
|
+
class AerodromeSlipstreamSellExactlyRequestTypedDict(TypedDict):
|
|
51
43
|
r"""Request model for selling exactly an amount of tokens."""
|
|
52
44
|
|
|
53
45
|
token_in: TokenEnum
|
|
@@ -64,21 +56,19 @@ class CompassAPIBackendModelsAerodromeSlipstreamTransactRequestSwapSellExactlyAe
|
|
|
64
56
|
"""
|
|
65
57
|
tick_spacing: int
|
|
66
58
|
r"""The tick spacing of the pool"""
|
|
67
|
-
amount_in:
|
|
59
|
+
amount_in: AerodromeSlipstreamSellExactlyRequestAmountInTypedDict
|
|
68
60
|
r"""The amount of the token to swap from"""
|
|
69
|
-
chain:
|
|
61
|
+
chain: AerodromeSlipstreamSellExactlyRequestChain
|
|
70
62
|
sender: str
|
|
71
63
|
r"""The address of the transaction sender."""
|
|
72
64
|
action_type: Literal["AERODROME_SLIPSTREAM_SELL_EXACTLY"]
|
|
73
65
|
amount_out_minimum: NotRequired[
|
|
74
|
-
|
|
66
|
+
AerodromeSlipstreamSellExactlyRequestAmountOutMinimumTypedDict
|
|
75
67
|
]
|
|
76
68
|
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
77
69
|
|
|
78
70
|
|
|
79
|
-
class
|
|
80
|
-
BaseModel
|
|
81
|
-
):
|
|
71
|
+
class AerodromeSlipstreamSellExactlyRequest(BaseModel):
|
|
82
72
|
r"""Request model for selling exactly an amount of tokens."""
|
|
83
73
|
|
|
84
74
|
token_in: TokenEnum
|
|
@@ -98,10 +88,10 @@ class CompassAPIBackendModelsAerodromeSlipstreamTransactRequestSwapSellExactlyAe
|
|
|
98
88
|
tick_spacing: int
|
|
99
89
|
r"""The tick spacing of the pool"""
|
|
100
90
|
|
|
101
|
-
amount_in:
|
|
91
|
+
amount_in: AerodromeSlipstreamSellExactlyRequestAmountIn
|
|
102
92
|
r"""The amount of the token to swap from"""
|
|
103
93
|
|
|
104
|
-
chain:
|
|
94
|
+
chain: AerodromeSlipstreamSellExactlyRequestChain
|
|
105
95
|
|
|
106
96
|
sender: str
|
|
107
97
|
r"""The address of the transaction sender."""
|
|
@@ -115,6 +105,6 @@ class CompassAPIBackendModelsAerodromeSlipstreamTransactRequestSwapSellExactlyAe
|
|
|
115
105
|
] = "AERODROME_SLIPSTREAM_SELL_EXACTLY"
|
|
116
106
|
|
|
117
107
|
amount_out_minimum: Optional[
|
|
118
|
-
|
|
108
|
+
AerodromeSlipstreamSellExactlyRequestAmountOutMinimum
|
|
119
109
|
] = None
|
|
120
110
|
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
from enum import Enum
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict = TypeAliasType(
|
|
14
|
+
"AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict",
|
|
15
|
+
Union[float, str],
|
|
16
|
+
)
|
|
17
|
+
r"""How much liquidity to take out in percentage."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawal = (
|
|
21
|
+
TypeAliasType(
|
|
22
|
+
"AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawal",
|
|
23
|
+
Union[float, str],
|
|
24
|
+
)
|
|
25
|
+
)
|
|
26
|
+
r"""How much liquidity to take out in percentage."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class AerodromeSlipstreamWithdrawLiquidityProvisionRequestChain(str, Enum):
|
|
30
|
+
BASE = "base"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class AerodromeSlipstreamWithdrawLiquidityProvisionRequestTypedDict(TypedDict):
|
|
34
|
+
token_id: int
|
|
35
|
+
r"""Token ID of the NFT representing the liquidity provisioned position."""
|
|
36
|
+
percentage_for_withdrawal: AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict
|
|
37
|
+
r"""How much liquidity to take out in percentage."""
|
|
38
|
+
chain: AerodromeSlipstreamWithdrawLiquidityProvisionRequestChain
|
|
39
|
+
sender: str
|
|
40
|
+
r"""The address of the transaction sender."""
|
|
41
|
+
action_type: Literal["AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AerodromeSlipstreamWithdrawLiquidityProvisionRequest(BaseModel):
|
|
45
|
+
token_id: int
|
|
46
|
+
r"""Token ID of the NFT representing the liquidity provisioned position."""
|
|
47
|
+
|
|
48
|
+
percentage_for_withdrawal: (
|
|
49
|
+
AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawal
|
|
50
|
+
)
|
|
51
|
+
r"""How much liquidity to take out in percentage."""
|
|
52
|
+
|
|
53
|
+
chain: AerodromeSlipstreamWithdrawLiquidityProvisionRequestChain
|
|
54
|
+
|
|
55
|
+
sender: str
|
|
56
|
+
r"""The address of the transaction sender."""
|
|
57
|
+
|
|
58
|
+
ACTION_TYPE: Annotated[
|
|
59
|
+
Annotated[
|
|
60
|
+
Optional[Literal["AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"]],
|
|
61
|
+
AfterValidator(
|
|
62
|
+
validate_const("AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION")
|
|
63
|
+
),
|
|
64
|
+
],
|
|
65
|
+
pydantic.Field(alias="action_type"),
|
|
66
|
+
] = "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .useroperation import UserOperation, UserOperationTypedDict
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from enum import Enum
|
|
7
|
+
from typing import List
|
|
8
|
+
from typing_extensions import TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BatchedUserOperationsRequestChain(str, Enum):
|
|
12
|
+
ARBITRUM = "arbitrum"
|
|
13
|
+
BASE = "base"
|
|
14
|
+
ETHEREUM = "ethereum"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class BatchedUserOperationsRequestTypedDict(TypedDict):
|
|
18
|
+
r"""Request model for batching user operations."""
|
|
19
|
+
|
|
20
|
+
chain: BatchedUserOperationsRequestChain
|
|
21
|
+
sender: str
|
|
22
|
+
r"""The address of the transaction sender."""
|
|
23
|
+
operations: List[UserOperationTypedDict]
|
|
24
|
+
r"""List of possible user operations"""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class BatchedUserOperationsRequest(BaseModel):
|
|
28
|
+
r"""Request model for batching user operations."""
|
|
29
|
+
|
|
30
|
+
chain: BatchedUserOperationsRequestChain
|
|
31
|
+
|
|
32
|
+
sender: str
|
|
33
|
+
r"""The address of the transaction sender."""
|
|
34
|
+
|
|
35
|
+
operations: List[UserOperation]
|
|
36
|
+
r"""List of possible user operations"""
|
|
@@ -18,9 +18,7 @@ class Borrowratemode(int, Enum):
|
|
|
18
18
|
TWO = 2
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
class
|
|
22
|
-
TypedDict
|
|
23
|
-
):
|
|
21
|
+
class BorrowTypedDict(TypedDict):
|
|
24
22
|
id: str
|
|
25
23
|
r"""The id of a historical transaction on aave"""
|
|
26
24
|
timestamp: int
|
|
@@ -39,7 +37,7 @@ class CompassAPIBackendModelsAaveReadResponseHistoricalTransactionsBorrowTypedDi
|
|
|
39
37
|
r"""The type of transaction"""
|
|
40
38
|
|
|
41
39
|
|
|
42
|
-
class
|
|
40
|
+
class Borrow(BaseModel):
|
|
43
41
|
id: str
|
|
44
42
|
r"""The id of a historical transaction on aave"""
|
|
45
43
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .unsignedmulticalltransaction import (
|
|
5
|
+
UnsignedMulticallTransaction,
|
|
6
|
+
UnsignedMulticallTransactionTypedDict,
|
|
7
|
+
)
|
|
8
|
+
from compass_api_sdk.types import BaseModel
|
|
9
|
+
from typing_extensions import TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class BundlerTransactionResponseTypedDict(TypedDict):
|
|
13
|
+
transaction: UnsignedMulticallTransactionTypedDict
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class BundlerTransactionResponse(BaseModel):
|
|
17
|
+
transaction: UnsignedMulticallTransaction
|
compass_api_sdk/models/compass_api_backend_models_vaults_read_response_vault_userposition.py
CHANGED
|
@@ -6,11 +6,15 @@ from typing_extensions import TypedDict
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class CompassAPIBackendModelsVaultsReadResponseVaultUserPositionTypedDict(TypedDict):
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
amount_of_shares: str
|
|
10
|
+
r"""The number of vault share tokens representing the user’s proportional ownership of the assets in the vault."""
|
|
11
|
+
amount_in_underlying_token: str
|
|
12
|
+
r"""The equivalent value of the user’s vault shares, denominated in the vault’s underlying asset (deposit token)."""
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
class CompassAPIBackendModelsVaultsReadResponseVaultUserPosition(BaseModel):
|
|
14
|
-
|
|
16
|
+
amount_of_shares: str
|
|
17
|
+
r"""The number of vault share tokens representing the user’s proportional ownership of the assets in the vault."""
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
amount_in_underlying_token: str
|
|
20
|
+
r"""The equivalent value of the user’s vault shares, denominated in the vault’s underlying asset (deposit token)."""
|
|
@@ -0,0 +1,35 @@
|
|
|
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 datetime import datetime
|
|
6
|
+
from typing import Union
|
|
7
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
CooldownEndTypedDict = TypeAliasType("CooldownEndTypedDict", Union[datetime, bool])
|
|
11
|
+
r"""When the cooldown period ends. ISO 8601 format. UTC timezone."""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
CooldownEnd = TypeAliasType("CooldownEnd", Union[datetime, bool])
|
|
15
|
+
r"""When the cooldown period ends. ISO 8601 format. UTC timezone."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class CooldownPositionTypedDict(TypedDict):
|
|
19
|
+
amount_in_underlying_asset: str
|
|
20
|
+
r"""The amount of USDe currently in a cooldown period."""
|
|
21
|
+
cooldown_end: CooldownEndTypedDict
|
|
22
|
+
r"""When the cooldown period ends. ISO 8601 format. UTC timezone."""
|
|
23
|
+
can_be_withdrawn: bool
|
|
24
|
+
r"""Whether the USDe in cooldown can be withdrawn at this moment."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class CooldownPosition(BaseModel):
|
|
28
|
+
amount_in_underlying_asset: str
|
|
29
|
+
r"""The amount of USDe currently in a cooldown period."""
|
|
30
|
+
|
|
31
|
+
cooldown_end: CooldownEnd
|
|
32
|
+
r"""When the cooldown period ends. ISO 8601 format. UTC timezone."""
|
|
33
|
+
|
|
34
|
+
can_be_withdrawn: bool
|
|
35
|
+
r"""Whether the USDe in cooldown can be withdrawn at this moment."""
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from compass_api_sdk.utils import validate_const
|
|
12
|
+
import pydantic
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
|
+
from typing import Literal, Optional, Union
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
EthenaDepositParamsAmountTypedDict = TypeAliasType(
|
|
20
|
+
"EthenaDepositParamsAmountTypedDict", Union[float, str]
|
|
21
|
+
)
|
|
22
|
+
r"""The amount of USDe to deposit into Ethena's vault."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
EthenaDepositParamsAmount = TypeAliasType(
|
|
26
|
+
"EthenaDepositParamsAmount", Union[float, str]
|
|
27
|
+
)
|
|
28
|
+
r"""The amount of USDe to deposit into Ethena's vault."""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class EthenaDepositParamsTypedDict(TypedDict):
|
|
32
|
+
amount: EthenaDepositParamsAmountTypedDict
|
|
33
|
+
r"""The amount of USDe to deposit into Ethena's vault."""
|
|
34
|
+
action_type: Literal["ETHENA_DEPOSIT"]
|
|
35
|
+
receiver: NotRequired[Nullable[str]]
|
|
36
|
+
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."""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class EthenaDepositParams(BaseModel):
|
|
40
|
+
amount: EthenaDepositParamsAmount
|
|
41
|
+
r"""The amount of USDe to deposit into Ethena's vault."""
|
|
42
|
+
|
|
43
|
+
ACTION_TYPE: Annotated[
|
|
44
|
+
Annotated[
|
|
45
|
+
Optional[Literal["ETHENA_DEPOSIT"]],
|
|
46
|
+
AfterValidator(validate_const("ETHENA_DEPOSIT")),
|
|
47
|
+
],
|
|
48
|
+
pydantic.Field(alias="action_type"),
|
|
49
|
+
] = "ETHENA_DEPOSIT"
|
|
50
|
+
|
|
51
|
+
receiver: OptionalNullable[str] = UNSET
|
|
52
|
+
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."""
|
|
53
|
+
|
|
54
|
+
@model_serializer(mode="wrap")
|
|
55
|
+
def serialize_model(self, handler):
|
|
56
|
+
optional_fields = ["action_type", "receiver"]
|
|
57
|
+
nullable_fields = ["receiver"]
|
|
58
|
+
null_default_fields = []
|
|
59
|
+
|
|
60
|
+
serialized = handler(self)
|
|
61
|
+
|
|
62
|
+
m = {}
|
|
63
|
+
|
|
64
|
+
for n, f in type(self).model_fields.items():
|
|
65
|
+
k = f.alias or n
|
|
66
|
+
val = serialized.get(k)
|
|
67
|
+
serialized.pop(k, None)
|
|
68
|
+
|
|
69
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
70
|
+
is_set = (
|
|
71
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
72
|
+
or k in null_default_fields
|
|
73
|
+
) # pylint: disable=no-member
|
|
74
|
+
|
|
75
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
76
|
+
m[k] = val
|
|
77
|
+
elif val != UNSET_SENTINEL and (
|
|
78
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
79
|
+
):
|
|
80
|
+
m[k] = val
|
|
81
|
+
|
|
82
|
+
return m
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from compass_api_sdk.utils import validate_const
|
|
12
|
+
from enum import Enum
|
|
13
|
+
import pydantic
|
|
14
|
+
from pydantic import model_serializer
|
|
15
|
+
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from typing import Literal, Optional, Union
|
|
17
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
EthenaDepositRequestAmountTypedDict = TypeAliasType(
|
|
21
|
+
"EthenaDepositRequestAmountTypedDict", Union[float, str]
|
|
22
|
+
)
|
|
23
|
+
r"""The amount of USDe to deposit into Ethena's vault."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
EthenaDepositRequestAmount = TypeAliasType(
|
|
27
|
+
"EthenaDepositRequestAmount", Union[float, str]
|
|
28
|
+
)
|
|
29
|
+
r"""The amount of USDe to deposit into Ethena's vault."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class EthenaDepositRequestChain(str, Enum):
|
|
33
|
+
ETHEREUM = "ethereum"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class EthenaDepositRequestTypedDict(TypedDict):
|
|
37
|
+
amount: EthenaDepositRequestAmountTypedDict
|
|
38
|
+
r"""The amount of USDe to deposit into Ethena's vault."""
|
|
39
|
+
chain: EthenaDepositRequestChain
|
|
40
|
+
sender: str
|
|
41
|
+
r"""The address of the transaction sender."""
|
|
42
|
+
action_type: Literal["ETHENA_DEPOSIT"]
|
|
43
|
+
receiver: NotRequired[Nullable[str]]
|
|
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
|
+
|
|
46
|
+
|
|
47
|
+
class EthenaDepositRequest(BaseModel):
|
|
48
|
+
amount: EthenaDepositRequestAmount
|
|
49
|
+
r"""The amount of USDe to deposit into Ethena's vault."""
|
|
50
|
+
|
|
51
|
+
chain: EthenaDepositRequestChain
|
|
52
|
+
|
|
53
|
+
sender: str
|
|
54
|
+
r"""The address of the transaction sender."""
|
|
55
|
+
|
|
56
|
+
ACTION_TYPE: Annotated[
|
|
57
|
+
Annotated[
|
|
58
|
+
Optional[Literal["ETHENA_DEPOSIT"]],
|
|
59
|
+
AfterValidator(validate_const("ETHENA_DEPOSIT")),
|
|
60
|
+
],
|
|
61
|
+
pydantic.Field(alias="action_type"),
|
|
62
|
+
] = "ETHENA_DEPOSIT"
|
|
63
|
+
|
|
64
|
+
receiver: OptionalNullable[str] = UNSET
|
|
65
|
+
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
|
+
|
|
67
|
+
@model_serializer(mode="wrap")
|
|
68
|
+
def serialize_model(self, handler):
|
|
69
|
+
optional_fields = ["action_type", "receiver"]
|
|
70
|
+
nullable_fields = ["receiver"]
|
|
71
|
+
null_default_fields = []
|
|
72
|
+
|
|
73
|
+
serialized = handler(self)
|
|
74
|
+
|
|
75
|
+
m = {}
|
|
76
|
+
|
|
77
|
+
for n, f in type(self).model_fields.items():
|
|
78
|
+
k = f.alias or n
|
|
79
|
+
val = serialized.get(k)
|
|
80
|
+
serialized.pop(k, None)
|
|
81
|
+
|
|
82
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
83
|
+
is_set = (
|
|
84
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
85
|
+
or k in null_default_fields
|
|
86
|
+
) # pylint: disable=no-member
|
|
87
|
+
|
|
88
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
89
|
+
m[k] = val
|
|
90
|
+
elif val != UNSET_SENTINEL and (
|
|
91
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
92
|
+
):
|
|
93
|
+
m[k] = val
|
|
94
|
+
|
|
95
|
+
return m
|