compass_api_sdk 0.1.0__py3-none-any.whl → 0.1.2__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 (172) hide show
  1. {compass_api_sdk-0.1.0.dist-info → compass_api_sdk-0.1.2.dist-info}/METADATA +40 -39
  2. compass_api_sdk-0.1.2.dist-info/RECORD +165 -0
  3. {compass_api_sdk → compassapisdk}/_hooks/sdkhooks.py +1 -1
  4. {compass_api_sdk → compassapisdk}/_hooks/types.py +1 -1
  5. {compass_api_sdk → compassapisdk}/_version.py +2 -2
  6. {compass_api_sdk → compassapisdk}/aave_v3.py +9 -9
  7. {compass_api_sdk → compassapisdk}/aerodrome_slipstream.py +3 -3
  8. {compass_api_sdk → compassapisdk}/basesdk.py +3 -3
  9. {compass_api_sdk → compassapisdk}/errors/httpvalidationerror.py +3 -3
  10. {compass_api_sdk → compassapisdk}/models/__init__.py +431 -47
  11. {compass_api_sdk → compassapisdk}/models/aave_liquidity_changeop.py +2 -2
  12. {compass_api_sdk → compassapisdk}/models/aave_token_priceop.py +2 -2
  13. {compass_api_sdk → compassapisdk}/models/aave_user_position_per_tokenop.py +5 -7
  14. {compass_api_sdk → compassapisdk}/models/aave_user_position_summaryop.py +5 -7
  15. compassapisdk/models/aaveborrowparams.py +94 -0
  16. {compass_api_sdk → compassapisdk}/models/aaveborrowrequest.py +1 -1
  17. {compass_api_sdk → compassapisdk}/models/aaveliquiditychangeresponse.py +1 -1
  18. compassapisdk/models/aaverepayparams.py +94 -0
  19. {compass_api_sdk → compassapisdk}/models/aaverepayrequest.py +1 -1
  20. compassapisdk/models/aavesupplyparams.py +82 -0
  21. {compass_api_sdk → compassapisdk}/models/aavesupplyrequest.py +1 -1
  22. {compass_api_sdk → compassapisdk}/models/aavetokenpriceresponse.py +1 -1
  23. {compass_api_sdk → compassapisdk}/models/aaveuserpositionpertokenresponse.py +1 -1
  24. {compass_api_sdk → compassapisdk}/models/aaveuserpositionsummaryresponse.py +1 -1
  25. compassapisdk/models/aavewithdrawparams.py +45 -0
  26. {compass_api_sdk → compassapisdk}/models/aavewithdrawrequest.py +1 -1
  27. {compass_api_sdk → compassapisdk}/models/aerodrome_slipstream_liquidity_provision_positionsop.py +2 -2
  28. {compass_api_sdk → compassapisdk}/models/aerodrome_slipstream_pool_priceop.py +2 -2
  29. compassapisdk/models/aerodromeaddliquidityethparams.py +153 -0
  30. compassapisdk/models/aerodromeaddliquidityparams.py +160 -0
  31. {compass_api_sdk → compassapisdk}/models/aerodromelppositionsresponse.py +1 -1
  32. {compass_api_sdk → compassapisdk}/models/aerodromeposition.py +1 -1
  33. compassapisdk/models/aerodromeremoveliquidityethrequest.py +139 -0
  34. compassapisdk/models/aerodromeremoveliquidityrequest.py +152 -0
  35. compassapisdk/models/aerodromeslipstreambuyexactlyparams.py +81 -0
  36. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreambuyexactlyrequest.py +1 -1
  37. compassapisdk/models/aerodromeslipstreamincreaseliquidityprovisionparams.py +110 -0
  38. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +1 -1
  39. compassapisdk/models/aerodromeslipstreammintliquidityprovisionparams.py +175 -0
  40. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreammintliquidityprovisionrequest.py +1 -1
  41. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreampoolpriceresponse.py +1 -1
  42. compassapisdk/models/aerodromeslipstreamsellexactlyparams.py +85 -0
  43. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreamsellexactlyrequest.py +1 -1
  44. compassapisdk/models/aerodromeslipstreamwithdrawliquidityprovisionparams.py +51 -0
  45. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +1 -1
  46. compassapisdk/models/aerodromeswapethfortokenparams.py +110 -0
  47. compassapisdk/models/aerodromeswaptokenforethparams.py +110 -0
  48. compassapisdk/models/aerodromeswaptokensparams.py +135 -0
  49. {compass_api_sdk → compassapisdk}/models/allowanceinforesponse.py +1 -1
  50. {compass_api_sdk → compassapisdk}/models/chaininfo.py +1 -1
  51. {compass_api_sdk → compassapisdk}/models/compass_api_backend_models_morpho_read_response_get_markets_asset.py +1 -1
  52. {compass_api_sdk → compassapisdk}/models/compass_api_backend_models_morpho_read_response_get_vaults_asset.py +1 -1
  53. compassapisdk/models/contractname.py +34 -0
  54. {compass_api_sdk → compassapisdk}/models/ensnameinforesponse.py +1 -1
  55. {compass_api_sdk → compassapisdk}/models/generic_allowanceop.py +2 -2
  56. {compass_api_sdk → compassapisdk}/models/generic_ensop.py +2 -2
  57. {compass_api_sdk → compassapisdk}/models/generic_portfolioop.py +2 -2
  58. {compass_api_sdk → compassapisdk}/models/generic_supported_tokensop.py +2 -2
  59. {compass_api_sdk → compassapisdk}/models/generic_visualize_portfolioop.py +2 -2
  60. {compass_api_sdk → compassapisdk}/models/image.py +1 -1
  61. compassapisdk/models/increaseallowanceanyparams.py +62 -0
  62. compassapisdk/models/increaseallowanceparams.py +66 -0
  63. {compass_api_sdk → compassapisdk}/models/increaseallowancerequest.py +4 -4
  64. {compass_api_sdk → compassapisdk}/models/marketstate.py +1 -1
  65. {compass_api_sdk → compassapisdk}/models/morpho_market_positionop.py +2 -2
  66. {compass_api_sdk → compassapisdk}/models/morpho_marketsop.py +2 -2
  67. {compass_api_sdk → compassapisdk}/models/morpho_vault_positionop.py +2 -2
  68. {compass_api_sdk → compassapisdk}/models/morpho_vaultsop.py +2 -2
  69. {compass_api_sdk → compassapisdk}/models/morphoborrowrequest.py +1 -1
  70. {compass_api_sdk → compassapisdk}/models/morphocheckmarketpositionresponse.py +1 -1
  71. {compass_api_sdk → compassapisdk}/models/morphocheckvaultpositionresponse.py +1 -1
  72. {compass_api_sdk → compassapisdk}/models/morphodepositrequest.py +1 -1
  73. {compass_api_sdk → compassapisdk}/models/morphogetmarketsresponse.py +1 -1
  74. {compass_api_sdk → compassapisdk}/models/morphogetvaultsresponse.py +1 -1
  75. {compass_api_sdk → compassapisdk}/models/morphomarket.py +1 -1
  76. {compass_api_sdk → compassapisdk}/models/morphorepayrequest.py +1 -1
  77. {compass_api_sdk → compassapisdk}/models/morphosetvaultallowancerequest.py +1 -1
  78. {compass_api_sdk → compassapisdk}/models/morphosupplycollateralrequest.py +1 -1
  79. {compass_api_sdk → compassapisdk}/models/morphovault.py +1 -1
  80. {compass_api_sdk → compassapisdk}/models/morphowithdrawcollateralrequest.py +1 -1
  81. {compass_api_sdk → compassapisdk}/models/morphowithdrawrequest.py +1 -1
  82. compassapisdk/models/multicallaction.py +170 -0
  83. compassapisdk/models/multicallactiontype.py +33 -0
  84. compassapisdk/models/multicallauthorizationrequest.py +35 -0
  85. compassapisdk/models/multicallauthorizationresponse.py +31 -0
  86. compassapisdk/models/multicallexecuterequest.py +36 -0
  87. {compass_api_sdk → compassapisdk}/models/portfolio.py +1 -1
  88. {compass_api_sdk → compassapisdk}/models/security.py +2 -2
  89. compassapisdk/models/signedauthorization.py +42 -0
  90. {compass_api_sdk → compassapisdk}/models/token_addressop.py +2 -2
  91. {compass_api_sdk → compassapisdk}/models/token_balanceop.py +2 -2
  92. {compass_api_sdk → compassapisdk}/models/token_priceop.py +2 -2
  93. {compass_api_sdk → compassapisdk}/models/tokenaddressresponse.py +1 -1
  94. {compass_api_sdk → compassapisdk}/models/tokenbalance.py +1 -1
  95. {compass_api_sdk → compassapisdk}/models/tokenbalanceresponse.py +1 -1
  96. {compass_api_sdk → compassapisdk}/models/tokeninfo.py +1 -1
  97. {compass_api_sdk → compassapisdk}/models/tokenpriceresponse.py +1 -1
  98. compass_api_sdk/models/transfererc20request.py → compassapisdk/models/tokentransfererc20params.py +11 -22
  99. {compass_api_sdk → compassapisdk}/models/tokentransferrequest.py +1 -1
  100. {compass_api_sdk → compassapisdk}/models/uniswap_liquidity_provision_in_rangeop.py +2 -2
  101. {compass_api_sdk → compassapisdk}/models/uniswap_liquidity_provision_positionsop.py +2 -2
  102. {compass_api_sdk → compassapisdk}/models/uniswap_pool_priceop.py +2 -2
  103. {compass_api_sdk → compassapisdk}/models/uniswap_quote_buy_exactlyop.py +2 -2
  104. {compass_api_sdk → compassapisdk}/models/uniswap_quote_sell_exactlyop.py +2 -2
  105. compassapisdk/models/uniswapbuyexactlyparams.py +89 -0
  106. {compass_api_sdk → compassapisdk}/models/uniswapbuyexactlyrequest.py +1 -1
  107. {compass_api_sdk → compassapisdk}/models/uniswapbuyquoteinforesponse.py +1 -1
  108. {compass_api_sdk → compassapisdk}/models/uniswapcheckinrangeresponse.py +1 -1
  109. compassapisdk/models/uniswapincreaseliquidityprovisionparams.py +84 -0
  110. {compass_api_sdk → compassapisdk}/models/uniswapincreaseliquidityprovisionrequest.py +1 -1
  111. {compass_api_sdk → compassapisdk}/models/uniswaplppositionsinforesponse.py +1 -1
  112. compassapisdk/models/uniswapmintliquidityprovisionparams.py +170 -0
  113. {compass_api_sdk → compassapisdk}/models/uniswapmintliquidityprovisionrequest.py +1 -1
  114. {compass_api_sdk → compassapisdk}/models/uniswappoolpriceresponse.py +1 -1
  115. {compass_api_sdk → compassapisdk}/models/uniswappositionssolidityresponse.py +1 -1
  116. compassapisdk/models/uniswapsellexactlyparams.py +93 -0
  117. {compass_api_sdk → compassapisdk}/models/uniswapsellexactlyrequest.py +1 -1
  118. {compass_api_sdk → compassapisdk}/models/uniswapsellquoteinforesponse.py +1 -1
  119. compassapisdk/models/uniswapwithdrawliquidityprovisionparams.py +50 -0
  120. {compass_api_sdk → compassapisdk}/models/uniswapwithdrawliquidityprovisionrequest.py +1 -1
  121. compassapisdk/models/unsignedmulticalltransaction.py +67 -0
  122. {compass_api_sdk → compassapisdk}/models/unsignedtransaction.py +1 -1
  123. compassapisdk/models/unwrapwethparams.py +30 -0
  124. {compass_api_sdk → compassapisdk}/models/unwrapwethrequest.py +1 -1
  125. {compass_api_sdk → compassapisdk}/models/validationerror.py +1 -1
  126. {compass_api_sdk → compassapisdk}/models/vaultstate.py +1 -1
  127. {compass_api_sdk → compassapisdk}/models/weeklyapys.py +1 -1
  128. compassapisdk/models/wrapethparams.py +30 -0
  129. {compass_api_sdk → compassapisdk}/models/wrapethrequest.py +1 -1
  130. {compass_api_sdk → compassapisdk}/morpho.py +3 -3
  131. {compass_api_sdk → compassapisdk}/sdk.py +12 -9
  132. {compass_api_sdk → compassapisdk}/sdkconfiguration.py +2 -2
  133. {compass_api_sdk → compassapisdk}/token_sdk.py +3 -3
  134. compassapisdk/transaction_batching.py +473 -0
  135. {compass_api_sdk → compassapisdk}/uniswap_v3.py +3 -3
  136. {compass_api_sdk → compassapisdk}/universal.py +144 -1012
  137. compass_api_sdk/_hooks/registration.py +0 -13
  138. compass_api_sdk/models/balanceinforesponse.py +0 -43
  139. compass_api_sdk/models/generic_balanceop.py +0 -104
  140. compass_api_sdk/models/generic_price_usdop.py +0 -97
  141. compass_api_sdk/models/priceresponse.py +0 -15
  142. compass_api_sdk/models/transferethrequest.py +0 -46
  143. compass_api_sdk-0.1.0.dist-info/RECORD +0 -137
  144. {compass_api_sdk-0.1.0.dist-info → compass_api_sdk-0.1.2.dist-info}/WHEEL +0 -0
  145. {compass_api_sdk → compassapisdk}/__init__.py +0 -0
  146. {compass_api_sdk → compassapisdk}/_hooks/__init__.py +0 -0
  147. {compass_api_sdk → compassapisdk}/errors/__init__.py +0 -0
  148. {compass_api_sdk → compassapisdk}/errors/apierror.py +0 -0
  149. {compass_api_sdk → compassapisdk}/httpclient.py +0 -0
  150. {compass_api_sdk → compassapisdk}/models/chain.py +0 -0
  151. {compass_api_sdk → compassapisdk}/models/feeenum.py +0 -0
  152. {compass_api_sdk → compassapisdk}/models/interestratemode.py +0 -0
  153. {compass_api_sdk → compassapisdk}/models/token_enum.py +0 -0
  154. {compass_api_sdk → compassapisdk}/py.typed +0 -0
  155. {compass_api_sdk → compassapisdk}/types/__init__.py +0 -0
  156. {compass_api_sdk → compassapisdk}/types/basemodel.py +0 -0
  157. {compass_api_sdk → compassapisdk}/utils/__init__.py +0 -0
  158. {compass_api_sdk → compassapisdk}/utils/annotations.py +0 -0
  159. {compass_api_sdk → compassapisdk}/utils/datetimes.py +0 -0
  160. {compass_api_sdk → compassapisdk}/utils/enums.py +0 -0
  161. {compass_api_sdk → compassapisdk}/utils/eventstreaming.py +0 -0
  162. {compass_api_sdk → compassapisdk}/utils/forms.py +0 -0
  163. {compass_api_sdk → compassapisdk}/utils/headers.py +0 -0
  164. {compass_api_sdk → compassapisdk}/utils/logger.py +0 -0
  165. {compass_api_sdk → compassapisdk}/utils/metadata.py +0 -0
  166. {compass_api_sdk → compassapisdk}/utils/queryparams.py +0 -0
  167. {compass_api_sdk → compassapisdk}/utils/requestbodies.py +0 -0
  168. {compass_api_sdk → compassapisdk}/utils/retries.py +0 -0
  169. {compass_api_sdk → compassapisdk}/utils/security.py +0 -0
  170. {compass_api_sdk → compassapisdk}/utils/serializers.py +0 -0
  171. {compass_api_sdk → compassapisdk}/utils/url.py +0 -0
  172. {compass_api_sdk → compassapisdk}/utils/values.py +0 -0
