compass_api_sdk 0.9.51__py3-none-any.whl → 1.0.0__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.

Files changed (133) hide show
  1. compass_api_sdk/_version.py +3 -3
  2. compass_api_sdk/aave_v3.py +198 -198
  3. compass_api_sdk/aerodrome_slipstream.py +108 -108
  4. compass_api_sdk/erc_4626_vaults.py +44 -44
  5. compass_api_sdk/errors/__init__.py +3 -2
  6. compass_api_sdk/models/__init__.py +900 -746
  7. compass_api_sdk/models/aaveborrowrequest.py +9 -5
  8. compass_api_sdk/models/aavehistoricaltransactionsresponse.py +5 -5
  9. compass_api_sdk/models/aavelooprequest.py +59 -11
  10. compass_api_sdk/models/aaverepayrequest.py +9 -5
  11. compass_api_sdk/models/aavereserveoverviewresponse.py +34 -3
  12. compass_api_sdk/models/aavesupplyrequest.py +9 -5
  13. compass_api_sdk/models/aavewithdrawrequest.py +9 -5
  14. compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +7 -5
  15. compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +7 -5
  16. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +7 -5
  17. compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +7 -5
  18. compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +7 -5
  19. compass_api_sdk/models/batcheduseroperationsrequest.py +9 -5
  20. compass_api_sdk/models/chain.py +3 -3
  21. compass_api_sdk/models/details.py +44 -7
  22. compass_api_sdk/models/morphoborrowrequest.py +3 -2
  23. compass_api_sdk/models/morphodepositrequest.py +3 -2
  24. compass_api_sdk/models/morphorepayrequest.py +3 -2
  25. compass_api_sdk/models/morphosupplycollateralrequest.py +3 -2
  26. compass_api_sdk/models/morphowithdrawcollateralrequest.py +3 -2
  27. compass_api_sdk/models/morphowithdrawrequest.py +3 -2
  28. compass_api_sdk/models/movement10percent.py +65 -10
  29. compass_api_sdk/models/multicallauthorizationrequest.py +9 -5
  30. compass_api_sdk/models/multicallexecuterequest.py +53 -10
  31. compass_api_sdk/models/odosswaprequest.py +9 -5
  32. compass_api_sdk/models/pendlemanageliquidityparams.py +81 -0
  33. compass_api_sdk/models/pendlemanageliquidityrequest.py +95 -0
  34. compass_api_sdk/models/pendleredeemyieldrequest.py +9 -5
  35. compass_api_sdk/models/pendletradeptparams.py +81 -0
  36. compass_api_sdk/models/pendletradeptrequest.py +95 -0
  37. compass_api_sdk/models/pendletradeytparams.py +81 -0
  38. compass_api_sdk/models/pendletradeytrequest.py +95 -0
  39. compass_api_sdk/models/pendletxresponse.py +45 -0
  40. compass_api_sdk/models/setallowancerequest.py +8 -5
  41. compass_api_sdk/models/skybuyrequest.py +7 -9
  42. compass_api_sdk/models/skydepositrequest.py +7 -8
  43. compass_api_sdk/models/skysellrequest.py +7 -9
  44. compass_api_sdk/models/skywithdrawrequest.py +7 -8
  45. compass_api_sdk/models/token_enum.py +17 -0
  46. compass_api_sdk/models/tokentransferparams.py +67 -0
  47. compass_api_sdk/models/tokentransferrequest.py +9 -5
  48. compass_api_sdk/models/transactionresponse.py +40 -0
  49. compass_api_sdk/models/uniswapbuyexactlyparams.py +19 -24
  50. compass_api_sdk/models/uniswapbuyexactlyrequest.py +28 -29
  51. compass_api_sdk/models/uniswapbuyexactlytransactionresponse.py +45 -0
  52. compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +9 -5
  53. compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +9 -5
  54. compass_api_sdk/models/uniswapsellexactlyparams.py +43 -40
  55. compass_api_sdk/models/uniswapsellexactlyrequest.py +52 -45
  56. compass_api_sdk/models/uniswapsellexactlytransactionresponse.py +45 -0
  57. compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +9 -5
  58. compass_api_sdk/models/unwrapwethrequest.py +9 -5
  59. compass_api_sdk/models/useroperation.py +34 -40
  60. compass_api_sdk/models/{aave_aave_supported_tokensop.py → v1_aave_aave_supported_tokensop.py} +9 -13
  61. compass_api_sdk/models/{aave_avg_rateop.py → v1_aave_avg_rateop.py} +32 -19
  62. compass_api_sdk/models/{aave_historical_transactionsop.py → v1_aave_historical_transactionsop.py} +9 -13
  63. compass_api_sdk/models/{aave_liquidity_changeop.py → v1_aave_liquidity_changeop.py} +30 -17
  64. compass_api_sdk/models/{aave_rateop.py → v1_aave_rateop.py} +32 -19
  65. compass_api_sdk/models/{aave_reserve_overviewop.py → v1_aave_reserve_overviewop.py} +32 -19
  66. compass_api_sdk/models/{aave_std_rateop.py → v1_aave_std_rateop.py} +32 -19
  67. compass_api_sdk/models/{aave_token_priceop.py → v1_aave_token_priceop.py} +32 -19
  68. compass_api_sdk/models/{aave_user_position_per_tokenop.py → v1_aave_user_position_per_tokenop.py} +32 -19
  69. compass_api_sdk/models/{aave_user_position_summaryop.py → v1_aave_user_position_summaryop.py} +9 -13
  70. compass_api_sdk/models/{uniswap_liquidity_provision_positionsop.py → v1_aerodrome_slipstream_liquidity_provision_positionsop.py} +7 -13
  71. compass_api_sdk/models/{aerodrome_slipstream_pool_priceop.py → v1_aerodrome_slipstream_pool_priceop.py} +53 -25
  72. compass_api_sdk/models/{generic_allowanceop.py → v1_generic_allowanceop.py} +24 -25
  73. compass_api_sdk/models/{generic_ensop.py → v1_generic_ensop.py} +7 -13
  74. compass_api_sdk/models/{generic_portfolioop.py → v1_generic_portfolioop.py} +9 -13
  75. compass_api_sdk/models/{generic_supported_chainsop.py → v1_generic_supported_chainsop.py} +2 -2
  76. compass_api_sdk/models/v1_generic_supported_tokensop.py +24 -0
  77. compass_api_sdk/models/{morpho_market_positionop.py → v1_morpho_market_positionop.py} +9 -8
  78. compass_api_sdk/models/{morpho_marketop.py → v1_morpho_marketop.py} +9 -8
  79. compass_api_sdk/models/{morpho_marketsop.py → v1_morpho_marketsop.py} +9 -8
  80. compass_api_sdk/models/{morpho_user_positionop.py → v1_morpho_user_positionop.py} +9 -8
  81. compass_api_sdk/models/{morpho_vaultop.py → v1_morpho_vaultop.py} +9 -13
  82. compass_api_sdk/models/{morpho_vaultsop.py → v1_morpho_vaultsop.py} +9 -8
  83. compass_api_sdk/models/{pendle_marketop.py → v1_pendle_marketop.py} +9 -13
  84. compass_api_sdk/models/v1_pendle_marketsop.py +24 -0
  85. compass_api_sdk/models/{pendle_positionsop.py → v1_pendle_positionsop.py} +10 -14
  86. compass_api_sdk/models/{sky_positionop.py → v1_sky_positionop.py} +14 -15
  87. compass_api_sdk/models/{token_addressop.py → v1_token_addressop.py} +30 -17
  88. compass_api_sdk/models/{token_balanceop.py → v1_token_balanceop.py} +14 -18
  89. compass_api_sdk/models/{token_priceop.py → v1_token_priceop.py} +14 -18
  90. compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +24 -0
  91. compass_api_sdk/models/{uniswap_liquidity_provision_in_rangeop.py → v1_uniswap_liquidity_provision_in_rangeop.py} +9 -13
  92. compass_api_sdk/models/{aerodrome_slipstream_liquidity_provision_positionsop.py → v1_uniswap_liquidity_provision_positionsop.py} +9 -13
  93. compass_api_sdk/models/{uniswap_pool_priceop.py → v1_uniswap_pool_priceop.py} +59 -29
  94. compass_api_sdk/models/{uniswap_quote_buy_exactlyop.py → v1_uniswap_quote_buy_exactlyop.py} +65 -35
  95. compass_api_sdk/models/{uniswap_quote_sell_exactlyop.py → v1_uniswap_quote_sell_exactlyop.py} +65 -35
  96. compass_api_sdk/models/{vaults_vaultop.py → v1_vaults_vaultop.py} +9 -13
  97. compass_api_sdk/models/vaultdepositparams.py +85 -0
  98. compass_api_sdk/models/vaultdepositrequest.py +9 -5
  99. compass_api_sdk/models/vaultwithdrawparams.py +75 -0
  100. compass_api_sdk/models/vaultwithdrawrequest.py +9 -5
  101. compass_api_sdk/models/wrapethrequest.py +9 -5
  102. compass_api_sdk/morpho.py +140 -140
  103. compass_api_sdk/pendle.py +254 -1066
  104. compass_api_sdk/sky.py +98 -56
  105. compass_api_sdk/smart_account.py +10 -10
  106. compass_api_sdk/swap.py +16 -16
  107. compass_api_sdk/token_sdk.py +56 -56
  108. compass_api_sdk/transaction_bundler.py +64 -62
  109. compass_api_sdk/uniswap_v3.py +222 -214
  110. compass_api_sdk/universal.py +104 -292
  111. compass_api_sdk/utils/__init__.py +3 -2
  112. {compass_api_sdk-0.9.51.dist-info → compass_api_sdk-1.0.0.dist-info}/METADATA +83 -88
  113. {compass_api_sdk-0.9.51.dist-info → compass_api_sdk-1.0.0.dist-info}/RECORD +114 -117
  114. compass_api_sdk/models/generic_supported_tokensop.py +0 -28
  115. compass_api_sdk/models/generic_visualize_portfolioop.py +0 -37
  116. compass_api_sdk/models/image.py +0 -15
  117. compass_api_sdk/models/pendle_marketsop.py +0 -28
  118. compass_api_sdk/models/pendle_quoteop.py +0 -128
  119. compass_api_sdk/models/pendleaddliquidityparams.py +0 -50
  120. compass_api_sdk/models/pendleaddliquidityrequest.py +0 -61
  121. compass_api_sdk/models/pendlebuyptparams.py +0 -48
  122. compass_api_sdk/models/pendlebuyptrequest.py +0 -59
  123. compass_api_sdk/models/pendlebuyytparams.py +0 -48
  124. compass_api_sdk/models/pendlebuyytrequest.py +0 -59
  125. compass_api_sdk/models/pendlegetquoteresponse.py +0 -15
  126. compass_api_sdk/models/pendleremoveliquidityparams.py +0 -50
  127. compass_api_sdk/models/pendleremoveliquidityrequest.py +0 -61
  128. compass_api_sdk/models/pendlesellptparams.py +0 -48
  129. compass_api_sdk/models/pendlesellptrequest.py +0 -61
  130. compass_api_sdk/models/pendlesellytparams.py +0 -48
  131. compass_api_sdk/models/pendlesellytrequest.py +0 -61
  132. compass_api_sdk/models/txresponse.py +0 -27
  133. {compass_api_sdk-0.9.51.dist-info → compass_api_sdk-1.0.0.dist-info}/WHEEL +0 -0
