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
|
@@ -3,10 +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 compass_api_sdk.utils import validate_const
|
|
6
7
|
import pydantic
|
|
7
|
-
from pydantic import
|
|
8
|
-
from typing import
|
|
9
|
-
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
AerodromeSlipstreamSellExactlyParamsAmountInTypedDict = TypeAliasType(
|
|
@@ -52,6 +53,7 @@ class AerodromeSlipstreamSellExactlyParamsTypedDict(TypedDict):
|
|
|
52
53
|
r"""The tick spacing of the pool"""
|
|
53
54
|
amount_in: AerodromeSlipstreamSellExactlyParamsAmountInTypedDict
|
|
54
55
|
r"""The amount of the token to swap from"""
|
|
56
|
+
action_type: Literal["AERODROME_SLIPSTREAM_SELL_EXACTLY"]
|
|
55
57
|
amount_out_minimum: NotRequired[
|
|
56
58
|
AerodromeSlipstreamSellExactlyParamsAmountOutMinimumTypedDict
|
|
57
59
|
]
|
|
@@ -61,11 +63,6 @@ class AerodromeSlipstreamSellExactlyParamsTypedDict(TypedDict):
|
|
|
61
63
|
class AerodromeSlipstreamSellExactlyParams(BaseModel):
|
|
62
64
|
r"""Parameters model for selling exactly an amount of tokens."""
|
|
63
65
|
|
|
64
|
-
model_config = ConfigDict(
|
|
65
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
66
|
-
)
|
|
67
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
68
|
-
|
|
69
66
|
token_in: TokenEnum
|
|
70
67
|
r"""A class representing the token.
|
|
71
68
|
|
|
@@ -86,15 +83,15 @@ class AerodromeSlipstreamSellExactlyParams(BaseModel):
|
|
|
86
83
|
amount_in: AerodromeSlipstreamSellExactlyParamsAmountIn
|
|
87
84
|
r"""The amount of the token to swap from"""
|
|
88
85
|
|
|
86
|
+
ACTION_TYPE: Annotated[
|
|
87
|
+
Annotated[
|
|
88
|
+
Optional[Literal["AERODROME_SLIPSTREAM_SELL_EXACTLY"]],
|
|
89
|
+
AfterValidator(validate_const("AERODROME_SLIPSTREAM_SELL_EXACTLY")),
|
|
90
|
+
],
|
|
91
|
+
pydantic.Field(alias="action_type"),
|
|
92
|
+
] = "AERODROME_SLIPSTREAM_SELL_EXACTLY"
|
|
93
|
+
|
|
89
94
|
amount_out_minimum: Optional[
|
|
90
95
|
AerodromeSlipstreamSellExactlyParamsAmountOutMinimum
|
|
91
96
|
] = None
|
|
92
97
|
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
93
|
-
|
|
94
|
-
@property
|
|
95
|
-
def additional_properties(self):
|
|
96
|
-
return self.__pydantic_extra__
|
|
97
|
-
|
|
98
|
-
@additional_properties.setter
|
|
99
|
-
def additional_properties(self, value):
|
|
100
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
@@ -4,10 +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 compass_api_sdk.utils import validate_const
|
|
7
8
|
import pydantic
|
|
8
|
-
from pydantic import
|
|
9
|
-
from typing import
|
|
10
|
-
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from typing import Literal, Optional, Union
|
|
11
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
AerodromeSlipstreamSellExactlyRequestAmountInTypedDict = TypeAliasType(
|
|
@@ -57,6 +58,7 @@ class AerodromeSlipstreamSellExactlyRequestTypedDict(TypedDict):
|
|
|
57
58
|
r"""The chain to use."""
|
|
58
59
|
sender: str
|
|
59
60
|
r"""The address of the transaction sender."""
|
|
61
|
+
action_type: Literal["AERODROME_SLIPSTREAM_SELL_EXACTLY"]
|
|
60
62
|
amount_out_minimum: NotRequired[
|
|
61
63
|
AerodromeSlipstreamSellExactlyRequestAmountOutMinimumTypedDict
|
|
62
64
|
]
|
|
@@ -66,11 +68,6 @@ class AerodromeSlipstreamSellExactlyRequestTypedDict(TypedDict):
|
|
|
66
68
|
class AerodromeSlipstreamSellExactlyRequest(BaseModel):
|
|
67
69
|
r"""Request model for selling exactly an amount of tokens."""
|
|
68
70
|
|
|
69
|
-
model_config = ConfigDict(
|
|
70
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
71
|
-
)
|
|
72
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
73
|
-
|
|
74
71
|
token_in: TokenEnum
|
|
75
72
|
r"""A class representing the token.
|
|
76
73
|
|
|
@@ -97,15 +94,15 @@ class AerodromeSlipstreamSellExactlyRequest(BaseModel):
|
|
|
97
94
|
sender: str
|
|
98
95
|
r"""The address of the transaction sender."""
|
|
99
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
|
+
|
|
100
105
|
amount_out_minimum: Optional[
|
|
101
106
|
AerodromeSlipstreamSellExactlyRequestAmountOutMinimum
|
|
102
107
|
] = None
|
|
103
108
|
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
104
|
-
|
|
105
|
-
@property
|
|
106
|
-
def additional_properties(self):
|
|
107
|
-
return self.__pydantic_extra__
|
|
108
|
-
|
|
109
|
-
@additional_properties.setter
|
|
110
|
-
def additional_properties(self, value):
|
|
111
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
@@ -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
|
AerodromeSlipstreamWithdrawLiquidityProvisionParamsPercentageForWithdrawalTypedDict = TypeAliasType(
|
|
@@ -35,6 +36,7 @@ class AerodromeSlipstreamWithdrawLiquidityProvisionParamsTypedDict(TypedDict):
|
|
|
35
36
|
r"""Token ID of the NFT representing the liquidity provisioned position."""
|
|
36
37
|
percentage_for_withdrawal: AerodromeSlipstreamWithdrawLiquidityProvisionParamsPercentageForWithdrawalTypedDict
|
|
37
38
|
r"""How much liquidity to take out in percentage."""
|
|
39
|
+
action_type: Literal["AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"]
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
class AerodromeSlipstreamWithdrawLiquidityProvisionParams(BaseModel):
|
|
@@ -44,11 +46,6 @@ class AerodromeSlipstreamWithdrawLiquidityProvisionParams(BaseModel):
|
|
|
44
46
|
First, we call decrease liquidity then collect the tokens owed to the user.
|
|
45
47
|
"""
|
|
46
48
|
|
|
47
|
-
model_config = ConfigDict(
|
|
48
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
49
|
-
)
|
|
50
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
51
|
-
|
|
52
49
|
token_id: int
|
|
53
50
|
r"""Token ID of the NFT representing the liquidity provisioned position."""
|
|
54
51
|
|
|
@@ -57,10 +54,12 @@ class AerodromeSlipstreamWithdrawLiquidityProvisionParams(BaseModel):
|
|
|
57
54
|
)
|
|
58
55
|
r"""How much liquidity to take out in percentage."""
|
|
59
56
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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,10 +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 compass_api_sdk.utils import validate_const
|
|
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
|
AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict = TypeAliasType(
|
|
@@ -34,14 +35,10 @@ class AerodromeSlipstreamWithdrawLiquidityProvisionRequestTypedDict(TypedDict):
|
|
|
34
35
|
r"""The chain to use."""
|
|
35
36
|
sender: str
|
|
36
37
|
r"""The address of the transaction sender."""
|
|
38
|
+
action_type: Literal["AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"]
|
|
37
39
|
|
|
38
40
|
|
|
39
41
|
class AerodromeSlipstreamWithdrawLiquidityProvisionRequest(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
|
token_id: int
|
|
46
43
|
r"""Token ID of the NFT representing the liquidity provisioned position."""
|
|
47
44
|
|
|
@@ -56,10 +53,12 @@ class AerodromeSlipstreamWithdrawLiquidityProvisionRequest(BaseModel):
|
|
|
56
53
|
sender: str
|
|
57
54
|
r"""The address of the transaction sender."""
|
|
58
55
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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,11 +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
|
import pydantic
|
|
8
|
-
from pydantic import
|
|
9
|
-
from typing import
|
|
10
|
-
from typing_extensions import TypeAliasType, TypedDict
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from typing import Literal, Optional, Union
|
|
11
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
IncreaseAllowanceParamsTokenTypedDict = TypeAliasType(
|
|
@@ -61,16 +62,12 @@ class IncreaseAllowanceParamsTypedDict(TypedDict):
|
|
|
61
62
|
r"""The name of the contract to increase allowance for."""
|
|
62
63
|
amount: IncreaseAllowanceParamsAmountTypedDict
|
|
63
64
|
r"""The amount to increase the allowance to."""
|
|
65
|
+
action_type: Literal["ALLOWANCE_INCREASE"]
|
|
64
66
|
|
|
65
67
|
|
|
66
68
|
class IncreaseAllowanceParams(BaseModel):
|
|
67
69
|
r"""Parameters model for increasing token allowance for a contract."""
|
|
68
70
|
|
|
69
|
-
model_config = ConfigDict(
|
|
70
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
71
|
-
)
|
|
72
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
73
|
-
|
|
74
71
|
token: IncreaseAllowanceParamsToken
|
|
75
72
|
r"""The symbol or address of the token for which the allowance is increased.."""
|
|
76
73
|
|
|
@@ -80,10 +77,10 @@ class IncreaseAllowanceParams(BaseModel):
|
|
|
80
77
|
amount: IncreaseAllowanceParamsAmount
|
|
81
78
|
r"""The amount to increase the allowance to."""
|
|
82
79
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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,11 +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
|
import pydantic
|
|
9
|
-
from pydantic import
|
|
10
|
-
from typing import
|
|
11
|
-
from typing_extensions import TypeAliasType, TypedDict
|
|
10
|
+
from pydantic.functional_validators import AfterValidator
|
|
11
|
+
from typing import Literal, Optional, Union
|
|
12
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
IncreaseAllowanceRequestTokenTypedDict = TypeAliasType(
|
|
@@ -66,16 +67,12 @@ class IncreaseAllowanceRequestTypedDict(TypedDict):
|
|
|
66
67
|
r"""The chain to use."""
|
|
67
68
|
sender: str
|
|
68
69
|
r"""The address of the transaction sender."""
|
|
70
|
+
action_type: Literal["ALLOWANCE_INCREASE"]
|
|
69
71
|
|
|
70
72
|
|
|
71
73
|
class IncreaseAllowanceRequest(BaseModel):
|
|
72
74
|
r"""Request model for increasing token allowance for a contract."""
|
|
73
75
|
|
|
74
|
-
model_config = ConfigDict(
|
|
75
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
76
|
-
)
|
|
77
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
78
|
-
|
|
79
76
|
token: IncreaseAllowanceRequestToken
|
|
80
77
|
r"""The symbol or address of the token for which the allowance is increased.."""
|
|
81
78
|
|
|
@@ -91,10 +88,10 @@ class IncreaseAllowanceRequest(BaseModel):
|
|
|
91
88
|
sender: str
|
|
92
89
|
r"""The address of the transaction sender."""
|
|
93
90
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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,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
|
MorphoBorrowParamsAmountTypedDict = TypeAliasType(
|
|
@@ -29,6 +31,7 @@ class MorphoBorrowParamsTypedDict(TypedDict):
|
|
|
29
31
|
r"""Amount of the token to borrow from the market."""
|
|
30
32
|
unique_market_key: str
|
|
31
33
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
34
|
+
action_type: Literal["MORPHO_BORROW"]
|
|
32
35
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
33
36
|
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
34
37
|
receiver: NotRequired[Nullable[str]]
|
|
@@ -36,34 +39,29 @@ class MorphoBorrowParamsTypedDict(TypedDict):
|
|
|
36
39
|
|
|
37
40
|
|
|
38
41
|
class MorphoBorrowParams(BaseModel):
|
|
39
|
-
model_config = ConfigDict(
|
|
40
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
41
|
-
)
|
|
42
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
43
|
-
|
|
44
42
|
amount: MorphoBorrowParamsAmount
|
|
45
43
|
r"""Amount of the token to borrow from the market."""
|
|
46
44
|
|
|
47
45
|
unique_market_key: str
|
|
48
46
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
49
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
|
+
|
|
50
56
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
51
57
|
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
52
58
|
|
|
53
59
|
receiver: OptionalNullable[str] = UNSET
|
|
54
60
|
r"""The address of the receiver of the tokens borrowed. Defaults to the transaction sender."""
|
|
55
61
|
|
|
56
|
-
@property
|
|
57
|
-
def additional_properties(self):
|
|
58
|
-
return self.__pydantic_extra__
|
|
59
|
-
|
|
60
|
-
@additional_properties.setter
|
|
61
|
-
def additional_properties(self, value):
|
|
62
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
63
|
-
|
|
64
62
|
@model_serializer(mode="wrap")
|
|
65
63
|
def serialize_model(self, handler):
|
|
66
|
-
optional_fields = ["on_behalf_of", "receiver"]
|
|
64
|
+
optional_fields = ["action_type", "on_behalf_of", "receiver"]
|
|
67
65
|
nullable_fields = ["on_behalf_of", "receiver"]
|
|
68
66
|
null_default_fields = []
|
|
69
67
|
|
|
@@ -89,7 +87,4 @@ class MorphoBorrowParams(BaseModel):
|
|
|
89
87
|
):
|
|
90
88
|
m[k] = val
|
|
91
89
|
|
|
92
|
-
for k, v in serialized.items():
|
|
93
|
-
m[k] = v
|
|
94
|
-
|
|
95
90
|
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
|
MorphoBorrowRequestAmountTypedDict = TypeAliasType(
|
|
@@ -40,6 +42,7 @@ class MorphoBorrowRequestTypedDict(TypedDict):
|
|
|
40
42
|
chain: MorphoBorrowRequestChain
|
|
41
43
|
sender: str
|
|
42
44
|
r"""The address of the transaction sender."""
|
|
45
|
+
action_type: Literal["MORPHO_BORROW"]
|
|
43
46
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
44
47
|
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
45
48
|
receiver: NotRequired[Nullable[str]]
|
|
@@ -47,11 +50,6 @@ class MorphoBorrowRequestTypedDict(TypedDict):
|
|
|
47
50
|
|
|
48
51
|
|
|
49
52
|
class MorphoBorrowRequest(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: MorphoBorrowRequestAmount
|
|
56
54
|
r"""Amount of the token to borrow from the market."""
|
|
57
55
|
|
|
@@ -63,23 +61,23 @@ class MorphoBorrowRequest(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_BORROW"]],
|
|
67
|
+
AfterValidator(validate_const("MORPHO_BORROW")),
|
|
68
|
+
],
|
|
69
|
+
pydantic.Field(alias="action_type"),
|
|
70
|
+
] = "MORPHO_BORROW"
|
|
71
|
+
|
|
66
72
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
67
73
|
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
68
74
|
|
|
69
75
|
receiver: OptionalNullable[str] = UNSET
|
|
70
76
|
r"""The address of the receiver of the tokens borrowed. Defaults to the transaction 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 MorphoBorrowRequest(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
|
MorphoDepositParamsAmountTypedDict = TypeAliasType(
|
|
@@ -31,36 +33,32 @@ class MorphoDepositParamsTypedDict(TypedDict):
|
|
|
31
33
|
r"""The vault address you are depositing to."""
|
|
32
34
|
amount: MorphoDepositParamsAmountTypedDict
|
|
33
35
|
r"""The amount of tokens to deposit into the vault."""
|
|
36
|
+
action_type: Literal["MORPHO_DEPOSIT"]
|
|
34
37
|
receiver: NotRequired[Nullable[str]]
|
|
35
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."""
|
|
36
39
|
|
|
37
40
|
|
|
38
41
|
class MorphoDepositParams(BaseModel):
|
|
39
|
-
model_config = ConfigDict(
|
|
40
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
41
|
-
)
|
|
42
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
43
|
-
|
|
44
42
|
vault_address: str
|
|
45
43
|
r"""The vault address you are depositing to."""
|
|
46
44
|
|
|
47
45
|
amount: MorphoDepositParamsAmount
|
|
48
46
|
r"""The amount of tokens to deposit into the vault."""
|
|
49
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
|
+
|
|
50
56
|
receiver: OptionalNullable[str] = UNSET
|
|
51
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."""
|
|
52
58
|
|
|
53
|
-
@property
|
|
54
|
-
def additional_properties(self):
|
|
55
|
-
return self.__pydantic_extra__
|
|
56
|
-
|
|
57
|
-
@additional_properties.setter
|
|
58
|
-
def additional_properties(self, value):
|
|
59
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
60
|
-
|
|
61
59
|
@model_serializer(mode="wrap")
|
|
62
60
|
def serialize_model(self, handler):
|
|
63
|
-
optional_fields = ["receiver"]
|
|
61
|
+
optional_fields = ["action_type", "receiver"]
|
|
64
62
|
nullable_fields = ["receiver"]
|
|
65
63
|
null_default_fields = []
|
|
66
64
|
|
|
@@ -86,7 +84,4 @@ class MorphoDepositParams(BaseModel):
|
|
|
86
84
|
):
|
|
87
85
|
m[k] = val
|
|
88
86
|
|
|
89
|
-
for k, v in serialized.items():
|
|
90
|
-
m[k] = v
|
|
91
|
-
|
|
92
87
|
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
|
MorphoDepositRequestAmountTypedDict = TypeAliasType(
|
|
@@ -40,16 +42,12 @@ class MorphoDepositRequestTypedDict(TypedDict):
|
|
|
40
42
|
chain: MorphoDepositRequestChain
|
|
41
43
|
sender: str
|
|
42
44
|
r"""The address of the transaction sender."""
|
|
45
|
+
action_type: Literal["MORPHO_DEPOSIT"]
|
|
43
46
|
receiver: NotRequired[Nullable[str]]
|
|
44
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."""
|
|
45
48
|
|
|
46
49
|
|
|
47
50
|
class MorphoDepositRequest(BaseModel):
|
|
48
|
-
model_config = ConfigDict(
|
|
49
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
|
50
|
-
)
|
|
51
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
|
52
|
-
|
|
53
51
|
vault_address: str
|
|
54
52
|
r"""The vault address you are depositing to."""
|
|
55
53
|
|
|
@@ -61,20 +59,20 @@ class MorphoDepositRequest(BaseModel):
|
|
|
61
59
|
sender: str
|
|
62
60
|
r"""The address of the transaction sender."""
|
|
63
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
|
+
|
|
64
70
|
receiver: OptionalNullable[str] = UNSET
|
|
65
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."""
|
|
66
72
|
|
|
67
|
-
@property
|
|
68
|
-
def additional_properties(self):
|
|
69
|
-
return self.__pydantic_extra__
|
|
70
|
-
|
|
71
|
-
@additional_properties.setter
|
|
72
|
-
def additional_properties(self, value):
|
|
73
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
|
74
|
-
|
|
75
73
|
@model_serializer(mode="wrap")
|
|
76
74
|
def serialize_model(self, handler):
|
|
77
|
-
optional_fields = ["receiver"]
|
|
75
|
+
optional_fields = ["action_type", "receiver"]
|
|
78
76
|
nullable_fields = ["receiver"]
|
|
79
77
|
null_default_fields = []
|
|
80
78
|
|
|
@@ -100,7 +98,4 @@ class MorphoDepositRequest(BaseModel):
|
|
|
100
98
|
):
|
|
101
99
|
m[k] = val
|
|
102
100
|
|
|
103
|
-
for k, v in serialized.items():
|
|
104
|
-
m[k] = v
|
|
105
|
-
|
|
106
101
|
return m
|