compass_api_sdk 0.0.1__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.
- compass_api_sdk/__init__.py +17 -0
- compass_api_sdk/_hooks/__init__.py +5 -0
- compass_api_sdk/_hooks/registration.py +13 -0
- compass_api_sdk/_hooks/sdkhooks.py +76 -0
- compass_api_sdk/_hooks/types.py +106 -0
- compass_api_sdk/_version.py +15 -0
- compass_api_sdk/aave_v3.py +1903 -0
- compass_api_sdk/aerodrome_slipstream.py +1875 -0
- compass_api_sdk/basesdk.py +362 -0
- compass_api_sdk/errors/__init__.py +7 -0
- compass_api_sdk/errors/apierror.py +22 -0
- compass_api_sdk/errors/httpvalidationerror.py +21 -0
- compass_api_sdk/httpclient.py +136 -0
- compass_api_sdk/models/__init__.py +777 -0
- compass_api_sdk/models/aave_liquidity_changeop.py +108 -0
- compass_api_sdk/models/aave_token_priceop.py +98 -0
- compass_api_sdk/models/aave_user_position_per_tokenop.py +104 -0
- compass_api_sdk/models/aave_user_position_summaryop.py +35 -0
- compass_api_sdk/models/aaveborrowrequest.py +105 -0
- compass_api_sdk/models/aaveliquiditychangeresponse.py +26 -0
- compass_api_sdk/models/aaverepayrequest.py +105 -0
- compass_api_sdk/models/aavesupplyrequest.py +93 -0
- compass_api_sdk/models/aavetokenpriceresponse.py +15 -0
- compass_api_sdk/models/aaveuserpositionpertokenresponse.py +73 -0
- compass_api_sdk/models/aaveuserpositionsummaryresponse.py +50 -0
- compass_api_sdk/models/aavewithdrawrequest.py +58 -0
- compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +35 -0
- compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +173 -0
- compass_api_sdk/models/aerodromelppositionsresponse.py +21 -0
- compass_api_sdk/models/aerodromeposition.py +70 -0
- compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +92 -0
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +109 -0
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +186 -0
- compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +57 -0
- compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +96 -0
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +50 -0
- compass_api_sdk/models/allowanceinforesponse.py +48 -0
- compass_api_sdk/models/balanceinforesponse.py +43 -0
- compass_api_sdk/models/chain.py +12 -0
- compass_api_sdk/models/chaininfo.py +53 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_asset.py +22 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_asset.py +23 -0
- compass_api_sdk/models/ensnameinforesponse.py +24 -0
- compass_api_sdk/models/feeenum.py +16 -0
- compass_api_sdk/models/generic_allowanceop.py +121 -0
- compass_api_sdk/models/generic_balanceop.py +104 -0
- compass_api_sdk/models/generic_ensop.py +35 -0
- compass_api_sdk/models/generic_portfolioop.py +35 -0
- compass_api_sdk/models/generic_price_usdop.py +98 -0
- compass_api_sdk/models/generic_supported_tokensop.py +29 -0
- compass_api_sdk/models/generic_visualize_portfolioop.py +35 -0
- compass_api_sdk/models/image.py +15 -0
- compass_api_sdk/models/increaseallowancerequest.py +77 -0
- compass_api_sdk/models/interestratemode.py +14 -0
- compass_api_sdk/models/marketstate.py +35 -0
- compass_api_sdk/models/morpho_market_positionop.py +39 -0
- compass_api_sdk/models/morpho_marketsop.py +78 -0
- compass_api_sdk/models/morpho_vault_positionop.py +39 -0
- compass_api_sdk/models/morpho_vaultsop.py +72 -0
- compass_api_sdk/models/morphoborrowrequest.py +91 -0
- compass_api_sdk/models/morphocheckmarketpositionresponse.py +23 -0
- compass_api_sdk/models/morphocheckvaultpositionresponse.py +20 -0
- compass_api_sdk/models/morphodepositrequest.py +86 -0
- compass_api_sdk/models/morphogetmarketsresponse.py +17 -0
- compass_api_sdk/models/morphogetvaultsresponse.py +17 -0
- compass_api_sdk/models/morphomarket.py +80 -0
- compass_api_sdk/models/morphorepayrequest.py +79 -0
- compass_api_sdk/models/morphosetvaultallowancerequest.py +44 -0
- compass_api_sdk/models/morphosupplycollateralrequest.py +91 -0
- compass_api_sdk/models/morphovault.py +47 -0
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +91 -0
- compass_api_sdk/models/morphowithdrawrequest.py +74 -0
- compass_api_sdk/models/portfolio.py +22 -0
- compass_api_sdk/models/priceresponse.py +15 -0
- compass_api_sdk/models/security.py +24 -0
- compass_api_sdk/models/token_addressop.py +98 -0
- compass_api_sdk/models/token_balanceop.py +49 -0
- compass_api_sdk/models/token_enum.py +57 -0
- compass_api_sdk/models/token_priceop.py +97 -0
- compass_api_sdk/models/tokenaddressresponse.py +15 -0
- compass_api_sdk/models/tokenbalance.py +49 -0
- compass_api_sdk/models/tokenbalanceresponse.py +44 -0
- compass_api_sdk/models/tokeninfo.py +17 -0
- compass_api_sdk/models/tokenpriceresponse.py +15 -0
- compass_api_sdk/models/tokentransferrequest.py +66 -0
- compass_api_sdk/models/transfererc20request.py +62 -0
- compass_api_sdk/models/transferethrequest.py +46 -0
- compass_api_sdk/models/uniswap_liquidity_provision_in_rangeop.py +34 -0
- compass_api_sdk/models/uniswap_liquidity_provision_positionsop.py +35 -0
- compass_api_sdk/models/uniswap_pool_priceop.py +193 -0
- compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +209 -0
- compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +209 -0
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +104 -0
- compass_api_sdk/models/uniswapbuyquoteinforesponse.py +20 -0
- compass_api_sdk/models/uniswapcheckinrangeresponse.py +15 -0
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +99 -0
- compass_api_sdk/models/uniswaplppositionsinforesponse.py +24 -0
- compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +185 -0
- compass_api_sdk/models/uniswappoolpriceresponse.py +47 -0
- compass_api_sdk/models/uniswappositionssolidityresponse.py +46 -0
- compass_api_sdk/models/uniswapsellexactlyrequest.py +104 -0
- compass_api_sdk/models/uniswapsellquoteinforesponse.py +20 -0
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +51 -0
- compass_api_sdk/models/unsignedtransaction.py +58 -0
- compass_api_sdk/models/unwrapwethrequest.py +41 -0
- compass_api_sdk/models/validationerror.py +26 -0
- compass_api_sdk/models/vaultstate.py +32 -0
- compass_api_sdk/models/weeklyapys.py +23 -0
- compass_api_sdk/models/wrapethrequest.py +41 -0
- compass_api_sdk/morpho.py +2577 -0
- compass_api_sdk/py.typed +1 -0
- compass_api_sdk/sdk.py +155 -0
- compass_api_sdk/sdkconfiguration.py +56 -0
- compass_api_sdk/token_sdk.py +861 -0
- compass_api_sdk/types/__init__.py +21 -0
- compass_api_sdk/types/basemodel.py +39 -0
- compass_api_sdk/uniswap_v3.py +2551 -0
- compass_api_sdk/universal.py +2625 -0
- compass_api_sdk/utils/__init__.py +100 -0
- compass_api_sdk/utils/annotations.py +55 -0
- compass_api_sdk/utils/datetimes.py +23 -0
- compass_api_sdk/utils/enums.py +74 -0
- compass_api_sdk/utils/eventstreaming.py +238 -0
- compass_api_sdk/utils/forms.py +202 -0
- compass_api_sdk/utils/headers.py +136 -0
- compass_api_sdk/utils/logger.py +22 -0
- compass_api_sdk/utils/metadata.py +118 -0
- compass_api_sdk/utils/queryparams.py +205 -0
- compass_api_sdk/utils/requestbodies.py +66 -0
- compass_api_sdk/utils/retries.py +217 -0
- compass_api_sdk/utils/security.py +174 -0
- compass_api_sdk/utils/serializers.py +248 -0
- compass_api_sdk/utils/url.py +155 -0
- compass_api_sdk/utils/values.py +137 -0
- compass_api_sdk-0.0.1.dist-info/METADATA +534 -0
- compass_api_sdk-0.0.1.dist-info/RECORD +137 -0
- compass_api_sdk-0.0.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from .feeenum import FeeEnum
|
|
6
|
+
from .token_enum import TokenEnum
|
|
7
|
+
from compass_api_sdk.types import (
|
|
8
|
+
BaseModel,
|
|
9
|
+
Nullable,
|
|
10
|
+
OptionalNullable,
|
|
11
|
+
UNSET,
|
|
12
|
+
UNSET_SENTINEL,
|
|
13
|
+
)
|
|
14
|
+
from pydantic import model_serializer
|
|
15
|
+
from typing import Union
|
|
16
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
UniswapMintLiquidityProvisionRequestAmount0DesiredTypedDict = TypeAliasType(
|
|
20
|
+
"UniswapMintLiquidityProvisionRequestAmount0DesiredTypedDict", Union[float, str]
|
|
21
|
+
)
|
|
22
|
+
r"""The desired amount of the first token to deposit"""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
UniswapMintLiquidityProvisionRequestAmount0Desired = TypeAliasType(
|
|
26
|
+
"UniswapMintLiquidityProvisionRequestAmount0Desired", Union[float, str]
|
|
27
|
+
)
|
|
28
|
+
r"""The desired amount of the first token to deposit"""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
UniswapMintLiquidityProvisionRequestAmount1DesiredTypedDict = TypeAliasType(
|
|
32
|
+
"UniswapMintLiquidityProvisionRequestAmount1DesiredTypedDict", Union[float, str]
|
|
33
|
+
)
|
|
34
|
+
r"""The desired amount of the second token to deposit"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
UniswapMintLiquidityProvisionRequestAmount1Desired = TypeAliasType(
|
|
38
|
+
"UniswapMintLiquidityProvisionRequestAmount1Desired", Union[float, str]
|
|
39
|
+
)
|
|
40
|
+
r"""The desired amount of the second token to deposit"""
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
UniswapMintLiquidityProvisionRequestAmount0MinTypedDict = TypeAliasType(
|
|
44
|
+
"UniswapMintLiquidityProvisionRequestAmount0MinTypedDict", Union[float, str]
|
|
45
|
+
)
|
|
46
|
+
r"""The minimum amount of the first token to deposit"""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
UniswapMintLiquidityProvisionRequestAmount0Min = TypeAliasType(
|
|
50
|
+
"UniswapMintLiquidityProvisionRequestAmount0Min", Union[float, str]
|
|
51
|
+
)
|
|
52
|
+
r"""The minimum amount of the first token to deposit"""
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
UniswapMintLiquidityProvisionRequestAmount1MinTypedDict = TypeAliasType(
|
|
56
|
+
"UniswapMintLiquidityProvisionRequestAmount1MinTypedDict", Union[float, str]
|
|
57
|
+
)
|
|
58
|
+
r"""The minimum amount of the second token to deposit"""
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
UniswapMintLiquidityProvisionRequestAmount1Min = TypeAliasType(
|
|
62
|
+
"UniswapMintLiquidityProvisionRequestAmount1Min", Union[float, str]
|
|
63
|
+
)
|
|
64
|
+
r"""The minimum amount of the second token to deposit"""
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class UniswapMintLiquidityProvisionRequestTypedDict(TypedDict):
|
|
68
|
+
r"""Request model for minting a new liquidity position."""
|
|
69
|
+
|
|
70
|
+
token0: TokenEnum
|
|
71
|
+
r"""A class representing the token.
|
|
72
|
+
|
|
73
|
+
This class is used to represent the token in the system. Notice individual
|
|
74
|
+
endpoints' documentation where per chain tokens are presented.
|
|
75
|
+
"""
|
|
76
|
+
token1: TokenEnum
|
|
77
|
+
r"""A class representing the token.
|
|
78
|
+
|
|
79
|
+
This class is used to represent the token in the system. Notice individual
|
|
80
|
+
endpoints' documentation where per chain tokens are presented.
|
|
81
|
+
"""
|
|
82
|
+
fee: FeeEnum
|
|
83
|
+
r"""The transaction fee of a Uniswap pool in bips.
|
|
84
|
+
|
|
85
|
+
Uniswap supports 4 different fee levels.
|
|
86
|
+
"""
|
|
87
|
+
tick_lower: int
|
|
88
|
+
r"""The lower tick of the range to mint the position in"""
|
|
89
|
+
tick_upper: int
|
|
90
|
+
r"""The upper tick of the range to mint the position in"""
|
|
91
|
+
amount0_desired: UniswapMintLiquidityProvisionRequestAmount0DesiredTypedDict
|
|
92
|
+
r"""The desired amount of the first token to deposit"""
|
|
93
|
+
amount1_desired: UniswapMintLiquidityProvisionRequestAmount1DesiredTypedDict
|
|
94
|
+
r"""The desired amount of the second token to deposit"""
|
|
95
|
+
amount0_min: UniswapMintLiquidityProvisionRequestAmount0MinTypedDict
|
|
96
|
+
r"""The minimum amount of the first token to deposit"""
|
|
97
|
+
amount1_min: UniswapMintLiquidityProvisionRequestAmount1MinTypedDict
|
|
98
|
+
r"""The minimum amount of the second token to deposit"""
|
|
99
|
+
chain: Chain
|
|
100
|
+
r"""The chain to use."""
|
|
101
|
+
sender: str
|
|
102
|
+
r"""The address of the transaction sender."""
|
|
103
|
+
recipient: NotRequired[Nullable[str]]
|
|
104
|
+
r"""The address that will receive the LP tokens"""
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class UniswapMintLiquidityProvisionRequest(BaseModel):
|
|
108
|
+
r"""Request model for minting a new liquidity position."""
|
|
109
|
+
|
|
110
|
+
token0: TokenEnum
|
|
111
|
+
r"""A class representing the token.
|
|
112
|
+
|
|
113
|
+
This class is used to represent the token in the system. Notice individual
|
|
114
|
+
endpoints' documentation where per chain tokens are presented.
|
|
115
|
+
"""
|
|
116
|
+
|
|
117
|
+
token1: TokenEnum
|
|
118
|
+
r"""A class representing the token.
|
|
119
|
+
|
|
120
|
+
This class is used to represent the token in the system. Notice individual
|
|
121
|
+
endpoints' documentation where per chain tokens are presented.
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
fee: FeeEnum
|
|
125
|
+
r"""The transaction fee of a Uniswap pool in bips.
|
|
126
|
+
|
|
127
|
+
Uniswap supports 4 different fee levels.
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
tick_lower: int
|
|
131
|
+
r"""The lower tick of the range to mint the position in"""
|
|
132
|
+
|
|
133
|
+
tick_upper: int
|
|
134
|
+
r"""The upper tick of the range to mint the position in"""
|
|
135
|
+
|
|
136
|
+
amount0_desired: UniswapMintLiquidityProvisionRequestAmount0Desired
|
|
137
|
+
r"""The desired amount of the first token to deposit"""
|
|
138
|
+
|
|
139
|
+
amount1_desired: UniswapMintLiquidityProvisionRequestAmount1Desired
|
|
140
|
+
r"""The desired amount of the second token to deposit"""
|
|
141
|
+
|
|
142
|
+
amount0_min: UniswapMintLiquidityProvisionRequestAmount0Min
|
|
143
|
+
r"""The minimum amount of the first token to deposit"""
|
|
144
|
+
|
|
145
|
+
amount1_min: UniswapMintLiquidityProvisionRequestAmount1Min
|
|
146
|
+
r"""The minimum amount of the second token to deposit"""
|
|
147
|
+
|
|
148
|
+
chain: Chain
|
|
149
|
+
r"""The chain to use."""
|
|
150
|
+
|
|
151
|
+
sender: str
|
|
152
|
+
r"""The address of the transaction sender."""
|
|
153
|
+
|
|
154
|
+
recipient: OptionalNullable[str] = UNSET
|
|
155
|
+
r"""The address that will receive the LP tokens"""
|
|
156
|
+
|
|
157
|
+
@model_serializer(mode="wrap")
|
|
158
|
+
def serialize_model(self, handler):
|
|
159
|
+
optional_fields = ["recipient"]
|
|
160
|
+
nullable_fields = ["recipient"]
|
|
161
|
+
null_default_fields = []
|
|
162
|
+
|
|
163
|
+
serialized = handler(self)
|
|
164
|
+
|
|
165
|
+
m = {}
|
|
166
|
+
|
|
167
|
+
for n, f in type(self).model_fields.items():
|
|
168
|
+
k = f.alias or n
|
|
169
|
+
val = serialized.get(k)
|
|
170
|
+
serialized.pop(k, None)
|
|
171
|
+
|
|
172
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
173
|
+
is_set = (
|
|
174
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
175
|
+
or k in null_default_fields
|
|
176
|
+
) # pylint: disable=no-member
|
|
177
|
+
|
|
178
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
179
|
+
m[k] = val
|
|
180
|
+
elif val != UNSET_SENTINEL and (
|
|
181
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
182
|
+
):
|
|
183
|
+
m[k] = val
|
|
184
|
+
|
|
185
|
+
return m
|
|
@@ -0,0 +1,47 @@
|
|
|
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 typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class UniswapPoolPriceResponseTypedDict(TypedDict):
|
|
10
|
+
token_in: TokenEnum
|
|
11
|
+
r"""A class representing the token.
|
|
12
|
+
|
|
13
|
+
This class is used to represent the token in the system. Notice individual
|
|
14
|
+
endpoints' documentation where per chain tokens are presented.
|
|
15
|
+
"""
|
|
16
|
+
token_out: TokenEnum
|
|
17
|
+
r"""A class representing the token.
|
|
18
|
+
|
|
19
|
+
This class is used to represent the token in the system. Notice individual
|
|
20
|
+
endpoints' documentation where per chain tokens are presented.
|
|
21
|
+
"""
|
|
22
|
+
price: str
|
|
23
|
+
r"""The price of the pool. This is expressed as an instantanteous amount of how many token0 you need to buy 1 token1. In any swap this will not change during the trade; use the quote endpoint to get a better idea of how much you will pay!"""
|
|
24
|
+
tick: int
|
|
25
|
+
r"""The current tick in the pool. This is a number that represents the price of the pool according to the uniswap v3 concentrated liquidity concept."""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class UniswapPoolPriceResponse(BaseModel):
|
|
29
|
+
token_in: 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
|
+
|
|
36
|
+
token_out: TokenEnum
|
|
37
|
+
r"""A class representing the token.
|
|
38
|
+
|
|
39
|
+
This class is used to represent the token in the system. Notice individual
|
|
40
|
+
endpoints' documentation where per chain tokens are presented.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
price: str
|
|
44
|
+
r"""The price of the pool. This is expressed as an instantanteous amount of how many token0 you need to buy 1 token1. In any swap this will not change during the trade; use the quote endpoint to get a better idea of how much you will pay!"""
|
|
45
|
+
|
|
46
|
+
tick: int
|
|
47
|
+
r"""The current tick in the pool. This is a number that represents the price of the pool according to the uniswap v3 concentrated liquidity concept."""
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UniswapPositionsSolidityResponseTypedDict(TypedDict):
|
|
9
|
+
nonce: int
|
|
10
|
+
operator: str
|
|
11
|
+
token0: str
|
|
12
|
+
token1: str
|
|
13
|
+
fee: int
|
|
14
|
+
tick_lower: int
|
|
15
|
+
tick_upper: int
|
|
16
|
+
liquidity: int
|
|
17
|
+
fee_growth_inside0_last_x128: int
|
|
18
|
+
fee_growth_inside1_last_x128: int
|
|
19
|
+
tokens_owed0: int
|
|
20
|
+
tokens_owed1: int
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class UniswapPositionsSolidityResponse(BaseModel):
|
|
24
|
+
nonce: int
|
|
25
|
+
|
|
26
|
+
operator: str
|
|
27
|
+
|
|
28
|
+
token0: str
|
|
29
|
+
|
|
30
|
+
token1: str
|
|
31
|
+
|
|
32
|
+
fee: int
|
|
33
|
+
|
|
34
|
+
tick_lower: int
|
|
35
|
+
|
|
36
|
+
tick_upper: int
|
|
37
|
+
|
|
38
|
+
liquidity: int
|
|
39
|
+
|
|
40
|
+
fee_growth_inside0_last_x128: int
|
|
41
|
+
|
|
42
|
+
fee_growth_inside1_last_x128: int
|
|
43
|
+
|
|
44
|
+
tokens_owed0: int
|
|
45
|
+
|
|
46
|
+
tokens_owed1: int
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from .feeenum import FeeEnum
|
|
6
|
+
from .token_enum import TokenEnum
|
|
7
|
+
from compass_api_sdk.types import BaseModel
|
|
8
|
+
from typing import Optional, Union
|
|
9
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
UniswapSellExactlyRequestAmountInTypedDict = TypeAliasType(
|
|
13
|
+
"UniswapSellExactlyRequestAmountInTypedDict", Union[float, str]
|
|
14
|
+
)
|
|
15
|
+
r"""The amount of the token to swap from"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
UniswapSellExactlyRequestAmountIn = TypeAliasType(
|
|
19
|
+
"UniswapSellExactlyRequestAmountIn", Union[float, str]
|
|
20
|
+
)
|
|
21
|
+
r"""The amount of the token to swap from"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
UniswapSellExactlyRequestAmountOutMinimumTypedDict = TypeAliasType(
|
|
25
|
+
"UniswapSellExactlyRequestAmountOutMinimumTypedDict", Union[float, str]
|
|
26
|
+
)
|
|
27
|
+
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
UniswapSellExactlyRequestAmountOutMinimum = TypeAliasType(
|
|
31
|
+
"UniswapSellExactlyRequestAmountOutMinimum", Union[float, str]
|
|
32
|
+
)
|
|
33
|
+
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class UniswapSellExactlyRequestTypedDict(TypedDict):
|
|
37
|
+
r"""Request model for selling exactly an amount of tokens."""
|
|
38
|
+
|
|
39
|
+
token_in: TokenEnum
|
|
40
|
+
r"""A class representing the token.
|
|
41
|
+
|
|
42
|
+
This class is used to represent the token in the system. Notice individual
|
|
43
|
+
endpoints' documentation where per chain tokens are presented.
|
|
44
|
+
"""
|
|
45
|
+
token_out: TokenEnum
|
|
46
|
+
r"""A class representing the token.
|
|
47
|
+
|
|
48
|
+
This class is used to represent the token in the system. Notice individual
|
|
49
|
+
endpoints' documentation where per chain tokens are presented.
|
|
50
|
+
"""
|
|
51
|
+
fee: FeeEnum
|
|
52
|
+
r"""The transaction fee of a Uniswap pool in bips.
|
|
53
|
+
|
|
54
|
+
Uniswap supports 4 different fee levels.
|
|
55
|
+
"""
|
|
56
|
+
amount_in: UniswapSellExactlyRequestAmountInTypedDict
|
|
57
|
+
r"""The amount of the token to swap from"""
|
|
58
|
+
chain: Chain
|
|
59
|
+
r"""The chain to use."""
|
|
60
|
+
sender: str
|
|
61
|
+
r"""The address of the transaction sender."""
|
|
62
|
+
amount_out_minimum: NotRequired[UniswapSellExactlyRequestAmountOutMinimumTypedDict]
|
|
63
|
+
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
64
|
+
wrap_eth: NotRequired[bool]
|
|
65
|
+
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class UniswapSellExactlyRequest(BaseModel):
|
|
69
|
+
r"""Request model for selling exactly an amount of tokens."""
|
|
70
|
+
|
|
71
|
+
token_in: TokenEnum
|
|
72
|
+
r"""A class representing the token.
|
|
73
|
+
|
|
74
|
+
This class is used to represent the token in the system. Notice individual
|
|
75
|
+
endpoints' documentation where per chain tokens are presented.
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
token_out: 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
|
+
|
|
85
|
+
fee: FeeEnum
|
|
86
|
+
r"""The transaction fee of a Uniswap pool in bips.
|
|
87
|
+
|
|
88
|
+
Uniswap supports 4 different fee levels.
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
amount_in: UniswapSellExactlyRequestAmountIn
|
|
92
|
+
r"""The amount of the token to swap from"""
|
|
93
|
+
|
|
94
|
+
chain: Chain
|
|
95
|
+
r"""The chain to use."""
|
|
96
|
+
|
|
97
|
+
sender: str
|
|
98
|
+
r"""The address of the transaction sender."""
|
|
99
|
+
|
|
100
|
+
amount_out_minimum: Optional[UniswapSellExactlyRequestAmountOutMinimum] = None
|
|
101
|
+
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
102
|
+
|
|
103
|
+
wrap_eth: Optional[bool] = False
|
|
104
|
+
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UniswapSellQuoteInfoResponseTypedDict(TypedDict):
|
|
9
|
+
amount_out: str
|
|
10
|
+
r"""The amount of token_out you would receive from the pool."""
|
|
11
|
+
price_after: str
|
|
12
|
+
r"""The price of the pool after this trade would happen. (How much token0 you need to buy 1 token1.)"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class UniswapSellQuoteInfoResponse(BaseModel):
|
|
16
|
+
amount_out: str
|
|
17
|
+
r"""The amount of token_out you would receive from the pool."""
|
|
18
|
+
|
|
19
|
+
price_after: str
|
|
20
|
+
r"""The price of the pool after this trade would happen. (How much token0 you need to buy 1 token1.)"""
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from typing import Union
|
|
7
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict = (
|
|
11
|
+
TypeAliasType(
|
|
12
|
+
"UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict",
|
|
13
|
+
Union[float, str],
|
|
14
|
+
)
|
|
15
|
+
)
|
|
16
|
+
r"""How much liquidity to take out in percentage."""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawal = TypeAliasType(
|
|
20
|
+
"UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawal", Union[float, str]
|
|
21
|
+
)
|
|
22
|
+
r"""How much liquidity to take out in percentage."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class UniswapWithdrawLiquidityProvisionRequestTypedDict(TypedDict):
|
|
26
|
+
token_id: int
|
|
27
|
+
r"""Token ID of the NFT representing the liquidity provisioned position."""
|
|
28
|
+
percentage_for_withdrawal: (
|
|
29
|
+
UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict
|
|
30
|
+
)
|
|
31
|
+
r"""How much liquidity to take out in percentage."""
|
|
32
|
+
chain: Chain
|
|
33
|
+
r"""The chain to use."""
|
|
34
|
+
sender: str
|
|
35
|
+
r"""The address of the transaction sender."""
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class UniswapWithdrawLiquidityProvisionRequest(BaseModel):
|
|
39
|
+
token_id: int
|
|
40
|
+
r"""Token ID of the NFT representing the liquidity provisioned position."""
|
|
41
|
+
|
|
42
|
+
percentage_for_withdrawal: (
|
|
43
|
+
UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawal
|
|
44
|
+
)
|
|
45
|
+
r"""How much liquidity to take out in percentage."""
|
|
46
|
+
|
|
47
|
+
chain: Chain
|
|
48
|
+
r"""The chain to use."""
|
|
49
|
+
|
|
50
|
+
sender: str
|
|
51
|
+
r"""The address of the transaction sender."""
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
import pydantic
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class UnsignedTransactionTypedDict(TypedDict):
|
|
10
|
+
chain_id: int
|
|
11
|
+
r"""The chain id of the transaction"""
|
|
12
|
+
data: str
|
|
13
|
+
r"""The data of the transaction"""
|
|
14
|
+
from_: str
|
|
15
|
+
r"""The sender of the transaction"""
|
|
16
|
+
gas: int
|
|
17
|
+
r"""The gas of the transaction"""
|
|
18
|
+
to: str
|
|
19
|
+
r"""The recipient of the transaction"""
|
|
20
|
+
value: int
|
|
21
|
+
r"""The value of the transaction"""
|
|
22
|
+
nonce: int
|
|
23
|
+
r"""The nonce of the address"""
|
|
24
|
+
max_fee_per_gas: int
|
|
25
|
+
r"""The max fee per gas of the transaction"""
|
|
26
|
+
max_priority_fee_per_gas: int
|
|
27
|
+
r"""The max priority fee per gas of the transaction"""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class UnsignedTransaction(BaseModel):
|
|
31
|
+
chain_id: Annotated[int, pydantic.Field(alias="chainId")]
|
|
32
|
+
r"""The chain id of the transaction"""
|
|
33
|
+
|
|
34
|
+
data: str
|
|
35
|
+
r"""The data of the transaction"""
|
|
36
|
+
|
|
37
|
+
from_: Annotated[str, pydantic.Field(alias="from")]
|
|
38
|
+
r"""The sender of the transaction"""
|
|
39
|
+
|
|
40
|
+
gas: int
|
|
41
|
+
r"""The gas of the transaction"""
|
|
42
|
+
|
|
43
|
+
to: str
|
|
44
|
+
r"""The recipient of the transaction"""
|
|
45
|
+
|
|
46
|
+
value: int
|
|
47
|
+
r"""The value of the transaction"""
|
|
48
|
+
|
|
49
|
+
nonce: int
|
|
50
|
+
r"""The nonce of the address"""
|
|
51
|
+
|
|
52
|
+
max_fee_per_gas: Annotated[int, pydantic.Field(alias="maxFeePerGas")]
|
|
53
|
+
r"""The max fee per gas of the transaction"""
|
|
54
|
+
|
|
55
|
+
max_priority_fee_per_gas: Annotated[
|
|
56
|
+
int, pydantic.Field(alias="maxPriorityFeePerGas")
|
|
57
|
+
]
|
|
58
|
+
r"""The max priority fee per gas of the transaction"""
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from typing import Union
|
|
7
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
UnwrapWethRequestAmountTypedDict = TypeAliasType(
|
|
11
|
+
"UnwrapWethRequestAmountTypedDict", Union[float, str]
|
|
12
|
+
)
|
|
13
|
+
r"""The amount of WETH to unwrap."""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
UnwrapWethRequestAmount = TypeAliasType("UnwrapWethRequestAmount", Union[float, str])
|
|
17
|
+
r"""The amount of WETH to unwrap."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class UnwrapWethRequestTypedDict(TypedDict):
|
|
21
|
+
r"""Request model for unwrapping WETH back to native ETH."""
|
|
22
|
+
|
|
23
|
+
amount: UnwrapWethRequestAmountTypedDict
|
|
24
|
+
r"""The amount of WETH to unwrap."""
|
|
25
|
+
chain: Chain
|
|
26
|
+
r"""The chain to use."""
|
|
27
|
+
sender: str
|
|
28
|
+
r"""The address of the transaction sender."""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class UnwrapWethRequest(BaseModel):
|
|
32
|
+
r"""Request model for unwrapping WETH back to native ETH."""
|
|
33
|
+
|
|
34
|
+
amount: UnwrapWethRequestAmount
|
|
35
|
+
r"""The amount of WETH to unwrap."""
|
|
36
|
+
|
|
37
|
+
chain: Chain
|
|
38
|
+
r"""The chain to use."""
|
|
39
|
+
|
|
40
|
+
sender: str
|
|
41
|
+
r"""The address of the transaction sender."""
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from typing import List, Union
|
|
6
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
LocTypedDict = TypeAliasType("LocTypedDict", Union[str, int])
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Loc = TypeAliasType("Loc", Union[str, int])
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ValidationErrorTypedDict(TypedDict):
|
|
16
|
+
loc: List[LocTypedDict]
|
|
17
|
+
msg: str
|
|
18
|
+
type: str
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ValidationError(BaseModel):
|
|
22
|
+
loc: List[Loc]
|
|
23
|
+
|
|
24
|
+
msg: str
|
|
25
|
+
|
|
26
|
+
type: str
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
import pydantic
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class VaultStateTypedDict(TypedDict):
|
|
10
|
+
id: str
|
|
11
|
+
apy: float
|
|
12
|
+
net_apy: float
|
|
13
|
+
total_assets: int
|
|
14
|
+
total_assets_usd: float
|
|
15
|
+
fee: float
|
|
16
|
+
timelock: int
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class VaultState(BaseModel):
|
|
20
|
+
id: str
|
|
21
|
+
|
|
22
|
+
apy: float
|
|
23
|
+
|
|
24
|
+
net_apy: Annotated[float, pydantic.Field(alias="netApy")]
|
|
25
|
+
|
|
26
|
+
total_assets: Annotated[int, pydantic.Field(alias="totalAssets")]
|
|
27
|
+
|
|
28
|
+
total_assets_usd: Annotated[float, pydantic.Field(alias="totalAssetsUsd")]
|
|
29
|
+
|
|
30
|
+
fee: float
|
|
31
|
+
|
|
32
|
+
timelock: int
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
import pydantic
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class WeeklyApysTypedDict(TypedDict):
|
|
10
|
+
supply_apy: float
|
|
11
|
+
net_supply_apy: float
|
|
12
|
+
borrow_apy: float
|
|
13
|
+
net_borrow_apy: float
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class WeeklyApys(BaseModel):
|
|
17
|
+
supply_apy: Annotated[float, pydantic.Field(alias="supplyApy")]
|
|
18
|
+
|
|
19
|
+
net_supply_apy: Annotated[float, pydantic.Field(alias="netSupplyApy")]
|
|
20
|
+
|
|
21
|
+
borrow_apy: Annotated[float, pydantic.Field(alias="borrowApy")]
|
|
22
|
+
|
|
23
|
+
net_borrow_apy: Annotated[float, pydantic.Field(alias="netBorrowApy")]
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from typing import Union
|
|
7
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
WrapEthRequestAmountTypedDict = TypeAliasType(
|
|
11
|
+
"WrapEthRequestAmountTypedDict", Union[float, str]
|
|
12
|
+
)
|
|
13
|
+
r"""The amount of ETH to wrap."""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
WrapEthRequestAmount = TypeAliasType("WrapEthRequestAmount", Union[float, str])
|
|
17
|
+
r"""The amount of ETH to wrap."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class WrapEthRequestTypedDict(TypedDict):
|
|
21
|
+
r"""Request model for wrapping ETH into WETH."""
|
|
22
|
+
|
|
23
|
+
amount: WrapEthRequestAmountTypedDict
|
|
24
|
+
r"""The amount of ETH to wrap."""
|
|
25
|
+
chain: Chain
|
|
26
|
+
r"""The chain to use."""
|
|
27
|
+
sender: str
|
|
28
|
+
r"""The address of the transaction sender."""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class WrapEthRequest(BaseModel):
|
|
32
|
+
r"""Request model for wrapping ETH into WETH."""
|
|
33
|
+
|
|
34
|
+
amount: WrapEthRequestAmount
|
|
35
|
+
r"""The amount of ETH to wrap."""
|
|
36
|
+
|
|
37
|
+
chain: Chain
|
|
38
|
+
r"""The chain to use."""
|
|
39
|
+
|
|
40
|
+
sender: str
|
|
41
|
+
r"""The address of the transaction sender."""
|