compass_api_sdk 0.9.51__py3-none-any.whl → 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of compass_api_sdk might be problematic. Click here for more details.
- compass_api_sdk/_version.py +3 -3
- compass_api_sdk/aave_v3.py +198 -198
- compass_api_sdk/aerodrome_slipstream.py +108 -108
- compass_api_sdk/erc_4626_vaults.py +44 -44
- compass_api_sdk/errors/__init__.py +3 -2
- compass_api_sdk/models/__init__.py +900 -746
- compass_api_sdk/models/aaveborrowrequest.py +9 -5
- compass_api_sdk/models/aavehistoricaltransactionsresponse.py +5 -5
- compass_api_sdk/models/aavelooprequest.py +59 -11
- compass_api_sdk/models/aaverepayrequest.py +9 -5
- compass_api_sdk/models/aavereserveoverviewresponse.py +34 -3
- compass_api_sdk/models/aavesupplyrequest.py +9 -5
- compass_api_sdk/models/aavewithdrawrequest.py +9 -5
- compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +7 -5
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +7 -5
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +7 -5
- compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +7 -5
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +7 -5
- compass_api_sdk/models/batcheduseroperationsrequest.py +9 -5
- compass_api_sdk/models/chain.py +3 -3
- compass_api_sdk/models/details.py +44 -7
- compass_api_sdk/models/morphoborrowrequest.py +3 -2
- compass_api_sdk/models/morphodepositrequest.py +3 -2
- compass_api_sdk/models/morphorepayrequest.py +3 -2
- compass_api_sdk/models/morphosupplycollateralrequest.py +3 -2
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +3 -2
- compass_api_sdk/models/morphowithdrawrequest.py +3 -2
- compass_api_sdk/models/movement10percent.py +65 -10
- compass_api_sdk/models/multicallauthorizationrequest.py +9 -5
- compass_api_sdk/models/multicallexecuterequest.py +53 -10
- compass_api_sdk/models/odosswaprequest.py +9 -5
- compass_api_sdk/models/pendlemanageliquidityparams.py +81 -0
- compass_api_sdk/models/pendlemanageliquidityrequest.py +95 -0
- compass_api_sdk/models/pendleredeemyieldrequest.py +9 -5
- compass_api_sdk/models/pendletradeptparams.py +81 -0
- compass_api_sdk/models/pendletradeptrequest.py +95 -0
- compass_api_sdk/models/pendletradeytparams.py +81 -0
- compass_api_sdk/models/pendletradeytrequest.py +95 -0
- compass_api_sdk/models/pendletxresponse.py +45 -0
- compass_api_sdk/models/setallowancerequest.py +8 -5
- compass_api_sdk/models/skybuyrequest.py +7 -9
- compass_api_sdk/models/skydepositrequest.py +7 -8
- compass_api_sdk/models/skysellrequest.py +7 -9
- compass_api_sdk/models/skywithdrawrequest.py +7 -8
- compass_api_sdk/models/token_enum.py +17 -0
- compass_api_sdk/models/tokentransferparams.py +67 -0
- compass_api_sdk/models/tokentransferrequest.py +9 -5
- compass_api_sdk/models/transactionresponse.py +40 -0
- compass_api_sdk/models/uniswapbuyexactlyparams.py +19 -24
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +28 -29
- compass_api_sdk/models/uniswapbuyexactlytransactionresponse.py +45 -0
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +9 -5
- compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +9 -5
- compass_api_sdk/models/uniswapsellexactlyparams.py +43 -40
- compass_api_sdk/models/uniswapsellexactlyrequest.py +52 -45
- compass_api_sdk/models/uniswapsellexactlytransactionresponse.py +45 -0
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +9 -5
- compass_api_sdk/models/unwrapwethrequest.py +9 -5
- compass_api_sdk/models/useroperation.py +34 -40
- compass_api_sdk/models/{aave_aave_supported_tokensop.py → v1_aave_aave_supported_tokensop.py} +9 -13
- compass_api_sdk/models/{aave_avg_rateop.py → v1_aave_avg_rateop.py} +32 -19
- compass_api_sdk/models/{aave_historical_transactionsop.py → v1_aave_historical_transactionsop.py} +9 -13
- compass_api_sdk/models/{aave_liquidity_changeop.py → v1_aave_liquidity_changeop.py} +30 -17
- compass_api_sdk/models/{aave_rateop.py → v1_aave_rateop.py} +32 -19
- compass_api_sdk/models/{aave_reserve_overviewop.py → v1_aave_reserve_overviewop.py} +32 -19
- compass_api_sdk/models/{aave_std_rateop.py → v1_aave_std_rateop.py} +32 -19
- compass_api_sdk/models/{aave_token_priceop.py → v1_aave_token_priceop.py} +32 -19
- compass_api_sdk/models/{aave_user_position_per_tokenop.py → v1_aave_user_position_per_tokenop.py} +32 -19
- compass_api_sdk/models/{aave_user_position_summaryop.py → v1_aave_user_position_summaryop.py} +9 -13
- compass_api_sdk/models/{uniswap_liquidity_provision_positionsop.py → v1_aerodrome_slipstream_liquidity_provision_positionsop.py} +7 -13
- compass_api_sdk/models/{aerodrome_slipstream_pool_priceop.py → v1_aerodrome_slipstream_pool_priceop.py} +53 -25
- compass_api_sdk/models/{generic_allowanceop.py → v1_generic_allowanceop.py} +24 -25
- compass_api_sdk/models/{generic_ensop.py → v1_generic_ensop.py} +7 -13
- compass_api_sdk/models/{generic_portfolioop.py → v1_generic_portfolioop.py} +9 -13
- compass_api_sdk/models/{generic_supported_chainsop.py → v1_generic_supported_chainsop.py} +2 -2
- compass_api_sdk/models/v1_generic_supported_tokensop.py +24 -0
- compass_api_sdk/models/{morpho_market_positionop.py → v1_morpho_market_positionop.py} +9 -8
- compass_api_sdk/models/{morpho_marketop.py → v1_morpho_marketop.py} +9 -8
- compass_api_sdk/models/{morpho_marketsop.py → v1_morpho_marketsop.py} +9 -8
- compass_api_sdk/models/{morpho_user_positionop.py → v1_morpho_user_positionop.py} +9 -8
- compass_api_sdk/models/{morpho_vaultop.py → v1_morpho_vaultop.py} +9 -13
- compass_api_sdk/models/{morpho_vaultsop.py → v1_morpho_vaultsop.py} +9 -8
- compass_api_sdk/models/{pendle_marketop.py → v1_pendle_marketop.py} +9 -13
- compass_api_sdk/models/v1_pendle_marketsop.py +24 -0
- compass_api_sdk/models/{pendle_positionsop.py → v1_pendle_positionsop.py} +10 -14
- compass_api_sdk/models/{sky_positionop.py → v1_sky_positionop.py} +14 -15
- compass_api_sdk/models/{token_addressop.py → v1_token_addressop.py} +30 -17
- compass_api_sdk/models/{token_balanceop.py → v1_token_balanceop.py} +14 -18
- compass_api_sdk/models/{token_priceop.py → v1_token_priceop.py} +14 -18
- compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +24 -0
- compass_api_sdk/models/{uniswap_liquidity_provision_in_rangeop.py → v1_uniswap_liquidity_provision_in_rangeop.py} +9 -13
- compass_api_sdk/models/{aerodrome_slipstream_liquidity_provision_positionsop.py → v1_uniswap_liquidity_provision_positionsop.py} +9 -13
- compass_api_sdk/models/{uniswap_pool_priceop.py → v1_uniswap_pool_priceop.py} +59 -29
- compass_api_sdk/models/{uniswap_quote_buy_exactlyop.py → v1_uniswap_quote_buy_exactlyop.py} +65 -35
- compass_api_sdk/models/{uniswap_quote_sell_exactlyop.py → v1_uniswap_quote_sell_exactlyop.py} +65 -35
- compass_api_sdk/models/{vaults_vaultop.py → v1_vaults_vaultop.py} +9 -13
- compass_api_sdk/models/vaultdepositparams.py +85 -0
- compass_api_sdk/models/vaultdepositrequest.py +9 -5
- compass_api_sdk/models/vaultwithdrawparams.py +75 -0
- compass_api_sdk/models/vaultwithdrawrequest.py +9 -5
- compass_api_sdk/models/wrapethrequest.py +9 -5
- compass_api_sdk/morpho.py +140 -140
- compass_api_sdk/pendle.py +254 -1066
- compass_api_sdk/sky.py +98 -56
- compass_api_sdk/smart_account.py +10 -10
- compass_api_sdk/swap.py +16 -16
- compass_api_sdk/token_sdk.py +56 -56
- compass_api_sdk/transaction_bundler.py +64 -62
- compass_api_sdk/uniswap_v3.py +222 -214
- compass_api_sdk/universal.py +104 -292
- compass_api_sdk/utils/__init__.py +3 -2
- {compass_api_sdk-0.9.51.dist-info → compass_api_sdk-1.0.0.dist-info}/METADATA +83 -88
- {compass_api_sdk-0.9.51.dist-info → compass_api_sdk-1.0.0.dist-info}/RECORD +114 -117
- compass_api_sdk/models/generic_supported_tokensop.py +0 -28
- compass_api_sdk/models/generic_visualize_portfolioop.py +0 -37
- compass_api_sdk/models/image.py +0 -15
- compass_api_sdk/models/pendle_marketsop.py +0 -28
- compass_api_sdk/models/pendle_quoteop.py +0 -128
- compass_api_sdk/models/pendleaddliquidityparams.py +0 -50
- compass_api_sdk/models/pendleaddliquidityrequest.py +0 -61
- compass_api_sdk/models/pendlebuyptparams.py +0 -48
- compass_api_sdk/models/pendlebuyptrequest.py +0 -59
- compass_api_sdk/models/pendlebuyytparams.py +0 -48
- compass_api_sdk/models/pendlebuyytrequest.py +0 -59
- compass_api_sdk/models/pendlegetquoteresponse.py +0 -15
- compass_api_sdk/models/pendleremoveliquidityparams.py +0 -50
- compass_api_sdk/models/pendleremoveliquidityrequest.py +0 -61
- compass_api_sdk/models/pendlesellptparams.py +0 -48
- compass_api_sdk/models/pendlesellptrequest.py +0 -61
- compass_api_sdk/models/pendlesellytparams.py +0 -48
- compass_api_sdk/models/pendlesellytrequest.py +0 -61
- compass_api_sdk/models/txresponse.py +0 -27
- {compass_api_sdk-0.9.51.dist-info → compass_api_sdk-1.0.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .token_enum import TokenEnum
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
7
|
+
from enum import Enum
|
|
8
|
+
import pydantic
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from typing import Literal, Optional, Union
|
|
11
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class PendleTradePtParamsAction(str, Enum):
|
|
15
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
16
|
+
|
|
17
|
+
BUY = "BUY"
|
|
18
|
+
SELL = "SELL"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
PendleTradePtParamsTokenTypedDict = TypeAliasType(
|
|
22
|
+
"PendleTradePtParamsTokenTypedDict", Union[TokenEnum, str]
|
|
23
|
+
)
|
|
24
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
PendleTradePtParamsToken = TypeAliasType(
|
|
28
|
+
"PendleTradePtParamsToken", Union[TokenEnum, str]
|
|
29
|
+
)
|
|
30
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
PendleTradePtParamsAmountInTypedDict = TypeAliasType(
|
|
34
|
+
"PendleTradePtParamsAmountInTypedDict", Union[float, str]
|
|
35
|
+
)
|
|
36
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
PendleTradePtParamsAmountIn = TypeAliasType(
|
|
40
|
+
"PendleTradePtParamsAmountIn", Union[float, str]
|
|
41
|
+
)
|
|
42
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class PendleTradePtParamsTypedDict(TypedDict):
|
|
46
|
+
market_address: str
|
|
47
|
+
r"""The address of the market identifying which Principal Token (PT) you would like to trade."""
|
|
48
|
+
action: PendleTradePtParamsAction
|
|
49
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
50
|
+
token: PendleTradePtParamsTokenTypedDict
|
|
51
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
52
|
+
amount_in: PendleTradePtParamsAmountInTypedDict
|
|
53
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
54
|
+
max_slippage_percent: float
|
|
55
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
56
|
+
action_type: Literal["PENDLE_TRADE_PT"]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class PendleTradePtParams(BaseModel):
|
|
60
|
+
market_address: str
|
|
61
|
+
r"""The address of the market identifying which Principal Token (PT) you would like to trade."""
|
|
62
|
+
|
|
63
|
+
action: PendleTradePtParamsAction
|
|
64
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
65
|
+
|
|
66
|
+
token: PendleTradePtParamsToken
|
|
67
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
68
|
+
|
|
69
|
+
amount_in: PendleTradePtParamsAmountIn
|
|
70
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
71
|
+
|
|
72
|
+
max_slippage_percent: float
|
|
73
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
74
|
+
|
|
75
|
+
ACTION_TYPE: Annotated[
|
|
76
|
+
Annotated[
|
|
77
|
+
Optional[Literal["PENDLE_TRADE_PT"]],
|
|
78
|
+
AfterValidator(validate_const("PENDLE_TRADE_PT")),
|
|
79
|
+
],
|
|
80
|
+
pydantic.Field(alias="action_type"),
|
|
81
|
+
] = "PENDLE_TRADE_PT"
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .token_enum import TokenEnum
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
7
|
+
from enum import Enum
|
|
8
|
+
import pydantic
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from typing import Literal, Optional, Union
|
|
11
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class PendleTradePtRequestAction(str, Enum):
|
|
15
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
16
|
+
|
|
17
|
+
BUY = "BUY"
|
|
18
|
+
SELL = "SELL"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
PendleTradePtRequestTokenTypedDict = TypeAliasType(
|
|
22
|
+
"PendleTradePtRequestTokenTypedDict", Union[TokenEnum, str]
|
|
23
|
+
)
|
|
24
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
PendleTradePtRequestToken = TypeAliasType(
|
|
28
|
+
"PendleTradePtRequestToken", Union[TokenEnum, str]
|
|
29
|
+
)
|
|
30
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
PendleTradePtRequestAmountInTypedDict = TypeAliasType(
|
|
34
|
+
"PendleTradePtRequestAmountInTypedDict", Union[float, str]
|
|
35
|
+
)
|
|
36
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
PendleTradePtRequestAmountIn = TypeAliasType(
|
|
40
|
+
"PendleTradePtRequestAmountIn", Union[float, str]
|
|
41
|
+
)
|
|
42
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class PendleTradePtRequestChain(str, Enum):
|
|
46
|
+
ARBITRUM = "arbitrum"
|
|
47
|
+
BASE = "base"
|
|
48
|
+
ETHEREUM = "ethereum"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class PendleTradePtRequestTypedDict(TypedDict):
|
|
52
|
+
market_address: str
|
|
53
|
+
r"""The address of the market identifying which Principal Token (PT) you would like to trade."""
|
|
54
|
+
action: PendleTradePtRequestAction
|
|
55
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
56
|
+
token: PendleTradePtRequestTokenTypedDict
|
|
57
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
58
|
+
amount_in: PendleTradePtRequestAmountInTypedDict
|
|
59
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
60
|
+
max_slippage_percent: float
|
|
61
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
62
|
+
chain: PendleTradePtRequestChain
|
|
63
|
+
sender: str
|
|
64
|
+
r"""The address of the transaction sender."""
|
|
65
|
+
action_type: Literal["PENDLE_TRADE_PT"]
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class PendleTradePtRequest(BaseModel):
|
|
69
|
+
market_address: str
|
|
70
|
+
r"""The address of the market identifying which Principal Token (PT) you would like to trade."""
|
|
71
|
+
|
|
72
|
+
action: PendleTradePtRequestAction
|
|
73
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
74
|
+
|
|
75
|
+
token: PendleTradePtRequestToken
|
|
76
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
77
|
+
|
|
78
|
+
amount_in: PendleTradePtRequestAmountIn
|
|
79
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
80
|
+
|
|
81
|
+
max_slippage_percent: float
|
|
82
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
83
|
+
|
|
84
|
+
chain: PendleTradePtRequestChain
|
|
85
|
+
|
|
86
|
+
sender: str
|
|
87
|
+
r"""The address of the transaction sender."""
|
|
88
|
+
|
|
89
|
+
ACTION_TYPE: Annotated[
|
|
90
|
+
Annotated[
|
|
91
|
+
Optional[Literal["PENDLE_TRADE_PT"]],
|
|
92
|
+
AfterValidator(validate_const("PENDLE_TRADE_PT")),
|
|
93
|
+
],
|
|
94
|
+
pydantic.Field(alias="action_type"),
|
|
95
|
+
] = "PENDLE_TRADE_PT"
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .token_enum import TokenEnum
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
7
|
+
from enum import Enum
|
|
8
|
+
import pydantic
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from typing import Literal, Optional, Union
|
|
11
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class PendleTradeYtParamsAction(str, Enum):
|
|
15
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
16
|
+
|
|
17
|
+
BUY = "BUY"
|
|
18
|
+
SELL = "SELL"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
PendleTradeYtParamsTokenTypedDict = TypeAliasType(
|
|
22
|
+
"PendleTradeYtParamsTokenTypedDict", Union[TokenEnum, str]
|
|
23
|
+
)
|
|
24
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
PendleTradeYtParamsToken = TypeAliasType(
|
|
28
|
+
"PendleTradeYtParamsToken", Union[TokenEnum, str]
|
|
29
|
+
)
|
|
30
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
PendleTradeYtParamsAmountInTypedDict = TypeAliasType(
|
|
34
|
+
"PendleTradeYtParamsAmountInTypedDict", Union[float, str]
|
|
35
|
+
)
|
|
36
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
PendleTradeYtParamsAmountIn = TypeAliasType(
|
|
40
|
+
"PendleTradeYtParamsAmountIn", Union[float, str]
|
|
41
|
+
)
|
|
42
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class PendleTradeYtParamsTypedDict(TypedDict):
|
|
46
|
+
market_address: str
|
|
47
|
+
r"""The address of the market identifying which Yield Token (YT) you would like to trade."""
|
|
48
|
+
action: PendleTradeYtParamsAction
|
|
49
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
50
|
+
token: PendleTradeYtParamsTokenTypedDict
|
|
51
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
52
|
+
amount_in: PendleTradeYtParamsAmountInTypedDict
|
|
53
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
54
|
+
max_slippage_percent: float
|
|
55
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
56
|
+
action_type: Literal["PENDLE_TRADE_YT"]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class PendleTradeYtParams(BaseModel):
|
|
60
|
+
market_address: str
|
|
61
|
+
r"""The address of the market identifying which Yield Token (YT) you would like to trade."""
|
|
62
|
+
|
|
63
|
+
action: PendleTradeYtParamsAction
|
|
64
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
65
|
+
|
|
66
|
+
token: PendleTradeYtParamsToken
|
|
67
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
68
|
+
|
|
69
|
+
amount_in: PendleTradeYtParamsAmountIn
|
|
70
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
71
|
+
|
|
72
|
+
max_slippage_percent: float
|
|
73
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
74
|
+
|
|
75
|
+
ACTION_TYPE: Annotated[
|
|
76
|
+
Annotated[
|
|
77
|
+
Optional[Literal["PENDLE_TRADE_YT"]],
|
|
78
|
+
AfterValidator(validate_const("PENDLE_TRADE_YT")),
|
|
79
|
+
],
|
|
80
|
+
pydantic.Field(alias="action_type"),
|
|
81
|
+
] = "PENDLE_TRADE_YT"
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .token_enum import TokenEnum
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
7
|
+
from enum import Enum
|
|
8
|
+
import pydantic
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from typing import Literal, Optional, Union
|
|
11
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class PendleTradeYtRequestAction(str, Enum):
|
|
15
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
16
|
+
|
|
17
|
+
BUY = "BUY"
|
|
18
|
+
SELL = "SELL"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
PendleTradeYtRequestTokenTypedDict = TypeAliasType(
|
|
22
|
+
"PendleTradeYtRequestTokenTypedDict", Union[TokenEnum, str]
|
|
23
|
+
)
|
|
24
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
PendleTradeYtRequestToken = TypeAliasType(
|
|
28
|
+
"PendleTradeYtRequestToken", Union[TokenEnum, str]
|
|
29
|
+
)
|
|
30
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
PendleTradeYtRequestAmountInTypedDict = TypeAliasType(
|
|
34
|
+
"PendleTradeYtRequestAmountInTypedDict", Union[float, str]
|
|
35
|
+
)
|
|
36
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
PendleTradeYtRequestAmountIn = TypeAliasType(
|
|
40
|
+
"PendleTradeYtRequestAmountIn", Union[float, str]
|
|
41
|
+
)
|
|
42
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class PendleTradeYtRequestChain(str, Enum):
|
|
46
|
+
ARBITRUM = "arbitrum"
|
|
47
|
+
BASE = "base"
|
|
48
|
+
ETHEREUM = "ethereum"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class PendleTradeYtRequestTypedDict(TypedDict):
|
|
52
|
+
market_address: str
|
|
53
|
+
r"""The address of the market identifying which Yield Token (YT) you would like to trade."""
|
|
54
|
+
action: PendleTradeYtRequestAction
|
|
55
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
56
|
+
token: PendleTradeYtRequestTokenTypedDict
|
|
57
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
58
|
+
amount_in: PendleTradeYtRequestAmountInTypedDict
|
|
59
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
60
|
+
max_slippage_percent: float
|
|
61
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
62
|
+
chain: PendleTradeYtRequestChain
|
|
63
|
+
sender: str
|
|
64
|
+
r"""The address of the transaction sender."""
|
|
65
|
+
action_type: Literal["PENDLE_TRADE_YT"]
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class PendleTradeYtRequest(BaseModel):
|
|
69
|
+
market_address: str
|
|
70
|
+
r"""The address of the market identifying which Yield Token (YT) you would like to trade."""
|
|
71
|
+
|
|
72
|
+
action: PendleTradeYtRequestAction
|
|
73
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
74
|
+
|
|
75
|
+
token: PendleTradeYtRequestToken
|
|
76
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
77
|
+
|
|
78
|
+
amount_in: PendleTradeYtRequestAmountIn
|
|
79
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
80
|
+
|
|
81
|
+
max_slippage_percent: float
|
|
82
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
83
|
+
|
|
84
|
+
chain: PendleTradeYtRequestChain
|
|
85
|
+
|
|
86
|
+
sender: str
|
|
87
|
+
r"""The address of the transaction sender."""
|
|
88
|
+
|
|
89
|
+
ACTION_TYPE: Annotated[
|
|
90
|
+
Annotated[
|
|
91
|
+
Optional[Literal["PENDLE_TRADE_YT"]],
|
|
92
|
+
AfterValidator(validate_const("PENDLE_TRADE_YT")),
|
|
93
|
+
],
|
|
94
|
+
pydantic.Field(alias="action_type"),
|
|
95
|
+
] = "PENDLE_TRADE_YT"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .unsignedmulticalltransaction import (
|
|
5
|
+
UnsignedMulticallTransaction,
|
|
6
|
+
UnsignedMulticallTransactionTypedDict,
|
|
7
|
+
)
|
|
8
|
+
from .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
|
|
9
|
+
from .useroperationresponse import UserOperationResponse, UserOperationResponseTypedDict
|
|
10
|
+
from compass_api_sdk.types import BaseModel
|
|
11
|
+
from typing import Union
|
|
12
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
PendleTxResponseTransactionTypedDict = TypeAliasType(
|
|
16
|
+
"PendleTxResponseTransactionTypedDict",
|
|
17
|
+
Union[
|
|
18
|
+
UserOperationResponseTypedDict,
|
|
19
|
+
UnsignedTransactionTypedDict,
|
|
20
|
+
UnsignedMulticallTransactionTypedDict,
|
|
21
|
+
],
|
|
22
|
+
)
|
|
23
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
PendleTxResponseTransaction = TypeAliasType(
|
|
27
|
+
"PendleTxResponseTransaction",
|
|
28
|
+
Union[UserOperationResponse, UnsignedTransaction, UnsignedMulticallTransaction],
|
|
29
|
+
)
|
|
30
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class PendleTxResponseTypedDict(TypedDict):
|
|
34
|
+
transaction: PendleTxResponseTransactionTypedDict
|
|
35
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
36
|
+
amount_out_quote: str
|
|
37
|
+
r"""The estimated amount out for the transaction. The actual output amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote."""
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class PendleTxResponse(BaseModel):
|
|
41
|
+
transaction: PendleTxResponseTransaction
|
|
42
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
43
|
+
|
|
44
|
+
amount_out_quote: str
|
|
45
|
+
r"""The estimated amount out for the transaction. The actual output amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote."""
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .chain import Chain
|
|
5
4
|
from .token_enum import TokenEnum
|
|
6
5
|
from compass_api_sdk.types import BaseModel
|
|
7
6
|
from compass_api_sdk.utils import validate_const
|
|
@@ -66,6 +65,12 @@ SetAllowanceRequestAmount = TypeAliasType(
|
|
|
66
65
|
r"""The amount to set the allowance to."""
|
|
67
66
|
|
|
68
67
|
|
|
68
|
+
class SetAllowanceRequestChain(str, Enum):
|
|
69
|
+
ARBITRUM = "arbitrum"
|
|
70
|
+
BASE = "base"
|
|
71
|
+
ETHEREUM = "ethereum"
|
|
72
|
+
|
|
73
|
+
|
|
69
74
|
class SetAllowanceRequestTypedDict(TypedDict):
|
|
70
75
|
r"""Request model for increasing token allowance for a contract."""
|
|
71
76
|
|
|
@@ -75,8 +80,7 @@ class SetAllowanceRequestTypedDict(TypedDict):
|
|
|
75
80
|
r"""The name or address of the contract to set spending allowance for."""
|
|
76
81
|
amount: SetAllowanceRequestAmountTypedDict
|
|
77
82
|
r"""The amount to set the allowance to."""
|
|
78
|
-
chain:
|
|
79
|
-
r"""The chain to use."""
|
|
83
|
+
chain: SetAllowanceRequestChain
|
|
80
84
|
sender: str
|
|
81
85
|
r"""The address of the transaction sender."""
|
|
82
86
|
action_type: Literal["SET_ALLOWANCE"]
|
|
@@ -94,8 +98,7 @@ class SetAllowanceRequest(BaseModel):
|
|
|
94
98
|
amount: SetAllowanceRequestAmount
|
|
95
99
|
r"""The amount to set the allowance to."""
|
|
96
100
|
|
|
97
|
-
chain:
|
|
98
|
-
r"""The chain to use."""
|
|
101
|
+
chain: SetAllowanceRequestChain
|
|
99
102
|
|
|
100
103
|
sender: str
|
|
101
104
|
r"""The address of the transaction sender."""
|
|
@@ -27,15 +27,19 @@ SkyBuyRequestAmount = TypeAliasType("SkyBuyRequestAmount", Union[float, str])
|
|
|
27
27
|
r"""The amount of USDS you would like to buy 1:1 with 'token_in'."""
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
class SkyBuyRequestChain(str, Enum):
|
|
31
|
+
ETHEREUM = "ethereum"
|
|
32
|
+
|
|
33
|
+
|
|
30
34
|
class SkyBuyRequestTypedDict(TypedDict):
|
|
31
35
|
token_in: SkyBuyRequestTokenIn
|
|
32
36
|
r"""The token you would like to swap 1:1 for USDS. Choose from DAI or USDC."""
|
|
33
37
|
amount: SkyBuyRequestAmountTypedDict
|
|
34
38
|
r"""The amount of USDS you would like to buy 1:1 with 'token_in'."""
|
|
39
|
+
chain: SkyBuyRequestChain
|
|
35
40
|
sender: str
|
|
36
41
|
r"""The address of the transaction sender."""
|
|
37
42
|
action_type: Literal["SKY_BUY"]
|
|
38
|
-
chain: Literal["ethereum:mainnet"]
|
|
39
43
|
|
|
40
44
|
|
|
41
45
|
class SkyBuyRequest(BaseModel):
|
|
@@ -45,6 +49,8 @@ class SkyBuyRequest(BaseModel):
|
|
|
45
49
|
amount: SkyBuyRequestAmount
|
|
46
50
|
r"""The amount of USDS you would like to buy 1:1 with 'token_in'."""
|
|
47
51
|
|
|
52
|
+
chain: SkyBuyRequestChain
|
|
53
|
+
|
|
48
54
|
sender: str
|
|
49
55
|
r"""The address of the transaction sender."""
|
|
50
56
|
|
|
@@ -54,11 +60,3 @@ class SkyBuyRequest(BaseModel):
|
|
|
54
60
|
],
|
|
55
61
|
pydantic.Field(alias="action_type"),
|
|
56
62
|
] = "SKY_BUY"
|
|
57
|
-
|
|
58
|
-
CHAIN: Annotated[
|
|
59
|
-
Annotated[
|
|
60
|
-
Optional[Literal["ethereum:mainnet"]],
|
|
61
|
-
AfterValidator(validate_const("ethereum:mainnet")),
|
|
62
|
-
],
|
|
63
|
-
pydantic.Field(alias="chain"),
|
|
64
|
-
] = "ethereum:mainnet"
|
|
@@ -9,6 +9,7 @@ from compass_api_sdk.types import (
|
|
|
9
9
|
UNSET_SENTINEL,
|
|
10
10
|
)
|
|
11
11
|
from compass_api_sdk.utils import validate_const
|
|
12
|
+
from enum import Enum
|
|
12
13
|
import pydantic
|
|
13
14
|
from pydantic import model_serializer
|
|
14
15
|
from pydantic.functional_validators import AfterValidator
|
|
@@ -26,6 +27,10 @@ SkyDepositRequestAmount = TypeAliasType("SkyDepositRequestAmount", Union[float,
|
|
|
26
27
|
r"""The amount of USDS you would like to deposit for sUSDS to earn yield."""
|
|
27
28
|
|
|
28
29
|
|
|
30
|
+
class SkyDepositRequestChain(str, Enum):
|
|
31
|
+
ETHEREUM = "ethereum"
|
|
32
|
+
|
|
33
|
+
|
|
29
34
|
class SkyDepositRequestTypedDict(TypedDict):
|
|
30
35
|
amount: SkyDepositRequestAmountTypedDict
|
|
31
36
|
r"""The amount of USDS you would like to deposit for sUSDS to earn yield."""
|
|
@@ -34,7 +39,7 @@ class SkyDepositRequestTypedDict(TypedDict):
|
|
|
34
39
|
action_type: Literal["SKY_DEPOSIT"]
|
|
35
40
|
receiver: NotRequired[Nullable[str]]
|
|
36
41
|
r"""The address which will receive the sUSDS. Defaults to the sender."""
|
|
37
|
-
chain:
|
|
42
|
+
chain: NotRequired[SkyDepositRequestChain]
|
|
38
43
|
|
|
39
44
|
|
|
40
45
|
class SkyDepositRequest(BaseModel):
|
|
@@ -55,13 +60,7 @@ class SkyDepositRequest(BaseModel):
|
|
|
55
60
|
receiver: OptionalNullable[str] = UNSET
|
|
56
61
|
r"""The address which will receive the sUSDS. Defaults to the sender."""
|
|
57
62
|
|
|
58
|
-
|
|
59
|
-
Annotated[
|
|
60
|
-
Optional[Literal["ethereum:mainnet"]],
|
|
61
|
-
AfterValidator(validate_const("ethereum:mainnet")),
|
|
62
|
-
],
|
|
63
|
-
pydantic.Field(alias="chain"),
|
|
64
|
-
] = "ethereum:mainnet"
|
|
63
|
+
chain: Optional[SkyDepositRequestChain] = SkyDepositRequestChain.ETHEREUM
|
|
65
64
|
|
|
66
65
|
@model_serializer(mode="wrap")
|
|
67
66
|
def serialize_model(self, handler):
|
|
@@ -7,7 +7,7 @@ from enum import Enum
|
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional, Union
|
|
10
|
-
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class SkySellRequestTokenOut(str, Enum):
|
|
@@ -27,6 +27,10 @@ SkySellRequestAmount = TypeAliasType("SkySellRequestAmount", Union[float, str])
|
|
|
27
27
|
r"""The amount of USDS you would like to sell 1:1 for 'token_out'."""
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
class SkySellRequestChain(str, Enum):
|
|
31
|
+
ETHEREUM = "ethereum"
|
|
32
|
+
|
|
33
|
+
|
|
30
34
|
class SkySellRequestTypedDict(TypedDict):
|
|
31
35
|
token_out: SkySellRequestTokenOut
|
|
32
36
|
r"""The token you would like to swap 1:1 with USDS. Choose from DAI or USDC."""
|
|
@@ -35,7 +39,7 @@ class SkySellRequestTypedDict(TypedDict):
|
|
|
35
39
|
sender: str
|
|
36
40
|
r"""The address of the transaction sender."""
|
|
37
41
|
action_type: Literal["SKY_SELL"]
|
|
38
|
-
chain:
|
|
42
|
+
chain: NotRequired[SkySellRequestChain]
|
|
39
43
|
|
|
40
44
|
|
|
41
45
|
class SkySellRequest(BaseModel):
|
|
@@ -55,10 +59,4 @@ class SkySellRequest(BaseModel):
|
|
|
55
59
|
pydantic.Field(alias="action_type"),
|
|
56
60
|
] = "SKY_SELL"
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
Annotated[
|
|
60
|
-
Optional[Literal["ethereum:mainnet"]],
|
|
61
|
-
AfterValidator(validate_const("ethereum:mainnet")),
|
|
62
|
-
],
|
|
63
|
-
pydantic.Field(alias="chain"),
|
|
64
|
-
] = "ethereum:mainnet"
|
|
62
|
+
chain: Optional[SkySellRequestChain] = SkySellRequestChain.ETHEREUM
|
|
@@ -9,6 +9,7 @@ from compass_api_sdk.types import (
|
|
|
9
9
|
UNSET_SENTINEL,
|
|
10
10
|
)
|
|
11
11
|
from compass_api_sdk.utils import validate_const
|
|
12
|
+
from enum import Enum
|
|
12
13
|
import pydantic
|
|
13
14
|
from pydantic import model_serializer
|
|
14
15
|
from pydantic.functional_validators import AfterValidator
|
|
@@ -16,6 +17,10 @@ from typing import Any, Literal, Optional
|
|
|
16
17
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
17
18
|
|
|
18
19
|
|
|
20
|
+
class SkyWithdrawRequestChain(str, Enum):
|
|
21
|
+
ETHEREUM = "ethereum"
|
|
22
|
+
|
|
23
|
+
|
|
19
24
|
class SkyWithdrawRequestTypedDict(TypedDict):
|
|
20
25
|
amount: Any
|
|
21
26
|
r"""The amount of USDS you would like to withdraw. If set to 'ALL', your total deposited USDS amount will be withdrawn."""
|
|
@@ -24,7 +29,7 @@ class SkyWithdrawRequestTypedDict(TypedDict):
|
|
|
24
29
|
action_type: Literal["SKY_WITHDRAW"]
|
|
25
30
|
receiver: NotRequired[Nullable[str]]
|
|
26
31
|
r"""The address which will receive the withdrawn USDS. Defaults to the sender."""
|
|
27
|
-
chain:
|
|
32
|
+
chain: NotRequired[SkyWithdrawRequestChain]
|
|
28
33
|
|
|
29
34
|
|
|
30
35
|
class SkyWithdrawRequest(BaseModel):
|
|
@@ -45,13 +50,7 @@ class SkyWithdrawRequest(BaseModel):
|
|
|
45
50
|
receiver: OptionalNullable[str] = UNSET
|
|
46
51
|
r"""The address which will receive the withdrawn USDS. Defaults to the sender."""
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
Annotated[
|
|
50
|
-
Optional[Literal["ethereum:mainnet"]],
|
|
51
|
-
AfterValidator(validate_const("ethereum:mainnet")),
|
|
52
|
-
],
|
|
53
|
-
pydantic.Field(alias="chain"),
|
|
54
|
-
] = "ethereum:mainnet"
|
|
53
|
+
chain: Optional[SkyWithdrawRequestChain] = SkyWithdrawRequestChain.ETHEREUM
|
|
55
54
|
|
|
56
55
|
@model_serializer(mode="wrap")
|
|
57
56
|
def serialize_model(self, handler):
|
|
@@ -52,7 +52,24 @@ class TokenEnum(str, Enum):
|
|
|
52
52
|
EURS = "EURS"
|
|
53
53
|
MAI = "MAI"
|
|
54
54
|
USD_CE = "USDCe"
|
|
55
|
+
ETH = "ETH"
|
|
55
56
|
AERO = "AERO"
|
|
56
57
|
EUR = "EUR"
|
|
57
58
|
VIRTUAL = "VIRTUAL"
|
|
58
59
|
EZ_ETH = "ezETH"
|
|
60
|
+
CYBER = "CYBER"
|
|
61
|
+
WRS_ETH = "wrsETH"
|
|
62
|
+
E_BTC = "eBTC"
|
|
63
|
+
EURC = "EURC"
|
|
64
|
+
E_US_DE = "eUSDe"
|
|
65
|
+
FBTC = "FBTC"
|
|
66
|
+
LBTC = "LBTC"
|
|
67
|
+
PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
|
|
68
|
+
PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
|
|
69
|
+
PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
|
|
70
|
+
PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
|
|
71
|
+
PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
|
|
72
|
+
RLUSD = "RLUSD"
|
|
73
|
+
USD_0 = "USD₮0"
|
|
74
|
+
US_DB_C = "USDbC"
|
|
75
|
+
US_DTB = "USDtb"
|