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.

Files changed (73) hide show
  1. compass_api_sdk/_version.py +2 -2
  2. compass_api_sdk/models/__init__.py +0 -3
  3. compass_api_sdk/models/aaveborrowparams.py +15 -3
  4. compass_api_sdk/models/aaveborrowrequest.py +15 -3
  5. compass_api_sdk/models/aaverepayparams.py +15 -3
  6. compass_api_sdk/models/aaverepayrequest.py +15 -3
  7. compass_api_sdk/models/aavesupplyparams.py +15 -3
  8. compass_api_sdk/models/aavesupplyrequest.py +15 -3
  9. compass_api_sdk/models/aavewithdrawparams.py +14 -2
  10. compass_api_sdk/models/aavewithdrawrequest.py +14 -2
  11. compass_api_sdk/models/aerodromeslipstreambuyexactlyparams.py +14 -2
  12. compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +14 -2
  13. compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionparams.py +16 -2
  14. compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +16 -2
  15. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionparams.py +17 -3
  16. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +17 -3
  17. compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py +14 -2
  18. compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +14 -2
  19. compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionparams.py +16 -2
  20. compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +16 -2
  21. compass_api_sdk/models/increaseallowanceparams.py +14 -2
  22. compass_api_sdk/models/increaseallowancerequest.py +14 -2
  23. compass_api_sdk/models/morphoborrowparams.py +15 -3
  24. compass_api_sdk/models/morphoborrowrequest.py +15 -3
  25. compass_api_sdk/models/morphodepositparams.py +15 -3
  26. compass_api_sdk/models/morphodepositrequest.py +15 -3
  27. compass_api_sdk/models/morphorepayparams.py +15 -3
  28. compass_api_sdk/models/morphorepayrequest.py +15 -3
  29. compass_api_sdk/models/morphosetvaultallowanceparams.py +14 -2
  30. compass_api_sdk/models/morphosetvaultallowancerequest.py +14 -2
  31. compass_api_sdk/models/morphosupplycollateralparams.py +15 -3
  32. compass_api_sdk/models/morphosupplycollateralrequest.py +15 -3
  33. compass_api_sdk/models/morphowithdrawcollateralparams.py +15 -3
  34. compass_api_sdk/models/morphowithdrawcollateralrequest.py +15 -3
  35. compass_api_sdk/models/morphowithdrawparams.py +15 -3
  36. compass_api_sdk/models/morphowithdrawrequest.py +15 -3
  37. compass_api_sdk/models/pendlebuyptparams.py +14 -2
  38. compass_api_sdk/models/pendlebuyptrequest.py +14 -2
  39. compass_api_sdk/models/pendlebuyytparams.py +14 -2
  40. compass_api_sdk/models/pendlebuyytrequest.py +14 -2
  41. compass_api_sdk/models/pendlesellptparams.py +14 -2
  42. compass_api_sdk/models/pendlesellptrequest.py +14 -2
  43. compass_api_sdk/models/pendlesellytparams.py +14 -2
  44. compass_api_sdk/models/pendlesellytrequest.py +14 -2
  45. compass_api_sdk/models/skybuyparams.py +13 -2
  46. compass_api_sdk/models/skybuyrequest.py +8 -0
  47. compass_api_sdk/models/skydepositparams.py +15 -3
  48. compass_api_sdk/models/skydepositrequest.py +10 -1
  49. compass_api_sdk/models/skysellparams.py +13 -2
  50. compass_api_sdk/models/skysellrequest.py +8 -0
  51. compass_api_sdk/models/skywithdrawparams.py +15 -3
  52. compass_api_sdk/models/skywithdrawrequest.py +10 -1
  53. compass_api_sdk/models/tokentransfererc20params.py +14 -2
  54. compass_api_sdk/models/tokentransferrequest.py +14 -2
  55. compass_api_sdk/models/uniswapbuyexactlyparams.py +14 -2
  56. compass_api_sdk/models/uniswapbuyexactlyrequest.py +14 -2
  57. compass_api_sdk/models/uniswapincreaseliquidityprovisionparams.py +14 -2
  58. compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +14 -2
  59. compass_api_sdk/models/uniswapmintliquidityprovisionparams.py +15 -3
  60. compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +15 -3
  61. compass_api_sdk/models/uniswapsellexactlyparams.py +14 -2
  62. compass_api_sdk/models/uniswapsellexactlyrequest.py +14 -2
  63. compass_api_sdk/models/uniswapwithdrawliquidityprovisionparams.py +14 -2
  64. compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +14 -2
  65. compass_api_sdk/models/unwrapwethparams.py +14 -2
  66. compass_api_sdk/models/unwrapwethrequest.py +14 -2
  67. compass_api_sdk/models/useroperation.py +72 -56
  68. compass_api_sdk/models/wrapethparams.py +13 -2
  69. compass_api_sdk/models/wrapethrequest.py +13 -2
  70. {compass_api_sdk-0.9.0.dist-info → compass_api_sdk-0.9.1.dist-info}/METADATA +1 -1
  71. {compass_api_sdk-0.9.0.dist-info → compass_api_sdk-0.9.1.dist-info}/RECORD +72 -73
  72. compass_api_sdk/models/multicallactiontype.py +0 -40
  73. {compass_api_sdk-0.9.0.dist-info → compass_api_sdk-0.9.1.dist-info}/WHEEL +0 -0
