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
|
@@ -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, NotRequired, TypeAliasType, TypedDict
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
AerodromeSlipstreamSellExactlyRequestAmountInTypedDict = TypeAliasType(
|
|
@@ -55,6 +58,7 @@ class AerodromeSlipstreamSellExactlyRequestTypedDict(TypedDict):
|
|
|
55
58
|
r"""The chain to use."""
|
|
56
59
|
sender: str
|
|
57
60
|
r"""The address of the transaction sender."""
|
|
61
|
+
action_type: Literal["AERODROME_SLIPSTREAM_SELL_EXACTLY"]
|
|
58
62
|
amount_out_minimum: NotRequired[
|
|
59
63
|
AerodromeSlipstreamSellExactlyRequestAmountOutMinimumTypedDict
|
|
60
64
|
]
|
|
@@ -90,6 +94,14 @@ class AerodromeSlipstreamSellExactlyRequest(BaseModel):
|
|
|
90
94
|
sender: str
|
|
91
95
|
r"""The address of the transaction sender."""
|
|
92
96
|
|
|
97
|
+
ACTION_TYPE: Annotated[
|
|
98
|
+
Annotated[
|
|
99
|
+
Optional[Literal["AERODROME_SLIPSTREAM_SELL_EXACTLY"]],
|
|
100
|
+
AfterValidator(validate_const("AERODROME_SLIPSTREAM_SELL_EXACTLY")),
|
|
101
|
+
],
|
|
102
|
+
pydantic.Field(alias="action_type"),
|
|
103
|
+
] = "AERODROME_SLIPSTREAM_SELL_EXACTLY"
|
|
104
|
+
|
|
93
105
|
amount_out_minimum: Optional[
|
|
94
106
|
AerodromeSlipstreamSellExactlyRequestAmountOutMinimum
|
|
95
107
|
] = None
|
|
@@ -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
|
AerodromeSlipstreamWithdrawLiquidityProvisionParamsPercentageForWithdrawalTypedDict = TypeAliasType(
|
|
@@ -33,6 +36,7 @@ class AerodromeSlipstreamWithdrawLiquidityProvisionParamsTypedDict(TypedDict):
|
|
|
33
36
|
r"""Token ID of the NFT representing the liquidity provisioned position."""
|
|
34
37
|
percentage_for_withdrawal: AerodromeSlipstreamWithdrawLiquidityProvisionParamsPercentageForWithdrawalTypedDict
|
|
35
38
|
r"""How much liquidity to take out in percentage."""
|
|
39
|
+
action_type: Literal["AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"]
|
|
36
40
|
|
|
37
41
|
|
|
38
42
|
class AerodromeSlipstreamWithdrawLiquidityProvisionParams(BaseModel):
|
|
@@ -49,3 +53,13 @@ class AerodromeSlipstreamWithdrawLiquidityProvisionParams(BaseModel):
|
|
|
49
53
|
AerodromeSlipstreamWithdrawLiquidityProvisionParamsPercentageForWithdrawal
|
|
50
54
|
)
|
|
51
55
|
r"""How much liquidity to take out in percentage."""
|
|
56
|
+
|
|
57
|
+
ACTION_TYPE: Annotated[
|
|
58
|
+
Annotated[
|
|
59
|
+
Optional[Literal["AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"]],
|
|
60
|
+
AfterValidator(
|
|
61
|
+
validate_const("AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION")
|
|
62
|
+
),
|
|
63
|
+
],
|
|
64
|
+
pydantic.Field(alias="action_type"),
|
|
65
|
+
] = "AERODROME_SLIPSTREAM_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
|
AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict = TypeAliasType(
|
|
@@ -32,6 +35,7 @@ class AerodromeSlipstreamWithdrawLiquidityProvisionRequestTypedDict(TypedDict):
|
|
|
32
35
|
r"""The chain to use."""
|
|
33
36
|
sender: str
|
|
34
37
|
r"""The address of the transaction sender."""
|
|
38
|
+
action_type: Literal["AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"]
|
|
35
39
|
|
|
36
40
|
|
|
37
41
|
class AerodromeSlipstreamWithdrawLiquidityProvisionRequest(BaseModel):
|
|
@@ -48,3 +52,13 @@ class AerodromeSlipstreamWithdrawLiquidityProvisionRequest(BaseModel):
|
|
|
48
52
|
|
|
49
53
|
sender: str
|
|
50
54
|
r"""The address of the transaction sender."""
|
|
55
|
+
|
|
56
|
+
ACTION_TYPE: Annotated[
|
|
57
|
+
Annotated[
|
|
58
|
+
Optional[Literal["AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"]],
|
|
59
|
+
AfterValidator(
|
|
60
|
+
validate_const("AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION")
|
|
61
|
+
),
|
|
62
|
+
],
|
|
63
|
+
pydantic.Field(alias="action_type"),
|
|
64
|
+
] = "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .token_enum import TokenEnum
|
|
5
5
|
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
6
7
|
from enum import Enum
|
|
7
|
-
|
|
8
|
-
from
|
|
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
|
IncreaseAllowanceParamsTokenTypedDict = TypeAliasType(
|
|
@@ -59,6 +62,7 @@ class IncreaseAllowanceParamsTypedDict(TypedDict):
|
|
|
59
62
|
r"""The name of the contract to increase allowance for."""
|
|
60
63
|
amount: IncreaseAllowanceParamsAmountTypedDict
|
|
61
64
|
r"""The amount to increase the allowance to."""
|
|
65
|
+
action_type: Literal["ALLOWANCE_INCREASE"]
|
|
62
66
|
|
|
63
67
|
|
|
64
68
|
class IncreaseAllowanceParams(BaseModel):
|
|
@@ -72,3 +76,11 @@ class IncreaseAllowanceParams(BaseModel):
|
|
|
72
76
|
|
|
73
77
|
amount: IncreaseAllowanceParamsAmount
|
|
74
78
|
r"""The amount to increase the allowance to."""
|
|
79
|
+
|
|
80
|
+
ACTION_TYPE: Annotated[
|
|
81
|
+
Annotated[
|
|
82
|
+
Optional[Literal["ALLOWANCE_INCREASE"]],
|
|
83
|
+
AfterValidator(validate_const("ALLOWANCE_INCREASE")),
|
|
84
|
+
],
|
|
85
|
+
pydantic.Field(alias="action_type"),
|
|
86
|
+
] = "ALLOWANCE_INCREASE"
|
|
@@ -4,9 +4,12 @@ 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 compass_api_sdk.utils import validate_const
|
|
7
8
|
from enum import Enum
|
|
8
|
-
|
|
9
|
-
from
|
|
9
|
+
import pydantic
|
|
10
|
+
from pydantic.functional_validators import AfterValidator
|
|
11
|
+
from typing import Literal, Optional, Union
|
|
12
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
IncreaseAllowanceRequestTokenTypedDict = TypeAliasType(
|
|
@@ -64,6 +67,7 @@ class IncreaseAllowanceRequestTypedDict(TypedDict):
|
|
|
64
67
|
r"""The chain to use."""
|
|
65
68
|
sender: str
|
|
66
69
|
r"""The address of the transaction sender."""
|
|
70
|
+
action_type: Literal["ALLOWANCE_INCREASE"]
|
|
67
71
|
|
|
68
72
|
|
|
69
73
|
class IncreaseAllowanceRequest(BaseModel):
|
|
@@ -83,3 +87,11 @@ class IncreaseAllowanceRequest(BaseModel):
|
|
|
83
87
|
|
|
84
88
|
sender: str
|
|
85
89
|
r"""The address of the transaction sender."""
|
|
90
|
+
|
|
91
|
+
ACTION_TYPE: Annotated[
|
|
92
|
+
Annotated[
|
|
93
|
+
Optional[Literal["ALLOWANCE_INCREASE"]],
|
|
94
|
+
AfterValidator(validate_const("ALLOWANCE_INCREASE")),
|
|
95
|
+
],
|
|
96
|
+
pydantic.Field(alias="action_type"),
|
|
97
|
+
] = "ALLOWANCE_INCREASE"
|
|
@@ -8,9 +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
|
|
12
|
+
import pydantic
|
|
11
13
|
from pydantic import model_serializer
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
|
+
from typing import Literal, Optional, Union
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
MorphoBorrowParamsAmountTypedDict = TypeAliasType(
|
|
@@ -28,6 +31,7 @@ class MorphoBorrowParamsTypedDict(TypedDict):
|
|
|
28
31
|
r"""Amount of the token to borrow from the market."""
|
|
29
32
|
unique_market_key: str
|
|
30
33
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
34
|
+
action_type: Literal["MORPHO_BORROW"]
|
|
31
35
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
32
36
|
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
33
37
|
receiver: NotRequired[Nullable[str]]
|
|
@@ -41,6 +45,14 @@ class MorphoBorrowParams(BaseModel):
|
|
|
41
45
|
unique_market_key: str
|
|
42
46
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
43
47
|
|
|
48
|
+
ACTION_TYPE: Annotated[
|
|
49
|
+
Annotated[
|
|
50
|
+
Optional[Literal["MORPHO_BORROW"]],
|
|
51
|
+
AfterValidator(validate_const("MORPHO_BORROW")),
|
|
52
|
+
],
|
|
53
|
+
pydantic.Field(alias="action_type"),
|
|
54
|
+
] = "MORPHO_BORROW"
|
|
55
|
+
|
|
44
56
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
45
57
|
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
46
58
|
|
|
@@ -49,7 +61,7 @@ class MorphoBorrowParams(BaseModel):
|
|
|
49
61
|
|
|
50
62
|
@model_serializer(mode="wrap")
|
|
51
63
|
def serialize_model(self, handler):
|
|
52
|
-
optional_fields = ["on_behalf_of", "receiver"]
|
|
64
|
+
optional_fields = ["action_type", "on_behalf_of", "receiver"]
|
|
53
65
|
nullable_fields = ["on_behalf_of", "receiver"]
|
|
54
66
|
null_default_fields = []
|
|
55
67
|
|
|
@@ -8,10 +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
|
|
13
|
+
import pydantic
|
|
12
14
|
from pydantic import model_serializer
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
+
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from typing import Literal, Optional, Union
|
|
17
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
15
18
|
|
|
16
19
|
|
|
17
20
|
MorphoBorrowRequestAmountTypedDict = TypeAliasType(
|
|
@@ -39,6 +42,7 @@ class MorphoBorrowRequestTypedDict(TypedDict):
|
|
|
39
42
|
chain: MorphoBorrowRequestChain
|
|
40
43
|
sender: str
|
|
41
44
|
r"""The address of the transaction sender."""
|
|
45
|
+
action_type: Literal["MORPHO_BORROW"]
|
|
42
46
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
43
47
|
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
44
48
|
receiver: NotRequired[Nullable[str]]
|
|
@@ -57,6 +61,14 @@ class MorphoBorrowRequest(BaseModel):
|
|
|
57
61
|
sender: str
|
|
58
62
|
r"""The address of the transaction sender."""
|
|
59
63
|
|
|
64
|
+
ACTION_TYPE: Annotated[
|
|
65
|
+
Annotated[
|
|
66
|
+
Optional[Literal["MORPHO_BORROW"]],
|
|
67
|
+
AfterValidator(validate_const("MORPHO_BORROW")),
|
|
68
|
+
],
|
|
69
|
+
pydantic.Field(alias="action_type"),
|
|
70
|
+
] = "MORPHO_BORROW"
|
|
71
|
+
|
|
60
72
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
61
73
|
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
62
74
|
|
|
@@ -65,7 +77,7 @@ class MorphoBorrowRequest(BaseModel):
|
|
|
65
77
|
|
|
66
78
|
@model_serializer(mode="wrap")
|
|
67
79
|
def serialize_model(self, handler):
|
|
68
|
-
optional_fields = ["on_behalf_of", "receiver"]
|
|
80
|
+
optional_fields = ["action_type", "on_behalf_of", "receiver"]
|
|
69
81
|
nullable_fields = ["on_behalf_of", "receiver"]
|
|
70
82
|
null_default_fields = []
|
|
71
83
|
|
|
@@ -8,9 +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
|
|
12
|
+
import pydantic
|
|
11
13
|
from pydantic import model_serializer
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
|
+
from typing import Literal, Optional, Union
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
MorphoDepositParamsAmountTypedDict = TypeAliasType(
|
|
@@ -30,6 +33,7 @@ class MorphoDepositParamsTypedDict(TypedDict):
|
|
|
30
33
|
r"""The vault address you are depositing to."""
|
|
31
34
|
amount: MorphoDepositParamsAmountTypedDict
|
|
32
35
|
r"""The amount of tokens to deposit into the vault."""
|
|
36
|
+
action_type: Literal["MORPHO_DEPOSIT"]
|
|
33
37
|
receiver: NotRequired[Nullable[str]]
|
|
34
38
|
r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
35
39
|
|
|
@@ -41,12 +45,20 @@ class MorphoDepositParams(BaseModel):
|
|
|
41
45
|
amount: MorphoDepositParamsAmount
|
|
42
46
|
r"""The amount of tokens to deposit into the vault."""
|
|
43
47
|
|
|
48
|
+
ACTION_TYPE: Annotated[
|
|
49
|
+
Annotated[
|
|
50
|
+
Optional[Literal["MORPHO_DEPOSIT"]],
|
|
51
|
+
AfterValidator(validate_const("MORPHO_DEPOSIT")),
|
|
52
|
+
],
|
|
53
|
+
pydantic.Field(alias="action_type"),
|
|
54
|
+
] = "MORPHO_DEPOSIT"
|
|
55
|
+
|
|
44
56
|
receiver: OptionalNullable[str] = UNSET
|
|
45
57
|
r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
46
58
|
|
|
47
59
|
@model_serializer(mode="wrap")
|
|
48
60
|
def serialize_model(self, handler):
|
|
49
|
-
optional_fields = ["receiver"]
|
|
61
|
+
optional_fields = ["action_type", "receiver"]
|
|
50
62
|
nullable_fields = ["receiver"]
|
|
51
63
|
null_default_fields = []
|
|
52
64
|
|
|
@@ -8,10 +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
|
|
13
|
+
import pydantic
|
|
12
14
|
from pydantic import model_serializer
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
+
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from typing import Literal, Optional, Union
|
|
17
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
15
18
|
|
|
16
19
|
|
|
17
20
|
MorphoDepositRequestAmountTypedDict = TypeAliasType(
|
|
@@ -39,6 +42,7 @@ class MorphoDepositRequestTypedDict(TypedDict):
|
|
|
39
42
|
chain: MorphoDepositRequestChain
|
|
40
43
|
sender: str
|
|
41
44
|
r"""The address of the transaction sender."""
|
|
45
|
+
action_type: Literal["MORPHO_DEPOSIT"]
|
|
42
46
|
receiver: NotRequired[Nullable[str]]
|
|
43
47
|
r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
44
48
|
|
|
@@ -55,12 +59,20 @@ class MorphoDepositRequest(BaseModel):
|
|
|
55
59
|
sender: str
|
|
56
60
|
r"""The address of the transaction sender."""
|
|
57
61
|
|
|
62
|
+
ACTION_TYPE: Annotated[
|
|
63
|
+
Annotated[
|
|
64
|
+
Optional[Literal["MORPHO_DEPOSIT"]],
|
|
65
|
+
AfterValidator(validate_const("MORPHO_DEPOSIT")),
|
|
66
|
+
],
|
|
67
|
+
pydantic.Field(alias="action_type"),
|
|
68
|
+
] = "MORPHO_DEPOSIT"
|
|
69
|
+
|
|
58
70
|
receiver: OptionalNullable[str] = UNSET
|
|
59
71
|
r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
60
72
|
|
|
61
73
|
@model_serializer(mode="wrap")
|
|
62
74
|
def serialize_model(self, handler):
|
|
63
|
-
optional_fields = ["receiver"]
|
|
75
|
+
optional_fields = ["action_type", "receiver"]
|
|
64
76
|
nullable_fields = ["receiver"]
|
|
65
77
|
null_default_fields = []
|
|
66
78
|
|
|
@@ -8,9 +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
|
|
12
|
+
import pydantic
|
|
11
13
|
from pydantic import model_serializer
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
|
+
from typing import Any, Literal, Optional
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
class MorphoRepayParamsTypedDict(TypedDict):
|
|
@@ -18,6 +21,7 @@ class MorphoRepayParamsTypedDict(TypedDict):
|
|
|
18
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."""
|
|
19
22
|
unique_market_key: str
|
|
20
23
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
24
|
+
action_type: Literal["MORPHO_REPAY"]
|
|
21
25
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
22
26
|
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
23
27
|
callback_data: NotRequired[Nullable[bytes]]
|
|
@@ -31,6 +35,14 @@ class MorphoRepayParams(BaseModel):
|
|
|
31
35
|
unique_market_key: str
|
|
32
36
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
33
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
|
+
|
|
34
46
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
35
47
|
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
36
48
|
|
|
@@ -39,7 +51,7 @@ class MorphoRepayParams(BaseModel):
|
|
|
39
51
|
|
|
40
52
|
@model_serializer(mode="wrap")
|
|
41
53
|
def serialize_model(self, handler):
|
|
42
|
-
optional_fields = ["on_behalf_of", "callback_data"]
|
|
54
|
+
optional_fields = ["action_type", "on_behalf_of", "callback_data"]
|
|
43
55
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
44
56
|
null_default_fields = []
|
|
45
57
|
|
|
@@ -8,10 +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
|
|
13
|
+
import pydantic
|
|
12
14
|
from pydantic import model_serializer
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
+
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from typing import Any, Literal, Optional
|
|
17
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
15
18
|
|
|
16
19
|
|
|
17
20
|
class MorphoRepayRequestChain(str, Enum):
|
|
@@ -27,6 +30,7 @@ class MorphoRepayRequestTypedDict(TypedDict):
|
|
|
27
30
|
chain: MorphoRepayRequestChain
|
|
28
31
|
sender: str
|
|
29
32
|
r"""The address of the transaction sender."""
|
|
33
|
+
action_type: Literal["MORPHO_REPAY"]
|
|
30
34
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
31
35
|
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
32
36
|
callback_data: NotRequired[Nullable[bytes]]
|
|
@@ -45,6 +49,14 @@ class MorphoRepayRequest(BaseModel):
|
|
|
45
49
|
sender: str
|
|
46
50
|
r"""The address of the transaction sender."""
|
|
47
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
|
+
|
|
48
60
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
49
61
|
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
50
62
|
|
|
@@ -53,7 +65,7 @@ class MorphoRepayRequest(BaseModel):
|
|
|
53
65
|
|
|
54
66
|
@model_serializer(mode="wrap")
|
|
55
67
|
def serialize_model(self, handler):
|
|
56
|
-
optional_fields = ["on_behalf_of", "callback_data"]
|
|
68
|
+
optional_fields = ["action_type", "on_behalf_of", "callback_data"]
|
|
57
69
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
58
70
|
null_default_fields = []
|
|
59
71
|
|
|
@@ -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
|
MorphoSetVaultAllowanceParamsAmountTypedDict = TypeAliasType(
|
|
@@ -23,6 +26,7 @@ class MorphoSetVaultAllowanceParamsTypedDict(TypedDict):
|
|
|
23
26
|
r"""The vault address you are increasing the allowance for."""
|
|
24
27
|
amount: MorphoSetVaultAllowanceParamsAmountTypedDict
|
|
25
28
|
r"""The amount of tokens to increase the allowance by."""
|
|
29
|
+
action_type: Literal["MORPHO_SET_VAULT_ALLOWANCE"]
|
|
26
30
|
|
|
27
31
|
|
|
28
32
|
class MorphoSetVaultAllowanceParams(BaseModel):
|
|
@@ -31,3 +35,11 @@ class MorphoSetVaultAllowanceParams(BaseModel):
|
|
|
31
35
|
|
|
32
36
|
amount: MorphoSetVaultAllowanceParamsAmount
|
|
33
37
|
r"""The amount of tokens to increase the allowance by."""
|
|
38
|
+
|
|
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,9 +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
|
-
from
|
|
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
|
MorphoSetVaultAllowanceRequestAmountTypedDict = TypeAliasType(
|
|
@@ -32,6 +35,7 @@ class MorphoSetVaultAllowanceRequestTypedDict(TypedDict):
|
|
|
32
35
|
chain: MorphoSetVaultAllowanceRequestChain
|
|
33
36
|
sender: str
|
|
34
37
|
r"""The address of the transaction sender."""
|
|
38
|
+
action_type: Literal["MORPHO_SET_VAULT_ALLOWANCE"]
|
|
35
39
|
|
|
36
40
|
|
|
37
41
|
class MorphoSetVaultAllowanceRequest(BaseModel):
|
|
@@ -45,3 +49,11 @@ class MorphoSetVaultAllowanceRequest(BaseModel):
|
|
|
45
49
|
|
|
46
50
|
sender: str
|
|
47
51
|
r"""The address of the transaction sender."""
|
|
52
|
+
|
|
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,9 +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
|
|
12
|
+
import pydantic
|
|
11
13
|
from pydantic import model_serializer
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
|
+
from typing import Literal, Optional, Union
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
MorphoSupplyCollateralParamsAmountTypedDict = TypeAliasType(
|
|
@@ -30,6 +33,7 @@ class MorphoSupplyCollateralParamsTypedDict(TypedDict):
|
|
|
30
33
|
r"""Amount of the token to supply to the market as collateral."""
|
|
31
34
|
unique_market_key: str
|
|
32
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"]
|
|
33
37
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
34
38
|
r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
|
|
35
39
|
callback_data: NotRequired[Nullable[bytes]]
|
|
@@ -43,6 +47,14 @@ class MorphoSupplyCollateralParams(BaseModel):
|
|
|
43
47
|
unique_market_key: str
|
|
44
48
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
45
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
|
+
|
|
46
58
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
47
59
|
r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
|
|
48
60
|
|
|
@@ -51,7 +63,7 @@ class MorphoSupplyCollateralParams(BaseModel):
|
|
|
51
63
|
|
|
52
64
|
@model_serializer(mode="wrap")
|
|
53
65
|
def serialize_model(self, handler):
|
|
54
|
-
optional_fields = ["on_behalf_of", "callback_data"]
|
|
66
|
+
optional_fields = ["action_type", "on_behalf_of", "callback_data"]
|
|
55
67
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
56
68
|
null_default_fields = []
|
|
57
69
|
|
|
@@ -8,10 +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
|
|
13
|
+
import pydantic
|
|
12
14
|
from pydantic import model_serializer
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
+
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from typing import Literal, Optional, Union
|
|
17
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
15
18
|
|
|
16
19
|
|
|
17
20
|
MorphoSupplyCollateralRequestAmountTypedDict = TypeAliasType(
|
|
@@ -39,6 +42,7 @@ class MorphoSupplyCollateralRequestTypedDict(TypedDict):
|
|
|
39
42
|
chain: MorphoSupplyCollateralRequestChain
|
|
40
43
|
sender: str
|
|
41
44
|
r"""The address of the transaction sender."""
|
|
45
|
+
action_type: Literal["MORPHO_SUPPLY_COLLATERAL"]
|
|
42
46
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
43
47
|
r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
|
|
44
48
|
callback_data: NotRequired[Nullable[bytes]]
|
|
@@ -57,6 +61,14 @@ class MorphoSupplyCollateralRequest(BaseModel):
|
|
|
57
61
|
sender: str
|
|
58
62
|
r"""The address of the transaction sender."""
|
|
59
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
|
+
|
|
60
72
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
61
73
|
r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
|
|
62
74
|
|
|
@@ -65,7 +77,7 @@ class MorphoSupplyCollateralRequest(BaseModel):
|
|
|
65
77
|
|
|
66
78
|
@model_serializer(mode="wrap")
|
|
67
79
|
def serialize_model(self, handler):
|
|
68
|
-
optional_fields = ["on_behalf_of", "callback_data"]
|
|
80
|
+
optional_fields = ["action_type", "on_behalf_of", "callback_data"]
|
|
69
81
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
70
82
|
null_default_fields = []
|
|
71
83
|
|
|
@@ -8,9 +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
|
|
12
|
+
import pydantic
|
|
11
13
|
from pydantic import model_serializer
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
|
+
from typing import Literal, Optional, Union
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
MorphoWithdrawCollateralParamsAmountTypedDict = TypeAliasType(
|
|
@@ -30,6 +33,7 @@ class MorphoWithdrawCollateralParamsTypedDict(TypedDict):
|
|
|
30
33
|
r"""Amount of the token to supply to the market as collateral."""
|
|
31
34
|
unique_market_key: str
|
|
32
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"]
|
|
33
37
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
34
38
|
r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
|
|
35
39
|
receiver: NotRequired[Nullable[str]]
|
|
@@ -43,6 +47,14 @@ class MorphoWithdrawCollateralParams(BaseModel):
|
|
|
43
47
|
unique_market_key: str
|
|
44
48
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
45
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
|
+
|
|
46
58
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
47
59
|
r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
|
|
48
60
|
|
|
@@ -51,7 +63,7 @@ class MorphoWithdrawCollateralParams(BaseModel):
|
|
|
51
63
|
|
|
52
64
|
@model_serializer(mode="wrap")
|
|
53
65
|
def serialize_model(self, handler):
|
|
54
|
-
optional_fields = ["on_behalf_of", "receiver"]
|
|
66
|
+
optional_fields = ["action_type", "on_behalf_of", "receiver"]
|
|
55
67
|
nullable_fields = ["on_behalf_of", "receiver"]
|
|
56
68
|
null_default_fields = []
|
|
57
69
|
|