compass_api_sdk 0.8.3__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/aave_v3.py +1 -25
- compass_api_sdk/aerodrome_slipstream.py +1 -31
- compass_api_sdk/models/__init__.py +0 -3
- compass_api_sdk/models/aaveborrowparams.py +15 -20
- compass_api_sdk/models/aaveborrowrequest.py +15 -20
- compass_api_sdk/models/aaverepayparams.py +15 -20
- compass_api_sdk/models/aaverepayrequest.py +15 -20
- compass_api_sdk/models/aavesupplyparams.py +15 -20
- compass_api_sdk/models/aavesupplyrequest.py +15 -20
- compass_api_sdk/models/aavewithdrawparams.py +12 -15
- compass_api_sdk/models/aavewithdrawrequest.py +12 -15
- compass_api_sdk/models/aerodromeslipstreambuyexactlyparams.py +12 -15
- compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +12 -15
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionparams.py +14 -15
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +14 -15
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionparams.py +17 -20
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +17 -20
- compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py +13 -16
- compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +13 -16
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionparams.py +14 -15
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +14 -15
- compass_api_sdk/models/increaseallowanceparams.py +12 -15
- compass_api_sdk/models/increaseallowancerequest.py +12 -15
- compass_api_sdk/models/morphoborrowparams.py +15 -20
- compass_api_sdk/models/morphoborrowrequest.py +15 -20
- compass_api_sdk/models/morphodepositparams.py +15 -20
- compass_api_sdk/models/morphodepositrequest.py +15 -20
- compass_api_sdk/models/morphorepayparams.py +15 -20
- compass_api_sdk/models/morphorepayrequest.py +15 -20
- compass_api_sdk/models/morphosetvaultallowanceparams.py +12 -15
- compass_api_sdk/models/morphosetvaultallowancerequest.py +12 -15
- compass_api_sdk/models/morphosupplycollateralparams.py +15 -20
- compass_api_sdk/models/morphosupplycollateralrequest.py +15 -20
- compass_api_sdk/models/morphowithdrawcollateralparams.py +15 -20
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +15 -20
- compass_api_sdk/models/morphowithdrawparams.py +15 -20
- compass_api_sdk/models/morphowithdrawrequest.py +15 -20
- compass_api_sdk/models/pendlebuyptparams.py +12 -15
- compass_api_sdk/models/pendlebuyptrequest.py +12 -15
- compass_api_sdk/models/pendlebuyytparams.py +12 -15
- compass_api_sdk/models/pendlebuyytrequest.py +12 -15
- compass_api_sdk/models/pendlesellptparams.py +12 -15
- compass_api_sdk/models/pendlesellptrequest.py +12 -15
- compass_api_sdk/models/pendlesellytparams.py +12 -15
- compass_api_sdk/models/pendlesellytrequest.py +12 -15
- compass_api_sdk/models/skybuyparams.py +11 -15
- compass_api_sdk/models/skybuyrequest.py +9 -15
- compass_api_sdk/models/skydepositparams.py +15 -20
- compass_api_sdk/models/skydepositrequest.py +12 -19
- compass_api_sdk/models/skysellparams.py +11 -15
- compass_api_sdk/models/skysellrequest.py +9 -15
- compass_api_sdk/models/skywithdrawparams.py +15 -20
- compass_api_sdk/models/skywithdrawrequest.py +12 -19
- compass_api_sdk/models/tokentransfererc20params.py +12 -15
- compass_api_sdk/models/tokentransferrequest.py +12 -15
- compass_api_sdk/models/uniswapbuyexactlyparams.py +13 -16
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +13 -16
- compass_api_sdk/models/uniswapincreaseliquidityprovisionparams.py +12 -15
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +12 -15
- compass_api_sdk/models/uniswapmintliquidityprovisionparams.py +15 -20
- compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +15 -20
- compass_api_sdk/models/uniswapsellexactlyparams.py +13 -16
- compass_api_sdk/models/uniswapsellexactlyrequest.py +13 -16
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionparams.py +12 -15
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +12 -15
- compass_api_sdk/models/unwrapwethparams.py +12 -15
- compass_api_sdk/models/unwrapwethrequest.py +12 -15
- compass_api_sdk/models/useroperation.py +73 -72
- compass_api_sdk/models/wrapethparams.py +11 -15
- compass_api_sdk/models/wrapethrequest.py +11 -15
- compass_api_sdk/morpho.py +1 -43
- compass_api_sdk/pendle.py +1 -25
- compass_api_sdk/sky.py +1 -25
- compass_api_sdk/token_sdk.py +1 -7
- compass_api_sdk/uniswap_v3.py +1 -31
- compass_api_sdk/universal.py +1 -19
- {compass_api_sdk-0.8.3.dist-info → compass_api_sdk-0.9.1.dist-info}/METADATA +1 -1
- {compass_api_sdk-0.8.3.dist-info → compass_api_sdk-0.9.1.dist-info}/RECORD +80 -81
- compass_api_sdk/models/multicallactiontype.py +0 -40
- {compass_api_sdk-0.8.3.dist-info → compass_api_sdk-0.9.1.dist-info}/WHEEL +0 -0
|
@@ -8,10 +8,12 @@ from compass_api_sdk.types import (
|
|
|
8
8
|
UNSET,
|
|
9
9
|
UNSET_SENTINEL,
|
|
10
10
|
)
|
|
11
|
+
from compass_api_sdk.utils import validate_const
|
|
11
12
|
import pydantic
|
|
12
|
-
from pydantic import
|
|
13
|
-
from
|
|
14
|
-
from
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
|
+
from typing import Any, Literal, Optional
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
class MorphoRepayParamsTypedDict(TypedDict):
|
|
@@ -19,6 +21,7 @@ class MorphoRepayParamsTypedDict(TypedDict):
|
|
|
19
21
|
r"""Amount of the token to repay to the market. If set to 'ALL', all debt plus interest will be paid back if the user has a sufficient token balance in their wallet."""
|
|
20
22
|
unique_market_key: str
|
|
21
23
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
24
|
+
action_type: Literal["MORPHO_REPAY"]
|
|
22
25
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
23
26
|
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
24
27
|
callback_data: NotRequired[Nullable[bytes]]
|
|
@@ -26,34 +29,29 @@ class MorphoRepayParamsTypedDict(TypedDict):
|
|
|
26
29
|
|
|
27
30
|
|
|
28
31
|
class MorphoRepayParams(BaseModel):
|
|
29
|
-
model_config = ConfigDict(
|
|
30
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
31
|
-
)
|
|
32
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
33
|
-
|
|
34
32
|
amount: Any
|
|
35
33
|
r"""Amount of the token to repay to the market. If set to 'ALL', all debt plus interest will be paid back if the user has a sufficient token balance in their wallet."""
|
|
36
34
|
|
|
37
35
|
unique_market_key: str
|
|
38
36
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
39
37
|
|
|
38
|
+
ACTION_TYPE: Annotated[
|
|
39
|
+
Annotated[
|
|
40
|
+
Optional[Literal["MORPHO_REPAY"]],
|
|
41
|
+
AfterValidator(validate_const("MORPHO_REPAY")),
|
|
42
|
+
],
|
|
43
|
+
pydantic.Field(alias="action_type"),
|
|
44
|
+
] = "MORPHO_REPAY"
|
|
45
|
+
|
|
40
46
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
41
47
|
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
42
48
|
|
|
43
49
|
callback_data: OptionalNullable[bytes] = UNSET
|
|
44
50
|
r"""An optional field for callback byte data that will be triggered upon successful repaying of debt."""
|
|
45
51
|
|
|
46
|
-
@property
|
|
47
|
-
def additional_properties(self):
|
|
48
|
-
return self.__pydantic_extra__
|
|
49
|
-
|
|
50
|
-
@additional_properties.setter
|
|
51
|
-
def additional_properties(self, value):
|
|
52
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
53
|
-
|
|
54
52
|
@model_serializer(mode="wrap")
|
|
55
53
|
def serialize_model(self, handler):
|
|
56
|
-
optional_fields = ["on_behalf_of", "callback_data"]
|
|
54
|
+
optional_fields = ["action_type", "on_behalf_of", "callback_data"]
|
|
57
55
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
58
56
|
null_default_fields = []
|
|
59
57
|
|
|
@@ -79,7 +77,4 @@ class MorphoRepayParams(BaseModel):
|
|
|
79
77
|
):
|
|
80
78
|
m[k] = val
|
|
81
79
|
|
|
82
|
-
for k, v in serialized.items():
|
|
83
|
-
m[k] = v
|
|
84
|
-
|
|
85
80
|
return m
|
|
@@ -8,11 +8,13 @@ from compass_api_sdk.types import (
|
|
|
8
8
|
UNSET,
|
|
9
9
|
UNSET_SENTINEL,
|
|
10
10
|
)
|
|
11
|
+
from compass_api_sdk.utils import validate_const
|
|
11
12
|
from enum import Enum
|
|
12
13
|
import pydantic
|
|
13
|
-
from pydantic import
|
|
14
|
-
from
|
|
15
|
-
from
|
|
14
|
+
from pydantic import model_serializer
|
|
15
|
+
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from typing import Any, Literal, Optional
|
|
17
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
class MorphoRepayRequestChain(str, Enum):
|
|
@@ -28,6 +30,7 @@ class MorphoRepayRequestTypedDict(TypedDict):
|
|
|
28
30
|
chain: MorphoRepayRequestChain
|
|
29
31
|
sender: str
|
|
30
32
|
r"""The address of the transaction sender."""
|
|
33
|
+
action_type: Literal["MORPHO_REPAY"]
|
|
31
34
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
32
35
|
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
33
36
|
callback_data: NotRequired[Nullable[bytes]]
|
|
@@ -35,11 +38,6 @@ class MorphoRepayRequestTypedDict(TypedDict):
|
|
|
35
38
|
|
|
36
39
|
|
|
37
40
|
class MorphoRepayRequest(BaseModel):
|
|
38
|
-
model_config = ConfigDict(
|
|
39
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
40
|
-
)
|
|
41
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
42
|
-
|
|
43
41
|
amount: Any
|
|
44
42
|
r"""Amount of the token to repay to the market. If set to 'ALL', all debt plus interest will be paid back if the user has a sufficient token balance in their wallet."""
|
|
45
43
|
|
|
@@ -51,23 +49,23 @@ class MorphoRepayRequest(BaseModel):
|
|
|
51
49
|
sender: str
|
|
52
50
|
r"""The address of the transaction sender."""
|
|
53
51
|
|
|
52
|
+
ACTION_TYPE: Annotated[
|
|
53
|
+
Annotated[
|
|
54
|
+
Optional[Literal["MORPHO_REPAY"]],
|
|
55
|
+
AfterValidator(validate_const("MORPHO_REPAY")),
|
|
56
|
+
],
|
|
57
|
+
pydantic.Field(alias="action_type"),
|
|
58
|
+
] = "MORPHO_REPAY"
|
|
59
|
+
|
|
54
60
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
55
61
|
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
56
62
|
|
|
57
63
|
callback_data: OptionalNullable[bytes] = UNSET
|
|
58
64
|
r"""An optional field for callback byte data that will be triggered upon successful repaying of debt."""
|
|
59
65
|
|
|
60
|
-
@property
|
|
61
|
-
def additional_properties(self):
|
|
62
|
-
return self.__pydantic_extra__
|
|
63
|
-
|
|
64
|
-
@additional_properties.setter
|
|
65
|
-
def additional_properties(self, value):
|
|
66
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
67
|
-
|
|
68
66
|
@model_serializer(mode="wrap")
|
|
69
67
|
def serialize_model(self, handler):
|
|
70
|
-
optional_fields = ["on_behalf_of", "callback_data"]
|
|
68
|
+
optional_fields = ["action_type", "on_behalf_of", "callback_data"]
|
|
71
69
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
72
70
|
null_default_fields = []
|
|
73
71
|
|
|
@@ -93,7 +91,4 @@ class MorphoRepayRequest(BaseModel):
|
|
|
93
91
|
):
|
|
94
92
|
m[k] = val
|
|
95
93
|
|
|
96
|
-
for k, v in serialized.items():
|
|
97
|
-
m[k] = v
|
|
98
|
-
|
|
99
94
|
return m
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
5
6
|
import pydantic
|
|
6
|
-
from pydantic import
|
|
7
|
-
from typing import
|
|
8
|
-
from typing_extensions import TypeAliasType, TypedDict
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import Literal, Optional, Union
|
|
9
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
MorphoSetVaultAllowanceParamsAmountTypedDict = TypeAliasType(
|
|
@@ -25,24 +26,20 @@ class MorphoSetVaultAllowanceParamsTypedDict(TypedDict):
|
|
|
25
26
|
r"""The vault address you are increasing the allowance for."""
|
|
26
27
|
amount: MorphoSetVaultAllowanceParamsAmountTypedDict
|
|
27
28
|
r"""The amount of tokens to increase the allowance by."""
|
|
29
|
+
action_type: Literal["MORPHO_SET_VAULT_ALLOWANCE"]
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
class MorphoSetVaultAllowanceParams(BaseModel):
|
|
31
|
-
model_config = ConfigDict(
|
|
32
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
33
|
-
)
|
|
34
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
35
|
-
|
|
36
33
|
vault_address: str
|
|
37
34
|
r"""The vault address you are increasing the allowance for."""
|
|
38
35
|
|
|
39
36
|
amount: MorphoSetVaultAllowanceParamsAmount
|
|
40
37
|
r"""The amount of tokens to increase the allowance by."""
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
ACTION_TYPE: Annotated[
|
|
40
|
+
Annotated[
|
|
41
|
+
Optional[Literal["MORPHO_SET_VAULT_ALLOWANCE"]],
|
|
42
|
+
AfterValidator(validate_const("MORPHO_SET_VAULT_ALLOWANCE")),
|
|
43
|
+
],
|
|
44
|
+
pydantic.Field(alias="action_type"),
|
|
45
|
+
] = "MORPHO_SET_VAULT_ALLOWANCE"
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
5
6
|
from enum import Enum
|
|
6
7
|
import pydantic
|
|
7
|
-
from pydantic import
|
|
8
|
-
from typing import
|
|
9
|
-
from typing_extensions import TypeAliasType, TypedDict
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
MorphoSetVaultAllowanceRequestAmountTypedDict = TypeAliasType(
|
|
@@ -34,14 +35,10 @@ class MorphoSetVaultAllowanceRequestTypedDict(TypedDict):
|
|
|
34
35
|
chain: MorphoSetVaultAllowanceRequestChain
|
|
35
36
|
sender: str
|
|
36
37
|
r"""The address of the transaction sender."""
|
|
38
|
+
action_type: Literal["MORPHO_SET_VAULT_ALLOWANCE"]
|
|
37
39
|
|
|
38
40
|
|
|
39
41
|
class MorphoSetVaultAllowanceRequest(BaseModel):
|
|
40
|
-
model_config = ConfigDict(
|
|
41
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
42
|
-
)
|
|
43
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
44
|
-
|
|
45
42
|
vault_address: str
|
|
46
43
|
r"""The vault address you are increasing the allowance for."""
|
|
47
44
|
|
|
@@ -53,10 +50,10 @@ class MorphoSetVaultAllowanceRequest(BaseModel):
|
|
|
53
50
|
sender: str
|
|
54
51
|
r"""The address of the transaction sender."""
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
ACTION_TYPE: Annotated[
|
|
54
|
+
Annotated[
|
|
55
|
+
Optional[Literal["MORPHO_SET_VAULT_ALLOWANCE"]],
|
|
56
|
+
AfterValidator(validate_const("MORPHO_SET_VAULT_ALLOWANCE")),
|
|
57
|
+
],
|
|
58
|
+
pydantic.Field(alias="action_type"),
|
|
59
|
+
] = "MORPHO_SET_VAULT_ALLOWANCE"
|
|
@@ -8,10 +8,12 @@ from compass_api_sdk.types import (
|
|
|
8
8
|
UNSET,
|
|
9
9
|
UNSET_SENTINEL,
|
|
10
10
|
)
|
|
11
|
+
from compass_api_sdk.utils import validate_const
|
|
11
12
|
import pydantic
|
|
12
|
-
from pydantic import
|
|
13
|
-
from
|
|
14
|
-
from
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
|
+
from typing import Literal, Optional, Union
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
MorphoSupplyCollateralParamsAmountTypedDict = TypeAliasType(
|
|
@@ -31,6 +33,7 @@ class MorphoSupplyCollateralParamsTypedDict(TypedDict):
|
|
|
31
33
|
r"""Amount of the token to supply to the market as collateral."""
|
|
32
34
|
unique_market_key: str
|
|
33
35
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
36
|
+
action_type: Literal["MORPHO_SUPPLY_COLLATERAL"]
|
|
34
37
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
35
38
|
r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
|
|
36
39
|
callback_data: NotRequired[Nullable[bytes]]
|
|
@@ -38,34 +41,29 @@ class MorphoSupplyCollateralParamsTypedDict(TypedDict):
|
|
|
38
41
|
|
|
39
42
|
|
|
40
43
|
class MorphoSupplyCollateralParams(BaseModel):
|
|
41
|
-
model_config = ConfigDict(
|
|
42
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
43
|
-
)
|
|
44
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
45
|
-
|
|
46
44
|
amount: MorphoSupplyCollateralParamsAmount
|
|
47
45
|
r"""Amount of the token to supply to the market as collateral."""
|
|
48
46
|
|
|
49
47
|
unique_market_key: str
|
|
50
48
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
51
49
|
|
|
50
|
+
ACTION_TYPE: Annotated[
|
|
51
|
+
Annotated[
|
|
52
|
+
Optional[Literal["MORPHO_SUPPLY_COLLATERAL"]],
|
|
53
|
+
AfterValidator(validate_const("MORPHO_SUPPLY_COLLATERAL")),
|
|
54
|
+
],
|
|
55
|
+
pydantic.Field(alias="action_type"),
|
|
56
|
+
] = "MORPHO_SUPPLY_COLLATERAL"
|
|
57
|
+
|
|
52
58
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
53
59
|
r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
|
|
54
60
|
|
|
55
61
|
callback_data: OptionalNullable[bytes] = UNSET
|
|
56
62
|
r"""An optional field for callback byte data that will be triggered upon successful supplying of collateral."""
|
|
57
63
|
|
|
58
|
-
@property
|
|
59
|
-
def additional_properties(self):
|
|
60
|
-
return self.__pydantic_extra__
|
|
61
|
-
|
|
62
|
-
@additional_properties.setter
|
|
63
|
-
def additional_properties(self, value):
|
|
64
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
65
|
-
|
|
66
64
|
@model_serializer(mode="wrap")
|
|
67
65
|
def serialize_model(self, handler):
|
|
68
|
-
optional_fields = ["on_behalf_of", "callback_data"]
|
|
66
|
+
optional_fields = ["action_type", "on_behalf_of", "callback_data"]
|
|
69
67
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
70
68
|
null_default_fields = []
|
|
71
69
|
|
|
@@ -91,7 +89,4 @@ class MorphoSupplyCollateralParams(BaseModel):
|
|
|
91
89
|
):
|
|
92
90
|
m[k] = val
|
|
93
91
|
|
|
94
|
-
for k, v in serialized.items():
|
|
95
|
-
m[k] = v
|
|
96
|
-
|
|
97
92
|
return m
|
|
@@ -8,11 +8,13 @@ from compass_api_sdk.types import (
|
|
|
8
8
|
UNSET,
|
|
9
9
|
UNSET_SENTINEL,
|
|
10
10
|
)
|
|
11
|
+
from compass_api_sdk.utils import validate_const
|
|
11
12
|
from enum import Enum
|
|
12
13
|
import pydantic
|
|
13
|
-
from pydantic import
|
|
14
|
-
from
|
|
15
|
-
from
|
|
14
|
+
from pydantic import model_serializer
|
|
15
|
+
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from typing import Literal, Optional, Union
|
|
17
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
MorphoSupplyCollateralRequestAmountTypedDict = TypeAliasType(
|
|
@@ -40,6 +42,7 @@ class MorphoSupplyCollateralRequestTypedDict(TypedDict):
|
|
|
40
42
|
chain: MorphoSupplyCollateralRequestChain
|
|
41
43
|
sender: str
|
|
42
44
|
r"""The address of the transaction sender."""
|
|
45
|
+
action_type: Literal["MORPHO_SUPPLY_COLLATERAL"]
|
|
43
46
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
44
47
|
r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
|
|
45
48
|
callback_data: NotRequired[Nullable[bytes]]
|
|
@@ -47,11 +50,6 @@ class MorphoSupplyCollateralRequestTypedDict(TypedDict):
|
|
|
47
50
|
|
|
48
51
|
|
|
49
52
|
class MorphoSupplyCollateralRequest(BaseModel):
|
|
50
|
-
model_config = ConfigDict(
|
|
51
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
52
|
-
)
|
|
53
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
54
|
-
|
|
55
53
|
amount: MorphoSupplyCollateralRequestAmount
|
|
56
54
|
r"""Amount of the token to supply to the market as collateral."""
|
|
57
55
|
|
|
@@ -63,23 +61,23 @@ class MorphoSupplyCollateralRequest(BaseModel):
|
|
|
63
61
|
sender: str
|
|
64
62
|
r"""The address of the transaction sender."""
|
|
65
63
|
|
|
64
|
+
ACTION_TYPE: Annotated[
|
|
65
|
+
Annotated[
|
|
66
|
+
Optional[Literal["MORPHO_SUPPLY_COLLATERAL"]],
|
|
67
|
+
AfterValidator(validate_const("MORPHO_SUPPLY_COLLATERAL")),
|
|
68
|
+
],
|
|
69
|
+
pydantic.Field(alias="action_type"),
|
|
70
|
+
] = "MORPHO_SUPPLY_COLLATERAL"
|
|
71
|
+
|
|
66
72
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
67
73
|
r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
|
|
68
74
|
|
|
69
75
|
callback_data: OptionalNullable[bytes] = UNSET
|
|
70
76
|
r"""An optional field for callback byte data that will be triggered upon successful supplying of collateral."""
|
|
71
77
|
|
|
72
|
-
@property
|
|
73
|
-
def additional_properties(self):
|
|
74
|
-
return self.__pydantic_extra__
|
|
75
|
-
|
|
76
|
-
@additional_properties.setter
|
|
77
|
-
def additional_properties(self, value):
|
|
78
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
79
|
-
|
|
80
78
|
@model_serializer(mode="wrap")
|
|
81
79
|
def serialize_model(self, handler):
|
|
82
|
-
optional_fields = ["on_behalf_of", "callback_data"]
|
|
80
|
+
optional_fields = ["action_type", "on_behalf_of", "callback_data"]
|
|
83
81
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
84
82
|
null_default_fields = []
|
|
85
83
|
|
|
@@ -105,7 +103,4 @@ class MorphoSupplyCollateralRequest(BaseModel):
|
|
|
105
103
|
):
|
|
106
104
|
m[k] = val
|
|
107
105
|
|
|
108
|
-
for k, v in serialized.items():
|
|
109
|
-
m[k] = v
|
|
110
|
-
|
|
111
106
|
return m
|
|
@@ -8,10 +8,12 @@ from compass_api_sdk.types import (
|
|
|
8
8
|
UNSET,
|
|
9
9
|
UNSET_SENTINEL,
|
|
10
10
|
)
|
|
11
|
+
from compass_api_sdk.utils import validate_const
|
|
11
12
|
import pydantic
|
|
12
|
-
from pydantic import
|
|
13
|
-
from
|
|
14
|
-
from
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
|
+
from typing import Literal, Optional, Union
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
MorphoWithdrawCollateralParamsAmountTypedDict = TypeAliasType(
|
|
@@ -31,6 +33,7 @@ class MorphoWithdrawCollateralParamsTypedDict(TypedDict):
|
|
|
31
33
|
r"""Amount of the token to supply to the market as collateral."""
|
|
32
34
|
unique_market_key: str
|
|
33
35
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
36
|
+
action_type: Literal["MORPHO_WITHDRAW_COLLATERAL"]
|
|
34
37
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
35
38
|
r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
|
|
36
39
|
receiver: NotRequired[Nullable[str]]
|
|
@@ -38,34 +41,29 @@ class MorphoWithdrawCollateralParamsTypedDict(TypedDict):
|
|
|
38
41
|
|
|
39
42
|
|
|
40
43
|
class MorphoWithdrawCollateralParams(BaseModel):
|
|
41
|
-
model_config = ConfigDict(
|
|
42
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
43
|
-
)
|
|
44
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
45
|
-
|
|
46
44
|
amount: MorphoWithdrawCollateralParamsAmount
|
|
47
45
|
r"""Amount of the token to supply to the market as collateral."""
|
|
48
46
|
|
|
49
47
|
unique_market_key: str
|
|
50
48
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
51
49
|
|
|
50
|
+
ACTION_TYPE: Annotated[
|
|
51
|
+
Annotated[
|
|
52
|
+
Optional[Literal["MORPHO_WITHDRAW_COLLATERAL"]],
|
|
53
|
+
AfterValidator(validate_const("MORPHO_WITHDRAW_COLLATERAL")),
|
|
54
|
+
],
|
|
55
|
+
pydantic.Field(alias="action_type"),
|
|
56
|
+
] = "MORPHO_WITHDRAW_COLLATERAL"
|
|
57
|
+
|
|
52
58
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
53
59
|
r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
|
|
54
60
|
|
|
55
61
|
receiver: OptionalNullable[str] = UNSET
|
|
56
62
|
r"""The address where the withdrawn collateral will be received. Defaults to sender."""
|
|
57
63
|
|
|
58
|
-
@property
|
|
59
|
-
def additional_properties(self):
|
|
60
|
-
return self.__pydantic_extra__
|
|
61
|
-
|
|
62
|
-
@additional_properties.setter
|
|
63
|
-
def additional_properties(self, value):
|
|
64
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
65
|
-
|
|
66
64
|
@model_serializer(mode="wrap")
|
|
67
65
|
def serialize_model(self, handler):
|
|
68
|
-
optional_fields = ["on_behalf_of", "receiver"]
|
|
66
|
+
optional_fields = ["action_type", "on_behalf_of", "receiver"]
|
|
69
67
|
nullable_fields = ["on_behalf_of", "receiver"]
|
|
70
68
|
null_default_fields = []
|
|
71
69
|
|
|
@@ -91,7 +89,4 @@ class MorphoWithdrawCollateralParams(BaseModel):
|
|
|
91
89
|
):
|
|
92
90
|
m[k] = val
|
|
93
91
|
|
|
94
|
-
for k, v in serialized.items():
|
|
95
|
-
m[k] = v
|
|
96
|
-
|
|
97
92
|
return m
|
|
@@ -8,11 +8,13 @@ from compass_api_sdk.types import (
|
|
|
8
8
|
UNSET,
|
|
9
9
|
UNSET_SENTINEL,
|
|
10
10
|
)
|
|
11
|
+
from compass_api_sdk.utils import validate_const
|
|
11
12
|
from enum import Enum
|
|
12
13
|
import pydantic
|
|
13
|
-
from pydantic import
|
|
14
|
-
from
|
|
15
|
-
from
|
|
14
|
+
from pydantic import model_serializer
|
|
15
|
+
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from typing import Literal, Optional, Union
|
|
17
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
MorphoWithdrawCollateralRequestAmountTypedDict = TypeAliasType(
|
|
@@ -40,6 +42,7 @@ class MorphoWithdrawCollateralRequestTypedDict(TypedDict):
|
|
|
40
42
|
chain: MorphoWithdrawCollateralRequestChain
|
|
41
43
|
sender: str
|
|
42
44
|
r"""The address of the transaction sender."""
|
|
45
|
+
action_type: Literal["MORPHO_WITHDRAW_COLLATERAL"]
|
|
43
46
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
44
47
|
r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
|
|
45
48
|
receiver: NotRequired[Nullable[str]]
|
|
@@ -47,11 +50,6 @@ class MorphoWithdrawCollateralRequestTypedDict(TypedDict):
|
|
|
47
50
|
|
|
48
51
|
|
|
49
52
|
class MorphoWithdrawCollateralRequest(BaseModel):
|
|
50
|
-
model_config = ConfigDict(
|
|
51
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
52
|
-
)
|
|
53
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
54
|
-
|
|
55
53
|
amount: MorphoWithdrawCollateralRequestAmount
|
|
56
54
|
r"""Amount of the token to supply to the market as collateral."""
|
|
57
55
|
|
|
@@ -63,23 +61,23 @@ class MorphoWithdrawCollateralRequest(BaseModel):
|
|
|
63
61
|
sender: str
|
|
64
62
|
r"""The address of the transaction sender."""
|
|
65
63
|
|
|
64
|
+
ACTION_TYPE: Annotated[
|
|
65
|
+
Annotated[
|
|
66
|
+
Optional[Literal["MORPHO_WITHDRAW_COLLATERAL"]],
|
|
67
|
+
AfterValidator(validate_const("MORPHO_WITHDRAW_COLLATERAL")),
|
|
68
|
+
],
|
|
69
|
+
pydantic.Field(alias="action_type"),
|
|
70
|
+
] = "MORPHO_WITHDRAW_COLLATERAL"
|
|
71
|
+
|
|
66
72
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
67
73
|
r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
|
|
68
74
|
|
|
69
75
|
receiver: OptionalNullable[str] = UNSET
|
|
70
76
|
r"""The address where the withdrawn collateral will be received. Defaults to sender."""
|
|
71
77
|
|
|
72
|
-
@property
|
|
73
|
-
def additional_properties(self):
|
|
74
|
-
return self.__pydantic_extra__
|
|
75
|
-
|
|
76
|
-
@additional_properties.setter
|
|
77
|
-
def additional_properties(self, value):
|
|
78
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
79
|
-
|
|
80
78
|
@model_serializer(mode="wrap")
|
|
81
79
|
def serialize_model(self, handler):
|
|
82
|
-
optional_fields = ["on_behalf_of", "receiver"]
|
|
80
|
+
optional_fields = ["action_type", "on_behalf_of", "receiver"]
|
|
83
81
|
nullable_fields = ["on_behalf_of", "receiver"]
|
|
84
82
|
null_default_fields = []
|
|
85
83
|
|
|
@@ -105,7 +103,4 @@ class MorphoWithdrawCollateralRequest(BaseModel):
|
|
|
105
103
|
):
|
|
106
104
|
m[k] = val
|
|
107
105
|
|
|
108
|
-
for k, v in serialized.items():
|
|
109
|
-
m[k] = v
|
|
110
|
-
|
|
111
106
|
return m
|
|
@@ -8,10 +8,12 @@ from compass_api_sdk.types import (
|
|
|
8
8
|
UNSET,
|
|
9
9
|
UNSET_SENTINEL,
|
|
10
10
|
)
|
|
11
|
+
from compass_api_sdk.utils import validate_const
|
|
11
12
|
import pydantic
|
|
12
|
-
from pydantic import
|
|
13
|
-
from
|
|
14
|
-
from
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
|
+
from typing import Any, Literal, Optional
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
class MorphoWithdrawParamsTypedDict(TypedDict):
|
|
@@ -19,36 +21,32 @@ class MorphoWithdrawParamsTypedDict(TypedDict):
|
|
|
19
21
|
r"""The vault address you are withdrawing from."""
|
|
20
22
|
amount: Any
|
|
21
23
|
r"""The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn."""
|
|
24
|
+
action_type: Literal["MORPHO_WITHDRAW"]
|
|
22
25
|
receiver: NotRequired[Nullable[str]]
|
|
23
26
|
r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
|
|
24
27
|
|
|
25
28
|
|
|
26
29
|
class MorphoWithdrawParams(BaseModel):
|
|
27
|
-
model_config = ConfigDict(
|
|
28
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
29
|
-
)
|
|
30
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
31
|
-
|
|
32
30
|
vault_address: str
|
|
33
31
|
r"""The vault address you are withdrawing from."""
|
|
34
32
|
|
|
35
33
|
amount: Any
|
|
36
34
|
r"""The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn."""
|
|
37
35
|
|
|
36
|
+
ACTION_TYPE: Annotated[
|
|
37
|
+
Annotated[
|
|
38
|
+
Optional[Literal["MORPHO_WITHDRAW"]],
|
|
39
|
+
AfterValidator(validate_const("MORPHO_WITHDRAW")),
|
|
40
|
+
],
|
|
41
|
+
pydantic.Field(alias="action_type"),
|
|
42
|
+
] = "MORPHO_WITHDRAW"
|
|
43
|
+
|
|
38
44
|
receiver: OptionalNullable[str] = UNSET
|
|
39
45
|
r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
|
|
40
46
|
|
|
41
|
-
@property
|
|
42
|
-
def additional_properties(self):
|
|
43
|
-
return self.__pydantic_extra__
|
|
44
|
-
|
|
45
|
-
@additional_properties.setter
|
|
46
|
-
def additional_properties(self, value):
|
|
47
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
48
|
-
|
|
49
47
|
@model_serializer(mode="wrap")
|
|
50
48
|
def serialize_model(self, handler):
|
|
51
|
-
optional_fields = ["receiver"]
|
|
49
|
+
optional_fields = ["action_type", "receiver"]
|
|
52
50
|
nullable_fields = ["receiver"]
|
|
53
51
|
null_default_fields = []
|
|
54
52
|
|
|
@@ -74,7 +72,4 @@ class MorphoWithdrawParams(BaseModel):
|
|
|
74
72
|
):
|
|
75
73
|
m[k] = val
|
|
76
74
|
|
|
77
|
-
for k, v in serialized.items():
|
|
78
|
-
m[k] = v
|
|
79
|
-
|
|
80
75
|
return m
|