@@ -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 typing import Union
14
- from typing_extensions import NotRequired, TypeAliasType, TypedDict
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
  MorphoWithdrawCollateralRequestAmountTypedDict = TypeAliasType(
@@ -39,6 +42,7 @@ class MorphoWithdrawCollateralRequestTypedDict(TypedDict):
39
42
  chain: MorphoWithdrawCollateralRequestChain
40
43
  sender: str
41
44
  r"""The address of the transaction sender."""
45
+ action_type: Literal["MORPHO_WITHDRAW_COLLATERAL"]
42
46
  on_behalf_of: NotRequired[Nullable[str]]
43
47
  r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
44
48
  receiver: NotRequired[Nullable[str]]
@@ -57,6 +61,14 @@ class MorphoWithdrawCollateralRequest(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_WITHDRAW_COLLATERAL"]],
67
+ AfterValidator(validate_const("MORPHO_WITHDRAW_COLLATERAL")),
68
+ ],
69
+ pydantic.Field(alias="action_type"),
70
+ ] = "MORPHO_WITHDRAW_COLLATERAL"
71
+
60
72
  on_behalf_of: OptionalNullable[str] = UNSET
61
73
  r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
62
74
 
@@ -65,7 +77,7 @@ class MorphoWithdrawCollateralRequest(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 typing import Any
13
- from typing_extensions import NotRequired, TypedDict
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 MorphoWithdrawParamsTypedDict(TypedDict):
@@ -18,6 +21,7 @@ class MorphoWithdrawParamsTypedDict(TypedDict):
18
21
  r"""The vault address you are withdrawing from."""
19
22
  amount: Any
20
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"]
21
25
  receiver: NotRequired[Nullable[str]]
22
26
  r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
23
27
 
@@ -29,12 +33,20 @@ class MorphoWithdrawParams(BaseModel):
29
33
  amount: Any
30
34
  r"""The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn."""
31
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
+
32
44
  receiver: OptionalNullable[str] = UNSET
33
45
  r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
34
46
 
35
47
  @model_serializer(mode="wrap")
36
48
  def serialize_model(self, handler):
37
- optional_fields = ["receiver"]
49
+ optional_fields = ["action_type", "receiver"]
38
50
  nullable_fields = ["receiver"]
39
51
  null_default_fields = []
40
52
 
@@ -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 typing import Any
14
- from typing_extensions import NotRequired, TypedDict
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 MorphoWithdrawRequestChain(str, Enum):
@@ -27,6 +30,7 @@ class MorphoWithdrawRequestTypedDict(TypedDict):
27
30
  chain: MorphoWithdrawRequestChain
28
31
  sender: str
29
32
  r"""The address of the transaction sender."""
33
+ action_type: Literal["MORPHO_WITHDRAW"]
30
34
  receiver: NotRequired[Nullable[str]]
31
35
  r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
32
36
 
@@ -43,12 +47,20 @@ class MorphoWithdrawRequest(BaseModel):
43
47
  sender: str
44
48
  r"""The address of the transaction sender."""
45
49
 
50
+ ACTION_TYPE: Annotated[
51
+ Annotated[
52
+ Optional[Literal["MORPHO_WITHDRAW"]],
53
+ AfterValidator(validate_const("MORPHO_WITHDRAW")),
54
+ ],
55
+ pydantic.Field(alias="action_type"),
56
+ ] = "MORPHO_WITHDRAW"
57
+
46
58
  receiver: OptionalNullable[str] = UNSET
47
59
  r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
48
60
 
49
61
  @model_serializer(mode="wrap")
50
62
  def serialize_model(self, handler):
51
- optional_fields = ["receiver"]
63
+ optional_fields = ["action_type", "receiver"]
52
64
  nullable_fields = ["receiver"]
53
65
  null_default_fields = []
54
66
 
@@ -2,8 +2,11 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from compass_api_sdk.types import BaseModel
5
- from typing import Union
6
- from typing_extensions import TypeAliasType, TypedDict
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
  PendleBuyPtParamsAmountTypedDict = TypeAliasType(
@@ -21,6 +24,7 @@ class PendleBuyPtParamsTypedDict(TypedDict):
21
24
  r"""The address of the market identifying which Principal Token (PT) you would like to buy."""
22
25
  amount: PendleBuyPtParamsAmountTypedDict
23
26
  r"""The amount of market's Underlying Token you would like to sell for market's Principal Token (PT)."""
27
+ action_type: Literal["PENDLE_BUY_PT"]
24
28
 
25
29
 
26
30
  class PendleBuyPtParams(BaseModel):
@@ -29,3 +33,11 @@ class PendleBuyPtParams(BaseModel):
29
33
 
30
34
  amount: PendleBuyPtParamsAmount
31
35
  r"""The amount of market's Underlying Token you would like to sell for market's Principal Token (PT)."""
36
+
37
+ ACTION_TYPE: Annotated[
38
+ Annotated[
39
+ Optional[Literal["PENDLE_BUY_PT"]],
40
+ AfterValidator(validate_const("PENDLE_BUY_PT")),
41
+ ],
42
+ pydantic.Field(alias="action_type"),
43
+ ] = "PENDLE_BUY_PT"
@@ -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 typing import Union
7
- from typing_extensions import TypeAliasType, TypedDict
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
  PendleBuyPtRequestAmountTypedDict = TypeAliasType(
@@ -26,6 +29,7 @@ class PendleBuyPtRequestTypedDict(TypedDict):
26
29
  r"""The chain to use."""
27
30
  sender: str
28
31
  r"""The address of the transaction sender."""
32
+ action_type: Literal["PENDLE_BUY_PT"]
29
33
 
30
34
 
31
35
  class PendleBuyPtRequest(BaseModel):
@@ -40,3 +44,11 @@ class PendleBuyPtRequest(BaseModel):
40
44
 
41
45
  sender: str
42
46
  r"""The address of the transaction sender."""
47
+
48
+ ACTION_TYPE: Annotated[
49
+ Annotated[
50
+ Optional[Literal["PENDLE_BUY_PT"]],
51
+ AfterValidator(validate_const("PENDLE_BUY_PT")),
52
+ ],
53
+ pydantic.Field(alias="action_type"),
54
+ ] = "PENDLE_BUY_PT"
@@ -2,8 +2,11 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from compass_api_sdk.types import BaseModel
5
- from typing import Union
6
- from typing_extensions import TypeAliasType, TypedDict
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
  PendleBuyYtParamsAmountTypedDict = TypeAliasType(
@@ -21,6 +24,7 @@ class PendleBuyYtParamsTypedDict(TypedDict):
21
24
  r"""The address of the market identifying which Yield Token (YT) you would like to buy."""
22
25
  amount: PendleBuyYtParamsAmountTypedDict
23
26
  r"""The amount of market's Underlying Token you would like to sell for market's Yield Token (YT)."""
27
+ action_type: Literal["PENDLE_BUY_YT"]
24
28
 
25
29
 
26
30
  class PendleBuyYtParams(BaseModel):
@@ -29,3 +33,11 @@ class PendleBuyYtParams(BaseModel):
29
33
 
30
34
  amount: PendleBuyYtParamsAmount
31
35
  r"""The amount of market's Underlying Token you would like to sell for market's Yield Token (YT)."""
36
+
37
+ ACTION_TYPE: Annotated[
38
+ Annotated[
39
+ Optional[Literal["PENDLE_BUY_YT"]],
40
+ AfterValidator(validate_const("PENDLE_BUY_YT")),
41
+ ],
42
+ pydantic.Field(alias="action_type"),
43
+ ] = "PENDLE_BUY_YT"
@@ -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 typing import Union
7
- from typing_extensions import TypeAliasType, TypedDict
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
  PendleBuyYtRequestAmountTypedDict = TypeAliasType(
@@ -26,6 +29,7 @@ class PendleBuyYtRequestTypedDict(TypedDict):
26
29
  r"""The chain to use."""
27
30
  sender: str
28
31
  r"""The address of the transaction sender."""
32
+ action_type: Literal["PENDLE_BUY_YT"]
29
33
 
30
34
 
31
35
  class PendleBuyYtRequest(BaseModel):
@@ -40,3 +44,11 @@ class PendleBuyYtRequest(BaseModel):
40
44
 
41
45
  sender: str
42
46
  r"""The address of the transaction sender."""
47
+
48
+ ACTION_TYPE: Annotated[
49
+ Annotated[
50
+ Optional[Literal["PENDLE_BUY_YT"]],
51
+ AfterValidator(validate_const("PENDLE_BUY_YT")),
52
+ ],
53
+ pydantic.Field(alias="action_type"),
54
+ ] = "PENDLE_BUY_YT"
@@ -2,8 +2,11 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from compass_api_sdk.types import BaseModel
5
- from typing import Union
6
- from typing_extensions import TypeAliasType, TypedDict
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
  PendleSellPtParamsAmountTypedDict = TypeAliasType(
@@ -21,6 +24,7 @@ class PendleSellPtParamsTypedDict(TypedDict):
21
24
  r"""The address of the market identifying which Principal Token (PT) you would like to sell."""
22
25
  amount: PendleSellPtParamsAmountTypedDict
23
26
  r"""The amount of market's Principal Token (PT) you would like to sell for market's Underlying Token."""
27
+ action_type: Literal["PENDLE_SELL_PT"]
24
28
 
25
29
 
26
30
  class PendleSellPtParams(BaseModel):
@@ -29,3 +33,11 @@ class PendleSellPtParams(BaseModel):
29
33
 
30
34
  amount: PendleSellPtParamsAmount
31
35
  r"""The amount of market's Principal Token (PT) you would like to sell for market's Underlying Token."""
36
+
37
+ ACTION_TYPE: Annotated[
38
+ Annotated[
39
+ Optional[Literal["PENDLE_SELL_PT"]],
40
+ AfterValidator(validate_const("PENDLE_SELL_PT")),
41
+ ],
42
+ pydantic.Field(alias="action_type"),
43
+ ] = "PENDLE_SELL_PT"
@@ -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 typing import Union
7
- from typing_extensions import TypeAliasType, TypedDict
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
  PendleSellPtRequestAmountTypedDict = TypeAliasType(
@@ -28,6 +31,7 @@ class PendleSellPtRequestTypedDict(TypedDict):
28
31
  r"""The chain to use."""
29
32
  sender: str
30
33
  r"""The address of the transaction sender."""
34
+ action_type: Literal["PENDLE_SELL_PT"]
31
35
 
32
36
 
33
37
  class PendleSellPtRequest(BaseModel):
@@ -42,3 +46,11 @@ class PendleSellPtRequest(BaseModel):
42
46
 
43
47
  sender: str
44
48
  r"""The address of the transaction sender."""
49
+
50
+ ACTION_TYPE: Annotated[
51
+ Annotated[
52
+ Optional[Literal["PENDLE_SELL_PT"]],
53
+ AfterValidator(validate_const("PENDLE_SELL_PT")),
54
+ ],
55
+ pydantic.Field(alias="action_type"),
56
+ ] = "PENDLE_SELL_PT"
@@ -2,8 +2,11 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from compass_api_sdk.types import BaseModel
5
- from typing import Union
6
- from typing_extensions import TypeAliasType, TypedDict
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
  PendleSellYtParamsAmountTypedDict = TypeAliasType(
@@ -21,6 +24,7 @@ class PendleSellYtParamsTypedDict(TypedDict):
21
24
  r"""The address of the market identifying which Yield Token (YT) you would like to sell."""
22
25
  amount: PendleSellYtParamsAmountTypedDict
23
26
  r"""The amount of market's Yield Token (YT) you would like to sell for market's Underlying Token."""
27
+ action_type: Literal["PENDLE_SELL_YT"]
24
28
 
25
29
 
26
30
  class PendleSellYtParams(BaseModel):
@@ -29,3 +33,11 @@ class PendleSellYtParams(BaseModel):
29
33
 
30
34
  amount: PendleSellYtParamsAmount
31
35
  r"""The amount of market's Yield Token (YT) you would like to sell for market's Underlying Token."""
36
+
37
+ ACTION_TYPE: Annotated[
38
+ Annotated[
39
+ Optional[Literal["PENDLE_SELL_YT"]],
40
+ AfterValidator(validate_const("PENDLE_SELL_YT")),
41
+ ],
42
+ pydantic.Field(alias="action_type"),
43
+ ] = "PENDLE_SELL_YT"
@@ -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 typing import Union
7
- from typing_extensions import TypeAliasType, TypedDict
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
  PendleSellYtRequestAmountTypedDict = TypeAliasType(
@@ -28,6 +31,7 @@ class PendleSellYtRequestTypedDict(TypedDict):
28
31
  r"""The chain to use."""
29
32
  sender: str
30
33
  r"""The address of the transaction sender."""
34
+ action_type: Literal["PENDLE_SELL_YT"]
31
35
 
32
36
 
33
37
  class PendleSellYtRequest(BaseModel):
@@ -42,3 +46,11 @@ class PendleSellYtRequest(BaseModel):
42
46
 
43
47
  sender: str
44
48
  r"""The address of the transaction sender."""
49
+
50
+ ACTION_TYPE: Annotated[
51
+ Annotated[
52
+ Optional[Literal["PENDLE_SELL_YT"]],
53
+ AfterValidator(validate_const("PENDLE_SELL_YT")),
54
+ ],
55
+ pydantic.Field(alias="action_type"),
56
+ ] = "PENDLE_SELL_YT"
@@ -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
- from typing import Union
7
- from typing_extensions import TypeAliasType, TypedDict
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
  class SkyBuyParamsTokenIn(str, Enum):
@@ -29,6 +32,7 @@ class SkyBuyParamsTypedDict(TypedDict):
29
32
  r"""The token you would like to swap 1:1 for USDS. Choose from DAI or USDC."""
30
33
  amount: SkyBuyParamsAmountTypedDict
31
34
  r"""The amount of USDS you would like to buy 1:1 with 'token_in'."""
35
+ action_type: Literal["SKY_BUY"]
32
36
 
33
37
 
34
38
  class SkyBuyParams(BaseModel):
@@ -37,3 +41,10 @@ class SkyBuyParams(BaseModel):
37
41
 
38
42
  amount: SkyBuyParamsAmount
39
43
  r"""The amount of USDS you would like to buy 1:1 with 'token_in'."""
44
+
45
+ ACTION_TYPE: Annotated[
46
+ Annotated[
47
+ Optional[Literal["SKY_BUY"]], AfterValidator(validate_const("SKY_BUY"))
48
+ ],
49
+ pydantic.Field(alias="action_type"),
50
+ ] = "SKY_BUY"
@@ -34,6 +34,7 @@ class SkyBuyRequestTypedDict(TypedDict):
34
34
  r"""The amount of USDS you would like to buy 1:1 with 'token_in'."""
35
35
  sender: str
36
36
  r"""The address of the transaction sender."""
37
+ action_type: Literal["SKY_BUY"]
37
38
  chain: Literal["ethereum:mainnet"]
38
39
 
39
40
 
@@ -47,6 +48,13 @@ class SkyBuyRequest(BaseModel):
47
48
  sender: str
48
49
  r"""The address of the transaction sender."""
49
50
 
51
+ ACTION_TYPE: Annotated[
52
+ Annotated[
53
+ Optional[Literal["SKY_BUY"]], AfterValidator(validate_const("SKY_BUY"))
54
+ ],
55
+ pydantic.Field(alias="action_type"),
56
+ ] = "SKY_BUY"
57
+
50
58
  CHAIN: Annotated[
51
59
  Annotated[
52
60
  Optional[Literal["ethereum:mainnet"]],
@@ -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 typing import Union
13
- from typing_extensions import NotRequired, TypeAliasType, TypedDict
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
  SkyDepositParamsAmountTypedDict = TypeAliasType(
@@ -26,6 +29,7 @@ r"""The amount of USDS you would like to deposit for sUSDS to earn yield."""
26
29
  class SkyDepositParamsTypedDict(TypedDict):
27
30
  amount: SkyDepositParamsAmountTypedDict
28
31
  r"""The amount of USDS you would like to deposit for sUSDS to earn yield."""
32
+ action_type: Literal["SKY_DEPOSIT"]
29
33
  receiver: NotRequired[Nullable[str]]
30
34
  r"""The address which will receive the sUSDS. Defaults to the sender."""
31
35
 
@@ -34,12 +38,20 @@ class SkyDepositParams(BaseModel):
34
38
  amount: SkyDepositParamsAmount
35
39
  r"""The amount of USDS you would like to deposit for sUSDS to earn yield."""
36
40
 
41
+ ACTION_TYPE: Annotated[
42
+ Annotated[
43
+ Optional[Literal["SKY_DEPOSIT"]],
44
+ AfterValidator(validate_const("SKY_DEPOSIT")),
45
+ ],
46
+ pydantic.Field(alias="action_type"),
47
+ ] = "SKY_DEPOSIT"
48
+
37
49
  receiver: OptionalNullable[str] = UNSET
38
50
  r"""The address which will receive the sUSDS. Defaults to the sender."""
39
51
 
40
52
  @model_serializer(mode="wrap")
41
53
  def serialize_model(self, handler):
42
- optional_fields = ["receiver"]
54
+ optional_fields = ["action_type", "receiver"]
43
55
  nullable_fields = ["receiver"]
44
56
  null_default_fields = []
45
57
 
@@ -31,6 +31,7 @@ class SkyDepositRequestTypedDict(TypedDict):
31
31
  r"""The amount of USDS you would like to deposit for sUSDS to earn yield."""
32
32
  sender: str
33
33
  r"""The address of the transaction sender."""
34
+ action_type: Literal["SKY_DEPOSIT"]
34
35
  receiver: NotRequired[Nullable[str]]
35
36
  r"""The address which will receive the sUSDS. Defaults to the sender."""
36
37
  chain: Literal["ethereum:mainnet"]
@@ -43,6 +44,14 @@ class SkyDepositRequest(BaseModel):
43
44
  sender: str
44
45
  r"""The address of the transaction sender."""
45
46
 
47
+ ACTION_TYPE: Annotated[
48
+ Annotated[
49
+ Optional[Literal["SKY_DEPOSIT"]],
50
+ AfterValidator(validate_const("SKY_DEPOSIT")),
51
+ ],
52
+ pydantic.Field(alias="action_type"),
53
+ ] = "SKY_DEPOSIT"
54
+
46
55
  receiver: OptionalNullable[str] = UNSET
47
56
  r"""The address which will receive the sUSDS. Defaults to the sender."""
48
57
 
@@ -56,7 +65,7 @@ class SkyDepositRequest(BaseModel):
56
65
 
57
66
  @model_serializer(mode="wrap")
58
67
  def serialize_model(self, handler):
59
- optional_fields = ["receiver", "chain"]
68
+ optional_fields = ["action_type", "receiver", "chain"]
60
69
  nullable_fields = ["receiver"]
61
70
  null_default_fields = []
62
71
 
@@ -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
- from typing import Union
7
- from typing_extensions import TypeAliasType, TypedDict
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
  class SkySellParamsTokenOut(str, Enum):
@@ -29,6 +32,7 @@ class SkySellParamsTypedDict(TypedDict):
29
32
  r"""The token you would like to swap 1:1 with USDS. Choose from DAI or USDC."""
30
33
  amount: SkySellParamsAmountTypedDict
31
34
  r"""The amount of USDS you would like to sell 1:1 for 'token_out'."""
35
+ action_type: Literal["SKY_SELL"]
32
36
 
33
37
 
34
38
  class SkySellParams(BaseModel):
@@ -37,3 +41,10 @@ class SkySellParams(BaseModel):
37
41
 
38
42
  amount: SkySellParamsAmount
39
43
  r"""The amount of USDS you would like to sell 1:1 for 'token_out'."""
44
+
45
+ ACTION_TYPE: Annotated[
46
+ Annotated[
47
+ Optional[Literal["SKY_SELL"]], AfterValidator(validate_const("SKY_SELL"))
48
+ ],
49
+ pydantic.Field(alias="action_type"),
50
+ ] = "SKY_SELL"
@@ -34,6 +34,7 @@ class SkySellRequestTypedDict(TypedDict):
34
34
  r"""The amount of USDS you would like to sell 1:1 for 'token_out'."""
35
35
  sender: str
36
36
  r"""The address of the transaction sender."""
37
+ action_type: Literal["SKY_SELL"]
37
38
  chain: Literal["ethereum:mainnet"]
38
39
 
39
40
 
@@ -47,6 +48,13 @@ class SkySellRequest(BaseModel):
47
48
  sender: str
48
49
  r"""The address of the transaction sender."""
49
50
 
51
+ ACTION_TYPE: Annotated[
52
+ Annotated[
53
+ Optional[Literal["SKY_SELL"]], AfterValidator(validate_const("SKY_SELL"))
54
+ ],
55
+ pydantic.Field(alias="action_type"),
56
+ ] = "SKY_SELL"
57
+
50
58
  CHAIN: Annotated[
51
59
  Annotated[
52
60
  Optional[Literal["ethereum:mainnet"]],
@@ -8,14 +8,18 @@ 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 typing import Any
13
- from typing_extensions import NotRequired, TypedDict
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 SkyWithdrawParamsTypedDict(TypedDict):
17
20
  amount: Any
18
21
  r"""The amount of USDS you would like to withdraw. If set to 'ALL', your total deposited USDS amount will be withdrawn."""
22
+ action_type: Literal["SKY_WITHDRAW"]
19
23
  receiver: NotRequired[Nullable[str]]
20
24
  r"""The address which will receive the withdrawn USDS. Defaults to the sender."""
21
25
 
@@ -24,12 +28,20 @@ class SkyWithdrawParams(BaseModel):
24
28
  amount: Any
25
29
  r"""The amount of USDS you would like to withdraw. If set to 'ALL', your total deposited USDS amount will be withdrawn."""
26
30
 
31
+ ACTION_TYPE: Annotated[
32
+ Annotated[
33
+ Optional[Literal["SKY_WITHDRAW"]],
34
+ AfterValidator(validate_const("SKY_WITHDRAW")),
35
+ ],
36
+ pydantic.Field(alias="action_type"),
37
+ ] = "SKY_WITHDRAW"
38
+
27
39
  receiver: OptionalNullable[str] = UNSET
28
40
  r"""The address which will receive the withdrawn USDS. Defaults to the sender."""
29
41
 
30
42
  @model_serializer(mode="wrap")
31
43
  def serialize_model(self, handler):
32
- optional_fields = ["receiver"]
44
+ optional_fields = ["action_type", "receiver"]
33
45
  nullable_fields = ["receiver"]
34
46
  null_default_fields = []
35
47