@@ -0,0 +1,175 @@
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 compassapisdk.types import (
6
+ BaseModel,
7
+ Nullable,
8
+ OptionalNullable,
9
+ UNSET,
10
+ UNSET_SENTINEL,
11
+ )
12
+ from pydantic import model_serializer
13
+ from typing import Union
14
+ from typing_extensions import NotRequired, TypeAliasType, TypedDict
15
+
16
+
17
+ AerodromeSlipstreamMintLiquidityProvisionParamsAmount0DesiredTypedDict = TypeAliasType(
18
+ "AerodromeSlipstreamMintLiquidityProvisionParamsAmount0DesiredTypedDict",
19
+ Union[float, str],
20
+ )
21
+ r"""The desired amount of the first token to deposit"""
22
+
23
+
24
+ AerodromeSlipstreamMintLiquidityProvisionParamsAmount0Desired = TypeAliasType(
25
+ "AerodromeSlipstreamMintLiquidityProvisionParamsAmount0Desired", Union[float, str]
26
+ )
27
+ r"""The desired amount of the first token to deposit"""
28
+
29
+
30
+ AerodromeSlipstreamMintLiquidityProvisionParamsAmount1DesiredTypedDict = TypeAliasType(
31
+ "AerodromeSlipstreamMintLiquidityProvisionParamsAmount1DesiredTypedDict",
32
+ Union[float, str],
33
+ )
34
+ r"""The desired amount of the second token to deposit"""
35
+
36
+
37
+ AerodromeSlipstreamMintLiquidityProvisionParamsAmount1Desired = TypeAliasType(
38
+ "AerodromeSlipstreamMintLiquidityProvisionParamsAmount1Desired", Union[float, str]
39
+ )
40
+ r"""The desired amount of the second token to deposit"""
41
+
42
+
43
+ AerodromeSlipstreamMintLiquidityProvisionParamsAmount0MinTypedDict = TypeAliasType(
44
+ "AerodromeSlipstreamMintLiquidityProvisionParamsAmount0MinTypedDict",
45
+ Union[float, str],
46
+ )
47
+ r"""The minimum amount of the first token to deposit"""
48
+
49
+
50
+ AerodromeSlipstreamMintLiquidityProvisionParamsAmount0Min = TypeAliasType(
51
+ "AerodromeSlipstreamMintLiquidityProvisionParamsAmount0Min", Union[float, str]
52
+ )
53
+ r"""The minimum amount of the first token to deposit"""
54
+
55
+
56
+ AerodromeSlipstreamMintLiquidityProvisionParamsAmount1MinTypedDict = TypeAliasType(
57
+ "AerodromeSlipstreamMintLiquidityProvisionParamsAmount1MinTypedDict",
58
+ Union[float, str],
59
+ )
60
+ r"""The minimum amount of the second token to deposit"""
61
+
62
+
63
+ AerodromeSlipstreamMintLiquidityProvisionParamsAmount1Min = TypeAliasType(
64
+ "AerodromeSlipstreamMintLiquidityProvisionParamsAmount1Min", Union[float, str]
65
+ )
66
+ r"""The minimum amount of the second token to deposit"""
67
+
68
+
69
+ class AerodromeSlipstreamMintLiquidityProvisionParamsTypedDict(TypedDict):
70
+ r"""Parameters model for minting a new liquidity position."""
71
+
72
+ token0: TokenEnum
73
+ r"""A class representing the token.
74
+
75
+ This class is used to represent the token in the system. Notice individual
76
+ endpoints' documentation where per chain tokens are presented.
77
+ """
78
+ token1: TokenEnum
79
+ r"""A class representing the token.
80
+
81
+ This class is used to represent the token in the system. Notice individual
82
+ endpoints' documentation where per chain tokens are presented.
83
+ """
84
+ tick_spacing: int
85
+ r"""The tick spacing of the pool"""
86
+ tick_lower: int
87
+ r"""The lower tick of the range to mint the position in"""
88
+ tick_upper: int
89
+ r"""The upper tick of the range to mint the position in"""
90
+ amount0_desired: (
91
+ AerodromeSlipstreamMintLiquidityProvisionParamsAmount0DesiredTypedDict
92
+ )
93
+ r"""The desired amount of the first token to deposit"""
94
+ amount1_desired: (
95
+ AerodromeSlipstreamMintLiquidityProvisionParamsAmount1DesiredTypedDict
96
+ )
97
+ r"""The desired amount of the second token to deposit"""
98
+ amount0_min: AerodromeSlipstreamMintLiquidityProvisionParamsAmount0MinTypedDict
99
+ r"""The minimum amount of the first token to deposit"""
100
+ amount1_min: AerodromeSlipstreamMintLiquidityProvisionParamsAmount1MinTypedDict
101
+ r"""The minimum amount of the second token to deposit"""
102
+ recipient: NotRequired[Nullable[str]]
103
+ r"""The address that will receive the LP tokens"""
104
+
105
+
106
+ class AerodromeSlipstreamMintLiquidityProvisionParams(BaseModel):
107
+ r"""Parameters model for minting a new liquidity position."""
108
+
109
+ token0: TokenEnum
110
+ r"""A class representing the token.
111
+
112
+ This class is used to represent the token in the system. Notice individual
113
+ endpoints' documentation where per chain tokens are presented.
114
+ """
115
+
116
+ token1: TokenEnum
117
+ r"""A class representing the token.
118
+
119
+ This class is used to represent the token in the system. Notice individual
120
+ endpoints' documentation where per chain tokens are presented.
121
+ """
122
+
123
+ tick_spacing: int
124
+ r"""The tick spacing of the pool"""
125
+
126
+ tick_lower: int
127
+ r"""The lower tick of the range to mint the position in"""
128
+
129
+ tick_upper: int
130
+ r"""The upper tick of the range to mint the position in"""
131
+
132
+ amount0_desired: AerodromeSlipstreamMintLiquidityProvisionParamsAmount0Desired
133
+ r"""The desired amount of the first token to deposit"""
134
+
135
+ amount1_desired: AerodromeSlipstreamMintLiquidityProvisionParamsAmount1Desired
136
+ r"""The desired amount of the second token to deposit"""
137
+
138
+ amount0_min: AerodromeSlipstreamMintLiquidityProvisionParamsAmount0Min
139
+ r"""The minimum amount of the first token to deposit"""
140
+
141
+ amount1_min: AerodromeSlipstreamMintLiquidityProvisionParamsAmount1Min
142
+ r"""The minimum amount of the second token to deposit"""
143
+
144
+ recipient: OptionalNullable[str] = UNSET
145
+ r"""The address that will receive the LP tokens"""
146
+
147
+ @model_serializer(mode="wrap")
148
+ def serialize_model(self, handler):
149
+ optional_fields = ["recipient"]
150
+ nullable_fields = ["recipient"]
151
+ null_default_fields = []
152
+
153
+ serialized = handler(self)
154
+
155
+ m = {}
156
+
157
+ for n, f in type(self).model_fields.items():
158
+ k = f.alias or n
159
+ val = serialized.get(k)
160
+ serialized.pop(k, None)
161
+
162
+ optional_nullable = k in optional_fields and k in nullable_fields
163
+ is_set = (
164
+ self.__pydantic_fields_set__.intersection({n})
165
+ or k in null_default_fields
166
+ ) # pylint: disable=no-member
167
+
168
+ if val is not None and val != UNSET_SENTINEL:
169
+ m[k] = val
170
+ elif val != UNSET_SENTINEL and (
171
+ not k in optional_fields or (optional_nullable and is_set)
172
+ ):
173
+ m[k] = val
174
+
175
+ return m
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
  from .chain import Chain
