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
@@ -1,8 +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_sdk.types import BaseModel
5
- from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
4
+ from compassapisdk.types import BaseModel
5
+ from compassapisdk.utils import FieldMetadata, QueryParamMetadata
6
6
  from enum import Enum
7
7
  from typing_extensions import Annotated, TypedDict
8
8
 
@@ -1,8 +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_sdk.types import BaseModel
5
- from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
4
+ from compassapisdk.types import BaseModel
5
+ from compassapisdk.utils import FieldMetadata, QueryParamMetadata
6
6
  from enum import Enum
7
7
  from typing_extensions import Annotated, TypedDict
8
8
 
@@ -1,11 +1,10 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from compass_api_sdk.types import BaseModel
5
- from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
4
+ from compassapisdk.types import BaseModel
5
+ from compassapisdk.utils import FieldMetadata, QueryParamMetadata
6
6
  from enum import Enum
7
- from typing import Optional
8
- from typing_extensions import Annotated, NotRequired, TypedDict
7
+ from typing_extensions import Annotated, TypedDict
9
8
 
10
9
 
11
10
  class AaveUserPositionPerTokenChain(str, Enum):
@@ -72,7 +71,7 @@ class AaveUserPositionPerTokenToken(str, Enum):
72
71
  class AaveUserPositionPerTokenRequestTypedDict(TypedDict):
73
72
  chain: AaveUserPositionPerTokenChain
74
73
  r"""The chain to use."""
75
- user: NotRequired[str]
74
+ user: str
76
75
  token: AaveUserPositionPerTokenToken
77
76
  r"""A class representing the token.
78
77
 
@@ -89,8 +88,7 @@ class AaveUserPositionPerTokenRequest(BaseModel):
89
88
  r"""The chain to use."""
90
89
 
91
90
  user: Annotated[
92
- Optional[str],
93
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
91
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
94
92
  ] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"
95
93
 
96
94
  token: Annotated[
@@ -1,11 +1,10 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from compass_api_sdk.types import BaseModel
5
- from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
4
+ from compassapisdk.types import BaseModel
5
+ from compassapisdk.utils import FieldMetadata, QueryParamMetadata
6
6
  from enum import Enum
7
- from typing import Optional
8
- from typing_extensions import Annotated, NotRequired, TypedDict
7
+ from typing_extensions import Annotated, TypedDict
9
8
 
10
9
 
11
10
  class AaveUserPositionSummaryChain(str, Enum):
@@ -19,7 +18,7 @@ class AaveUserPositionSummaryChain(str, Enum):
19
18
  class AaveUserPositionSummaryRequestTypedDict(TypedDict):
20
19
  chain: AaveUserPositionSummaryChain
21
20
  r"""The chain to use."""
22
- user: NotRequired[str]
21
+ user: str
23
22
 
24
23
 
25
24
  class AaveUserPositionSummaryRequest(BaseModel):
@@ -30,6 +29,5 @@ class AaveUserPositionSummaryRequest(BaseModel):
30
29
  r"""The chain to use."""
31
30
 
32
31
  user: Annotated[
33
- Optional[str],
34
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
32
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
35
33
  ] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"
@@ -0,0 +1,94 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .interestratemode import InterestRateMode
5
+ from .token_enum import TokenEnum
6
+ from compassapisdk.types import (
7
+ BaseModel,
8
+ Nullable,
9
+ OptionalNullable,
10
+ UNSET,
11
+ UNSET_SENTINEL,
12
+ )
13
+ from pydantic import model_serializer
14
+ from typing import Union
15
+ from typing_extensions import NotRequired, TypeAliasType, TypedDict
16
+
17
+
18
+ AaveBorrowParamsAmountTypedDict = TypeAliasType(
19
+ "AaveBorrowParamsAmountTypedDict", Union[float, str]
20
+ )
21
+ r"""The amount of the asset to borrow"""
22
+
23
+
24
+ AaveBorrowParamsAmount = TypeAliasType("AaveBorrowParamsAmount", Union[float, str])
25
+ r"""The amount of the asset to borrow"""
26
+
27
+
28
+ class AaveBorrowParamsTypedDict(TypedDict):
29
+ token: TokenEnum
30
+ r"""A class representing the token.
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
+ amount: AaveBorrowParamsAmountTypedDict
36
+ r"""The amount of the asset to borrow"""
37
+ interest_rate_mode: InterestRateMode
38
+ r"""On AAVE there are 2 different interest modes.
39
+
40
+ A stable (but typically higher rate), or a variable rate.
41
+ """
42
+ on_behalf_of: NotRequired[Nullable[str]]
43
+ r"""The address on behalf of whom the supply is made"""
44
+
45
+
46
+ class AaveBorrowParams(BaseModel):
47
+ token: TokenEnum
48
+ r"""A class representing the token.
49
+
50
+ This class is used to represent the token in the system. Notice individual
51
+ endpoints' documentation where per chain tokens are presented.
52
+ """
53
+
54
+ amount: AaveBorrowParamsAmount
55
+ r"""The amount of the asset to borrow"""
56
+
57
+ interest_rate_mode: InterestRateMode
58
+ r"""On AAVE there are 2 different interest modes.
59
+
60
+ A stable (but typically higher rate), or a variable rate.
61
+ """
62
+
63
+ on_behalf_of: OptionalNullable[str] = UNSET
64
+ r"""The address on behalf of whom the supply is made"""
65
+
66
+ @model_serializer(mode="wrap")
67
+ def serialize_model(self, handler):
68
+ optional_fields = ["on_behalf_of"]
69
+ nullable_fields = ["on_behalf_of"]
70
+ null_default_fields = []
71
+
72
+ serialized = handler(self)
73
+
74
+ m = {}
75
+
76
+ for n, f in type(self).model_fields.items():
77
+ k = f.alias or n
78
+ val = serialized.get(k)
79
+ serialized.pop(k, None)
80
+
81
+ optional_nullable = k in optional_fields and k in nullable_fields
82
+ is_set = (
83
+ self.__pydantic_fields_set__.intersection({n})
84
+ or k in null_default_fields
85
+ ) # pylint: disable=no-member
86
+
87
+ if val is not None and val != UNSET_SENTINEL:
88
+ m[k] = val
89
+ elif val != UNSET_SENTINEL and (
90
+ not k in optional_fields or (optional_nullable and is_set)
91
+ ):
92
+ m[k] = val
93
+
94
+ return m
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
  from .chain import Chain
