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
@@ -0,0 +1,67 @@
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
+ 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
+ TokenTransferParamsAmountTypedDict = TypeAliasType(
14
+ "TokenTransferParamsAmountTypedDict", Union[float, str]
15
+ )
16
+ r"""Amount of token to transfer"""
17
+
18
+
19
+ TokenTransferParamsAmount = TypeAliasType(
20
+ "TokenTransferParamsAmount", Union[float, str]
21
+ )
22
+ r"""Amount of token to transfer"""
23
+
24
+
25
+ TokenTransferParamsTokenTypedDict = TypeAliasType(
26
+ "TokenTransferParamsTokenTypedDict", Union[TokenEnum, str]
27
+ )
28
+ r"""The symbol of the token to transfer.."""
29
+
30
+
31
+ TokenTransferParamsToken = TypeAliasType(
32
+ "TokenTransferParamsToken", Union[TokenEnum, str]
33
+ )
34
+ r"""The symbol of the token to transfer.."""
35
+
36
+
37
+ class TokenTransferParamsTypedDict(TypedDict):
38
+ r"""Parameters model for transferring ETH or ERC20 tokens."""
39
+
40
+ amount: TokenTransferParamsAmountTypedDict
41
+ r"""Amount of token to transfer"""
42
+ token: TokenTransferParamsTokenTypedDict
43
+ r"""The symbol of the token to transfer.."""
44
+ to: str
45
+ r"""The recipient of the tokens."""
46
+ action_type: Literal["TOKEN_TRANSFER"]
47
+
48
+
49
+ class TokenTransferParams(BaseModel):
50
+ r"""Parameters model for transferring ETH or ERC20 tokens."""
51
+
52
+ amount: TokenTransferParamsAmount
53
+ r"""Amount of token to transfer"""
54
+
55
+ token: TokenTransferParamsToken
56
+ r"""The symbol of the token to transfer.."""
57
+
58
+ to: str
59
+ r"""The recipient of the tokens."""
60
+
61
+ ACTION_TYPE: Annotated[
62
+ Annotated[
63
+ Optional[Literal["TOKEN_TRANSFER"]],
64
+ AfterValidator(validate_const("TOKEN_TRANSFER")),
65
+ ],
66
+ pydantic.Field(alias="action_type"),
67
+ ] = "TOKEN_TRANSFER"
@@ -1,10 +1,10 @@
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 .token_enum import TokenEnum
6
5
  from compass_api_sdk.types import BaseModel
7
6
  from compass_api_sdk.utils import validate_const
7
+ from enum import Enum
8
8
  import pydantic
9
9
  from pydantic.functional_validators import AfterValidator
10
10
  from typing import Literal, Optional, Union
