compass_api_sdk 0.9.52__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 (99) hide show
  1. compass_api_sdk/_version.py +3 -3
  2. compass_api_sdk/aave_v3.py +70 -124
  3. compass_api_sdk/aerodrome_slipstream.py +86 -88
  4. compass_api_sdk/erc_4626_vaults.py +18 -42
  5. compass_api_sdk/models/__init__.py +908 -962
  6. compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_borrow_aaveborrowrequest.py → aaveborrowrequest.py} +10 -18
  7. compass_api_sdk/models/aavehistoricaltransactionsresponse.py +65 -0
  8. compass_api_sdk/models/{compass_api_backend_models_multicall_transact_request_aave_loop_request_aavelooprequest.py → aavelooprequest.py} +5 -11
  9. compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_repay_aaverepayrequest.py → aaverepayrequest.py} +10 -18
  10. compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_supply_aavesupplyrequest.py → aavesupplyrequest.py} +10 -18
  11. compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_withdraw_aavewithdrawrequest.py → aavewithdrawrequest.py} +11 -19
  12. compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_read_response_positions_aerodromelppositionsresponse.py → aerodromelppositionsresponse.py} +2 -6
  13. compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_transact_request_swap_buy_exactly_aerodromeslipstreambuyexactlyrequest.py → aerodromeslipstreambuyexactlyrequest.py} +17 -27
  14. compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +125 -0
  15. compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_transact_request_liquidity_provision_mint_aerodromeslipstreammintliquidityprovisionrequest.py → aerodromeslipstreammintliquidityprovisionrequest.py} +33 -39
  16. compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_transact_request_swap_sell_exactly_aerodromeslipstreamsellexactlyrequest.py → aerodromeslipstreamsellexactlyrequest.py} +17 -27
  17. compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +66 -0
  18. compass_api_sdk/models/batcheduseroperationsrequest.py +36 -0
  19. compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_borrow.py → borrow.py} +2 -4
  20. compass_api_sdk/models/{compass_api_backend_config_chain_chain.py → chain.py} +1 -1
  21. compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_liquidationcall.py → liquidationcall.py} +2 -6
  22. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_marketposition.py → marketposition.py} +2 -6
  23. compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_borrow_morphoborrowrequest.py → morphoborrowrequest.py} +11 -19
  24. compass_api_sdk/models/morphocheckuserpositionresponse.py +32 -0
  25. compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_deposit_morphodepositrequest.py → morphodepositrequest.py} +11 -23
  26. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_morphogetmarketresponse.py → morphogetmarketresponse.py} +2 -6
  27. compass_api_sdk/models/morphogetmarketsresponse.py +17 -0
  28. compass_api_sdk/models/morphogetvaultsresponse.py +17 -0
  29. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_markets_morphomarket.py → morphomarket.py} +2 -4
  30. compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_repay_morphorepayrequest.py → morphorepayrequest.py} +5 -9
  31. compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_supply_collateral_morphosupplycollateralrequest.py → morphosupplycollateralrequest.py} +11 -19
  32. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vaults_morphovault.py → morphovault.py} +2 -2
  33. compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_withdraw_collateral_morphowithdrawcollateralrequest.py → morphowithdrawcollateralrequest.py} +11 -19
  34. compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_withdraw_morphowithdrawrequest.py → morphowithdrawrequest.py} +5 -15
  35. compass_api_sdk/models/{compass_api_backend_models_multicall_read_request_get_authorization_multicallauthorizationrequest.py → multicallauthorizationrequest.py} +5 -11
  36. compass_api_sdk/models/{compass_api_backend_models_multicall_transact_request_multicall_execution_request_multicallexecuterequest.py → multicallexecuterequest.py} +8 -21
  37. compass_api_sdk/models/odosswaprequest.py +90 -0
  38. compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_positions_openposition.py → openposition.py} +2 -4
  39. compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_market_pendlegetmarketresponse.py → pendlegetmarketresponse.py} +2 -4
  40. compass_api_sdk/models/pendlelistmarketsresponse.py +17 -0
  41. compass_api_sdk/models/pendlelistuserpositionsresponse.py +17 -0
  42. compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_markets_pendlemarket.py → pendlemarket.py} +2 -2
  43. compass_api_sdk/models/{compass_api_backend_models_pendle_transact_request_redeem_yield_pendleredeemyieldrequest.py → pendleredeemyieldrequest.py} +5 -11
  44. compass_api_sdk/models/{compass_api_backend_models_generic_read_response_portfolio_portfolio.py → portfolio.py} +2 -2
  45. compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_positions_position.py → position.py} +7 -18
  46. compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_redeemunderlying.py → redeemunderlying.py} +2 -6
  47. compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_repay.py → repay.py} +2 -4
  48. compass_api_sdk/models/setallowancerequest.py +112 -0
  49. compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_buy_skybuyrequest.py → skybuyrequest.py} +13 -18
  50. compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_deposit_skydepositrequest.py → skydepositrequest.py} +10 -22
  51. compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_sell_skysellrequest.py → skysellrequest.py} +13 -21
  52. compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_withdraw_skywithdrawrequest.py → skywithdrawrequest.py} +5 -13
  53. compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_supply.py → supply.py} +2 -4
  54. compass_api_sdk/models/supportedchaininfo.py +19 -0
  55. compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_swapborrowrate.py → swapborrowrate.py} +2 -6
  56. compass_api_sdk/models/tokentransferrequest.py +82 -0
  57. compass_api_sdk/models/uniswapbuyexactlyrequest.py +111 -0
  58. compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +115 -0
  59. compass_api_sdk/models/{compass_api_backend_models_uniswap_transact_liquidity_provision_request_mint_uniswapmintliquidityprovisionrequest.py → uniswapmintliquidityprovisionrequest.py} +29 -43
  60. compass_api_sdk/models/uniswapsellexactlyrequest.py +111 -0
  61. compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +67 -0
  62. compass_api_sdk/models/{compass_api_backend_models_generic_transact_request_unwrap_weth_unwrapwethrequest.py → unwrapwethrequest.py} +10 -22
  63. compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_usageascollateral.py → usageascollateral.py} +2 -6
  64. compass_api_sdk/models/{compass_api_backend_models_multicall_transact_request_multicall_execution_request_useroperation.py → useroperation.py} +2 -6
  65. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_vault.py → vault.py} +2 -4
  66. compass_api_sdk/models/{compass_api_backend_models_vaults_transact_request_deposit_vaultdepositrequest.py → vaultdepositrequest.py} +11 -19
  67. compass_api_sdk/models/{compass_api_backend_models_vaults_read_response_vault_vaultgetvaultresponse.py → vaultgetvaultresponse.py} +2 -4
  68. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_vaultposition.py → vaultposition.py} +5 -12
  69. compass_api_sdk/models/{compass_api_backend_models_vaults_transact_request_withdraw_vaultwithdrawrequest.py → vaultwithdrawrequest.py} +5 -11
  70. compass_api_sdk/models/{compass_api_backend_models_generic_transact_request_wrap_eth_wrapethrequest.py → wrapethrequest.py} +10 -20
  71. compass_api_sdk/morpho.py +82 -170
  72. compass_api_sdk/pendle.py +18 -56
  73. compass_api_sdk/sky.py +56 -106
  74. compass_api_sdk/smart_account.py +10 -38
  75. compass_api_sdk/swap.py +12 -26
  76. compass_api_sdk/token_sdk.py +12 -22
  77. compass_api_sdk/transaction_bundler.py +22 -70
  78. compass_api_sdk/uniswap_v3.py +90 -106
  79. compass_api_sdk/universal.py +44 -92
  80. {compass_api_sdk-0.9.52.dist-info → compass_api_sdk-1.0.0.dist-info}/METADATA +1 -1
  81. {compass_api_sdk-0.9.52.dist-info → compass_api_sdk-1.0.0.dist-info}/RECORD +82 -82
  82. compass_api_sdk/models/compass_api_backend_models_aave_read_response_historical_transactions_aavehistoricaltransactionsresponse.py +0 -115
  83. compass_api_sdk/models/compass_api_backend_models_aerodrome_slipstream_transact_request_liquidity_provision_increase_aerodromeslipstreamincreaseliquidityprovisionrequest.py +0 -125
  84. compass_api_sdk/models/compass_api_backend_models_aerodrome_slipstream_transact_request_liquidity_provision_withdraw_aerodromeslipstreamwithdrawliquidityprovisionrequest.py +0 -68
  85. compass_api_sdk/models/compass_api_backend_models_generic_read_response_chains_supportedchaininfo.py +0 -21
  86. compass_api_sdk/models/compass_api_backend_models_generic_transact_request_allowance_setallowancerequest.py +0 -139
  87. compass_api_sdk/models/compass_api_backend_models_morpho_read_response_check_user_position_morphocheckuserpositionresponse.py +0 -48
  88. compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_morphogetmarketsresponse.py +0 -26
  89. compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_morphogetvaultsresponse.py +0 -24
  90. compass_api_sdk/models/compass_api_backend_models_pendle_read_response_markets_pendlelistmarketsresponse.py +0 -24
  91. compass_api_sdk/models/compass_api_backend_models_pendle_read_response_positions_pendlelistuserpositionsresponse.py +0 -24
  92. compass_api_sdk/models/compass_api_backend_models_smart_account_transact_request_user_operations_batcheduseroperationsrequest.py +0 -49
  93. compass_api_sdk/models/compass_api_backend_models_swap_transact_request_odos_odosswaprequest.py +0 -108
  94. compass_api_sdk/models/compass_api_backend_models_token_transact_request_transfer_tokentransferrequest.py +0 -98
  95. compass_api_sdk/models/compass_api_backend_models_uniswap_transact_liquidity_provision_request_increase_uniswapincreaseliquidityprovisionrequest.py +0 -129
  96. compass_api_sdk/models/compass_api_backend_models_uniswap_transact_liquidity_provision_request_withdraw_uniswapwithdrawliquidityprovisionrequest.py +0 -68
  97. compass_api_sdk/models/compass_api_backend_models_uniswap_transact_swap_request_buy_exactly_uniswapbuyexactlyrequest.py +0 -123
  98. compass_api_sdk/models/compass_api_backend_models_uniswap_transact_swap_request_sell_exactly_uniswapsellexactlyrequest.py +0 -123
  99. {compass_api_sdk-0.9.52.dist-info → compass_api_sdk-1.0.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,17 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .morphovault import MorphoVault, MorphoVaultTypedDict
5
+ from compass_api_sdk.types import BaseModel
6
+ from typing import List
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class MorphoGetVaultsResponseTypedDict(TypedDict):
11
+ vaults: List[MorphoVaultTypedDict]
12
+ r"""A list of vaults matching the query."""
13
+
14
+
15
+ class MorphoGetVaultsResponse(BaseModel):
16
+ vaults: List[MorphoVault]
17
+ r"""A list of vaults matching the query."""
@@ -16,9 +16,7 @@ from pydantic import model_serializer
16
16
  from typing_extensions import Annotated, TypedDict
17
17
 
18
18
 
19
- class CompassAPIBackendModelsMorphoReadResponseGetMarketsMorphoMarketTypedDict(
20
- TypedDict
21
- ):
19
+ class MorphoMarketTypedDict(TypedDict):
22
20
  unique_key: str
23
21
  lltv: int
24
22
  oracle_address: str
@@ -31,7 +29,7 @@ class CompassAPIBackendModelsMorphoReadResponseGetMarketsMorphoMarketTypedDict(
31
29
  loan_asset: CompassAPIBackendModelsMorphoReadResponseGetMarketsAssetTypedDict
32
30
 
33
31
 
34
- class CompassAPIBackendModelsMorphoReadResponseGetMarketsMorphoMarket(BaseModel):
32
+ class MorphoMarket(BaseModel):
35
33
  unique_key: Annotated[str, pydantic.Field(alias="uniqueKey")]
36
34
 
37
35
  lltv: int
@@ -17,22 +17,18 @@ from typing import Any, Literal, Optional
17
17
  from typing_extensions import Annotated, NotRequired, TypedDict
18
18
 
19
19
 
20
- class CompassAPIBackendModelsMorphoTransactRequestRepayMorphoRepayRequestChain(
21
- str, Enum
22
- ):
20
+ class MorphoRepayRequestChain(str, Enum):
23
21
  ARBITRUM = "arbitrum"
24
22
  BASE = "base"
25
23
  ETHEREUM = "ethereum"
26
24
 
27
25
 
28
- class CompassAPIBackendModelsMorphoTransactRequestRepayMorphoRepayRequestTypedDict(
29
- TypedDict
30
- ):
26
+ class MorphoRepayRequestTypedDict(TypedDict):
31
27
  amount: Any
32
28
  r"""Amount of the token to repay to the market. If set to 'ALL', all debt plus interest will be paid back if the user has a sufficient token balance in their wallet."""
33
29
  unique_market_key: str
34
30
  r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
35
- chain: CompassAPIBackendModelsMorphoTransactRequestRepayMorphoRepayRequestChain
31
+ chain: MorphoRepayRequestChain
36
32
  sender: str
37
33
  r"""The address of the transaction sender."""
38
34
  action_type: Literal["MORPHO_REPAY"]
@@ -42,14 +38,14 @@ class CompassAPIBackendModelsMorphoTransactRequestRepayMorphoRepayRequestTypedDi
42
38
  r"""An optional field for callback byte data that will be triggered upon successful repaying of debt."""
43
39
 
44
40
 
45
- class CompassAPIBackendModelsMorphoTransactRequestRepayMorphoRepayRequest(BaseModel):
41
+ class MorphoRepayRequest(BaseModel):
46
42
  amount: Any
47
43
  r"""Amount of the token to repay to the market. If set to 'ALL', all debt plus interest will be paid back if the user has a sufficient token balance in their wallet."""
48
44
 
49
45
  unique_market_key: str
50
46
  r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
51
47
 
52
- chain: CompassAPIBackendModelsMorphoTransactRequestRepayMorphoRepayRequestChain
48
+ chain: MorphoRepayRequestChain
53
49
 
54
50
  sender: str
55
51
  r"""The address of the transaction sender."""
@@ -17,36 +17,30 @@ from typing import Literal, Optional, Union
17
17
  from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
18
18
 
19
19
 
20
- CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCollateralRequestAmountTypedDict = TypeAliasType(
21
- "CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCollateralRequestAmountTypedDict",
22
- Union[float, str],
20
+ MorphoSupplyCollateralRequestAmountTypedDict = TypeAliasType(
21
+ "MorphoSupplyCollateralRequestAmountTypedDict", Union[float, str]
23
22
  )
24
23
  r"""Amount of the token to supply to the market as collateral."""
25
24
 
26
25
 
27
- CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCollateralRequestAmount = TypeAliasType(
28
- "CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCollateralRequestAmount",
29
- Union[float, str],
26
+ MorphoSupplyCollateralRequestAmount = TypeAliasType(
27
+ "MorphoSupplyCollateralRequestAmount", Union[float, str]
30
28
  )
31
29
  r"""Amount of the token to supply to the market as collateral."""
32
30
 
33
31
 
34
- class CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCollateralRequestChain(
35
- str, Enum
36
- ):
32
+ class MorphoSupplyCollateralRequestChain(str, Enum):
37
33
  ARBITRUM = "arbitrum"
38
34
  BASE = "base"
39
35
  ETHEREUM = "ethereum"
40
36
 
41
37
 
42
- class CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCollateralRequestTypedDict(
43
- TypedDict
44
- ):
45
- amount: CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCollateralRequestAmountTypedDict
38
+ class MorphoSupplyCollateralRequestTypedDict(TypedDict):
39
+ amount: MorphoSupplyCollateralRequestAmountTypedDict
46
40
  r"""Amount of the token to supply to the market as collateral."""
47
41
  unique_market_key: str
48
42
  r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
49
- chain: CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCollateralRequestChain
43
+ chain: MorphoSupplyCollateralRequestChain
50
44
  sender: str
51
45
  r"""The address of the transaction sender."""
52
46
  action_type: Literal["MORPHO_SUPPLY_COLLATERAL"]
@@ -56,16 +50,14 @@ class CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCo
56
50
  r"""An optional field for callback byte data that will be triggered upon successful supplying of collateral."""
57
51
 
58
52
 
59
- class CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCollateralRequest(
60
- BaseModel
61
- ):
62
- amount: CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCollateralRequestAmount
53
+ class MorphoSupplyCollateralRequest(BaseModel):
54
+ amount: MorphoSupplyCollateralRequestAmount
63
55
  r"""Amount of the token to supply to the market as collateral."""
64
56
 
65
57
  unique_market_key: str
66
58
  r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
67
59
 
68
- chain: CompassAPIBackendModelsMorphoTransactRequestSupplyCollateralMorphoSupplyCollateralRequestChain
60
+ chain: MorphoSupplyCollateralRequestChain
69
61
 
70
62
  sender: str
71
63
  r"""The address of the transaction sender."""
@@ -15,7 +15,7 @@ import pydantic
15
15
  from typing_extensions import Annotated, TypedDict
16
16
 
17
17
 
18
- class CompassAPIBackendModelsMorphoReadResponseGetVaultsMorphoVaultTypedDict(TypedDict):
18
+ class MorphoVaultTypedDict(TypedDict):
19
19
  address: str
20
20
  symbol: str
21
21
  name: str
@@ -28,7 +28,7 @@ class CompassAPIBackendModelsMorphoReadResponseGetVaultsMorphoVaultTypedDict(Typ
28
28
  state: CompassAPIBackendModelsMorphoReadResponseGetVaultsVaultStateTypedDict
29
29
 
30
30
 
31
- class CompassAPIBackendModelsMorphoReadResponseGetVaultsMorphoVault(BaseModel):
31
+ class MorphoVault(BaseModel):
32
32
  address: str
33
33
 
34
34
  symbol: str
@@ -17,36 +17,30 @@ from typing import Literal, Optional, Union
17
17
  from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
18
18
 
19
19
 
20
- CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdrawCollateralRequestAmountTypedDict = TypeAliasType(
21
- "CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdrawCollateralRequestAmountTypedDict",
22
- Union[float, str],
20
+ MorphoWithdrawCollateralRequestAmountTypedDict = TypeAliasType(
21
+ "MorphoWithdrawCollateralRequestAmountTypedDict", Union[float, str]
23
22
  )
24
23
  r"""Amount of the token to supply to the market as collateral."""
25
24
 
26
25
 
27
- CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdrawCollateralRequestAmount = TypeAliasType(
28
- "CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdrawCollateralRequestAmount",
29
- Union[float, str],
26
+ MorphoWithdrawCollateralRequestAmount = TypeAliasType(
27
+ "MorphoWithdrawCollateralRequestAmount", Union[float, str]
30
28
  )
31
29
  r"""Amount of the token to supply to the market as collateral."""
32
30
 
33
31
 
34
- class CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdrawCollateralRequestChain(
35
- str, Enum
36
- ):
32
+ class MorphoWithdrawCollateralRequestChain(str, Enum):
37
33
  ARBITRUM = "arbitrum"
38
34
  BASE = "base"
39
35
  ETHEREUM = "ethereum"
40
36
 
41
37
 
42
- class CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdrawCollateralRequestTypedDict(
43
- TypedDict
44
- ):
45
- amount: CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdrawCollateralRequestAmountTypedDict
38
+ class MorphoWithdrawCollateralRequestTypedDict(TypedDict):
39
+ amount: MorphoWithdrawCollateralRequestAmountTypedDict
46
40
  r"""Amount of the token to supply to the market as collateral."""
47
41
  unique_market_key: str
48
42
  r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
49
- chain: CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdrawCollateralRequestChain
43
+ chain: MorphoWithdrawCollateralRequestChain
50
44
  sender: str
51
45
  r"""The address of the transaction sender."""
52
46
  action_type: Literal["MORPHO_WITHDRAW_COLLATERAL"]
@@ -56,16 +50,14 @@ class CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdr
56
50
  r"""The address where the withdrawn collateral will be received. Defaults to sender."""
57
51
 
58
52
 
59
- class CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdrawCollateralRequest(
60
- BaseModel
61
- ):
62
- amount: CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdrawCollateralRequestAmount
53
+ class MorphoWithdrawCollateralRequest(BaseModel):
54
+ amount: MorphoWithdrawCollateralRequestAmount
63
55
  r"""Amount of the token to supply to the market as collateral."""
64
56
 
65
57
  unique_market_key: str
66
58
  r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
67
59
 
68
- chain: CompassAPIBackendModelsMorphoTransactRequestWithdrawCollateralMorphoWithdrawCollateralRequestChain
60
+ chain: MorphoWithdrawCollateralRequestChain
69
61
 
70
62
  sender: str
71
63
  r"""The address of the transaction sender."""
@@ -17,24 +17,18 @@ from typing import Any, Literal, Optional
17
17
  from typing_extensions import Annotated, NotRequired, TypedDict
18
18
 
19
19
 
20
- class CompassAPIBackendModelsMorphoTransactRequestWithdrawMorphoWithdrawRequestChain(
21
- str, Enum
22
- ):
20
+ class MorphoWithdrawRequestChain(str, Enum):
23
21
  ARBITRUM = "arbitrum"
24
22
  BASE = "base"
25
23
  ETHEREUM = "ethereum"
26
24
 
27
25
 
28
- class CompassAPIBackendModelsMorphoTransactRequestWithdrawMorphoWithdrawRequestTypedDict(
29
- TypedDict
30
- ):
26
+ class MorphoWithdrawRequestTypedDict(TypedDict):
31
27
  vault_address: str
32
28
  r"""The vault address you are withdrawing from."""
33
29
  amount: Any
34
30
  r"""The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn."""
35
- chain: (
36
- CompassAPIBackendModelsMorphoTransactRequestWithdrawMorphoWithdrawRequestChain
37
- )
31
+ chain: MorphoWithdrawRequestChain
38
32
  sender: str
39
33
  r"""The address of the transaction sender."""
40
34
  action_type: Literal["MORPHO_WITHDRAW"]
@@ -42,18 +36,14 @@ class CompassAPIBackendModelsMorphoTransactRequestWithdrawMorphoWithdrawRequestT
42
36
  r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
43
37
 
44
38
 
45
- class CompassAPIBackendModelsMorphoTransactRequestWithdrawMorphoWithdrawRequest(
46
- BaseModel
47
- ):
39
+ class MorphoWithdrawRequest(BaseModel):
48
40
  vault_address: str
49
41
  r"""The vault address you are withdrawing from."""
50
42
 
51
43
  amount: Any
52
44
  r"""The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn."""
53
45
 
54
- chain: (
55
- CompassAPIBackendModelsMorphoTransactRequestWithdrawMorphoWithdrawRequestChain
56
- )
46
+ chain: MorphoWithdrawRequestChain
57
47
 
58
48
  sender: str
59
49
  r"""The address of the transaction sender."""
@@ -6,17 +6,13 @@ from enum import Enum
6
6
  from typing_extensions import TypedDict
7
7
 
8
8
 
9
- class CompassAPIBackendModelsMulticallReadRequestGetAuthorizationMulticallAuthorizationRequestChain(
10
- str, Enum
11
- ):
9
+ class MulticallAuthorizationRequestChain(str, Enum):
12
10
  ARBITRUM = "arbitrum"
13
11
  BASE = "base"
14
12
  ETHEREUM = "ethereum"
15
13
 
16
14
 
17
- class CompassAPIBackendModelsMulticallReadRequestGetAuthorizationMulticallAuthorizationRequestTypedDict(
18
- TypedDict
19
- ):
15
+ class MulticallAuthorizationRequestTypedDict(TypedDict):
20
16
  r"""Request model for getting a multicall authorization.
21
17
 
22
18
  This model is used to authorize a sender address to perform multicall operations,
@@ -26,14 +22,12 @@ class CompassAPIBackendModelsMulticallReadRequestGetAuthorizationMulticallAuthor
26
22
  Only needs to be done once per an EOA.
27
23
  """
28
24
 
29
- chain: CompassAPIBackendModelsMulticallReadRequestGetAuthorizationMulticallAuthorizationRequestChain
25
+ chain: MulticallAuthorizationRequestChain
30
26
  sender: str
31
27
  r"""The Ethereum address to use for authorization"""
32
28
 
33
29
 
34
- class CompassAPIBackendModelsMulticallReadRequestGetAuthorizationMulticallAuthorizationRequest(
35
- BaseModel
36
- ):
30
+ class MulticallAuthorizationRequest(BaseModel):
37
31
  r"""Request model for getting a multicall authorization.
38
32
 
39
33
  This model is used to authorize a sender address to perform multicall operations,
@@ -43,7 +37,7 @@ class CompassAPIBackendModelsMulticallReadRequestGetAuthorizationMulticallAuthor
43
37
  Only needs to be done once per an EOA.
44
38
  """
45
39
 
46
- chain: CompassAPIBackendModelsMulticallReadRequestGetAuthorizationMulticallAuthorizationRequestChain
40
+ chain: MulticallAuthorizationRequestChain
47
41
 
48
42
  sender: str
49
43
  r"""The Ethereum address to use for authorization"""
@@ -1,11 +1,8 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .compass_api_backend_models_multicall_transact_request_multicall_execution_request_useroperation import (
5
- CompassAPIBackendModelsMulticallTransactRequestMulticallExecutionRequestUserOperation,
6
- CompassAPIBackendModelsMulticallTransactRequestMulticallExecutionRequestUserOperationTypedDict,
7
- )
8
4
  from .signedauthorization import SignedAuthorization, SignedAuthorizationTypedDict
5
+ from .useroperation import UserOperation, UserOperationTypedDict
9
6
  from compass_api_sdk.types import (
10
7
  BaseModel,
11
8
  Nullable,
@@ -19,43 +16,33 @@ from typing import List
19
16
  from typing_extensions import NotRequired, TypedDict
20
17
 
21
18
 
22
- class CompassAPIBackendModelsMulticallTransactRequestMulticallExecutionRequestMulticallExecuteRequestChain(
23
- str, Enum
24
- ):
19
+ class MulticallExecuteRequestChain(str, Enum):
25
20
  ARBITRUM = "arbitrum"
26
21
  BASE = "base"
27
22
  ETHEREUM = "ethereum"
28
23
 
29
24
 
30
- class CompassAPIBackendModelsMulticallTransactRequestMulticallExecutionRequestMulticallExecuteRequestTypedDict(
31
- TypedDict
32
- ):
25
+ class MulticallExecuteRequestTypedDict(TypedDict):
33
26
  r"""Request model for executing a multicall."""
34
27
 
35
- chain: CompassAPIBackendModelsMulticallTransactRequestMulticallExecutionRequestMulticallExecuteRequestChain
28
+ chain: MulticallExecuteRequestChain
36
29
  sender: str
37
30
  r"""The address of the transaction sender."""
38
- actions: List[
39
- CompassAPIBackendModelsMulticallTransactRequestMulticallExecutionRequestUserOperationTypedDict
40
- ]
31
+ actions: List[UserOperationTypedDict]
41
32
  r"""List of possible actions for multicall"""
42
33
  signed_authorization: NotRequired[Nullable[SignedAuthorizationTypedDict]]
43
34
  r"""EIP-7702 authorization"""
44
35
 
45
36
 
46
- class CompassAPIBackendModelsMulticallTransactRequestMulticallExecutionRequestMulticallExecuteRequest(
47
- BaseModel
48
- ):
37
+ class MulticallExecuteRequest(BaseModel):
49
38
  r"""Request model for executing a multicall."""
50
39
 
51
- chain: CompassAPIBackendModelsMulticallTransactRequestMulticallExecutionRequestMulticallExecuteRequestChain
40
+ chain: MulticallExecuteRequestChain
52
41
 
53
42
  sender: str
54
43
  r"""The address of the transaction sender."""
55
44
 
56
- actions: List[
57
- CompassAPIBackendModelsMulticallTransactRequestMulticallExecutionRequestUserOperation
58
- ]
45
+ actions: List[UserOperation]
59
46
  r"""List of possible actions for multicall"""
60
47
 
61
48
  signed_authorization: OptionalNullable[SignedAuthorization] = UNSET
@@ -0,0 +1,90 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .token_enum import TokenEnum
5
+ from compass_api_sdk.types import BaseModel
6
+ from compass_api_sdk.utils import validate_const
7
+ from enum import Enum
8
+ import pydantic
9
+ from pydantic.functional_validators import AfterValidator
10
+ from typing import Literal, Optional, Union
11
+ from typing_extensions import Annotated, TypeAliasType, TypedDict
12
+
13
+
14
+ OdosSwapRequestTokenInTypedDict = TypeAliasType(
15
+ "OdosSwapRequestTokenInTypedDict", Union[TokenEnum, str]
16
+ )
17
+ r"""The symbol or address of the token that is to be sold."""
18
+
19
+
20
+ OdosSwapRequestTokenIn = TypeAliasType("OdosSwapRequestTokenIn", Union[TokenEnum, str])
21
+ r"""The symbol or address of the token that is to be sold."""
22
+
23
+
24
+ OdosSwapRequestTokenOutTypedDict = TypeAliasType(
25
+ "OdosSwapRequestTokenOutTypedDict", Union[TokenEnum, str]
26
+ )
27
+ r"""The symbol or address of the token that is to be bought."""
28
+
29
+
30
+ OdosSwapRequestTokenOut = TypeAliasType(
31
+ "OdosSwapRequestTokenOut", Union[TokenEnum, str]
32
+ )
33
+ r"""The symbol or address of the token that is to be bought."""
34
+
35
+
36
+ OdosSwapRequestAmountTypedDict = TypeAliasType(
37
+ "OdosSwapRequestAmountTypedDict", Union[float, str]
38
+ )
39
+ r"""The amount of token_in to be sold."""
40
+
41
+
42
+ OdosSwapRequestAmount = TypeAliasType("OdosSwapRequestAmount", Union[float, str])
43
+ r"""The amount of token_in to be sold."""
44
+
45
+
46
+ class OdosSwapRequestChain(str, Enum):
47
+ ARBITRUM = "arbitrum"
48
+ BASE = "base"
49
+ ETHEREUM = "ethereum"
50
+
51
+
52
+ class OdosSwapRequestTypedDict(TypedDict):
53
+ token_in: OdosSwapRequestTokenInTypedDict
54
+ r"""The symbol or address of the token that is to be sold."""
55
+ token_out: OdosSwapRequestTokenOutTypedDict
56
+ r"""The symbol or address of the token that is to be bought."""
57
+ amount: OdosSwapRequestAmountTypedDict
58
+ r"""The amount of token_in to be sold."""
59
+ max_slippage_percent: float
60
+ r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
61
+ chain: OdosSwapRequestChain
62
+ sender: str
63
+ r"""The address of the transaction sender."""
64
+ action_type: Literal["ODOS_SWAP"]
65
+
66
+
67
+ class OdosSwapRequest(BaseModel):
68
+ token_in: OdosSwapRequestTokenIn
69
+ r"""The symbol or address of the token that is to be sold."""
70
+
71
+ token_out: OdosSwapRequestTokenOut
72
+ r"""The symbol or address of the token that is to be bought."""
73
+
74
+ amount: OdosSwapRequestAmount
75
+ r"""The amount of token_in to be sold."""
76
+
77
+ max_slippage_percent: float
78
+ r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
79
+
80
+ chain: OdosSwapRequestChain
81
+
82
+ sender: str
83
+ r"""The address of the transaction sender."""
84
+
85
+ ACTION_TYPE: Annotated[
86
+ Annotated[
87
+ Optional[Literal["ODOS_SWAP"]], AfterValidator(validate_const("ODOS_SWAP"))
88
+ ],
89
+ pydantic.Field(alias="action_type"),
90
+ ] = "ODOS_SWAP"
@@ -11,16 +11,14 @@ import pydantic
11
11
  from typing_extensions import Annotated, TypedDict
12
12
 
13
13
 
14
- class CompassAPIBackendModelsPendleReadResponsePositionsOpenPositionTypedDict(
15
- TypedDict
16
- ):
14
+ class OpenPositionTypedDict(TypedDict):
17
15
  market_id: str
18
16
  pt: CompassAPIBackendModelsPendleReadResponsePositionsTokenBalanceTypedDict
19
17
  yt: CompassAPIBackendModelsPendleReadResponsePositionsTokenBalanceTypedDict
20
18
  lp: LpBalanceTypedDict
21
19
 
22
20
 
23
- class CompassAPIBackendModelsPendleReadResponsePositionsOpenPosition(BaseModel):
21
+ class OpenPosition(BaseModel):
24
22
  market_id: Annotated[str, pydantic.Field(alias="marketId")]
25
23
 
26
24
  pt: CompassAPIBackendModelsPendleReadResponsePositionsTokenBalance
@@ -18,9 +18,7 @@ from pydantic import model_serializer
18
18
  from typing_extensions import NotRequired, TypedDict
19
19
 
20
20
 
21
- class CompassAPIBackendModelsPendleReadResponseMarketPendleGetMarketResponseTypedDict(
22
- TypedDict
23
- ):
21
+ class PendleGetMarketResponseTypedDict(TypedDict):
24
22
  market_address: str
25
23
  r"""The address of the market."""
26
24
  implied_apy: str
@@ -34,7 +32,7 @@ class CompassAPIBackendModelsPendleReadResponseMarketPendleGetMarketResponseType
34
32
  r"""The user's position in the market."""
35
33
 
36
34
 
37
- class CompassAPIBackendModelsPendleReadResponseMarketPendleGetMarketResponse(BaseModel):
35
+ class PendleGetMarketResponse(BaseModel):
38
36
  market_address: str
39
37
  r"""The address of the market."""
40
38
 
@@ -0,0 +1,17 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .pendlemarket import PendleMarket, PendleMarketTypedDict
5
+ from compass_api_sdk.types import BaseModel
6
+ from typing import List
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class PendleListMarketsResponseTypedDict(TypedDict):
11
+ markets: List[PendleMarketTypedDict]
12
+ r"""A list of active markets on the inputted chain."""
13
+
14
+
15
+ class PendleListMarketsResponse(BaseModel):
16
+ markets: List[PendleMarket]
17
+ r"""A list of active markets on the inputted chain."""
@@ -0,0 +1,17 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .position import Position, PositionTypedDict
5
+ from compass_api_sdk.types import BaseModel
6
+ from typing import List
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class PendleListUserPositionsResponseTypedDict(TypedDict):
11
+ positions: List[PositionTypedDict]
12
+ r"""A list of the user's positions on the given chain."""
13
+
14
+
15
+ class PendleListUserPositionsResponse(BaseModel):
16
+ positions: List[Position]
17
+ r"""A list of the user's positions on the given chain."""
@@ -8,7 +8,7 @@ import pydantic
8
8
  from typing_extensions import Annotated, TypedDict
9
9
 
10
10
 
11
- class CompassAPIBackendModelsPendleReadResponseMarketsPendleMarketTypedDict(TypedDict):
11
+ class PendleMarketTypedDict(TypedDict):
12
12
  name: str
13
13
  address: str
14
14
  expiry: datetime
@@ -22,7 +22,7 @@ class CompassAPIBackendModelsPendleReadResponseMarketsPendleMarketTypedDict(Type
22
22
  timestamp: datetime
23
23
 
24
24
 
25
- class CompassAPIBackendModelsPendleReadResponseMarketsPendleMarket(BaseModel):
25
+ class PendleMarket(BaseModel):
26
26
  name: str
27
27
 
28
28
  address: str
@@ -10,32 +10,26 @@ from typing import Literal, Optional
10
10
  from typing_extensions import Annotated, TypedDict
11
11
 
12
12
 
13
- class CompassAPIBackendModelsPendleTransactRequestRedeemYieldPendleRedeemYieldRequestChain(
14
- str, Enum
15
- ):
13
+ class PendleRedeemYieldRequestChain(str, Enum):
16
14
  ARBITRUM = "arbitrum"
17
15
  BASE = "base"
18
16
  ETHEREUM = "ethereum"
19
17
 
20
18
 
21
- class CompassAPIBackendModelsPendleTransactRequestRedeemYieldPendleRedeemYieldRequestTypedDict(
22
- TypedDict
23
- ):
19
+ class PendleRedeemYieldRequestTypedDict(TypedDict):
24
20
  market_address: str
25
21
  r"""The address of the market identifying which Yield Token (YT) you would like to claim yield from."""
26
- chain: CompassAPIBackendModelsPendleTransactRequestRedeemYieldPendleRedeemYieldRequestChain
22
+ chain: PendleRedeemYieldRequestChain
27
23
  sender: str
28
24
  r"""The address of the transaction sender."""
29
25
  action_type: Literal["PENDLE_REDEEM_YIELD"]
30
26
 
31
27
 
32
- class CompassAPIBackendModelsPendleTransactRequestRedeemYieldPendleRedeemYieldRequest(
33
- BaseModel
34
- ):
28
+ class PendleRedeemYieldRequest(BaseModel):
35
29
  market_address: str
36
30
  r"""The address of the market identifying which Yield Token (YT) you would like to claim yield from."""
37
31
 
38
- chain: CompassAPIBackendModelsPendleTransactRequestRedeemYieldPendleRedeemYieldRequestChain
32
+ chain: PendleRedeemYieldRequestChain
39
33
 
40
34
  sender: str
41
35
  r"""The address of the transaction sender."""
@@ -10,7 +10,7 @@ from typing import List
10
10
  from typing_extensions import TypedDict
11
11
 
12
12
 
13
- class CompassAPIBackendModelsGenericReadResponsePortfolioPortfolioTypedDict(TypedDict):
13
+ class PortfolioTypedDict(TypedDict):
14
14
  total_value_in_usd: str
15
15
  r"""Total value of the portfolio in USD"""
16
16
  token_balances: List[
@@ -19,7 +19,7 @@ class CompassAPIBackendModelsGenericReadResponsePortfolioPortfolioTypedDict(Type
19
19
  r"""List of token balances in the portfolio"""
20
20
 
21
21
 
22
- class CompassAPIBackendModelsGenericReadResponsePortfolioPortfolio(BaseModel):
22
+ class Portfolio(BaseModel):
23
23
  total_value_in_usd: str
24
24
  r"""Total value of the portfolio in USD"""
25
25