5
5
  from .token_enum import TokenEnum
6
- from compass_api_sdk.types import (
6
+ from compassapisdk.types import (
7
7
  BaseModel,
8
8
  Nullable,
9
9
  OptionalNullable,
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .token_enum import TokenEnum
5
- from compass_api_sdk.types import BaseModel
5
+ from compassapisdk.types import BaseModel
6
6
  from typing_extensions import TypedDict
7
7
 
8
8
 
@@ -0,0 +1,85 @@
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 compassapisdk.types import BaseModel
6
+ from typing import Optional, Union
7
+ from typing_extensions import NotRequired, TypeAliasType, TypedDict
8
+
9
+
10
+ AerodromeSlipstreamSellExactlyParamsAmountInTypedDict = TypeAliasType(
11
+ "AerodromeSlipstreamSellExactlyParamsAmountInTypedDict", Union[float, str]
12
+ )
13
+ r"""The amount of the token to swap from"""
14
+
15
+
16
+ AerodromeSlipstreamSellExactlyParamsAmountIn = TypeAliasType(
17
+ "AerodromeSlipstreamSellExactlyParamsAmountIn", Union[float, str]
18
+ )
19
+ r"""The amount of the token to swap from"""
20
+
21
+
22
+ AerodromeSlipstreamSellExactlyParamsAmountOutMinimumTypedDict = TypeAliasType(
23
+ "AerodromeSlipstreamSellExactlyParamsAmountOutMinimumTypedDict", Union[float, str]
24
+ )
25
+ r"""The minimum amount of the token to swap to, defaults to 0"""
26
+
27
+
28
+ AerodromeSlipstreamSellExactlyParamsAmountOutMinimum = TypeAliasType(
29
+ "AerodromeSlipstreamSellExactlyParamsAmountOutMinimum", Union[float, str]
30
+ )
31
+ r"""The minimum amount of the token to swap to, defaults to 0"""
32
+
33
+
34
+ class AerodromeSlipstreamSellExactlyParamsTypedDict(TypedDict):
35
+ r"""Parameters model for selling exactly an amount of tokens."""
36
+
37
+ token_in: TokenEnum
38
+ r"""A class representing the token.
39
+
40
+ This class is used to represent the token in the system. Notice individual
41
+ endpoints' documentation where per chain tokens are presented.
42
+ """
43
+ token_out: TokenEnum
44
+ r"""A class representing the token.
45
+
46
+ This class is used to represent the token in the system. Notice individual
47
+ endpoints' documentation where per chain tokens are presented.
48
+ """
49
+ tick_spacing: int
50
+ r"""The tick spacing of the pool"""
51
+ amount_in: AerodromeSlipstreamSellExactlyParamsAmountInTypedDict
52
+ r"""The amount of the token to swap from"""
53
+ amount_out_minimum: NotRequired[
54
+ AerodromeSlipstreamSellExactlyParamsAmountOutMinimumTypedDict
55
+ ]
56
+ r"""The minimum amount of the token to swap to, defaults to 0"""
57
+
58
+
59
+ class AerodromeSlipstreamSellExactlyParams(BaseModel):
60
+ r"""Parameters model for selling exactly an amount of tokens."""
61
+
62
+ token_in: TokenEnum
63
+ r"""A class representing the token.
64
+
65
+ This class is used to represent the token in the system. Notice individual
66
+ endpoints' documentation where per chain tokens are presented.
67
+ """
68
+
69
+ token_out: TokenEnum
70
+ r"""A class representing the token.
71
+
72
+ This class is used to represent the token in the system. Notice individual
73
+ endpoints' documentation where per chain tokens are presented.
74
+ """
75
+
76
+ tick_spacing: int
77
+ r"""The tick spacing of the pool"""
78
+
79
+ amount_in: AerodromeSlipstreamSellExactlyParamsAmountIn
80
+ r"""The amount of the token to swap from"""
81
+
82
+ amount_out_minimum: Optional[
83
+ AerodromeSlipstreamSellExactlyParamsAmountOutMinimum
84
+ ] = None
85
+ r"""The minimum amount of the token to swap to, defaults to 0"""
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
  from .chain import Chain
5
5
  from .token_enum import TokenEnum
6
- from compass_api_sdk.types import BaseModel
6
+ from compassapisdk.types import BaseModel
7
7
  from typing import Optional, Union
8
8
  from typing_extensions import NotRequired, TypeAliasType, TypedDict
9
9
 
@@ -0,0 +1,51 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from compassapisdk.types import BaseModel
5
+ from typing import Union
6
+ from typing_extensions import TypeAliasType, TypedDict
7
+
8
+
9
+ AerodromeSlipstreamWithdrawLiquidityProvisionParamsPercentageForWithdrawalTypedDict = TypeAliasType(
10
+ "AerodromeSlipstreamWithdrawLiquidityProvisionParamsPercentageForWithdrawalTypedDict",
11
+ Union[float, str],
12
+ )
13
+ r"""How much liquidity to take out in percentage."""
14
+
15
+
16
+ AerodromeSlipstreamWithdrawLiquidityProvisionParamsPercentageForWithdrawal = (
17
+ TypeAliasType(
18
+ "AerodromeSlipstreamWithdrawLiquidityProvisionParamsPercentageForWithdrawal",
19
+ Union[float, str],
20
+ )
21
+ )
22
+ r"""How much liquidity to take out in percentage."""
23
+
24
+
25
+ class AerodromeSlipstreamWithdrawLiquidityProvisionParamsTypedDict(TypedDict):
26
+ r"""Endpoint parameters for liquidity provision withdrawal on aerodrome slipstream.
27
+
28
+ This action is performed in a multicall on the NonfungiblePosition Manager: https://github.com/AerodromeSlipstream/v3-periphery/blob/0682387198a24c7cd63566a2c58398533860a5d1/contracts/base/Multicall.sol#L11-L27
29
+ First, we call decrease liquidity then collect the tokens owed to the user.
30
+ """
31
+
32
+ token_id: int
33
+ r"""Token ID of the NFT representing the liquidity provisioned position."""
34
+ percentage_for_withdrawal: AerodromeSlipstreamWithdrawLiquidityProvisionParamsPercentageForWithdrawalTypedDict
35
+ r"""How much liquidity to take out in percentage."""
36
+
37
+
38
+ class AerodromeSlipstreamWithdrawLiquidityProvisionParams(BaseModel):
39
+ r"""Endpoint parameters for liquidity provision withdrawal on aerodrome slipstream.
40
+
41
+ This action is performed in a multicall on the NonfungiblePosition Manager: https://github.com/AerodromeSlipstream/v3-periphery/blob/0682387198a24c7cd63566a2c58398533860a5d1/contracts/base/Multicall.sol#L11-L27
42
+ First, we call decrease liquidity then collect the tokens owed to the user.
43
+ """
44
+
45
+ token_id: int
46
+ r"""Token ID of the NFT representing the liquidity provisioned position."""
47
+
48
+ percentage_for_withdrawal: (
49
+ AerodromeSlipstreamWithdrawLiquidityProvisionParamsPercentageForWithdrawal
50
+ )
51
+ r"""How much liquidity to take out in percentage."""
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .chain import Chain
5
- from compass_api_sdk.types import BaseModel
5
+ from compassapisdk.types import BaseModel
6
6
  from typing import Union
7
7
  from typing_extensions import TypeAliasType, TypedDict
8
8
 
@@ -0,0 +1,110 @@
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 compassapisdk.types import (
6
+ BaseModel,
7
+ Nullable,
8
+ OptionalNullable,
9
+ UNSET,
10
+ UNSET_SENTINEL,
11
+ )
12
+ from pydantic import model_serializer
13
+ from typing import Union
14
+ from typing_extensions import NotRequired, TypeAliasType, TypedDict
15
+
16
+
17
+ AerodromeSwapEthForTokenParamsAmountInTypedDict = TypeAliasType(
18
+ "AerodromeSwapEthForTokenParamsAmountInTypedDict", Union[float, str]
19
+ )
20
+ r"""The amount of ETH you will give to aerodrome_basic for this trade"""
21
+
22
+
23
+ AerodromeSwapEthForTokenParamsAmountIn = TypeAliasType(
24
+ "AerodromeSwapEthForTokenParamsAmountIn", Union[float, str]
25
+ )
26
+ r"""The amount of ETH you will give to aerodrome_basic for this trade"""
27
+
28
+
29
+ AerodromeSwapEthForTokenParamsAmountOutMinTypedDict = TypeAliasType(
30
+ "AerodromeSwapEthForTokenParamsAmountOutMinTypedDict", Union[float, str]
31
+ )
32
+ r"""The minimal amount of token you are willing to receive (will revert if the swap gives you less)"""
33
+
34
+
35
+ AerodromeSwapEthForTokenParamsAmountOutMin = TypeAliasType(
36
+ "AerodromeSwapEthForTokenParamsAmountOutMin", Union[float, str]
37
+ )
38
+ r"""The minimal amount of token you are willing to receive (will revert if the swap gives you less)"""
39
+
40
+
41
+ class AerodromeSwapEthForTokenParamsTypedDict(TypedDict):
42
+ r"""Parameters model for swapping ETH for tokens."""
43
+
44
+ token_out: TokenEnum
45
+ r"""A class representing the token.
46
+
47
+ This class is used to represent the token in the system. Notice individual
48
+ endpoints' documentation where per chain tokens are presented.
49
+ """
50
+ amount_in: AerodromeSwapEthForTokenParamsAmountInTypedDict
51
+ r"""The amount of ETH you will give to aerodrome_basic for this trade"""
52
+ amount_out_min: AerodromeSwapEthForTokenParamsAmountOutMinTypedDict
53
+ r"""The minimal amount of token you are willing to receive (will revert if the swap gives you less)"""
54
+ stable: bool
55
+ r"""If true, try to trade on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to trade on a volatile pool with a bonding curve of K=xy"""
56
+ to: NotRequired[Nullable[str]]
57
+ r"""The receiver of the funds from this trade, default to sender"""
58
+
59
+
60
+ class AerodromeSwapEthForTokenParams(BaseModel):
61
+ r"""Parameters model for swapping ETH for tokens."""
62
+
63
+ token_out: TokenEnum
64
+ r"""A class representing the token.
65
+
66
+ This class is used to represent the token in the system. Notice individual
67
+ endpoints' documentation where per chain tokens are presented.
68
+ """
69
+
70
+ amount_in: AerodromeSwapEthForTokenParamsAmountIn
71
+ r"""The amount of ETH you will give to aerodrome_basic for this trade"""
72
+
73
+ amount_out_min: AerodromeSwapEthForTokenParamsAmountOutMin
74
+ r"""The minimal amount of token you are willing to receive (will revert if the swap gives you less)"""
75
+
76
+ stable: bool
77
+ r"""If true, try to trade on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to trade on a volatile pool with a bonding curve of K=xy"""
78
+
79
+ to: OptionalNullable[str] = UNSET
80
+ r"""The receiver of the funds from this trade, default to sender"""
81
+
82
+ @model_serializer(mode="wrap")
83
+ def serialize_model(self, handler):
84
+ optional_fields = ["to"]
85
+ nullable_fields = ["to"]
86
+ null_default_fields = []
87
+
88
+ serialized = handler(self)
89
+
90
+ m = {}
91
+
92
+ for n, f in type(self).model_fields.items():
93
+ k = f.alias or n
94
+ val = serialized.get(k)
95
+ serialized.pop(k, None)
96
+
97
+ optional_nullable = k in optional_fields and k in nullable_fields
98
+ is_set = (
99
+ self.__pydantic_fields_set__.intersection({n})
100
+ or k in null_default_fields
101
+ ) # pylint: disable=no-member
102
+
103
+ if val is not None and val != UNSET_SENTINEL:
104
+ m[k] = val
105
+ elif val != UNSET_SENTINEL and (
106
+ not k in optional_fields or (optional_nullable and is_set)
107
+ ):
108
+ m[k] = val
109
+
110
+ return m
@@ -0,0 +1,110 @@
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 compassapisdk.types import (
6
+ BaseModel,
7
+ Nullable,
8
+ OptionalNullable,
9
+ UNSET,
10
+ UNSET_SENTINEL,
11
+ )
12
+ from pydantic import model_serializer
13
+ from typing import Union
14
+ from typing_extensions import NotRequired, TypeAliasType, TypedDict
15
+
16
+
17
+ AerodromeSwapTokenForEthParamsAmountInTypedDict = TypeAliasType(
18
+ "AerodromeSwapTokenForEthParamsAmountInTypedDict", Union[float, str]
19
+ )
20
+ r"""The amount of tokens you will give to aerodrome_basic for this trade"""
21
+
22
+
23
+ AerodromeSwapTokenForEthParamsAmountIn = TypeAliasType(
24
+ "AerodromeSwapTokenForEthParamsAmountIn", Union[float, str]
25
+ )
26
+ r"""The amount of tokens you will give to aerodrome_basic for this trade"""
27
+
28
+
29
+ AerodromeSwapTokenForEthParamsAmountOutMinTypedDict = TypeAliasType(
30
+ "AerodromeSwapTokenForEthParamsAmountOutMinTypedDict", Union[float, str]
31
+ )
32
+ r"""The minimal amount of ETH you are willing to receive (will revert if the swap gives you less)"""
33
+
34
+
35
+ AerodromeSwapTokenForEthParamsAmountOutMin = TypeAliasType(
36
+ "AerodromeSwapTokenForEthParamsAmountOutMin", Union[float, str]
37
+ )
38
+ r"""The minimal amount of ETH you are willing to receive (will revert if the swap gives you less)"""
39
+
40
+
41
+ class AerodromeSwapTokenForEthParamsTypedDict(TypedDict):
42
+ r"""Parameters model for swapping tokens for ETH."""
43
+
44
+ token_in: TokenEnum
45
+ r"""A class representing the token.
46
+
47
+ This class is used to represent the token in the system. Notice individual
48
+ endpoints' documentation where per chain tokens are presented.
49
+ """
50
+ amount_in: AerodromeSwapTokenForEthParamsAmountInTypedDict
51
+ r"""The amount of tokens you will give to aerodrome_basic for this trade"""
52
+ amount_out_min: AerodromeSwapTokenForEthParamsAmountOutMinTypedDict
53
+ r"""The minimal amount of ETH you are willing to receive (will revert if the swap gives you less)"""
54
+ stable: bool
55
+ r"""If true, try to trade on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to trade on a volatile pool with a bonding curve of K=xy"""
56
+ to: NotRequired[Nullable[str]]
57
+ r"""The receiver of the funds from this trade, default to sender"""
58
+
59
+
60
+ class AerodromeSwapTokenForEthParams(BaseModel):
61
+ r"""Parameters model for swapping tokens for ETH."""
62
+
63
+ token_in: TokenEnum
64
+ r"""A class representing the token.
65
+
66
+ This class is used to represent the token in the system. Notice individual
67
+ endpoints' documentation where per chain tokens are presented.
68
+ """
69
+
70
+ amount_in: AerodromeSwapTokenForEthParamsAmountIn
71
+ r"""The amount of tokens you will give to aerodrome_basic for this trade"""
72
+
73
+ amount_out_min: AerodromeSwapTokenForEthParamsAmountOutMin
74
+ r"""The minimal amount of ETH you are willing to receive (will revert if the swap gives you less)"""
75
+
76
+ stable: bool
77
+ r"""If true, try to trade on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to trade on a volatile pool with a bonding curve of K=xy"""
78
+
79
+ to: OptionalNullable[str] = UNSET
80
+ r"""The receiver of the funds from this trade, default to sender"""
81
+
82
+ @model_serializer(mode="wrap")
83
+ def serialize_model(self, handler):
84
+ optional_fields = ["to"]
85
+ nullable_fields = ["to"]
86
+ null_default_fields = []
87
+
88
+ serialized = handler(self)
89
+
90
+ m = {}
91
+
92
+ for n, f in type(self).model_fields.items():
93
+ k = f.alias or n
94
+ val = serialized.get(k)
95
+ serialized.pop(k, None)
96
+
97
+ optional_nullable = k in optional_fields and k in nullable_fields
98
+ is_set = (
99
+ self.__pydantic_fields_set__.intersection({n})
100
+ or k in null_default_fields
101
+ ) # pylint: disable=no-member
102
+
103
+ if val is not None and val != UNSET_SENTINEL:
104
+ m[k] = val
105
+ elif val != UNSET_SENTINEL and (
106
+ not k in optional_fields or (optional_nullable and is_set)
107
+ ):
108
+ m[k] = val
109
+
110
+ return m