compass_api_sdk 0.9.0__py3-none-any.whl → 0.9.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/_version.py +2 -2
- compass_api_sdk/models/__init__.py +0 -3
- compass_api_sdk/models/aaveborrowparams.py +15 -3
- compass_api_sdk/models/aaveborrowrequest.py +15 -3
- compass_api_sdk/models/aaverepayparams.py +15 -3
- compass_api_sdk/models/aaverepayrequest.py +15 -3
- compass_api_sdk/models/aavesupplyparams.py +15 -3
- compass_api_sdk/models/aavesupplyrequest.py +15 -3
- compass_api_sdk/models/aavewithdrawparams.py +14 -2
- compass_api_sdk/models/aavewithdrawrequest.py +14 -2
- compass_api_sdk/models/aerodromeslipstreambuyexactlyparams.py +14 -2
- compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +14 -2
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionparams.py +16 -2
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +16 -2
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionparams.py +17 -3
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +17 -3
- compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py +14 -2
- compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +14 -2
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionparams.py +16 -2
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +16 -2
- compass_api_sdk/models/increaseallowanceparams.py +14 -2
- compass_api_sdk/models/increaseallowancerequest.py +14 -2
- compass_api_sdk/models/morphoborrowparams.py +15 -3
- compass_api_sdk/models/morphoborrowrequest.py +15 -3
- compass_api_sdk/models/morphodepositparams.py +15 -3
- compass_api_sdk/models/morphodepositrequest.py +15 -3
- compass_api_sdk/models/morphorepayparams.py +15 -3
- compass_api_sdk/models/morphorepayrequest.py +15 -3
- compass_api_sdk/models/morphosetvaultallowanceparams.py +14 -2
- compass_api_sdk/models/morphosetvaultallowancerequest.py +14 -2
- compass_api_sdk/models/morphosupplycollateralparams.py +15 -3
- compass_api_sdk/models/morphosupplycollateralrequest.py +15 -3
- compass_api_sdk/models/morphowithdrawcollateralparams.py +15 -3
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +15 -3
- compass_api_sdk/models/morphowithdrawparams.py +15 -3
- compass_api_sdk/models/morphowithdrawrequest.py +15 -3
- compass_api_sdk/models/pendlebuyptparams.py +14 -2
- compass_api_sdk/models/pendlebuyptrequest.py +14 -2
- compass_api_sdk/models/pendlebuyytparams.py +14 -2
- compass_api_sdk/models/pendlebuyytrequest.py +14 -2
- compass_api_sdk/models/pendlesellptparams.py +14 -2
- compass_api_sdk/models/pendlesellptrequest.py +14 -2
- compass_api_sdk/models/pendlesellytparams.py +14 -2
- compass_api_sdk/models/pendlesellytrequest.py +14 -2
- compass_api_sdk/models/skybuyparams.py +13 -2
- compass_api_sdk/models/skybuyrequest.py +8 -0
- compass_api_sdk/models/skydepositparams.py +15 -3
- compass_api_sdk/models/skydepositrequest.py +10 -1
- compass_api_sdk/models/skysellparams.py +13 -2
- compass_api_sdk/models/skysellrequest.py +8 -0
- compass_api_sdk/models/skywithdrawparams.py +15 -3
- compass_api_sdk/models/skywithdrawrequest.py +10 -1
- compass_api_sdk/models/tokentransfererc20params.py +14 -2
- compass_api_sdk/models/tokentransferrequest.py +14 -2
- compass_api_sdk/models/uniswapbuyexactlyparams.py +14 -2
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +14 -2
- compass_api_sdk/models/uniswapincreaseliquidityprovisionparams.py +14 -2
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +14 -2
- compass_api_sdk/models/uniswapmintliquidityprovisionparams.py +15 -3
- compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +15 -3
- compass_api_sdk/models/uniswapsellexactlyparams.py +14 -2
- compass_api_sdk/models/uniswapsellexactlyrequest.py +14 -2
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionparams.py +14 -2
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +14 -2
- compass_api_sdk/models/unwrapwethparams.py +14 -2
- compass_api_sdk/models/unwrapwethrequest.py +14 -2
- compass_api_sdk/models/useroperation.py +72 -56
- compass_api_sdk/models/wrapethparams.py +13 -2
- compass_api_sdk/models/wrapethrequest.py +13 -2
- {compass_api_sdk-0.9.0.dist-info → compass_api_sdk-0.9.1.dist-info}/METADATA +1 -1
- {compass_api_sdk-0.9.0.dist-info → compass_api_sdk-0.9.1.dist-info}/RECORD +72 -73
- compass_api_sdk/models/multicallactiontype.py +0 -40
- {compass_api_sdk-0.9.0.dist-info → compass_api_sdk-0.9.1.dist-info}/WHEEL +0 -0
|
@@ -21,6 +21,7 @@ class SkyWithdrawRequestTypedDict(TypedDict):
|
|
|
21
21
|
r"""The amount of USDS you would like to withdraw. If set to 'ALL', your total deposited USDS amount will be withdrawn."""
|
|
22
22
|
sender: str
|
|
23
23
|
r"""The address of the transaction sender."""
|
|
24
|
+
action_type: Literal["SKY_WITHDRAW"]
|
|
24
25
|
receiver: NotRequired[Nullable[str]]
|
|
25
26
|
r"""The address which will receive the withdrawn USDS. Defaults to the sender."""
|
|
26
27
|
chain: Literal["ethereum:mainnet"]
|
|
@@ -33,6 +34,14 @@ class SkyWithdrawRequest(BaseModel):
|
|
|
33
34
|
sender: str
|
|
34
35
|
r"""The address of the transaction sender."""
|
|
35
36
|
|
|
37
|
+
ACTION_TYPE: Annotated[
|
|
38
|
+
Annotated[
|
|
39
|
+
Optional[Literal["SKY_WITHDRAW"]],
|
|
40
|
+
AfterValidator(validate_const("SKY_WITHDRAW")),
|
|
41
|
+
],
|
|
42
|
+
pydantic.Field(alias="action_type"),
|
|
43
|
+
] = "SKY_WITHDRAW"
|
|
44
|
+
|
|
36
45
|
receiver: OptionalNullable[str] = UNSET
|
|
37
46
|
r"""The address which will receive the withdrawn USDS. Defaults to the sender."""
|
|
38
47
|
|
|
@@ -46,7 +55,7 @@ class SkyWithdrawRequest(BaseModel):
|
|
|
46
55
|
|
|
47
56
|
@model_serializer(mode="wrap")
|
|
48
57
|
def serialize_model(self, handler):
|
|
49
|
-
optional_fields = ["receiver", "chain"]
|
|
58
|
+
optional_fields = ["action_type", "receiver", "chain"]
|
|
50
59
|
nullable_fields = ["receiver"]
|
|
51
60
|
null_default_fields = []
|
|
52
61
|
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .token_enum import TokenEnum
|
|
5
5
|
from compass_api_sdk.types import BaseModel
|
|
6
|
-
from
|
|
7
|
-
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
TokenTransferErc20ParamsAmountTypedDict = TypeAliasType(
|
|
@@ -32,6 +35,7 @@ class TokenTransferErc20ParamsTypedDict(TypedDict):
|
|
|
32
35
|
"""
|
|
33
36
|
to: str
|
|
34
37
|
r"""The recipient of the tokens."""
|
|
38
|
+
action_type: Literal["TOKEN_TRANSFER_ERC20"]
|
|
35
39
|
|
|
36
40
|
|
|
37
41
|
class TokenTransferErc20Params(BaseModel):
|
|
@@ -49,3 +53,11 @@ class TokenTransferErc20Params(BaseModel):
|
|
|
49
53
|
|
|
50
54
|
to: str
|
|
51
55
|
r"""The recipient of the tokens."""
|
|
56
|
+
|
|
57
|
+
ACTION_TYPE: Annotated[
|
|
58
|
+
Annotated[
|
|
59
|
+
Optional[Literal["TOKEN_TRANSFER_ERC20"]],
|
|
60
|
+
AfterValidator(validate_const("TOKEN_TRANSFER_ERC20")),
|
|
61
|
+
],
|
|
62
|
+
pydantic.Field(alias="action_type"),
|
|
63
|
+
] = "TOKEN_TRANSFER_ERC20"
|
|
@@ -4,8 +4,11 @@ from __future__ import annotations
|
|
|
4
4
|
from .chain import Chain
|
|
5
5
|
from .token_enum import TokenEnum
|
|
6
6
|
from compass_api_sdk.types import BaseModel
|
|
7
|
-
from
|
|
8
|
-
|
|
7
|
+
from compass_api_sdk.utils import validate_const
|
|
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
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
TokenTransferRequestAmountTypedDict = TypeAliasType(
|
|
@@ -45,6 +48,7 @@ class TokenTransferRequestTypedDict(TypedDict):
|
|
|
45
48
|
r"""The chain to use."""
|
|
46
49
|
sender: str
|
|
47
50
|
r"""The address of the transaction sender."""
|
|
51
|
+
action_type: Literal["TOKEN_TRANSFER"]
|
|
48
52
|
|
|
49
53
|
|
|
50
54
|
class TokenTransferRequest(BaseModel):
|
|
@@ -64,3 +68,11 @@ class TokenTransferRequest(BaseModel):
|
|
|
64
68
|
|
|
65
69
|
sender: str
|
|
66
70
|
r"""The address of the transaction sender."""
|
|
71
|
+
|
|
72
|
+
ACTION_TYPE: Annotated[
|
|
73
|
+
Annotated[
|
|
74
|
+
Optional[Literal["TOKEN_TRANSFER"]],
|
|
75
|
+
AfterValidator(validate_const("TOKEN_TRANSFER")),
|
|
76
|
+
],
|
|
77
|
+
pydantic.Field(alias="action_type"),
|
|
78
|
+
] = "TOKEN_TRANSFER"
|
|
@@ -4,8 +4,11 @@ from __future__ import annotations
|
|
|
4
4
|
from .feeenum import FeeEnum
|
|
5
5
|
from .token_enum import TokenEnum
|
|
6
6
|
from compass_api_sdk.types import BaseModel
|
|
7
|
-
from
|
|
8
|
-
|
|
7
|
+
from compass_api_sdk.utils import validate_const
|
|
8
|
+
import pydantic
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from typing import Literal, Optional, Union
|
|
11
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
UniswapBuyExactlyParamsAmountTypedDict = TypeAliasType(
|
|
@@ -42,6 +45,7 @@ class UniswapBuyExactlyParamsTypedDict(TypedDict):
|
|
|
42
45
|
r"""The amount of the token to swap to"""
|
|
43
46
|
max_slippage_percent: float
|
|
44
47
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
|
|
48
|
+
action_type: Literal["UNISWAP_BUY_EXACTLY"]
|
|
45
49
|
wrap_eth: NotRequired[bool]
|
|
46
50
|
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
47
51
|
|
|
@@ -73,5 +77,13 @@ class UniswapBuyExactlyParams(BaseModel):
|
|
|
73
77
|
max_slippage_percent: float
|
|
74
78
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
|
|
75
79
|
|
|
80
|
+
ACTION_TYPE: Annotated[
|
|
81
|
+
Annotated[
|
|
82
|
+
Optional[Literal["UNISWAP_BUY_EXACTLY"]],
|
|
83
|
+
AfterValidator(validate_const("UNISWAP_BUY_EXACTLY")),
|
|
84
|
+
],
|
|
85
|
+
pydantic.Field(alias="action_type"),
|
|
86
|
+
] = "UNISWAP_BUY_EXACTLY"
|
|
87
|
+
|
|
76
88
|
wrap_eth: Optional[bool] = False
|
|
77
89
|
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
@@ -5,8 +5,11 @@ from .chain import Chain
|
|
|
5
5
|
from .feeenum import FeeEnum
|
|
6
6
|
from .token_enum import TokenEnum
|
|
7
7
|
from compass_api_sdk.types import BaseModel
|
|
8
|
-
from
|
|
9
|
-
|
|
8
|
+
from compass_api_sdk.utils import validate_const
|
|
9
|
+
import pydantic
|
|
10
|
+
from pydantic.functional_validators import AfterValidator
|
|
11
|
+
from typing import Literal, Optional, Union
|
|
12
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
UniswapBuyExactlyRequestAmountTypedDict = TypeAliasType(
|
|
@@ -49,6 +52,7 @@ class UniswapBuyExactlyRequestTypedDict(TypedDict):
|
|
|
49
52
|
r"""The chain to use."""
|
|
50
53
|
sender: str
|
|
51
54
|
r"""The address of the transaction sender."""
|
|
55
|
+
action_type: Literal["UNISWAP_BUY_EXACTLY"]
|
|
52
56
|
wrap_eth: NotRequired[bool]
|
|
53
57
|
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
54
58
|
|
|
@@ -88,5 +92,13 @@ class UniswapBuyExactlyRequest(BaseModel):
|
|
|
88
92
|
sender: str
|
|
89
93
|
r"""The address of the transaction sender."""
|
|
90
94
|
|
|
95
|
+
ACTION_TYPE: Annotated[
|
|
96
|
+
Annotated[
|
|
97
|
+
Optional[Literal["UNISWAP_BUY_EXACTLY"]],
|
|
98
|
+
AfterValidator(validate_const("UNISWAP_BUY_EXACTLY")),
|
|
99
|
+
],
|
|
100
|
+
pydantic.Field(alias="action_type"),
|
|
101
|
+
] = "UNISWAP_BUY_EXACTLY"
|
|
102
|
+
|
|
91
103
|
wrap_eth: Optional[bool] = False
|
|
92
104
|
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
|
-
from
|
|
6
|
-
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import Literal, Optional, Union
|
|
9
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
UniswapIncreaseLiquidityProvisionParamsAmount0DesiredTypedDict = TypeAliasType(
|
|
@@ -65,6 +68,7 @@ class UniswapIncreaseLiquidityProvisionParamsTypedDict(TypedDict):
|
|
|
65
68
|
r"""The minimum amount of the first token to deposit"""
|
|
66
69
|
amount1_min: UniswapIncreaseLiquidityProvisionParamsAmount1MinTypedDict
|
|
67
70
|
r"""The minimum amount of the second token to deposit"""
|
|
71
|
+
action_type: Literal["UNISWAP_INCREASE_LIQUIDITY_PROVISION"]
|
|
68
72
|
|
|
69
73
|
|
|
70
74
|
class UniswapIncreaseLiquidityProvisionParams(BaseModel):
|
|
@@ -82,3 +86,11 @@ class UniswapIncreaseLiquidityProvisionParams(BaseModel):
|
|
|
82
86
|
|
|
83
87
|
amount1_min: UniswapIncreaseLiquidityProvisionParamsAmount1Min
|
|
84
88
|
r"""The minimum amount of the second token to deposit"""
|
|
89
|
+
|
|
90
|
+
ACTION_TYPE: Annotated[
|
|
91
|
+
Annotated[
|
|
92
|
+
Optional[Literal["UNISWAP_INCREASE_LIQUIDITY_PROVISION"]],
|
|
93
|
+
AfterValidator(validate_const("UNISWAP_INCREASE_LIQUIDITY_PROVISION")),
|
|
94
|
+
],
|
|
95
|
+
pydantic.Field(alias="action_type"),
|
|
96
|
+
] = "UNISWAP_INCREASE_LIQUIDITY_PROVISION"
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .chain import Chain
|
|
5
5
|
from compass_api_sdk.types import BaseModel
|
|
6
|
-
from
|
|
7
|
-
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
UniswapIncreaseLiquidityProvisionRequestAmount0DesiredTypedDict = TypeAliasType(
|
|
@@ -72,6 +75,7 @@ class UniswapIncreaseLiquidityProvisionRequestTypedDict(TypedDict):
|
|
|
72
75
|
r"""The chain to use."""
|
|
73
76
|
sender: str
|
|
74
77
|
r"""The address of the transaction sender."""
|
|
78
|
+
action_type: Literal["UNISWAP_INCREASE_LIQUIDITY_PROVISION"]
|
|
75
79
|
|
|
76
80
|
|
|
77
81
|
class UniswapIncreaseLiquidityProvisionRequest(BaseModel):
|
|
@@ -97,3 +101,11 @@ class UniswapIncreaseLiquidityProvisionRequest(BaseModel):
|
|
|
97
101
|
|
|
98
102
|
sender: str
|
|
99
103
|
r"""The address of the transaction sender."""
|
|
104
|
+
|
|
105
|
+
ACTION_TYPE: Annotated[
|
|
106
|
+
Annotated[
|
|
107
|
+
Optional[Literal["UNISWAP_INCREASE_LIQUIDITY_PROVISION"]],
|
|
108
|
+
AfterValidator(validate_const("UNISWAP_INCREASE_LIQUIDITY_PROVISION")),
|
|
109
|
+
],
|
|
110
|
+
pydantic.Field(alias="action_type"),
|
|
111
|
+
] = "UNISWAP_INCREASE_LIQUIDITY_PROVISION"
|
|
@@ -10,9 +10,12 @@ from compass_api_sdk.types import (
|
|
|
10
10
|
UNSET,
|
|
11
11
|
UNSET_SENTINEL,
|
|
12
12
|
)
|
|
13
|
+
from compass_api_sdk.utils import validate_const
|
|
14
|
+
import pydantic
|
|
13
15
|
from pydantic import model_serializer
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
+
from pydantic.functional_validators import AfterValidator
|
|
17
|
+
from typing import Literal, Optional, Union
|
|
18
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
16
19
|
|
|
17
20
|
|
|
18
21
|
UniswapMintLiquidityProvisionParamsAmount0DesiredTypedDict = TypeAliasType(
|
|
@@ -93,6 +96,7 @@ class UniswapMintLiquidityProvisionParamsTypedDict(TypedDict):
|
|
|
93
96
|
r"""The minimum amount of the first token to deposit"""
|
|
94
97
|
amount1_min: UniswapMintLiquidityProvisionParamsAmount1MinTypedDict
|
|
95
98
|
r"""The minimum amount of the second token to deposit"""
|
|
99
|
+
action_type: Literal["UNISWAP_MINT_LIQUIDITY_PROVISION"]
|
|
96
100
|
recipient: NotRequired[Nullable[str]]
|
|
97
101
|
r"""The address that will receive the LP tokens"""
|
|
98
102
|
|
|
@@ -136,12 +140,20 @@ class UniswapMintLiquidityProvisionParams(BaseModel):
|
|
|
136
140
|
amount1_min: UniswapMintLiquidityProvisionParamsAmount1Min
|
|
137
141
|
r"""The minimum amount of the second token to deposit"""
|
|
138
142
|
|
|
143
|
+
ACTION_TYPE: Annotated[
|
|
144
|
+
Annotated[
|
|
145
|
+
Optional[Literal["UNISWAP_MINT_LIQUIDITY_PROVISION"]],
|
|
146
|
+
AfterValidator(validate_const("UNISWAP_MINT_LIQUIDITY_PROVISION")),
|
|
147
|
+
],
|
|
148
|
+
pydantic.Field(alias="action_type"),
|
|
149
|
+
] = "UNISWAP_MINT_LIQUIDITY_PROVISION"
|
|
150
|
+
|
|
139
151
|
recipient: OptionalNullable[str] = UNSET
|
|
140
152
|
r"""The address that will receive the LP tokens"""
|
|
141
153
|
|
|
142
154
|
@model_serializer(mode="wrap")
|
|
143
155
|
def serialize_model(self, handler):
|
|
144
|
-
optional_fields = ["recipient"]
|
|
156
|
+
optional_fields = ["action_type", "recipient"]
|
|
145
157
|
nullable_fields = ["recipient"]
|
|
146
158
|
null_default_fields = []
|
|
147
159
|
|
|
@@ -11,9 +11,12 @@ from compass_api_sdk.types import (
|
|
|
11
11
|
UNSET,
|
|
12
12
|
UNSET_SENTINEL,
|
|
13
13
|
)
|
|
14
|
+
from compass_api_sdk.utils import validate_const
|
|
15
|
+
import pydantic
|
|
14
16
|
from pydantic import model_serializer
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
+
from pydantic.functional_validators import AfterValidator
|
|
18
|
+
from typing import Literal, Optional, Union
|
|
19
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
17
20
|
|
|
18
21
|
|
|
19
22
|
UniswapMintLiquidityProvisionRequestAmount0DesiredTypedDict = TypeAliasType(
|
|
@@ -100,6 +103,7 @@ class UniswapMintLiquidityProvisionRequestTypedDict(TypedDict):
|
|
|
100
103
|
r"""The chain to use."""
|
|
101
104
|
sender: str
|
|
102
105
|
r"""The address of the transaction sender."""
|
|
106
|
+
action_type: Literal["UNISWAP_MINT_LIQUIDITY_PROVISION"]
|
|
103
107
|
recipient: NotRequired[Nullable[str]]
|
|
104
108
|
r"""The address that will receive the LP tokens"""
|
|
105
109
|
|
|
@@ -151,12 +155,20 @@ class UniswapMintLiquidityProvisionRequest(BaseModel):
|
|
|
151
155
|
sender: str
|
|
152
156
|
r"""The address of the transaction sender."""
|
|
153
157
|
|
|
158
|
+
ACTION_TYPE: Annotated[
|
|
159
|
+
Annotated[
|
|
160
|
+
Optional[Literal["UNISWAP_MINT_LIQUIDITY_PROVISION"]],
|
|
161
|
+
AfterValidator(validate_const("UNISWAP_MINT_LIQUIDITY_PROVISION")),
|
|
162
|
+
],
|
|
163
|
+
pydantic.Field(alias="action_type"),
|
|
164
|
+
] = "UNISWAP_MINT_LIQUIDITY_PROVISION"
|
|
165
|
+
|
|
154
166
|
recipient: OptionalNullable[str] = UNSET
|
|
155
167
|
r"""The address that will receive the LP tokens"""
|
|
156
168
|
|
|
157
169
|
@model_serializer(mode="wrap")
|
|
158
170
|
def serialize_model(self, handler):
|
|
159
|
-
optional_fields = ["recipient"]
|
|
171
|
+
optional_fields = ["action_type", "recipient"]
|
|
160
172
|
nullable_fields = ["recipient"]
|
|
161
173
|
null_default_fields = []
|
|
162
174
|
|
|
@@ -4,8 +4,11 @@ from __future__ import annotations
|
|
|
4
4
|
from .feeenum import FeeEnum
|
|
5
5
|
from .token_enum import TokenEnum
|
|
6
6
|
from compass_api_sdk.types import BaseModel
|
|
7
|
-
from
|
|
8
|
-
|
|
7
|
+
from compass_api_sdk.utils import validate_const
|
|
8
|
+
import pydantic
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from typing import Literal, Optional, Union
|
|
11
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
UniswapSellExactlyParamsAmountTypedDict = TypeAliasType(
|
|
@@ -44,6 +47,7 @@ class UniswapSellExactlyParamsTypedDict(TypedDict):
|
|
|
44
47
|
r"""The amount of the token to swap from"""
|
|
45
48
|
max_slippage_percent: float
|
|
46
49
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
|
|
50
|
+
action_type: Literal["UNISWAP_SELL_EXACTLY"]
|
|
47
51
|
wrap_eth: NotRequired[bool]
|
|
48
52
|
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
49
53
|
|
|
@@ -77,5 +81,13 @@ class UniswapSellExactlyParams(BaseModel):
|
|
|
77
81
|
max_slippage_percent: float
|
|
78
82
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
|
|
79
83
|
|
|
84
|
+
ACTION_TYPE: Annotated[
|
|
85
|
+
Annotated[
|
|
86
|
+
Optional[Literal["UNISWAP_SELL_EXACTLY"]],
|
|
87
|
+
AfterValidator(validate_const("UNISWAP_SELL_EXACTLY")),
|
|
88
|
+
],
|
|
89
|
+
pydantic.Field(alias="action_type"),
|
|
90
|
+
] = "UNISWAP_SELL_EXACTLY"
|
|
91
|
+
|
|
80
92
|
wrap_eth: Optional[bool] = False
|
|
81
93
|
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
@@ -5,8 +5,11 @@ from .chain import Chain
|
|
|
5
5
|
from .feeenum import FeeEnum
|
|
6
6
|
from .token_enum import TokenEnum
|
|
7
7
|
from compass_api_sdk.types import BaseModel
|
|
8
|
-
from
|
|
9
|
-
|
|
8
|
+
from compass_api_sdk.utils import validate_const
|
|
9
|
+
import pydantic
|
|
10
|
+
from pydantic.functional_validators import AfterValidator
|
|
11
|
+
from typing import Literal, Optional, Union
|
|
12
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
UniswapSellExactlyRequestAmountTypedDict = TypeAliasType(
|
|
@@ -49,6 +52,7 @@ class UniswapSellExactlyRequestTypedDict(TypedDict):
|
|
|
49
52
|
r"""The chain to use."""
|
|
50
53
|
sender: str
|
|
51
54
|
r"""The address of the transaction sender."""
|
|
55
|
+
action_type: Literal["UNISWAP_SELL_EXACTLY"]
|
|
52
56
|
wrap_eth: NotRequired[bool]
|
|
53
57
|
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
54
58
|
|
|
@@ -88,5 +92,13 @@ class UniswapSellExactlyRequest(BaseModel):
|
|
|
88
92
|
sender: str
|
|
89
93
|
r"""The address of the transaction sender."""
|
|
90
94
|
|
|
95
|
+
ACTION_TYPE: Annotated[
|
|
96
|
+
Annotated[
|
|
97
|
+
Optional[Literal["UNISWAP_SELL_EXACTLY"]],
|
|
98
|
+
AfterValidator(validate_const("UNISWAP_SELL_EXACTLY")),
|
|
99
|
+
],
|
|
100
|
+
pydantic.Field(alias="action_type"),
|
|
101
|
+
] = "UNISWAP_SELL_EXACTLY"
|
|
102
|
+
|
|
91
103
|
wrap_eth: Optional[bool] = False
|
|
92
104
|
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
|
-
from
|
|
6
|
-
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import Literal, Optional, Union
|
|
9
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
UniswapWithdrawLiquidityProvisionParamsPercentageForWithdrawalTypedDict = TypeAliasType(
|
|
@@ -32,6 +35,7 @@ class UniswapWithdrawLiquidityProvisionParamsTypedDict(TypedDict):
|
|
|
32
35
|
UniswapWithdrawLiquidityProvisionParamsPercentageForWithdrawalTypedDict
|
|
33
36
|
)
|
|
34
37
|
r"""How much liquidity to take out in percentage."""
|
|
38
|
+
action_type: Literal["UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"]
|
|
35
39
|
|
|
36
40
|
|
|
37
41
|
class UniswapWithdrawLiquidityProvisionParams(BaseModel):
|
|
@@ -48,3 +52,11 @@ class UniswapWithdrawLiquidityProvisionParams(BaseModel):
|
|
|
48
52
|
UniswapWithdrawLiquidityProvisionParamsPercentageForWithdrawal
|
|
49
53
|
)
|
|
50
54
|
r"""How much liquidity to take out in percentage."""
|
|
55
|
+
|
|
56
|
+
ACTION_TYPE: Annotated[
|
|
57
|
+
Annotated[
|
|
58
|
+
Optional[Literal["UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"]],
|
|
59
|
+
AfterValidator(validate_const("UNISWAP_WITHDRAW_LIQUIDITY_PROVISION")),
|
|
60
|
+
],
|
|
61
|
+
pydantic.Field(alias="action_type"),
|
|
62
|
+
] = "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .chain import Chain
|
|
5
5
|
from compass_api_sdk.types import BaseModel
|
|
6
|
-
from
|
|
7
|
-
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict = (
|
|
@@ -33,6 +36,7 @@ class UniswapWithdrawLiquidityProvisionRequestTypedDict(TypedDict):
|
|
|
33
36
|
r"""The chain to use."""
|
|
34
37
|
sender: str
|
|
35
38
|
r"""The address of the transaction sender."""
|
|
39
|
+
action_type: Literal["UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"]
|
|
36
40
|
|
|
37
41
|
|
|
38
42
|
class UniswapWithdrawLiquidityProvisionRequest(BaseModel):
|
|
@@ -49,3 +53,11 @@ class UniswapWithdrawLiquidityProvisionRequest(BaseModel):
|
|
|
49
53
|
|
|
50
54
|
sender: str
|
|
51
55
|
r"""The address of the transaction sender."""
|
|
56
|
+
|
|
57
|
+
ACTION_TYPE: Annotated[
|
|
58
|
+
Annotated[
|
|
59
|
+
Optional[Literal["UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"]],
|
|
60
|
+
AfterValidator(validate_const("UNISWAP_WITHDRAW_LIQUIDITY_PROVISION")),
|
|
61
|
+
],
|
|
62
|
+
pydantic.Field(alias="action_type"),
|
|
63
|
+
] = "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
|
-
from
|
|
6
|
-
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import Literal, Optional, Union
|
|
9
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
UnwrapWethParamsAmountTypedDict = TypeAliasType(
|
|
@@ -21,6 +24,7 @@ class UnwrapWethParamsTypedDict(TypedDict):
|
|
|
21
24
|
|
|
22
25
|
amount: UnwrapWethParamsAmountTypedDict
|
|
23
26
|
r"""The amount of WETH to unwrap."""
|
|
27
|
+
action_type: Literal["UNWRAP_WETH"]
|
|
24
28
|
|
|
25
29
|
|
|
26
30
|
class UnwrapWethParams(BaseModel):
|
|
@@ -28,3 +32,11 @@ class UnwrapWethParams(BaseModel):
|
|
|
28
32
|
|
|
29
33
|
amount: UnwrapWethParamsAmount
|
|
30
34
|
r"""The amount of WETH to unwrap."""
|
|
35
|
+
|
|
36
|
+
ACTION_TYPE: Annotated[
|
|
37
|
+
Annotated[
|
|
38
|
+
Optional[Literal["UNWRAP_WETH"]],
|
|
39
|
+
AfterValidator(validate_const("UNWRAP_WETH")),
|
|
40
|
+
],
|
|
41
|
+
pydantic.Field(alias="action_type"),
|
|
42
|
+
] = "UNWRAP_WETH"
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .chain import Chain
|
|
5
5
|
from compass_api_sdk.types import BaseModel
|
|
6
|
-
from
|
|
7
|
-
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
UnwrapWethRequestAmountTypedDict = TypeAliasType(
|
|
@@ -26,6 +29,7 @@ class UnwrapWethRequestTypedDict(TypedDict):
|
|
|
26
29
|
r"""The chain to use."""
|
|
27
30
|
sender: str
|
|
28
31
|
r"""The address of the transaction sender."""
|
|
32
|
+
action_type: Literal["UNWRAP_WETH"]
|
|
29
33
|
|
|
30
34
|
|
|
31
35
|
class UnwrapWethRequest(BaseModel):
|
|
@@ -39,3 +43,11 @@ class UnwrapWethRequest(BaseModel):
|
|
|
39
43
|
|
|
40
44
|
sender: str
|
|
41
45
|
r"""The address of the transaction sender."""
|
|
46
|
+
|
|
47
|
+
ACTION_TYPE: Annotated[
|
|
48
|
+
Annotated[
|
|
49
|
+
Optional[Literal["UNWRAP_WETH"]],
|
|
50
|
+
AfterValidator(validate_const("UNWRAP_WETH")),
|
|
51
|
+
],
|
|
52
|
+
pydantic.Field(alias="action_type"),
|
|
53
|
+
] = "UNWRAP_WETH"
|