@@ -35,6 +35,12 @@ TokenTransferRequestToken = TypeAliasType(
35
35
  r"""The symbol of the token to transfer.."""
36
36
 
37
37
 
38
+ class TokenTransferRequestChain(str, Enum):
39
+ ARBITRUM = "arbitrum"
40
+ BASE = "base"
41
+ ETHEREUM = "ethereum"
42
+
43
+
38
44
  class TokenTransferRequestTypedDict(TypedDict):
39
45
  r"""Request model for transferring ETH or ERC20 tokens."""
40
46
 
@@ -44,8 +50,7 @@ class TokenTransferRequestTypedDict(TypedDict):
44
50
  r"""The symbol of the token to transfer.."""
45
51
  to: str
46
52
  r"""The recipient of the tokens."""
47
- chain: Chain
48
- r"""The chain to use."""
53
+ chain: TokenTransferRequestChain
49
54
  sender: str
50
55
  r"""The address of the transaction sender."""
51
56
  action_type: Literal["TOKEN_TRANSFER"]
@@ -63,8 +68,7 @@ class TokenTransferRequest(BaseModel):
63
68
  to: str
64
69
  r"""The recipient of the tokens."""
65
70
 
66
- chain: Chain
67
- r"""The chain to use."""
71
+ chain: TokenTransferRequestChain
68
72
 
69
73
  sender: str
70
74
  r"""The address of the transaction sender."""
@@ -0,0 +1,40 @@
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 .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
9
+ from .useroperationresponse import UserOperationResponse, UserOperationResponseTypedDict
10
+ from compass_api_sdk.types import BaseModel
11
+ from typing import Union
12
+ from typing_extensions import TypeAliasType, TypedDict
13
+
14
+
15
+ TransactionResponseTransactionTypedDict = TypeAliasType(
16
+ "TransactionResponseTransactionTypedDict",
17
+ Union[
18
+ UserOperationResponseTypedDict,
19
+ UnsignedTransactionTypedDict,
20
+ UnsignedMulticallTransactionTypedDict,
21
+ ],
22
+ )
23
+ r"""The unsigned transaction data. User must sign and broadcast to network."""
24
+
25
+
26
+ TransactionResponseTransaction = TypeAliasType(
27
+ "TransactionResponseTransaction",
28
+ Union[UserOperationResponse, UnsignedTransaction, UnsignedMulticallTransaction],
29
+ )
30
+ r"""The unsigned transaction data. User must sign and broadcast to network."""
31
+
32
+
33
+ class TransactionResponseTypedDict(TypedDict):
34
+ transaction: TransactionResponseTransactionTypedDict
35
+ r"""The unsigned transaction data. User must sign and broadcast to network."""
36
+
37
+
38
+ class TransactionResponse(BaseModel):
39
+ transaction: TransactionResponseTransaction
40
+ r"""The unsigned transaction data. User must sign and broadcast to network."""
@@ -8,70 +8,68 @@ from compass_api_sdk.utils import validate_const
8
8
  import pydantic
9
9
  from pydantic.functional_validators import AfterValidator
10
10
  from typing import Literal, Optional, Union
11
- from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
11
+ from typing_extensions import Annotated, TypeAliasType, TypedDict
12
12
 
13
13
 
14
14
  UniswapBuyExactlyParamsTokenInTypedDict = TypeAliasType(
15
15
  "UniswapBuyExactlyParamsTokenInTypedDict", Union[TokenEnum, str]
16
16
  )
17
- r"""The symbol of the token to swap from."""
17
+ r"""The symbol or address of the token to swap from."""
18
18
 
19
19
 
20
20
  UniswapBuyExactlyParamsTokenIn = TypeAliasType(
21
21
  "UniswapBuyExactlyParamsTokenIn", Union[TokenEnum, str]
22
22
  )
23
- r"""The symbol of the token to swap from."""
23
+ r"""The symbol or address of the token to swap from."""
24
24
 
25
25
 
26
26
  UniswapBuyExactlyParamsTokenOutTypedDict = TypeAliasType(
27
27
  "UniswapBuyExactlyParamsTokenOutTypedDict", Union[TokenEnum, str]
28
28
  )
29
- r"""The symbol of the token to swap to."""
29
+ r"""The symbol or address of the token to swap to."""
30
30
 
31
31
 
32
32
  UniswapBuyExactlyParamsTokenOut = TypeAliasType(
33
33
  "UniswapBuyExactlyParamsTokenOut", Union[TokenEnum, str]
34
34
  )
35
- r"""The symbol of the token to swap to."""
35
+ r"""The symbol or address of the token to swap to."""
36
36
 
37
37
 
38
- UniswapBuyExactlyParamsAmountTypedDict = TypeAliasType(
39
- "UniswapBuyExactlyParamsAmountTypedDict", Union[float, str]
38
+ UniswapBuyExactlyParamsAmountOutTypedDict = TypeAliasType(
39
+ "UniswapBuyExactlyParamsAmountOutTypedDict", Union[float, str]
40
40
  )
41
- r"""The amount of the token to swap to"""
41
+ r"""The amount of 'token_out' to buy."""
42
42
 
43
43
 
44
- UniswapBuyExactlyParamsAmount = TypeAliasType(
45
- "UniswapBuyExactlyParamsAmount", Union[float, str]
44
+ UniswapBuyExactlyParamsAmountOut = TypeAliasType(
45
+ "UniswapBuyExactlyParamsAmountOut", Union[float, str]
46
46
  )
47
- r"""The amount of the token to swap to"""
47
+ r"""The amount of 'token_out' to buy."""
48
48
 
49
49
 
50
50
  class UniswapBuyExactlyParamsTypedDict(TypedDict):
51
51
  token_in: UniswapBuyExactlyParamsTokenInTypedDict
52
- r"""The symbol of the token to swap from."""
52
+ r"""The symbol or address of the token to swap from."""
53
53
  token_out: UniswapBuyExactlyParamsTokenOutTypedDict
54
- r"""The symbol of the token to swap to."""
54
+ r"""The symbol or address of the token to swap to."""
55
55
  fee: FeeEnum
56
56
  r"""The transaction fee of a Uniswap pool in bips.
57
57
 
58
58
  Uniswap supports 4 different fee levels.
59
59
  """
60
- amount: UniswapBuyExactlyParamsAmountTypedDict
61
- r"""The amount of the token to swap to"""
60
+ amount_out: UniswapBuyExactlyParamsAmountOutTypedDict
61
+ r"""The amount of 'token_out' to buy."""
62
62
  max_slippage_percent: float
63
63
  r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
64
64
  action_type: Literal["UNISWAP_BUY_EXACTLY"]
65
- wrap_eth: NotRequired[bool]
66
- r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
67
65
 
68
66
 
69
67
  class UniswapBuyExactlyParams(BaseModel):
70
68
  token_in: UniswapBuyExactlyParamsTokenIn
71
- r"""The symbol of the token to swap from."""
69
+ r"""The symbol or address of the token to swap from."""
72
70
 
73
71
  token_out: UniswapBuyExactlyParamsTokenOut
74
- r"""The symbol of the token to swap to."""
72
+ r"""The symbol or address of the token to swap to."""
75
73
 
76
74
  fee: FeeEnum
77
75
  r"""The transaction fee of a Uniswap pool in bips.
@@ -79,8 +77,8 @@ class UniswapBuyExactlyParams(BaseModel):
79
77
  Uniswap supports 4 different fee levels.
80
78
  """
81
79
 
82
- amount: UniswapBuyExactlyParamsAmount
83
- r"""The amount of the token to swap to"""
80
+ amount_out: UniswapBuyExactlyParamsAmountOut
81
+ r"""The amount of 'token_out' to buy."""
84
82
 
85
83
  max_slippage_percent: float
86
84
  r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
@@ -92,6 +90,3 @@ class UniswapBuyExactlyParams(BaseModel):
92
90
  ],
93
91
  pydantic.Field(alias="action_type"),
94
92
  ] = "UNISWAP_BUY_EXACTLY"
95
-
96
- wrap_eth: Optional[bool] = False
97
- r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
@@ -1,86 +1,89 @@
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 .feeenum import FeeEnum
6
5
  from .token_enum import TokenEnum
7
6
  from compass_api_sdk.types import BaseModel
8
7
  from compass_api_sdk.utils import validate_const
8
+ from enum import Enum
9
9
  import pydantic
10
10
  from pydantic.functional_validators import AfterValidator
11
11
  from typing import Literal, Optional, Union
12
- from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
12
+ from typing_extensions import Annotated, TypeAliasType, TypedDict
13
13
 
14
14
 
15
15
  UniswapBuyExactlyRequestTokenInTypedDict = TypeAliasType(
16
16
  "UniswapBuyExactlyRequestTokenInTypedDict", Union[TokenEnum, str]
17
17
  )
18
- r"""The symbol of the token to swap from."""
18
+ r"""The symbol or address of the token to swap from."""
19
19
 
20
20
 
21
21
  UniswapBuyExactlyRequestTokenIn = TypeAliasType(
22
22
  "UniswapBuyExactlyRequestTokenIn", Union[TokenEnum, str]
23
23
  )
24
- r"""The symbol of the token to swap from."""
24
+ r"""The symbol or address of the token to swap from."""
25
25
 
26
26
 
27
27
  UniswapBuyExactlyRequestTokenOutTypedDict = TypeAliasType(
28
28
  "UniswapBuyExactlyRequestTokenOutTypedDict", Union[TokenEnum, str]
29
29
  )
30
- r"""The symbol of the token to swap to."""
30
+ r"""The symbol or address of the token to swap to."""
31
31
 
32
32
 
33
33
  UniswapBuyExactlyRequestTokenOut = TypeAliasType(
34
34
  "UniswapBuyExactlyRequestTokenOut", Union[TokenEnum, str]
35
35
  )
36
- r"""The symbol of the token to swap to."""
36
+ r"""The symbol or address of the token to swap to."""
37
37
 
38
38
 
39
- UniswapBuyExactlyRequestAmountTypedDict = TypeAliasType(
40
- "UniswapBuyExactlyRequestAmountTypedDict", Union[float, str]
39
+ UniswapBuyExactlyRequestAmountOutTypedDict = TypeAliasType(
40
+ "UniswapBuyExactlyRequestAmountOutTypedDict", Union[float, str]
41
41
  )
42
- r"""The amount of the token to swap to"""
42
+ r"""The amount of 'token_out' to buy."""
43
43
 
44
44
 
45
- UniswapBuyExactlyRequestAmount = TypeAliasType(
46
- "UniswapBuyExactlyRequestAmount", Union[float, str]
45
+ UniswapBuyExactlyRequestAmountOut = TypeAliasType(
46
+ "UniswapBuyExactlyRequestAmountOut", Union[float, str]
47
47
  )
48
- r"""The amount of the token to swap to"""
48
+ r"""The amount of 'token_out' to buy."""
49
+
50
+
51
+ class UniswapBuyExactlyRequestChain(str, Enum):
52
+ ARBITRUM = "arbitrum"
53
+ BASE = "base"
54
+ ETHEREUM = "ethereum"
49
55
 
50
56
 
51
57
  class UniswapBuyExactlyRequestTypedDict(TypedDict):
52
58
  r"""Request model for buying an exact amount of tokens."""
53
59
 
54
60
  token_in: UniswapBuyExactlyRequestTokenInTypedDict
55
- r"""The symbol of the token to swap from."""
61
+ r"""The symbol or address of the token to swap from."""
56
62
  token_out: UniswapBuyExactlyRequestTokenOutTypedDict
57
- r"""The symbol of the token to swap to."""
63
+ r"""The symbol or address of the token to swap to."""
58
64
  fee: FeeEnum
59
65
  r"""The transaction fee of a Uniswap pool in bips.
60
66
 
61
67
  Uniswap supports 4 different fee levels.
62
68
  """
63
- amount: UniswapBuyExactlyRequestAmountTypedDict
64
- r"""The amount of the token to swap to"""
69
+ amount_out: UniswapBuyExactlyRequestAmountOutTypedDict
70
+ r"""The amount of 'token_out' to buy."""
65
71
  max_slippage_percent: float
66
72
  r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
67
- chain: Chain
68
- r"""The chain to use."""
73
+ chain: UniswapBuyExactlyRequestChain
69
74
  sender: str
70
75
  r"""The address of the transaction sender."""
71
76
  action_type: Literal["UNISWAP_BUY_EXACTLY"]
72
- wrap_eth: NotRequired[bool]
73
- r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
74
77
 
75
78
 
76
79
  class UniswapBuyExactlyRequest(BaseModel):
77
80
  r"""Request model for buying an exact amount of tokens."""
78
81
 
79
82
  token_in: UniswapBuyExactlyRequestTokenIn
80
- r"""The symbol of the token to swap from."""
83
+ r"""The symbol or address of the token to swap from."""
81
84
 
82
85
  token_out: UniswapBuyExactlyRequestTokenOut
83
- r"""The symbol of the token to swap to."""
86
+ r"""The symbol or address of the token to swap to."""
84
87
 
85
88
  fee: FeeEnum
86
89
  r"""The transaction fee of a Uniswap pool in bips.
@@ -88,14 +91,13 @@ class UniswapBuyExactlyRequest(BaseModel):
88
91
  Uniswap supports 4 different fee levels.
89
92
  """
90
93
 
91
- amount: UniswapBuyExactlyRequestAmount
92
- r"""The amount of the token to swap to"""
94
+ amount_out: UniswapBuyExactlyRequestAmountOut
95
+ r"""The amount of 'token_out' to buy."""
93
96
 
94
97
  max_slippage_percent: float
95
98
  r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
96
99
 
97
- chain: Chain
98
- r"""The chain to use."""
100
+ chain: UniswapBuyExactlyRequestChain
99
101
 
100
102
  sender: str
101
103
  r"""The address of the transaction sender."""
@@ -107,6 +109,3 @@ class UniswapBuyExactlyRequest(BaseModel):
107
109
  ],
108
110
  pydantic.Field(alias="action_type"),
109
111
  ] = "UNISWAP_BUY_EXACTLY"
110
-
111
- wrap_eth: Optional[bool] = False
112
- r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
@@ -0,0 +1,45 @@
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 .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
9
+ from .useroperationresponse import UserOperationResponse, UserOperationResponseTypedDict
10
+ from compass_api_sdk.types import BaseModel
11
+ from typing import Union
12
+ from typing_extensions import TypeAliasType, TypedDict
13
+
14
+
15
+ UniswapBuyExactlyTransactionResponseTransactionTypedDict = TypeAliasType(
16
+ "UniswapBuyExactlyTransactionResponseTransactionTypedDict",
17
+ Union[
18
+ UserOperationResponseTypedDict,
19
+ UnsignedTransactionTypedDict,
20
+ UnsignedMulticallTransactionTypedDict,
21
+ ],
22
+ )
23
+ r"""The unsigned transaction data. User must sign and broadcast to network."""
24
+
25
+
26
+ UniswapBuyExactlyTransactionResponseTransaction = TypeAliasType(
27
+ "UniswapBuyExactlyTransactionResponseTransaction",
28
+ Union[UserOperationResponse, UnsignedTransaction, UnsignedMulticallTransaction],
29
+ )
30
+ r"""The unsigned transaction data. User must sign and broadcast to network."""
31
+
32
+
33
+ class UniswapBuyExactlyTransactionResponseTypedDict(TypedDict):
34
+ transaction: UniswapBuyExactlyTransactionResponseTransactionTypedDict
35
+ r"""The unsigned transaction data. User must sign and broadcast to network."""
36
+ amount_in_quote: str
37
+ r"""The estimated amount in for the transaction. The actual input amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote."""
38
+
39
+
40
+ class UniswapBuyExactlyTransactionResponse(BaseModel):
41
+ transaction: UniswapBuyExactlyTransactionResponseTransaction
42
+ r"""The unsigned transaction data. User must sign and broadcast to network."""
43
+
44
+ amount_in_quote: str
45
+ r"""The estimated amount in for the transaction. The actual input amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote."""
@@ -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
@@ -58,6 +58,12 @@ UniswapIncreaseLiquidityProvisionRequestAmount1Min = TypeAliasType(
58
58
  r"""The minimum amount of the second token to deposit"""
59
59
 
60
60
 
61
+ class UniswapIncreaseLiquidityProvisionRequestChain(str, Enum):
62
+ ARBITRUM = "arbitrum"
63
+ BASE = "base"
64
+ ETHEREUM = "ethereum"
65
+
66
+
61
67
  class UniswapIncreaseLiquidityProvisionRequestTypedDict(TypedDict):
62
68
  r"""Request model for increasing liquidity provision in Uniswap V3."""
63
69
 
@@ -71,8 +77,7 @@ class UniswapIncreaseLiquidityProvisionRequestTypedDict(TypedDict):
71
77
  r"""The minimum amount of the first token to deposit"""
72
78
  amount1_min: UniswapIncreaseLiquidityProvisionRequestAmount1MinTypedDict
73
79
  r"""The minimum amount of the second token to deposit"""
74
- chain: Chain
75
- r"""The chain to use."""
80
+ chain: UniswapIncreaseLiquidityProvisionRequestChain
76
81
  sender: str
77
82
  r"""The address of the transaction sender."""
78
83
  action_type: Literal["UNISWAP_ADD_LIQUIDITY"]
@@ -96,8 +101,7 @@ class UniswapIncreaseLiquidityProvisionRequest(BaseModel):
96
101
  amount1_min: UniswapIncreaseLiquidityProvisionRequestAmount1Min
97
102
  r"""The minimum amount of the second token to deposit"""
98
103
 
99
- chain: Chain
100
- r"""The chain to use."""
104
+ chain: UniswapIncreaseLiquidityProvisionRequestChain
101
105
 
102
106
  sender: str
103
107
  r"""The address of the transaction sender."""
@@ -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 .feeenum import FeeEnum
6
5
  from .token_enum import TokenEnum
7
6
  from compass_api_sdk.types import (
@@ -12,6 +11,7 @@ from compass_api_sdk.types import (
12
11
  UNSET_SENTINEL,
13
12
  )
14
13
  from compass_api_sdk.utils import validate_const
14
+ from enum import Enum
15
15
  import pydantic
16
16
  from pydantic import model_serializer
17
17
  from pydantic.functional_validators import AfterValidator
@@ -67,6 +67,12 @@ UniswapMintLiquidityProvisionRequestAmount1Min = TypeAliasType(
67
67
  r"""The minimum amount of the second token to deposit"""
68
68
 
69
69
 
70
+ class UniswapMintLiquidityProvisionRequestChain(str, Enum):
71
+ ARBITRUM = "arbitrum"
72
+ BASE = "base"
73
+ ETHEREUM = "ethereum"
74
+
75
+
70
76
  class UniswapMintLiquidityProvisionRequestTypedDict(TypedDict):
71
77
  r"""Request model for minting a new liquidity position."""
72
78
 
@@ -99,8 +105,7 @@ class UniswapMintLiquidityProvisionRequestTypedDict(TypedDict):
99
105
  r"""The minimum amount of the first token to deposit"""
100
106
  amount1_min: UniswapMintLiquidityProvisionRequestAmount1MinTypedDict
101
107
  r"""The minimum amount of the second token to deposit"""
102
- chain: Chain
103
- r"""The chain to use."""
108
+ chain: UniswapMintLiquidityProvisionRequestChain
104
109
  sender: str
105
110
  r"""The address of the transaction sender."""
106
111
  action_type: Literal["UNISWAP_MINT_LIQUIDITY_PROVISION"]
@@ -149,8 +154,7 @@ class UniswapMintLiquidityProvisionRequest(BaseModel):
149
154
  amount1_min: UniswapMintLiquidityProvisionRequestAmount1Min
150
155
  r"""The minimum amount of the second token to deposit"""
151
156
 
152
- chain: Chain
153
- r"""The chain to use."""
157
+ chain: UniswapMintLiquidityProvisionRequestChain
154
158
 
155
159
  sender: str
156
160
  r"""The address of the transaction sender."""
@@ -8,66 +8,72 @@ from compass_api_sdk.utils import validate_const
8
8
  import pydantic
9
9
  from pydantic.functional_validators import AfterValidator
10
10
  from typing import Literal, Optional, Union
11
- from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
11
+ from typing_extensions import Annotated, TypeAliasType, TypedDict
12
12
 
13
13
 
14
- UniswapSellExactlyParamsAmountTypedDict = TypeAliasType(
15
- "UniswapSellExactlyParamsAmountTypedDict", Union[float, str]
14
+ UniswapSellExactlyParamsTokenInTypedDict = TypeAliasType(
15
+ "UniswapSellExactlyParamsTokenInTypedDict", Union[TokenEnum, str]
16
16
  )
17
- r"""The amount of the token to swap from"""
17
+ r"""The symbol or address of the token to sell.."""
18
18
 
19
19
 
20
- UniswapSellExactlyParamsAmount = TypeAliasType(
21
- "UniswapSellExactlyParamsAmount", Union[float, str]
20
+ UniswapSellExactlyParamsTokenIn = TypeAliasType(
21
+ "UniswapSellExactlyParamsTokenIn", Union[TokenEnum, str]
22
22
  )
23
- r"""The amount of the token to swap from"""
23
+ r"""The symbol or address of the token to sell.."""
24
24
 
25
25
 
26
- class UniswapSellExactlyParamsTypedDict(TypedDict):
27
- r"""Parameters model for selling exactly an amount of tokens."""
26
+ UniswapSellExactlyParamsTokenOutTypedDict = TypeAliasType(
27
+ "UniswapSellExactlyParamsTokenOutTypedDict", Union[TokenEnum, str]
28
+ )
29
+ r"""The symbol or address of the token to buy.."""
28
30
 
29
- token_in: TokenEnum
30
- r"""A class representing the token.
31
31
 
32
- This class is used to represent the token in the system. Notice individual
33
- endpoints' documentation where per chain tokens are presented.
34
- """
35
- token_out: TokenEnum
36
- r"""A class representing the token.
32
+ UniswapSellExactlyParamsTokenOut = TypeAliasType(
33
+ "UniswapSellExactlyParamsTokenOut", Union[TokenEnum, str]
34
+ )
35
+ r"""The symbol or address of the token to buy.."""
37
36
 
38
- This class is used to represent the token in the system. Notice individual
39
- endpoints' documentation where per chain tokens are presented.
40
- """
37
+
38
+ UniswapSellExactlyParamsAmountInTypedDict = TypeAliasType(
39
+ "UniswapSellExactlyParamsAmountInTypedDict", Union[float, str]
40
+ )
41
+ r"""The amount of the `token_in` to sell"""
42
+
43
+
44
+ UniswapSellExactlyParamsAmountIn = TypeAliasType(
45
+ "UniswapSellExactlyParamsAmountIn", Union[float, str]
46
+ )
47
+ r"""The amount of the `token_in` to sell"""
48
+
49
+
50
+ class UniswapSellExactlyParamsTypedDict(TypedDict):
51
+ r"""Parameters model for selling exactly an amount of tokens."""
52
+
53
+ token_in: UniswapSellExactlyParamsTokenInTypedDict
54
+ r"""The symbol or address of the token to sell.."""
55
+ token_out: UniswapSellExactlyParamsTokenOutTypedDict
56
+ r"""The symbol or address of the token to buy.."""
41
57
  fee: FeeEnum
42
58
  r"""The transaction fee of a Uniswap pool in bips.
43
59
 
44
60
  Uniswap supports 4 different fee levels.
45
61
  """
46
- amount: UniswapSellExactlyParamsAmountTypedDict
47
- r"""The amount of the token to swap from"""
62
+ amount_in: UniswapSellExactlyParamsAmountInTypedDict
63
+ r"""The amount of the `token_in` to sell"""
48
64
  max_slippage_percent: float
49
65
  r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
50
66
  action_type: Literal["UNISWAP_SELL_EXACTLY"]
51
- wrap_eth: NotRequired[bool]
52
- r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
53
67
 
54
68
 
55
69
  class UniswapSellExactlyParams(BaseModel):
56
70
  r"""Parameters model for selling exactly an amount of tokens."""
57
71
 
58
- token_in: TokenEnum
59
- r"""A class representing the token.
72
+ token_in: UniswapSellExactlyParamsTokenIn
73
+ r"""The symbol or address of the token to sell.."""
60
74
 
61
- This class is used to represent the token in the system. Notice individual
62
- endpoints' documentation where per chain tokens are presented.
63
- """
64
-
65
- token_out: TokenEnum
66
- r"""A class representing the token.
67
-
68
- This class is used to represent the token in the system. Notice individual
69
- endpoints' documentation where per chain tokens are presented.
70
- """
75
+ token_out: UniswapSellExactlyParamsTokenOut
76
+ r"""The symbol or address of the token to buy.."""
71
77
 
72
78
  fee: FeeEnum
73
79
  r"""The transaction fee of a Uniswap pool in bips.
@@ -75,8 +81,8 @@ class UniswapSellExactlyParams(BaseModel):
75
81
  Uniswap supports 4 different fee levels.
76
82
  """
77
83
 
78
- amount: UniswapSellExactlyParamsAmount
79
- r"""The amount of the token to swap from"""
84
+ amount_in: UniswapSellExactlyParamsAmountIn
85
+ r"""The amount of the `token_in` to sell"""
80
86
 
81
87
  max_slippage_percent: float
82
88
  r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
@@ -88,6 +94,3 @@ class UniswapSellExactlyParams(BaseModel):
88
94
  ],
89
95
  pydantic.Field(alias="action_type"),
90
96
  ] = "UNISWAP_SELL_EXACTLY"
91
-
92
- wrap_eth: Optional[bool] = False
93
- r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""