@@ -8,15 +8,13 @@ from typing import Union
8
8
  from typing_extensions import Annotated, TypeAliasType, TypedDict
9
9
 
10
10
 
11
- class UniswapQuoteSellExactlyChain(str, Enum):
12
- r"""The chain to use."""
11
+ class V1UniswapQuoteSellExactlyChain(str, Enum):
12
+ ARBITRUM = "arbitrum"
13
+ BASE = "base"
14
+ ETHEREUM = "ethereum"
13
15
 
14
- BASE_MAINNET = "base:mainnet"
15
- ETHEREUM_MAINNET = "ethereum:mainnet"
16
- ARBITRUM_MAINNET = "arbitrum:mainnet"
17
16
 
18
-
19
- class UniswapQuoteSellExactlyTokenInToken(str, Enum):
17
+ class V1UniswapQuoteSellExactlyTokenInToken(str, Enum):
20
18
  r"""A class representing the token.
21
19
 
22
20
  This class is used to represent the token in the system. Notice individual
@@ -64,13 +62,30 @@ class UniswapQuoteSellExactlyTokenInToken(str, Enum):
64
62
  EURS = "EURS"
65
63
  MAI = "MAI"
66
64
  USD_CE = "USDCe"
65
+ ETH = "ETH"
67
66
  AERO = "AERO"
68
67
  EUR = "EUR"
69
68
  VIRTUAL = "VIRTUAL"
70
69
  EZ_ETH = "ezETH"
71
-
72
-
73
- class UniswapQuoteSellExactlyTokenOutToken(str, Enum):
70
+ CYBER = "CYBER"
71
+ WRS_ETH = "wrsETH"
72
+ E_BTC = "eBTC"
73
+ EURC = "EURC"
74
+ E_US_DE = "eUSDe"
75
+ FBTC = "FBTC"
76
+ LBTC = "LBTC"
77
+ PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
78
+ PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
79
+ PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
80
+ PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
81
+ PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
82
+ RLUSD = "RLUSD"
83
+ USD_0 = "USD₮0"
84
+ US_DB_C = "USDbC"
85
+ US_DTB = "USDtb"
86
+
87
+
88
+ class V1UniswapQuoteSellExactlyTokenOutToken(str, Enum):
74
89
  r"""A class representing the token.
