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
|
@@ -3,9 +3,16 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .movement10percent import Movement10Percent, Movement10PercentTypedDict
|
|
5
5
|
from .yieldrange import YieldRange, YieldRangeTypedDict
|
|
6
|
-
from compass_api_sdk.types import
|
|
6
|
+
from compass_api_sdk.types import (
|
|
7
|
+
BaseModel,
|
|
8
|
+
Nullable,
|
|
9
|
+
OptionalNullable,
|
|
10
|
+
UNSET,
|
|
11
|
+
UNSET_SENTINEL,
|
|
12
|
+
)
|
|
7
13
|
import pydantic
|
|
8
|
-
from
|
|
14
|
+
from pydantic import model_serializer
|
|
15
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
16
|
|
|
10
17
|
|
|
11
18
|
class DetailsTypedDict(TypedDict):
|
|
@@ -13,10 +20,10 @@ class DetailsTypedDict(TypedDict):
|
|
|
13
20
|
pendle_apy: float
|
|
14
21
|
implied_apy: float
|
|
15
22
|
fee_rate: float
|
|
16
|
-
movement10_percent: Movement10PercentTypedDict
|
|
17
23
|
yield_range: YieldRangeTypedDict
|
|
18
24
|
aggregated_apy: float
|
|
19
25
|
max_boosted_apy: float
|
|
26
|
+
movement10_percent: NotRequired[Nullable[Movement10PercentTypedDict]]
|
|
20
27
|
|
|
21
28
|
|
|
22
29
|
class Details(BaseModel):
|
|
@@ -28,12 +35,42 @@ class Details(BaseModel):
|
|
|
28
35
|
|
|
29
36
|
fee_rate: Annotated[float, pydantic.Field(alias="feeRate")]
|
|
30
37
|
|
|
31
|
-
movement10_percent: Annotated[
|
|
32
|
-
Movement10Percent, pydantic.Field(alias="movement10Percent")
|
|
33
|
-
]
|
|
34
|
-
|
|
35
38
|
yield_range: Annotated[YieldRange, pydantic.Field(alias="yieldRange")]
|
|
36
39
|
|
|
37
40
|
aggregated_apy: Annotated[float, pydantic.Field(alias="aggregatedApy")]
|
|
38
41
|
|
|
39
42
|
max_boosted_apy: Annotated[float, pydantic.Field(alias="maxBoostedApy")]
|
|
43
|
+
|
|
44
|
+
movement10_percent: Annotated[
|
|
45
|
+
OptionalNullable[Movement10Percent], pydantic.Field(alias="movement10Percent")
|
|
46
|
+
] = UNSET
|
|
47
|
+
|
|
48
|
+
@model_serializer(mode="wrap")
|
|
49
|
+
def serialize_model(self, handler):
|
|
50
|
+
optional_fields = ["movement10Percent"]
|
|
51
|
+
nullable_fields = ["movement10Percent"]
|
|
52
|
+
null_default_fields = []
|
|
53
|
+
|
|
54
|
+
serialized = handler(self)
|
|
55
|
+
|
|
56
|
+
m = {}
|
|
57
|
+
|
|
58
|
+
for n, f in type(self).model_fields.items():
|
|
59
|
+
k = f.alias or n
|
|
60
|
+
val = serialized.get(k)
|
|
61
|
+
serialized.pop(k, None)
|
|
62
|
+
|
|
63
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
64
|
+
is_set = (
|
|
65
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
66
|
+
or k in null_default_fields
|
|
67
|
+
) # pylint: disable=no-member
|
|
68
|
+
|
|
69
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
70
|
+
m[k] = val
|
|
71
|
+
elif val != UNSET_SENTINEL and (
|
|
72
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
73
|
+
):
|
|
74
|
+
m[k] = val
|
|
75
|
+
|
|
76
|
+
return m
|
|
@@ -30,8 +30,9 @@ r"""Amount of the token to borrow from the market."""
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class MorphoBorrowRequestChain(str, Enum):
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
ARBITRUM = "arbitrum"
|
|
34
|
+
BASE = "base"
|
|
35
|
+
ETHEREUM = "ethereum"
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
class MorphoBorrowRequestTypedDict(TypedDict):
|
|
@@ -30,8 +30,9 @@ r"""The amount of tokens to deposit into the vault."""
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class MorphoDepositRequestChain(str, Enum):
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
ARBITRUM = "arbitrum"
|
|
34
|
+
BASE = "base"
|
|
35
|
+
ETHEREUM = "ethereum"
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
class MorphoDepositRequestTypedDict(TypedDict):
|
|
@@ -18,8 +18,9 @@ from typing_extensions import Annotated, NotRequired, TypedDict
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class MorphoRepayRequestChain(str, Enum):
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
ARBITRUM = "arbitrum"
|
|
22
|
+
BASE = "base"
|
|
23
|
+
ETHEREUM = "ethereum"
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
class MorphoRepayRequestTypedDict(TypedDict):
|
|
@@ -30,8 +30,9 @@ r"""Amount of the token to supply to the market as collateral."""
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class MorphoSupplyCollateralRequestChain(str, Enum):
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
ARBITRUM = "arbitrum"
|
|
34
|
+
BASE = "base"
|
|
35
|
+
ETHEREUM = "ethereum"
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
class MorphoSupplyCollateralRequestTypedDict(TypedDict):
|
|
@@ -30,8 +30,9 @@ r"""Amount of the token to supply to the market as collateral."""
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class MorphoWithdrawCollateralRequestChain(str, Enum):
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
ARBITRUM = "arbitrum"
|
|
34
|
+
BASE = "base"
|
|
35
|
+
ETHEREUM = "ethereum"
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
class MorphoWithdrawCollateralRequestTypedDict(TypedDict):
|
|
@@ -18,8 +18,9 @@ from typing_extensions import Annotated, NotRequired, TypedDict
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class MorphoWithdrawRequestChain(str, Enum):
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
ARBITRUM = "arbitrum"
|
|
22
|
+
BASE = "base"
|
|
23
|
+
ETHEREUM = "ethereum"
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
class MorphoWithdrawRequestTypedDict(TypedDict):
|
|
@@ -1,23 +1,78 @@
|
|
|
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
|
|
4
|
+
from compass_api_sdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
5
11
|
import pydantic
|
|
6
|
-
from
|
|
12
|
+
from pydantic import model_serializer
|
|
13
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
7
14
|
|
|
8
15
|
|
|
9
16
|
class Movement10PercentTypedDict(TypedDict):
|
|
10
|
-
pt_movement_up_usd: float
|
|
11
|
-
pt_movement_down_usd: float
|
|
12
|
-
yt_movement_up_usd: float
|
|
13
|
-
yt_movement_down_usd: float
|
|
17
|
+
pt_movement_up_usd: NotRequired[Nullable[float]]
|
|
18
|
+
pt_movement_down_usd: NotRequired[Nullable[float]]
|
|
19
|
+
yt_movement_up_usd: NotRequired[Nullable[float]]
|
|
20
|
+
yt_movement_down_usd: NotRequired[Nullable[float]]
|
|
14
21
|
|
|
15
22
|
|
|
16
23
|
class Movement10Percent(BaseModel):
|
|
17
|
-
pt_movement_up_usd: Annotated[
|
|
24
|
+
pt_movement_up_usd: Annotated[
|
|
25
|
+
OptionalNullable[float], pydantic.Field(alias="ptMovementUpUsd")
|
|
26
|
+
] = UNSET
|
|
18
27
|
|
|
19
|
-
pt_movement_down_usd: Annotated[
|
|
28
|
+
pt_movement_down_usd: Annotated[
|
|
29
|
+
OptionalNullable[float], pydantic.Field(alias="ptMovementDownUsd")
|
|
30
|
+
] = UNSET
|
|
20
31
|
|
|
21
|
-
yt_movement_up_usd: Annotated[
|
|
32
|
+
yt_movement_up_usd: Annotated[
|
|
33
|
+
OptionalNullable[float], pydantic.Field(alias="ytMovementUpUsd")
|
|
34
|
+
] = UNSET
|
|
22
35
|
|
|
23
|
-
yt_movement_down_usd: Annotated[
|
|
36
|
+
yt_movement_down_usd: Annotated[
|
|
37
|
+
OptionalNullable[float], pydantic.Field(alias="ytMovementDownUsd")
|
|
38
|
+
] = UNSET
|
|
39
|
+
|
|
40
|
+
@model_serializer(mode="wrap")
|
|
41
|
+
def serialize_model(self, handler):
|
|
42
|
+
optional_fields = [
|
|
43
|
+
"ptMovementUpUsd",
|
|
44
|
+
"ptMovementDownUsd",
|
|
45
|
+
"ytMovementUpUsd",
|
|
46
|
+
"ytMovementDownUsd",
|
|
47
|
+
]
|
|
48
|
+
nullable_fields = [
|
|
49
|
+
"ptMovementUpUsd",
|
|
50
|
+
"ptMovementDownUsd",
|
|
51
|
+
"ytMovementUpUsd",
|
|
52
|
+
"ytMovementDownUsd",
|
|
53
|
+
]
|
|
54
|
+
null_default_fields = []
|
|
55
|
+
|
|
56
|
+
serialized = handler(self)
|
|
57
|
+
|
|
58
|
+
m = {}
|
|
59
|
+
|
|
60
|
+
for n, f in type(self).model_fields.items():
|
|
61
|
+
k = f.alias or n
|
|
62
|
+
val = serialized.get(k)
|
|
63
|
+
serialized.pop(k, None)
|
|
64
|
+
|
|
65
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
66
|
+
is_set = (
|
|
67
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
68
|
+
or k in null_default_fields
|
|
69
|
+
) # pylint: disable=no-member
|
|
70
|
+
|
|
71
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
72
|
+
m[k] = val
|
|
73
|
+
elif val != UNSET_SENTINEL and (
|
|
74
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
75
|
+
):
|
|
76
|
+
m[k] = val
|
|
77
|
+
|
|
78
|
+
return m
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .chain import Chain
|
|
5
4
|
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from enum import Enum
|
|
6
6
|
from typing_extensions import TypedDict
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
class MulticallAuthorizationRequestChain(str, Enum):
|
|
10
|
+
ARBITRUM = "arbitrum"
|
|
11
|
+
BASE = "base"
|
|
12
|
+
ETHEREUM = "ethereum"
|
|
13
|
+
|
|
14
|
+
|
|
9
15
|
class MulticallAuthorizationRequestTypedDict(TypedDict):
|
|
10
16
|
r"""Request model for getting a multicall authorization.
|
|
11
17
|
|
|
@@ -16,8 +22,7 @@ class MulticallAuthorizationRequestTypedDict(TypedDict):
|
|
|
16
22
|
Only needs to be done once per an EOA.
|
|
17
23
|
"""
|
|
18
24
|
|
|
19
|
-
chain:
|
|
20
|
-
r"""The chain to use."""
|
|
25
|
+
chain: MulticallAuthorizationRequestChain
|
|
21
26
|
sender: str
|
|
22
27
|
r"""The Ethereum address to use for authorization"""
|
|
23
28
|
|
|
@@ -32,8 +37,7 @@ class MulticallAuthorizationRequest(BaseModel):
|
|
|
32
37
|
Only needs to be done once per an EOA.
|
|
33
38
|
"""
|
|
34
39
|
|
|
35
|
-
chain:
|
|
36
|
-
r"""The chain to use."""
|
|
40
|
+
chain: MulticallAuthorizationRequestChain
|
|
37
41
|
|
|
38
42
|
sender: str
|
|
39
43
|
r"""The Ethereum address to use for authorization"""
|
|
@@ -1,36 +1,79 @@
|
|
|
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 .signedauthorization import SignedAuthorization, SignedAuthorizationTypedDict
|
|
6
5
|
from .useroperation import UserOperation, UserOperationTypedDict
|
|
7
|
-
from compass_api_sdk.types import
|
|
6
|
+
from compass_api_sdk.types import (
|
|
7
|
+
BaseModel,
|
|
8
|
+
Nullable,
|
|
9
|
+
OptionalNullable,
|
|
10
|
+
UNSET,
|
|
11
|
+
UNSET_SENTINEL,
|
|
12
|
+
)
|
|
13
|
+
from enum import Enum
|
|
14
|
+
from pydantic import model_serializer
|
|
8
15
|
from typing import List
|
|
9
|
-
from typing_extensions import TypedDict
|
|
16
|
+
from typing_extensions import NotRequired, TypedDict
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class MulticallExecuteRequestChain(str, Enum):
|
|
20
|
+
ARBITRUM = "arbitrum"
|
|
21
|
+
BASE = "base"
|
|
22
|
+
ETHEREUM = "ethereum"
|
|
10
23
|
|
|
11
24
|
|
|
12
25
|
class MulticallExecuteRequestTypedDict(TypedDict):
|
|
13
26
|
r"""Request model for executing a multicall."""
|
|
14
27
|
|
|
15
|
-
chain:
|
|
16
|
-
r"""The chain to use."""
|
|
28
|
+
chain: MulticallExecuteRequestChain
|
|
17
29
|
sender: str
|
|
18
30
|
r"""The address of the transaction sender."""
|
|
19
|
-
signed_authorization: SignedAuthorizationTypedDict
|
|
20
31
|
actions: List[UserOperationTypedDict]
|
|
21
32
|
r"""List of possible actions for multicall"""
|
|
33
|
+
signed_authorization: NotRequired[Nullable[SignedAuthorizationTypedDict]]
|
|
34
|
+
r"""EIP-7702 authorization"""
|
|
22
35
|
|
|
23
36
|
|
|
24
37
|
class MulticallExecuteRequest(BaseModel):
|
|
25
38
|
r"""Request model for executing a multicall."""
|
|
26
39
|
|
|
27
|
-
chain:
|
|
28
|
-
r"""The chain to use."""
|
|
40
|
+
chain: MulticallExecuteRequestChain
|
|
29
41
|
|
|
30
42
|
sender: str
|
|
31
43
|
r"""The address of the transaction sender."""
|
|
32
44
|
|
|
33
|
-
signed_authorization: SignedAuthorization
|
|
34
|
-
|
|
35
45
|
actions: List[UserOperation]
|
|
36
46
|
r"""List of possible actions for multicall"""
|
|
47
|
+
|
|
48
|
+
signed_authorization: OptionalNullable[SignedAuthorization] = UNSET
|
|
49
|
+
r"""EIP-7702 authorization"""
|
|
50
|
+
|
|
51
|
+
@model_serializer(mode="wrap")
|
|
52
|
+
def serialize_model(self, handler):
|
|
53
|
+
optional_fields = ["signed_authorization"]
|
|
54
|
+
nullable_fields = ["signed_authorization"]
|
|
55
|
+
null_default_fields = []
|
|
56
|
+
|
|
57
|
+
serialized = handler(self)
|
|
58
|
+
|
|
59
|
+
m = {}
|
|
60
|
+
|
|
61
|
+
for n, f in type(self).model_fields.items():
|
|
62
|
+
k = f.alias or n
|
|
63
|
+
val = serialized.get(k)
|
|
64
|
+
serialized.pop(k, None)
|
|
65
|
+
|
|
66
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
67
|
+
is_set = (
|
|
68
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
69
|
+
or k in null_default_fields
|
|
70
|
+
) # pylint: disable=no-member
|
|
71
|
+
|
|
72
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
73
|
+
m[k] = val
|
|
74
|
+
elif val != UNSET_SENTINEL and (
|
|
75
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
76
|
+
):
|
|
77
|
+
m[k] = val
|
|
78
|
+
|
|
79
|
+
return m
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .chain import Chain
|
|
5
4
|
from .token_enum import TokenEnum
|
|
6
5
|
from compass_api_sdk.types import BaseModel
|
|
7
6
|
from compass_api_sdk.utils import validate_const
|
|
7
|
+
from enum import Enum
|
|
8
8
|
import pydantic
|
|
9
9
|
from pydantic.functional_validators import AfterValidator
|
|
10
10
|
from typing import Literal, Optional, Union
|
|
@@ -43,6 +43,12 @@ OdosSwapRequestAmount = TypeAliasType("OdosSwapRequestAmount", Union[float, str]
|
|
|
43
43
|
r"""The amount of token_in to be sold."""
|
|
44
44
|
|
|
45
45
|
|
|
46
|
+
class OdosSwapRequestChain(str, Enum):
|
|
47
|
+
ARBITRUM = "arbitrum"
|
|
48
|
+
BASE = "base"
|
|
49
|
+
ETHEREUM = "ethereum"
|
|
50
|
+
|
|
51
|
+
|
|
46
52
|
class OdosSwapRequestTypedDict(TypedDict):
|
|
47
53
|
token_in: OdosSwapRequestTokenInTypedDict
|
|
48
54
|
r"""The symbol or address of the token that is to be sold."""
|
|
@@ -52,8 +58,7 @@ class OdosSwapRequestTypedDict(TypedDict):
|
|
|
52
58
|
r"""The amount of token_in to be sold."""
|
|
53
59
|
max_slippage_percent: float
|
|
54
60
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
55
|
-
chain:
|
|
56
|
-
r"""The chain to use."""
|
|
61
|
+
chain: OdosSwapRequestChain
|
|
57
62
|
sender: str
|
|
58
63
|
r"""The address of the transaction sender."""
|
|
59
64
|
action_type: Literal["ODOS_SWAP"]
|
|
@@ -72,8 +77,7 @@ class OdosSwapRequest(BaseModel):
|
|
|
72
77
|
max_slippage_percent: float
|
|
73
78
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
74
79
|
|
|
75
|
-
chain:
|
|
76
|
-
r"""The chain to use."""
|
|
80
|
+
chain: OdosSwapRequestChain
|
|
77
81
|
|
|
78
82
|
sender: str
|
|
79
83
|
r"""The address of the transaction sender."""
|
|
@@ -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 PendleManageLiquidityParamsAction(str, Enum):
|
|
15
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
16
|
+
|
|
17
|
+
SUPPLY = "SUPPLY"
|
|
18
|
+
WITHDRAW = "WITHDRAW"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
PendleManageLiquidityParamsTokenTypedDict = TypeAliasType(
|
|
22
|
+
"PendleManageLiquidityParamsTokenTypedDict", Union[TokenEnum, str]
|
|
23
|
+
)
|
|
24
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
PendleManageLiquidityParamsToken = TypeAliasType(
|
|
28
|
+
"PendleManageLiquidityParamsToken", Union[TokenEnum, str]
|
|
29
|
+
)
|
|
30
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
PendleManageLiquidityParamsAmountInTypedDict = TypeAliasType(
|
|
34
|
+
"PendleManageLiquidityParamsAmountInTypedDict", Union[float, str]
|
|
35
|
+
)
|
|
36
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
PendleManageLiquidityParamsAmountIn = TypeAliasType(
|
|
40
|
+
"PendleManageLiquidityParamsAmountIn", Union[float, str]
|
|
41
|
+
)
|
|
42
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class PendleManageLiquidityParamsTypedDict(TypedDict):
|
|
46
|
+
market_address: str
|
|
47
|
+
r"""The address identifying which Pendle Market you would like to add liquidity to."""
|
|
48
|
+
action: PendleManageLiquidityParamsAction
|
|
49
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
50
|
+
token: PendleManageLiquidityParamsTokenTypedDict
|
|
51
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
52
|
+
amount_in: PendleManageLiquidityParamsAmountInTypedDict
|
|
53
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem 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_MANAGE_LIQUIDITY"]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class PendleManageLiquidityParams(BaseModel):
|
|
60
|
+
market_address: str
|
|
61
|
+
r"""The address identifying which Pendle Market you would like to add liquidity to."""
|
|
62
|
+
|
|
63
|
+
action: PendleManageLiquidityParamsAction
|
|
64
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
65
|
+
|
|
66
|
+
token: PendleManageLiquidityParamsToken
|
|
67
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
68
|
+
|
|
69
|
+
amount_in: PendleManageLiquidityParamsAmountIn
|
|
70
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem 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_MANAGE_LIQUIDITY"]],
|
|
78
|
+
AfterValidator(validate_const("PENDLE_MANAGE_LIQUIDITY")),
|
|
79
|
+
],
|
|
80
|
+
pydantic.Field(alias="action_type"),
|
|
81
|
+
] = "PENDLE_MANAGE_LIQUIDITY"
|
|
@@ -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 PendleManageLiquidityRequestAction(str, Enum):
|
|
15
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
16
|
+
|
|
17
|
+
SUPPLY = "SUPPLY"
|
|
18
|
+
WITHDRAW = "WITHDRAW"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
PendleManageLiquidityRequestTokenTypedDict = TypeAliasType(
|
|
22
|
+
"PendleManageLiquidityRequestTokenTypedDict", Union[TokenEnum, str]
|
|
23
|
+
)
|
|
24
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
PendleManageLiquidityRequestToken = TypeAliasType(
|
|
28
|
+
"PendleManageLiquidityRequestToken", Union[TokenEnum, str]
|
|
29
|
+
)
|
|
30
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
PendleManageLiquidityRequestAmountInTypedDict = TypeAliasType(
|
|
34
|
+
"PendleManageLiquidityRequestAmountInTypedDict", Union[float, str]
|
|
35
|
+
)
|
|
36
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
PendleManageLiquidityRequestAmountIn = TypeAliasType(
|
|
40
|
+
"PendleManageLiquidityRequestAmountIn", Union[float, str]
|
|
41
|
+
)
|
|
42
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class PendleManageLiquidityRequestChain(str, Enum):
|
|
46
|
+
ARBITRUM = "arbitrum"
|
|
47
|
+
BASE = "base"
|
|
48
|
+
ETHEREUM = "ethereum"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class PendleManageLiquidityRequestTypedDict(TypedDict):
|
|
52
|
+
market_address: str
|
|
53
|
+
r"""The address identifying which Pendle Market you would like to add liquidity to."""
|
|
54
|
+
action: PendleManageLiquidityRequestAction
|
|
55
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
56
|
+
token: PendleManageLiquidityRequestTokenTypedDict
|
|
57
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
58
|
+
amount_in: PendleManageLiquidityRequestAmountInTypedDict
|
|
59
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
60
|
+
max_slippage_percent: float
|
|
61
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
62
|
+
chain: PendleManageLiquidityRequestChain
|
|
63
|
+
sender: str
|
|
64
|
+
r"""The address of the transaction sender."""
|
|
65
|
+
action_type: Literal["PENDLE_MANAGE_LIQUIDITY"]
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class PendleManageLiquidityRequest(BaseModel):
|
|
69
|
+
market_address: str
|
|
70
|
+
r"""The address identifying which Pendle Market you would like to add liquidity to."""
|
|
71
|
+
|
|
72
|
+
action: PendleManageLiquidityRequestAction
|
|
73
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
74
|
+
|
|
75
|
+
token: PendleManageLiquidityRequestToken
|
|
76
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
77
|
+
|
|
78
|
+
amount_in: PendleManageLiquidityRequestAmountIn
|
|
79
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem 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: PendleManageLiquidityRequestChain
|
|
85
|
+
|
|
86
|
+
sender: str
|
|
87
|
+
r"""The address of the transaction sender."""
|
|
88
|
+
|
|
89
|
+
ACTION_TYPE: Annotated[
|
|
90
|
+
Annotated[
|
|
91
|
+
Optional[Literal["PENDLE_MANAGE_LIQUIDITY"]],
|
|
92
|
+
AfterValidator(validate_const("PENDLE_MANAGE_LIQUIDITY")),
|
|
93
|
+
],
|
|
94
|
+
pydantic.Field(alias="action_type"),
|
|
95
|
+
] = "PENDLE_MANAGE_LIQUIDITY"
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .chain import Chain
|
|
5
4
|
from compass_api_sdk.types import BaseModel
|
|
6
5
|
from compass_api_sdk.utils import validate_const
|
|
6
|
+
from enum import Enum
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional
|
|
10
10
|
from typing_extensions import Annotated, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
class PendleRedeemYieldRequestChain(str, Enum):
|
|
14
|
+
ARBITRUM = "arbitrum"
|
|
15
|
+
BASE = "base"
|
|
16
|
+
ETHEREUM = "ethereum"
|
|
17
|
+
|
|
18
|
+
|
|
13
19
|
class PendleRedeemYieldRequestTypedDict(TypedDict):
|
|
14
20
|
market_address: str
|
|
15
21
|
r"""The address of the market identifying which Yield Token (YT) you would like to claim yield from."""
|
|
16
|
-
chain:
|
|
17
|
-
r"""The chain to use."""
|
|
22
|
+
chain: PendleRedeemYieldRequestChain
|
|
18
23
|
sender: str
|
|
19
24
|
r"""The address of the transaction sender."""
|
|
20
25
|
action_type: Literal["PENDLE_REDEEM_YIELD"]
|
|
@@ -24,8 +29,7 @@ class PendleRedeemYieldRequest(BaseModel):
|
|
|
24
29
|
market_address: str
|
|
25
30
|
r"""The address of the market identifying which Yield Token (YT) you would like to claim yield from."""
|
|
26
31
|
|
|
27
|
-
chain:
|
|
28
|
-
r"""The chain to use."""
|
|
32
|
+
chain: PendleRedeemYieldRequestChain
|
|
29
33
|
|
|
30
34
|
sender: str
|
|
31
35
|
r"""The address of the transaction sender."""
|