5
5
  from .interestratemode import InterestRateMode
6
6
  from .token_enum import TokenEnum
7
- from compass_api_sdk.types import (
7
+ from compassapisdk.types import (
8
8
  BaseModel,
9
9
  Nullable,
10
10
  OptionalNullable,
@@ -1,7 +1,7 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from compass_api_sdk.types import BaseModel
4
+ from compassapisdk.types import BaseModel
5
5
  from datetime import datetime
6
6
  from typing_extensions import TypedDict
7
7
 
@@ -0,0 +1,94 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .interestratemode import InterestRateMode
5
+ from .token_enum import TokenEnum
6
+ from compassapisdk.types import (
7
+ BaseModel,
8
+ Nullable,
9
+ OptionalNullable,
10
+ UNSET,
11
+ UNSET_SENTINEL,
12
+ )
13
+ from pydantic import model_serializer
14
+ from typing import Union
15
+ from typing_extensions import NotRequired, TypeAliasType, TypedDict
16
+
17
+
18
+ AaveRepayParamsAmountTypedDict = TypeAliasType(
19
+ "AaveRepayParamsAmountTypedDict", Union[float, str]
20
+ )
21
+ r"""The amount of the asset to repay"""
22
+
23
+
24
+ AaveRepayParamsAmount = TypeAliasType("AaveRepayParamsAmount", Union[float, str])
25
+ r"""The amount of the asset to repay"""
26
+
27
+
28
+ class AaveRepayParamsTypedDict(TypedDict):
29
+ token: TokenEnum
30
+ r"""A class representing the token.
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
+ amount: AaveRepayParamsAmountTypedDict
36
+ r"""The amount of the asset to repay"""
37
+ interest_rate_mode: InterestRateMode
38
+ r"""On AAVE there are 2 different interest modes.
39
+
40
+ A stable (but typically higher rate), or a variable rate.
41
+ """
42
+ on_behalf_of: NotRequired[Nullable[str]]
43
+ r"""The address on behalf of whom the supply is made"""
44
+
45
+
46
+ class AaveRepayParams(BaseModel):
47
+ token: TokenEnum
48
+ r"""A class representing the token.
49
+
50
+ This class is used to represent the token in the system. Notice individual
51
+ endpoints' documentation where per chain tokens are presented.
52
+ """
53
+
54
+ amount: AaveRepayParamsAmount
55
+ r"""The amount of the asset to repay"""
56
+
57
+ interest_rate_mode: InterestRateMode
58
+ r"""On AAVE there are 2 different interest modes.
59
+
60
+ A stable (but typically higher rate), or a variable rate.
61
+ """
62
+
63
+ on_behalf_of: OptionalNullable[str] = UNSET
64
+ r"""The address on behalf of whom the supply is made"""
65
+
66
+ @model_serializer(mode="wrap")
67
+ def serialize_model(self, handler):
68
+ optional_fields = ["on_behalf_of"]
69
+ nullable_fields = ["on_behalf_of"]
70
+ null_default_fields = []
71
+
72
+ serialized = handler(self)
73
+
74
+ m = {}
75
+
76
+ for n, f in type(self).model_fields.items():
77
+ k = f.alias or n
78
+ val = serialized.get(k)
79
+ serialized.pop(k, None)
80
+
81
+ optional_nullable = k in optional_fields and k in nullable_fields
82
+ is_set = (
83
+ self.__pydantic_fields_set__.intersection({n})
84
+ or k in null_default_fields
85
+ ) # pylint: disable=no-member
86
+
87
+ if val is not None and val != UNSET_SENTINEL:
88
+ m[k] = val
89
+ elif val != UNSET_SENTINEL and (
90
+ not k in optional_fields or (optional_nullable and is_set)
91
+ ):
92
+ m[k] = val
93
+
94
+ return m
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
  from .chain import Chain
5
5
  from .interestratemode import InterestRateMode
6
6
  from .token_enum import TokenEnum
7
- from compass_api_sdk.types import (
7
+ from compassapisdk.types import (
8
8
  BaseModel,
9
9
  Nullable,
10
10
  OptionalNullable,
@@ -0,0 +1,82 @@
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
+ AaveSupplyParamsAmountTypedDict = TypeAliasType(
18
+ "AaveSupplyParamsAmountTypedDict", Union[float, str]
19
+ )
20
+ r"""The amount of the asset to supply"""
21
+
22
+
23
+ AaveSupplyParamsAmount = TypeAliasType("AaveSupplyParamsAmount", Union[float, str])
24
+ r"""The amount of the asset to supply"""
25
+
26
+
27
+ class AaveSupplyParamsTypedDict(TypedDict):
28
+ token: TokenEnum
29
+ r"""A class representing the token.
30
+
31
+ This class is used to represent the token in the system. Notice individual
32
+ endpoints' documentation where per chain tokens are presented.
33
+ """
34
+ amount: AaveSupplyParamsAmountTypedDict
35
+ r"""The amount of the asset to supply"""
36
+ on_behalf_of: NotRequired[Nullable[str]]
37
+ r"""The address on behalf of whom the supply is made. Defaults to the transaction sender."""
38
+
39
+
40
+ class AaveSupplyParams(BaseModel):
41
+ token: TokenEnum
42
+ r"""A class representing the token.
43
+
44
+ This class is used to represent the token in the system. Notice individual
45
+ endpoints' documentation where per chain tokens are presented.
46
+ """
47
+
48
+ amount: AaveSupplyParamsAmount
49
+ r"""The amount of the asset to supply"""
50
+
51
+ on_behalf_of: OptionalNullable[str] = UNSET
52
+ r"""The address on behalf of whom the supply is made. Defaults to the transaction sender."""
53
+
54
+ @model_serializer(mode="wrap")
55
+ def serialize_model(self, handler):
56
+ optional_fields = ["on_behalf_of"]
57
+ nullable_fields = ["on_behalf_of"]
58
+ null_default_fields = []
59
+
60
+ serialized = handler(self)
61
+
62
+ m = {}
63
+
64
+ for n, f in type(self).model_fields.items():
65
+ k = f.alias or n
66
+ val = serialized.get(k)
67
+ serialized.pop(k, None)
68
+
69
+ optional_nullable = k in optional_fields and k in nullable_fields
70
+ is_set = (
71
+ self.__pydantic_fields_set__.intersection({n})
72
+ or k in null_default_fields
73
+ ) # pylint: disable=no-member
74
+
75
+ if val is not None and val != UNSET_SENTINEL:
76
+ m[k] = val
77
+ elif val != UNSET_SENTINEL and (
78
+ not k in optional_fields or (optional_nullable and is_set)
79
+ ):
80
+ m[k] = val
81
+
82
+ return m
@@ -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,
@@ -1,7 +1,7 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from compass_api_sdk.types import BaseModel
4
+ from compassapisdk.types import BaseModel
5
5
  from typing_extensions import TypedDict
6
6
 
7
7
 
@@ -1,7 +1,7 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from compass_api_sdk.types import BaseModel
4
+ from compassapisdk.types import BaseModel
5
5
  from typing_extensions import TypedDict
6
6
 
7
7
 
@@ -1,7 +1,7 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from compass_api_sdk.types import BaseModel
4
+ from compassapisdk.types import BaseModel
5
5
  from typing_extensions import TypedDict
6
6
 
7
7
 
@@ -0,0 +1,45 @@
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 Union
7
+ from typing_extensions import TypeAliasType, TypedDict
8
+
9
+
10
+ AaveWithdrawParamsAmountTypedDict = TypeAliasType(
11
+ "AaveWithdrawParamsAmountTypedDict", Union[float, str]
12
+ )
13
+ r"""The amount of the asset to withdraw"""
14
+
15
+
16
+ AaveWithdrawParamsAmount = TypeAliasType("AaveWithdrawParamsAmount", Union[float, str])
17
+ r"""The amount of the asset to withdraw"""
18
+
19
+
20
+ class AaveWithdrawParamsTypedDict(TypedDict):
21
+ token: TokenEnum
22
+ r"""A class representing the token.
23
+
24
+ This class is used to represent the token in the system. Notice individual
25
+ endpoints' documentation where per chain tokens are presented.
26
+ """
27
+ amount: AaveWithdrawParamsAmountTypedDict
28
+ r"""The amount of the asset to withdraw"""
29
+ recipient: str
30
+ r"""The address of the recipient of the withdrawn funds."""
31
+
32
+
33
+ class AaveWithdrawParams(BaseModel):
34
+ token: TokenEnum
35
+ r"""A class representing the token.
36
+
37
+ This class is used to represent the token in the system. Notice individual
38
+ endpoints' documentation where per chain tokens are presented.
39
+ """
40
+
41
+ amount: AaveWithdrawParamsAmount
42
+ r"""The amount of the asset to withdraw"""
43
+
44
+ recipient: str
45
+ r"""The address of the recipient of the withdrawn funds."""
@@ -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 Union
8
8
  from typing_extensions import TypeAliasType, TypedDict
9
9
 
@@ -1,8 +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_sdk.types import BaseModel
5
- from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
4
+ from compassapisdk.types import BaseModel
5
+ from compassapisdk.utils import FieldMetadata, QueryParamMetadata
6
6
  from enum import Enum
7
7
  from typing import Optional
8
8
  from typing_extensions import Annotated, NotRequired, TypedDict
@@ -1,8 +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_sdk.types import BaseModel
5
- from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
4
+ from compassapisdk.types import BaseModel
5
+ from compassapisdk.utils import FieldMetadata, QueryParamMetadata
6
6
  from enum import Enum
7
7
  from typing import Optional
8
8
  from typing_extensions import Annotated, NotRequired, TypedDict
@@ -0,0 +1,153 @@
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
+ AmountTokenDesiredTypedDict = TypeAliasType(
18
+ "AmountTokenDesiredTypedDict", Union[float, str]
19
+ )
20
+ r"""The amount of token you want to provide"""
21
+
22
+
23
+ AmountTokenDesired = TypeAliasType("AmountTokenDesired", Union[float, str])
24
+ r"""The amount of token you want to provide"""
25
+
26
+
27
+ AmountEthDesiredTypedDict = TypeAliasType(
28
+ "AmountEthDesiredTypedDict", Union[float, str]
29
+ )
30
+ r"""The amount of WETH you want to provide"""
31
+
32
+
33
+ AmountEthDesired = TypeAliasType("AmountEthDesired", Union[float, str])
34
+ r"""The amount of WETH you want to provide"""
35
+
36
+
37
+ AerodromeAddLiquidityEthParamsAmountTokenMinTypedDict = TypeAliasType(
38
+ "AerodromeAddLiquidityEthParamsAmountTokenMinTypedDict", Union[float, str]
39
+ )
40
+ r"""The minimal amount of token you are willing to provide"""
41
+
42
+
43
+ AerodromeAddLiquidityEthParamsAmountTokenMin = TypeAliasType(
44
+ "AerodromeAddLiquidityEthParamsAmountTokenMin", Union[float, str]
45
+ )
46
+ r"""The minimal amount of token you are willing to provide"""
47
+
48
+
49
+ AerodromeAddLiquidityEthParamsAmountEthMinTypedDict = TypeAliasType(
50
+ "AerodromeAddLiquidityEthParamsAmountEthMinTypedDict", Union[float, str]
51
+ )
52
+ r"""The minimal amount of WETH you are willing to provide"""
53
+
54
+
55
+ AerodromeAddLiquidityEthParamsAmountEthMin = TypeAliasType(
56
+ "AerodromeAddLiquidityEthParamsAmountEthMin", Union[float, str]
57
+ )
58
+ r"""The minimal amount of WETH you are willing to provide"""
59
+
60
+
61
+ class AerodromeAddLiquidityEthParamsTypedDict(TypedDict):
62
+ r"""Endpoint parameters for adding ETH liquidity on Aerodrome Basic.
63
+
64
+ This action is performed on the Aerodrome Basic Router to add liquidity to a pool
65
+ with ETH as one of the tokens.
66
+ """
67
+
68
+ token: TokenEnum
69
+ r"""A class representing the token.
70
+
71
+ This class is used to represent the token in the system. Notice individual
72
+ endpoints' documentation where per chain tokens are presented.
73
+ """
74
+ stable: bool
75
+ r"""If true, try to provide liquidity on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to provide liquidity on a volatile pool with a bonding curve of K=xy"""
76
+ amount_token_desired: AmountTokenDesiredTypedDict
77
+ r"""The amount of token you want to provide"""
78
+ amount_eth_desired: AmountEthDesiredTypedDict
79
+ r"""The amount of WETH you want to provide"""
80
+ amount_token_min: AerodromeAddLiquidityEthParamsAmountTokenMinTypedDict
81
+ r"""The minimal amount of token you are willing to provide"""
82
+ amount_eth_min: AerodromeAddLiquidityEthParamsAmountEthMinTypedDict
83
+ r"""The minimal amount of WETH you are willing to provide"""
84
+ deadline: Nullable[int]
85
+ r"""The deadline for this transaction in seconds since epoch"""
86
+ to: NotRequired[Nullable[str]]
87
+ r"""The receiver of the LP tokens from this trade, default to sender"""
88
+
89
+
90
+ class AerodromeAddLiquidityEthParams(BaseModel):
91
+ r"""Endpoint parameters for adding ETH liquidity on Aerodrome Basic.
92
+
93
+ This action is performed on the Aerodrome Basic Router to add liquidity to a pool
94
+ with ETH as one of the tokens.
95
+ """
96
+
97
+ token: TokenEnum
98
+ r"""A class representing the token.
99
+
100
+ This class is used to represent the token in the system. Notice individual
101
+ endpoints' documentation where per chain tokens are presented.
102
+ """
103
+
104
+ stable: bool
105
+ r"""If true, try to provide liquidity on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to provide liquidity on a volatile pool with a bonding curve of K=xy"""
106
+
107
+ amount_token_desired: AmountTokenDesired
108
+ r"""The amount of token you want to provide"""
109
+
110
+ amount_eth_desired: AmountEthDesired
111
+ r"""The amount of WETH you want to provide"""
112
+
113
+ amount_token_min: AerodromeAddLiquidityEthParamsAmountTokenMin
114
+ r"""The minimal amount of token you are willing to provide"""
115
+
116
+ amount_eth_min: AerodromeAddLiquidityEthParamsAmountEthMin
117
+ r"""The minimal amount of WETH you are willing to provide"""
118
+
119
+ deadline: Nullable[int]
120
+ r"""The deadline for this transaction in seconds since epoch"""
121
+
122
+ to: OptionalNullable[str] = UNSET
123
+ r"""The receiver of the LP tokens from this trade, default to sender"""
124
+
125
+ @model_serializer(mode="wrap")
126
+ def serialize_model(self, handler):
127
+ optional_fields = ["to"]
128
+ nullable_fields = ["to", "deadline"]
129
+ null_default_fields = []
130
+
131
+ serialized = handler(self)
132
+
133
+ m = {}
134
+
135
+ for n, f in type(self).model_fields.items():
136
+ k = f.alias or n
137
+ val = serialized.get(k)
138
+ serialized.pop(k, None)
139
+
140
+ optional_nullable = k in optional_fields and k in nullable_fields
141
+ is_set = (
142
+ self.__pydantic_fields_set__.intersection({n})
143
+ or k in null_default_fields
144
+ ) # pylint: disable=no-member
145
+
146
+ if val is not None and val != UNSET_SENTINEL:
147
+ m[k] = val
148
+ elif val != UNSET_SENTINEL and (
149
+ not k in optional_fields or (optional_nullable and is_set)
150
+ ):
151
+ m[k] = val
152
+
153
+ return m