75
90
 
76
91
  This class is used to represent the token in the system. Notice individual
@@ -118,13 +133,30 @@ class UniswapQuoteSellExactlyTokenOutToken(str, Enum):
118
133
  EURS = "EURS"
119
134
  MAI = "MAI"
120
135
  USD_CE = "USDCe"
136
+ ETH = "ETH"
121
137
  AERO = "AERO"
122
138
  EUR = "EUR"
123
139
  VIRTUAL = "VIRTUAL"
124
140
  EZ_ETH = "ezETH"
125
-
126
-
127
- class UniswapQuoteSellExactlyFeeEnum(str, Enum):
141
+ CYBER = "CYBER"
142
+ WRS_ETH = "wrsETH"
143
+ E_BTC = "eBTC"
144
+ EURC = "EURC"
145
+ E_US_DE = "eUSDe"
146
+ FBTC = "FBTC"
147
+ LBTC = "LBTC"
148
+ PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
149
+ PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
150
+ PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
151
+ PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
152
+ PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
153
+ RLUSD = "RLUSD"
154
+ USD_0 = "USD₮0"
155
+ US_DB_C = "USDbC"
156
+ US_DTB = "USDtb"
157
+
158
+
159
+ class V1UniswapQuoteSellExactlyFeeEnum(str, Enum):
128
160
  r"""The transaction fee of a Uniswap pool in bips.
129
161
 
130
162
  Uniswap supports 4 different fee levels.
@@ -136,58 +168,56 @@ class UniswapQuoteSellExactlyFeeEnum(str, Enum):
136
168
  ONE_DOT_0 = "1.0"
137
169
 
138
170
 
139
- UniswapQuoteSellExactlyAmountInTypedDict = TypeAliasType(
140
- "UniswapQuoteSellExactlyAmountInTypedDict", Union[float, str]
171
+ V1UniswapQuoteSellExactlyAmountInTypedDict = TypeAliasType(
172
+ "V1UniswapQuoteSellExactlyAmountInTypedDict", Union[float, str]
141
173
  )
142
174
  r"""The amount of the token to swap from"""
143
175
 
144
176
 
145
- UniswapQuoteSellExactlyAmountIn = TypeAliasType(
146
- "UniswapQuoteSellExactlyAmountIn", Union[float, str]
177
+ V1UniswapQuoteSellExactlyAmountIn = TypeAliasType(
178
+ "V1UniswapQuoteSellExactlyAmountIn", Union[float, str]
147
179
  )
148
180
  r"""The amount of the token to swap from"""
149
181
 
150
182
 
151
- class UniswapQuoteSellExactlyRequestTypedDict(TypedDict):
152
- amount_in: UniswapQuoteSellExactlyAmountInTypedDict
183
+ class V1UniswapQuoteSellExactlyRequestTypedDict(TypedDict):
184
+ amount_in: V1UniswapQuoteSellExactlyAmountInTypedDict
153
185
  r"""The amount of the token to swap from"""
154
- chain: UniswapQuoteSellExactlyChain
155
- r"""The chain to use."""
156
- token_in: UniswapQuoteSellExactlyTokenInToken
186
+ chain: V1UniswapQuoteSellExactlyChain
187
+ token_in: V1UniswapQuoteSellExactlyTokenInToken
157
188
  r"""The symbol of the token to swap from."""
158
- token_out: UniswapQuoteSellExactlyTokenOutToken
189
+ token_out: V1UniswapQuoteSellExactlyTokenOutToken
159
190
  r"""The symbol of the token to swap to."""
160
- fee: UniswapQuoteSellExactlyFeeEnum
191
+ fee: V1UniswapQuoteSellExactlyFeeEnum
161
192
  r"""The fee to pay for the swap"""
162
193
 
163
194
 
164
- class UniswapQuoteSellExactlyRequest(BaseModel):
195
+ class V1UniswapQuoteSellExactlyRequest(BaseModel):
165
196
  amount_in: Annotated[
166
- UniswapQuoteSellExactlyAmountIn,
197
+ V1UniswapQuoteSellExactlyAmountIn,
167
198
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
168
199
  ]
169
200
  r"""The amount of the token to swap from"""
170
201
 
171
202
  chain: Annotated[
172
- UniswapQuoteSellExactlyChain,
203
+ V1UniswapQuoteSellExactlyChain,
173
204
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
174
- ] = UniswapQuoteSellExactlyChain.ARBITRUM_MAINNET
175
- r"""The chain to use."""
205
+ ] = V1UniswapQuoteSellExactlyChain.ARBITRUM
176
206
 
177
207
  token_in: Annotated[
178
- UniswapQuoteSellExactlyTokenInToken,
208
+ V1UniswapQuoteSellExactlyTokenInToken,
179
209
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
180
- ] = UniswapQuoteSellExactlyTokenInToken.USDC
210
+ ] = V1UniswapQuoteSellExactlyTokenInToken.USDC
181
211
  r"""The symbol of the token to swap from."""
182
212
 
183
213
  token_out: Annotated[
184
- UniswapQuoteSellExactlyTokenOutToken,
214
+ V1UniswapQuoteSellExactlyTokenOutToken,
185
215
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
186
- ] = UniswapQuoteSellExactlyTokenOutToken.USDT
216
+ ] = V1UniswapQuoteSellExactlyTokenOutToken.USDT
187
217
  r"""The symbol of the token to swap to."""
188
218
 
189
219
  fee: Annotated[
190
- UniswapQuoteSellExactlyFeeEnum,
220
+ V1UniswapQuoteSellExactlyFeeEnum,
191
221
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
192
- ] = UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01
222
+ ] = V1UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01
193
223
  r"""The fee to pay for the swap"""
@@ -14,17 +14,14 @@ from pydantic import model_serializer
14
14
  from typing_extensions import Annotated, NotRequired, TypedDict
15
15
 
16
16
 
17
- class VaultsVaultChain(str, Enum):
18
- r"""The chain to use."""
17
+ class V1VaultsVaultChain(str, Enum):
18
+ ARBITRUM = "arbitrum"
19
+ BASE = "base"
20
+ ETHEREUM = "ethereum"
19
21
 
20
- BASE_MAINNET = "base:mainnet"
21
- ETHEREUM_MAINNET = "ethereum:mainnet"
22
- ARBITRUM_MAINNET = "arbitrum:mainnet"
23
22
 
24
-
25
- class VaultsVaultRequestTypedDict(TypedDict):
26
- chain: VaultsVaultChain
27
- r"""The chain to use."""
23
+ class V1VaultsVaultRequestTypedDict(TypedDict):
24
+ chain: V1VaultsVaultChain
28
25
  block: NotRequired[Nullable[int]]
29
26
  r"""Optional block number (defaults to latest)."""
30
27
  vault_address: str
@@ -33,12 +30,11 @@ class VaultsVaultRequestTypedDict(TypedDict):
33
30
  r"""The user address of the desired vault position. Only include if you would like the user position included in the response. Defaults to `None`."""
34
31
 
35
32
 
36
- class VaultsVaultRequest(BaseModel):
33
+ class V1VaultsVaultRequest(BaseModel):
37
34
  chain: Annotated[
38
- VaultsVaultChain,
35
+ V1VaultsVaultChain,
39
36
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
40
- ] = VaultsVaultChain.ETHEREUM_MAINNET
41
- r"""The chain to use."""
37
+ ] = V1VaultsVaultChain.ETHEREUM
42
38
 
43
39
  block: Annotated[
44
40
  OptionalNullable[int],
@@ -0,0 +1,85 @@
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
+ VaultDepositParamsAmountTypedDict = TypeAliasType(
20
+ "VaultDepositParamsAmountTypedDict", Union[float, str]
21
+ )
22
+ r"""The amount of tokens to deposit into the vault."""
23
+
24
+
25
+ VaultDepositParamsAmount = TypeAliasType("VaultDepositParamsAmount", Union[float, str])
26
+ r"""The amount of tokens to deposit into the vault."""
27
+
28
+
29
+ class VaultDepositParamsTypedDict(TypedDict):
30
+ vault_address: str
31
+ r"""The vault address you are depositing to."""
32
+ amount: VaultDepositParamsAmountTypedDict
33
+ r"""The amount of tokens to deposit into the vault."""
34
+ action_type: Literal["VAULT_DEPOSIT"]
35
+ receiver: NotRequired[Nullable[str]]
36
+ r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
37
+
38
+
39
+ class VaultDepositParams(BaseModel):
40
+ vault_address: str
41
+ r"""The vault address you are depositing to."""
42
+
43
+ amount: VaultDepositParamsAmount
44
+ r"""The amount of tokens to deposit into the vault."""
45
+
46
+ ACTION_TYPE: Annotated[
47
+ Annotated[
48
+ Optional[Literal["VAULT_DEPOSIT"]],
49
+ AfterValidator(validate_const("VAULT_DEPOSIT")),
50
+ ],
51
+ pydantic.Field(alias="action_type"),
52
+ ] = "VAULT_DEPOSIT"
53
+
54
+ receiver: OptionalNullable[str] = UNSET
55
+ r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
56
+
57
+ @model_serializer(mode="wrap")
58
+ def serialize_model(self, handler):
59
+ optional_fields = ["action_type", "receiver"]
60
+ nullable_fields = ["receiver"]
61
+ null_default_fields = []
62
+
63
+ serialized = handler(self)
64
+
65
+ m = {}
66
+
67
+ for n, f in type(self).model_fields.items():
68
+ k = f.alias or n
69
+ val = serialized.get(k)
70
+ serialized.pop(k, None)
71
+
72
+ optional_nullable = k in optional_fields and k in nullable_fields
73
+ is_set = (
74
+ self.__pydantic_fields_set__.intersection({n})
75
+ or k in null_default_fields
76
+ ) # pylint: disable=no-member
77
+
78
+ if val is not None and val != UNSET_SENTINEL:
79
+ m[k] = val
80
+ elif val != UNSET_SENTINEL and (
81
+ not k in optional_fields or (optional_nullable and is_set)
82
+ ):
83
+ m[k] = val
84
+
85
+ return m
@@ -1,7 +1,6 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .chain import Chain
5
4
  from compass_api_sdk.types import (
6
5
  BaseModel,
7
6
  Nullable,
@@ -10,6 +9,7 @@ from compass_api_sdk.types import (
10
9
  UNSET_SENTINEL,
11
10
  )
12
11
  from compass_api_sdk.utils import validate_const
12
+ from enum import Enum
13
13
  import pydantic
14
14
  from pydantic import model_serializer
15
15
  from pydantic.functional_validators import AfterValidator
@@ -29,13 +29,18 @@ VaultDepositRequestAmount = TypeAliasType(
29
29
  r"""The amount of tokens to deposit into the vault."""
30
30
 
31
31
 
32
+ class VaultDepositRequestChain(str, Enum):
33
+ ARBITRUM = "arbitrum"
34
+ BASE = "base"
35
+ ETHEREUM = "ethereum"
36
+
37
+
32
38
  class VaultDepositRequestTypedDict(TypedDict):
33
39
  vault_address: str
34
40
  r"""The vault address you are depositing to."""
35
41
  amount: VaultDepositRequestAmountTypedDict
36
42
  r"""The amount of tokens to deposit into the vault."""
37
- chain: Chain
38
- r"""The chain to use."""
43
+ chain: VaultDepositRequestChain
39
44
  sender: str
40
45
  r"""The address of the transaction sender."""
41
46
  action_type: Literal["VAULT_DEPOSIT"]
@@ -50,8 +55,7 @@ class VaultDepositRequest(BaseModel):
50
55
  amount: VaultDepositRequestAmount
51
56
  r"""The amount of tokens to deposit into the vault."""
52
57
 
53
- chain: Chain
54
- r"""The chain to use."""
58
+ chain: VaultDepositRequestChain
55
59
 
56
60
  sender: str
57
61
  r"""The address of the transaction sender."""
@@ -0,0 +1,75 @@
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 Any, Literal, Optional
16
+ from typing_extensions import Annotated, NotRequired, TypedDict
17
+
18
+
19
+ class VaultWithdrawParamsTypedDict(TypedDict):
20
+ vault_address: str
21
+ r"""The vault address you are withdrawing from."""
22
+ amount: Any
23
+ r"""The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn."""
24
+ action_type: Literal["VAULT_WITHDRAW"]
25
+ receiver: NotRequired[Nullable[str]]
26
+ r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
27
+
28
+
29
+ class VaultWithdrawParams(BaseModel):
30
+ vault_address: str
31
+ r"""The vault address you are withdrawing from."""
32
+
33
+ amount: Any
34
+ r"""The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn."""
35
+
36
+ ACTION_TYPE: Annotated[
37
+ Annotated[
38
+ Optional[Literal["VAULT_WITHDRAW"]],
39
+ AfterValidator(validate_const("VAULT_WITHDRAW")),
40
+ ],
41
+ pydantic.Field(alias="action_type"),
42
+ ] = "VAULT_WITHDRAW"
43
+
44
+ receiver: OptionalNullable[str] = UNSET
45
+ r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
46
+
47
+ @model_serializer(mode="wrap")
48
+ def serialize_model(self, handler):
49
+ optional_fields = ["action_type", "receiver"]
50
+ nullable_fields = ["receiver"]
51
+ null_default_fields = []
52
+
53
+ serialized = handler(self)
54
+
55
+ m = {}
56
+
57
+ for n, f in type(self).model_fields.items():
58
+ k = f.alias or n
59
+ val = serialized.get(k)
60
+ serialized.pop(k, None)
61
+
62
+ optional_nullable = k in optional_fields and k in nullable_fields
63
+ is_set = (
64
+ self.__pydantic_fields_set__.intersection({n})
65
+ or k in null_default_fields
66
+ ) # pylint: disable=no-member
67
+
68
+ if val is not None and val != UNSET_SENTINEL:
69
+ m[k] = val
70
+ elif val != UNSET_SENTINEL and (
71
+ not k in optional_fields or (optional_nullable and is_set)
72
+ ):
73
+ m[k] = val
74
+
75
+ return m
@@ -1,7 +1,6 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .chain import Chain
5
4
  from compass_api_sdk.types import (
6
5
  BaseModel,
7
6
  Nullable,
@@ -10,6 +9,7 @@ from compass_api_sdk.types import (
10
9
  UNSET_SENTINEL,
11
10
  )
12
11
  from compass_api_sdk.utils import validate_const
12
+ from enum import Enum
13
13
  import pydantic
14
14
  from pydantic import model_serializer
15
15
  from pydantic.functional_validators import AfterValidator
@@ -17,13 +17,18 @@ from typing import Any, Literal, Optional
17
17
  from typing_extensions import Annotated, NotRequired, TypedDict
18
18
 
19
19
 
20
+ class VaultWithdrawRequestChain(str, Enum):
21
+ ARBITRUM = "arbitrum"
22
+ BASE = "base"
23
+ ETHEREUM = "ethereum"
24
+
25
+
20
26
  class VaultWithdrawRequestTypedDict(TypedDict):
21
27
  vault_address: str
22
28
  r"""The vault address you are withdrawing from."""
23
29
  amount: Any
24
30
  r"""The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn."""
25
- chain: Chain
26
- r"""The chain to use."""
31
+ chain: VaultWithdrawRequestChain
27
32
  sender: str
28
33
  r"""The address of the transaction sender."""
29
34
  action_type: Literal["VAULT_WITHDRAW"]
@@ -38,8 +43,7 @@ class VaultWithdrawRequest(BaseModel):
38
43
  amount: Any
39
44
  r"""The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn."""
40
45
 
41
- chain: Chain
42
- r"""The chain to use."""
46
+ chain: VaultWithdrawRequestChain
43
47
 
44
48
  sender: str
45
49
  r"""The address of the transaction sender."""
@@ -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 .chain import Chain
5
4
  from compass_api_sdk.types import BaseModel
6
5
  from compass_api_sdk.utils import validate_const
6
+ from enum import Enum
7
7
  import pydantic
8
8
  from pydantic.functional_validators import AfterValidator
9
9
  from typing import Literal, Optional, Union
@@ -20,13 +20,18 @@ WrapEthRequestAmount = TypeAliasType("WrapEthRequestAmount", Union[float, str])
20
20
  r"""The amount of ETH to wrap."""
21
21
 
22
22
 
23
+ class WrapEthRequestChain(str, Enum):
24
+ ARBITRUM = "arbitrum"
25
+ BASE = "base"
26
+ ETHEREUM = "ethereum"
27
+
28
+
23
29
  class WrapEthRequestTypedDict(TypedDict):
24
30
  r"""Request model for wrapping ETH into WETH."""
25
31
 
26
32
  amount: WrapEthRequestAmountTypedDict
27
33
  r"""The amount of ETH to wrap."""
28
- chain: Chain
29
- r"""The chain to use."""
34
+ chain: WrapEthRequestChain
30
35
  sender: str
31
36
  r"""The address of the transaction sender."""
32
37
  action_type: Literal["WRAP_ETH"]
@@ -38,8 +43,7 @@ class WrapEthRequest(BaseModel):
38
43
  amount: WrapEthRequestAmount
39
44
  r"""The amount of ETH to wrap."""
40
45
 
41
- chain: Chain
42
- r"""The chain to use."""
46
+ chain: WrapEthRequestChain
43
47
 
44
48
  sender: str
45
49
  r"""The address of the transaction sender."""