compass_api_sdk 0.9.38__py3-none-any.whl → 0.9.40__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 +3 -3
- compass_api_sdk/erc_4626_vaults.py +6 -2
- compass_api_sdk/models/__init__.py +31 -58
- compass_api_sdk/models/pendle_quoteop.py +128 -0
- compass_api_sdk/models/pendlegetquoteresponse.py +15 -0
- compass_api_sdk/morpho.py +8 -214
- compass_api_sdk/pendle.py +218 -0
- {compass_api_sdk-0.9.38.dist-info → compass_api_sdk-0.9.40.dist-info}/METADATA +2 -2
- {compass_api_sdk-0.9.38.dist-info → compass_api_sdk-0.9.40.dist-info}/RECORD +10 -16
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_asset.py +0 -60
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_vaultstate.py +0 -53
- compass_api_sdk/models/curator.py +0 -53
- compass_api_sdk/models/liquidity.py +0 -16
- compass_api_sdk/models/metadata.py +0 -50
- compass_api_sdk/models/morpho_vault_positionop.py +0 -37
- compass_api_sdk/models/morphocheckvaultpositionresponse.py +0 -20
- compass_api_sdk/models/morphogetvaultresponse.py +0 -86
- {compass_api_sdk-0.9.38.dist-info → compass_api_sdk-0.9.40.dist-info}/WHEEL +0 -0
compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_vaultstate.py
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from compass_api_sdk.types import BaseModel
|
|
5
|
-
import pydantic
|
|
6
|
-
from typing_extensions import Annotated, TypedDict
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class CompassAPIBackendModelsMorphoReadResponseGetVaultVaultStateTypedDict(TypedDict):
|
|
10
|
-
apy: str
|
|
11
|
-
net_apy: str
|
|
12
|
-
daily_apy: str
|
|
13
|
-
daily_net_apy: str
|
|
14
|
-
weekly_apy: str
|
|
15
|
-
weekly_net_apy: str
|
|
16
|
-
monthly_apy: str
|
|
17
|
-
monthly_net_apy: str
|
|
18
|
-
yearly_apy: str
|
|
19
|
-
yearly_net_apy: str
|
|
20
|
-
all_time_apy: str
|
|
21
|
-
all_time_net_apy: str
|
|
22
|
-
total_assets: str
|
|
23
|
-
total_assets_usd: str
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class CompassAPIBackendModelsMorphoReadResponseGetVaultVaultState(BaseModel):
|
|
27
|
-
apy: str
|
|
28
|
-
|
|
29
|
-
net_apy: Annotated[str, pydantic.Field(alias="netApy")]
|
|
30
|
-
|
|
31
|
-
daily_apy: Annotated[str, pydantic.Field(alias="dailyApy")]
|
|
32
|
-
|
|
33
|
-
daily_net_apy: Annotated[str, pydantic.Field(alias="dailyNetApy")]
|
|
34
|
-
|
|
35
|
-
weekly_apy: Annotated[str, pydantic.Field(alias="weeklyApy")]
|
|
36
|
-
|
|
37
|
-
weekly_net_apy: Annotated[str, pydantic.Field(alias="weeklyNetApy")]
|
|
38
|
-
|
|
39
|
-
monthly_apy: Annotated[str, pydantic.Field(alias="monthlyApy")]
|
|
40
|
-
|
|
41
|
-
monthly_net_apy: Annotated[str, pydantic.Field(alias="monthlyNetApy")]
|
|
42
|
-
|
|
43
|
-
yearly_apy: Annotated[str, pydantic.Field(alias="yearlyApy")]
|
|
44
|
-
|
|
45
|
-
yearly_net_apy: Annotated[str, pydantic.Field(alias="yearlyNetApy")]
|
|
46
|
-
|
|
47
|
-
all_time_apy: Annotated[str, pydantic.Field(alias="allTimeApy")]
|
|
48
|
-
|
|
49
|
-
all_time_net_apy: Annotated[str, pydantic.Field(alias="allTimeNetApy")]
|
|
50
|
-
|
|
51
|
-
total_assets: Annotated[str, pydantic.Field(alias="totalAssets")]
|
|
52
|
-
|
|
53
|
-
total_assets_usd: Annotated[str, pydantic.Field(alias="totalAssetsUsd")]
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
5
|
-
from pydantic import model_serializer
|
|
6
|
-
from typing_extensions import TypedDict
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class CuratorTypedDict(TypedDict):
|
|
10
|
-
name: str
|
|
11
|
-
verified: bool
|
|
12
|
-
url: Nullable[str]
|
|
13
|
-
image: Nullable[str]
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class Curator(BaseModel):
|
|
17
|
-
name: str
|
|
18
|
-
|
|
19
|
-
verified: bool
|
|
20
|
-
|
|
21
|
-
url: Nullable[str]
|
|
22
|
-
|
|
23
|
-
image: Nullable[str]
|
|
24
|
-
|
|
25
|
-
@model_serializer(mode="wrap")
|
|
26
|
-
def serialize_model(self, handler):
|
|
27
|
-
optional_fields = []
|
|
28
|
-
nullable_fields = ["url", "image"]
|
|
29
|
-
null_default_fields = []
|
|
30
|
-
|
|
31
|
-
serialized = handler(self)
|
|
32
|
-
|
|
33
|
-
m = {}
|
|
34
|
-
|
|
35
|
-
for n, f in type(self).model_fields.items():
|
|
36
|
-
k = f.alias or n
|
|
37
|
-
val = serialized.get(k)
|
|
38
|
-
serialized.pop(k, None)
|
|
39
|
-
|
|
40
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
|
41
|
-
is_set = (
|
|
42
|
-
self.__pydantic_fields_set__.intersection({n})
|
|
43
|
-
or k in null_default_fields
|
|
44
|
-
) # pylint: disable=no-member
|
|
45
|
-
|
|
46
|
-
if val is not None and val != UNSET_SENTINEL:
|
|
47
|
-
m[k] = val
|
|
48
|
-
elif val != UNSET_SENTINEL and (
|
|
49
|
-
not k in optional_fields or (optional_nullable and is_set)
|
|
50
|
-
):
|
|
51
|
-
m[k] = val
|
|
52
|
-
|
|
53
|
-
return m
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from compass_api_sdk.types import BaseModel
|
|
5
|
-
from typing_extensions import TypedDict
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class LiquidityTypedDict(TypedDict):
|
|
9
|
-
underlying: str
|
|
10
|
-
usd: str
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class Liquidity(BaseModel):
|
|
14
|
-
underlying: str
|
|
15
|
-
|
|
16
|
-
usd: str
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from .curator import Curator, CuratorTypedDict
|
|
5
|
-
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
6
|
-
import pydantic
|
|
7
|
-
from pydantic import model_serializer
|
|
8
|
-
from typing import List
|
|
9
|
-
from typing_extensions import Annotated, TypedDict
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class MetadataTypedDict(TypedDict):
|
|
13
|
-
forum_link: Nullable[str]
|
|
14
|
-
curators: List[CuratorTypedDict]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class Metadata(BaseModel):
|
|
18
|
-
forum_link: Annotated[Nullable[str], pydantic.Field(alias="forumLink")]
|
|
19
|
-
|
|
20
|
-
curators: List[Curator]
|
|
21
|
-
|
|
22
|
-
@model_serializer(mode="wrap")
|
|
23
|
-
def serialize_model(self, handler):
|
|
24
|
-
optional_fields = []
|
|
25
|
-
nullable_fields = ["forumLink"]
|
|
26
|
-
null_default_fields = []
|
|
27
|
-
|
|
28
|
-
serialized = handler(self)
|
|
29
|
-
|
|
30
|
-
m = {}
|
|
31
|
-
|
|
32
|
-
for n, f in type(self).model_fields.items():
|
|
33
|
-
k = f.alias or n
|
|
34
|
-
val = serialized.get(k)
|
|
35
|
-
serialized.pop(k, None)
|
|
36
|
-
|
|
37
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
|
38
|
-
is_set = (
|
|
39
|
-
self.__pydantic_fields_set__.intersection({n})
|
|
40
|
-
or k in null_default_fields
|
|
41
|
-
) # pylint: disable=no-member
|
|
42
|
-
|
|
43
|
-
if val is not None and val != UNSET_SENTINEL:
|
|
44
|
-
m[k] = val
|
|
45
|
-
elif val != UNSET_SENTINEL and (
|
|
46
|
-
not k in optional_fields or (optional_nullable and is_set)
|
|
47
|
-
):
|
|
48
|
-
m[k] = val
|
|
49
|
-
|
|
50
|
-
return m
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from compass_api_sdk.types import BaseModel
|
|
5
|
-
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
|
-
from enum import Enum
|
|
7
|
-
from typing_extensions import Annotated, TypedDict
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class MorphoVaultPositionChain(str, Enum):
|
|
11
|
-
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
12
|
-
BASE_MAINNET = "base:mainnet"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class MorphoVaultPositionRequestTypedDict(TypedDict):
|
|
16
|
-
chain: MorphoVaultPositionChain
|
|
17
|
-
user_address: str
|
|
18
|
-
r"""The user address of the desired vault position."""
|
|
19
|
-
vault_address: str
|
|
20
|
-
r"""The vault address of the desired vault position."""
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class MorphoVaultPositionRequest(BaseModel):
|
|
24
|
-
chain: Annotated[
|
|
25
|
-
MorphoVaultPositionChain,
|
|
26
|
-
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
27
|
-
] = MorphoVaultPositionChain.BASE_MAINNET
|
|
28
|
-
|
|
29
|
-
user_address: Annotated[
|
|
30
|
-
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
31
|
-
] = "0xB3B45f5aCBb58a432BDe58724c1C959E11D5A418"
|
|
32
|
-
r"""The user address of the desired vault position."""
|
|
33
|
-
|
|
34
|
-
vault_address: Annotated[
|
|
35
|
-
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
36
|
-
] = "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca"
|
|
37
|
-
r"""The vault address of the desired vault position."""
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from compass_api_sdk.types import BaseModel
|
|
5
|
-
from typing_extensions import TypedDict
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class MorphoCheckVaultPositionResponseTypedDict(TypedDict):
|
|
9
|
-
shares: int
|
|
10
|
-
r"""The number of vault shares the user holds."""
|
|
11
|
-
token_amount: str
|
|
12
|
-
r"""The amount of tokens the user has deposited."""
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class MorphoCheckVaultPositionResponse(BaseModel):
|
|
16
|
-
shares: int
|
|
17
|
-
r"""The number of vault shares the user holds."""
|
|
18
|
-
|
|
19
|
-
token_amount: str
|
|
20
|
-
r"""The amount of tokens the user has deposited."""
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from .compass_api_backend_models_morpho_read_response_get_vault_asset import (
|
|
5
|
-
CompassAPIBackendModelsMorphoReadResponseGetVaultAsset,
|
|
6
|
-
CompassAPIBackendModelsMorphoReadResponseGetVaultAssetTypedDict,
|
|
7
|
-
)
|
|
8
|
-
from .compass_api_backend_models_morpho_read_response_get_vault_vaultstate import (
|
|
9
|
-
CompassAPIBackendModelsMorphoReadResponseGetVaultVaultState,
|
|
10
|
-
CompassAPIBackendModelsMorphoReadResponseGetVaultVaultStateTypedDict,
|
|
11
|
-
)
|
|
12
|
-
from .liquidity import Liquidity, LiquidityTypedDict
|
|
13
|
-
from .metadata import Metadata, MetadataTypedDict
|
|
14
|
-
from compass_api_sdk.types import (
|
|
15
|
-
BaseModel,
|
|
16
|
-
Nullable,
|
|
17
|
-
OptionalNullable,
|
|
18
|
-
UNSET,
|
|
19
|
-
UNSET_SENTINEL,
|
|
20
|
-
)
|
|
21
|
-
from pydantic import model_serializer
|
|
22
|
-
from typing_extensions import NotRequired, TypedDict
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class MorphoGetVaultResponseTypedDict(TypedDict):
|
|
26
|
-
name: str
|
|
27
|
-
r"""The name of the Morpho vault."""
|
|
28
|
-
symbol: str
|
|
29
|
-
r"""The symbol of the Morpho vault."""
|
|
30
|
-
whitelisted: bool
|
|
31
|
-
r"""Whether the vault is whitelisted or not."""
|
|
32
|
-
state: CompassAPIBackendModelsMorphoReadResponseGetVaultVaultStateTypedDict
|
|
33
|
-
liquidity: LiquidityTypedDict
|
|
34
|
-
asset: CompassAPIBackendModelsMorphoReadResponseGetVaultAssetTypedDict
|
|
35
|
-
metadata: NotRequired[Nullable[MetadataTypedDict]]
|
|
36
|
-
r"""Metadata of the vault."""
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class MorphoGetVaultResponse(BaseModel):
|
|
40
|
-
name: str
|
|
41
|
-
r"""The name of the Morpho vault."""
|
|
42
|
-
|
|
43
|
-
symbol: str
|
|
44
|
-
r"""The symbol of the Morpho vault."""
|
|
45
|
-
|
|
46
|
-
whitelisted: bool
|
|
47
|
-
r"""Whether the vault is whitelisted or not."""
|
|
48
|
-
|
|
49
|
-
state: CompassAPIBackendModelsMorphoReadResponseGetVaultVaultState
|
|
50
|
-
|
|
51
|
-
liquidity: Liquidity
|
|
52
|
-
|
|
53
|
-
asset: CompassAPIBackendModelsMorphoReadResponseGetVaultAsset
|
|
54
|
-
|
|
55
|
-
metadata: OptionalNullable[Metadata] = UNSET
|
|
56
|
-
r"""Metadata of the vault."""
|
|
57
|
-
|
|
58
|
-
@model_serializer(mode="wrap")
|
|
59
|
-
def serialize_model(self, handler):
|
|
60
|
-
optional_fields = ["metadata"]
|
|
61
|
-
nullable_fields = ["metadata"]
|
|
62
|
-
null_default_fields = []
|
|
63
|
-
|
|
64
|
-
serialized = handler(self)
|
|
65
|
-
|
|
66
|
-
m = {}
|
|
67
|
-
|
|
68
|
-
for n, f in type(self).model_fields.items():
|
|
69
|
-
k = f.alias or n
|
|
70
|
-
val = serialized.get(k)
|
|
71
|
-
serialized.pop(k, None)
|
|
72
|
-
|
|
73
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
|
74
|
-
is_set = (
|
|
75
|
-
self.__pydantic_fields_set__.intersection({n})
|
|
76
|
-
or k in null_default_fields
|
|
77
|
-
) # pylint: disable=no-member
|
|
78
|
-
|
|
79
|
-
if val is not None and val != UNSET_SENTINEL:
|
|
80
|
-
m[k] = val
|
|
81
|
-
elif val != UNSET_SENTINEL and (
|
|
82
|
-
not k in optional_fields or (optional_nullable and is_set)
|
|
83
|
-
):
|
|
84
|
-
m[k] = val
|
|
85
|
-
|
|
86
|
-
return m
|
|
File without changes
|