compass_api_sdk 0.5.2__py3-none-any.whl → 0.5.4__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.
- compass_api_sdk/_version.py +2 -2
- compass_api_sdk/aave_v3.py +120 -0
- compass_api_sdk/aerodrome_slipstream.py +32 -0
- compass_api_sdk/models/__init__.py +208 -1
- compass_api_sdk/models/aave_avg_rateop.py +18 -1
- compass_api_sdk/models/aave_historical_transactionsop.py +22 -2
- compass_api_sdk/models/aave_liquidity_changeop.py +20 -1
- compass_api_sdk/models/aave_rateop.py +18 -1
- compass_api_sdk/models/aave_reserve_overviewop.py +20 -1
- compass_api_sdk/models/aave_std_rateop.py +18 -1
- compass_api_sdk/models/aave_token_priceop.py +20 -1
- compass_api_sdk/models/aave_user_position_per_tokenop.py +22 -1
- compass_api_sdk/models/aave_user_position_summaryop.py +22 -1
- compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +22 -2
- compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +22 -2
- compass_api_sdk/models/generic_allowanceop.py +20 -2
- compass_api_sdk/models/generic_ensop.py +18 -2
- compass_api_sdk/models/generic_portfolioop.py +20 -2
- compass_api_sdk/models/generic_supported_tokensop.py +22 -1
- compass_api_sdk/models/generic_visualize_portfolioop.py +22 -2
- compass_api_sdk/models/morpho_market_positionop.py +20 -1
- compass_api_sdk/models/morpho_marketop.py +20 -1
- compass_api_sdk/models/morpho_marketsop.py +21 -2
- compass_api_sdk/models/morpho_user_positionop.py +20 -1
- compass_api_sdk/models/morpho_vault_positionop.py +20 -1
- compass_api_sdk/models/morpho_vaultop.py +18 -1
- compass_api_sdk/models/morpho_vaultsop.py +21 -2
- compass_api_sdk/models/multicallauthorizationrequest.py +15 -1
- compass_api_sdk/models/pendle_marketop.py +20 -1
- compass_api_sdk/models/pendle_positionop.py +20 -1
- compass_api_sdk/models/sky_positionop.py +18 -2
- compass_api_sdk/models/token_addressop.py +20 -1
- compass_api_sdk/models/token_balanceop.py +20 -2
- compass_api_sdk/models/uniswap_liquidity_provision_in_rangeop.py +22 -1
- compass_api_sdk/models/uniswap_liquidity_provision_positionsop.py +22 -2
- compass_api_sdk/models/uniswap_pool_priceop.py +20 -1
- compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +22 -2
- compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +22 -2
- compass_api_sdk/morpho.py +86 -0
- compass_api_sdk/pendle.py +25 -5
- compass_api_sdk/sky.py +10 -0
- compass_api_sdk/token_sdk.py +20 -0
- compass_api_sdk/transaction_batching.py +6 -0
- compass_api_sdk/uniswap_v3.py +74 -0
- compass_api_sdk/universal.py +62 -0
- {compass_api_sdk-0.5.2.dist-info → compass_api_sdk-0.5.4.dist-info}/METADATA +1 -1
- {compass_api_sdk-0.5.2.dist-info → compass_api_sdk-0.5.4.dist-info}/RECORD +48 -48
- {compass_api_sdk-0.5.2.dist-info → compass_api_sdk-0.5.4.dist-info}/WHEEL +0 -0
|
@@ -4,7 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
7
|
+
from typing import Optional, Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class GenericSupportedTokensChain(str, Enum):
|
|
@@ -15,9 +16,23 @@ class GenericSupportedTokensChain(str, Enum):
|
|
|
15
16
|
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
GenericSupportedTokensBlockTypedDict = TypeAliasType(
|
|
20
|
+
"GenericSupportedTokensBlockTypedDict", Union[int, str]
|
|
21
|
+
)
|
|
22
|
+
r"""The block number you want to get this data at."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
GenericSupportedTokensBlock = TypeAliasType(
|
|
26
|
+
"GenericSupportedTokensBlock", Union[int, str]
|
|
27
|
+
)
|
|
28
|
+
r"""The block number you want to get this data at."""
|
|
29
|
+
|
|
30
|
+
|
|
18
31
|
class GenericSupportedTokensRequestTypedDict(TypedDict):
|
|
19
32
|
chain: GenericSupportedTokensChain
|
|
20
33
|
r"""The chain to use."""
|
|
34
|
+
block: NotRequired[GenericSupportedTokensBlockTypedDict]
|
|
35
|
+
r"""The block number you want to get this data at."""
|
|
21
36
|
|
|
22
37
|
|
|
23
38
|
class GenericSupportedTokensRequest(BaseModel):
|
|
@@ -26,3 +41,9 @@ class GenericSupportedTokensRequest(BaseModel):
|
|
|
26
41
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
27
42
|
] = GenericSupportedTokensChain.ARBITRUM_MAINNET
|
|
28
43
|
r"""The chain to use."""
|
|
44
|
+
|
|
45
|
+
block: Annotated[
|
|
46
|
+
Optional[GenericSupportedTokensBlock],
|
|
47
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
48
|
+
] = None
|
|
49
|
+
r"""The block number you want to get this data at."""
|
|
@@ -4,8 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from typing import Optional
|
|
8
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
7
|
+
from typing import Optional, Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class GenericVisualizePortfolioChain(str, Enum):
|
|
@@ -16,9 +16,23 @@ class GenericVisualizePortfolioChain(str, Enum):
|
|
|
16
16
|
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
GenericVisualizePortfolioBlockTypedDict = TypeAliasType(
|
|
20
|
+
"GenericVisualizePortfolioBlockTypedDict", Union[int, str]
|
|
21
|
+
)
|
|
22
|
+
r"""The block number you want to get this data at."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
GenericVisualizePortfolioBlock = TypeAliasType(
|
|
26
|
+
"GenericVisualizePortfolioBlock", Union[int, str]
|
|
27
|
+
)
|
|
28
|
+
r"""The block number you want to get this data at."""
|
|
29
|
+
|
|
30
|
+
|
|
19
31
|
class GenericVisualizePortfolioRequestTypedDict(TypedDict):
|
|
20
32
|
chain: GenericVisualizePortfolioChain
|
|
21
33
|
r"""The chain to use."""
|
|
34
|
+
block: NotRequired[GenericVisualizePortfolioBlockTypedDict]
|
|
35
|
+
r"""The block number you want to get this data at."""
|
|
22
36
|
user: NotRequired[str]
|
|
23
37
|
r"""The user to get portfolio for."""
|
|
24
38
|
|
|
@@ -30,6 +44,12 @@ class GenericVisualizePortfolioRequest(BaseModel):
|
|
|
30
44
|
] = GenericVisualizePortfolioChain.ARBITRUM_MAINNET
|
|
31
45
|
r"""The chain to use."""
|
|
32
46
|
|
|
47
|
+
block: Annotated[
|
|
48
|
+
Optional[GenericVisualizePortfolioBlock],
|
|
49
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
50
|
+
] = None
|
|
51
|
+
r"""The block number you want to get this data at."""
|
|
52
|
+
|
|
33
53
|
user: Annotated[
|
|
34
54
|
Optional[str],
|
|
35
55
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
@@ -4,7 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
7
|
+
from typing import Optional, Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class MorphoMarketPositionChain(str, Enum):
|
|
@@ -12,8 +13,20 @@ class MorphoMarketPositionChain(str, Enum):
|
|
|
12
13
|
BASE_MAINNET = "base:mainnet"
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
MorphoMarketPositionBlockTypedDict = TypeAliasType(
|
|
17
|
+
"MorphoMarketPositionBlockTypedDict", Union[int, str]
|
|
18
|
+
)
|
|
19
|
+
r"""The block number you want to get this data at."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
MorphoMarketPositionBlock = TypeAliasType("MorphoMarketPositionBlock", Union[int, str])
|
|
23
|
+
r"""The block number you want to get this data at."""
|
|
24
|
+
|
|
25
|
+
|
|
15
26
|
class MorphoMarketPositionRequestTypedDict(TypedDict):
|
|
16
27
|
chain: MorphoMarketPositionChain
|
|
28
|
+
block: NotRequired[MorphoMarketPositionBlockTypedDict]
|
|
29
|
+
r"""The block number you want to get this data at."""
|
|
17
30
|
user_address: str
|
|
18
31
|
r"""The user address of the desired market position."""
|
|
19
32
|
unique_market_key: str
|
|
@@ -26,6 +39,12 @@ class MorphoMarketPositionRequest(BaseModel):
|
|
|
26
39
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
27
40
|
] = MorphoMarketPositionChain.ETHEREUM_MAINNET
|
|
28
41
|
|
|
42
|
+
block: Annotated[
|
|
43
|
+
Optional[MorphoMarketPositionBlock],
|
|
44
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
45
|
+
] = None
|
|
46
|
+
r"""The block number you want to get this data at."""
|
|
47
|
+
|
|
29
48
|
user_address: Annotated[
|
|
30
49
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
31
50
|
] = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B"
|
|
@@ -4,7 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
7
|
+
from typing import Optional, Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class MorphoMarketChain(str, Enum):
|
|
@@ -12,8 +13,20 @@ class MorphoMarketChain(str, Enum):
|
|
|
12
13
|
BASE_MAINNET = "base:mainnet"
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
MorphoMarketBlockTypedDict = TypeAliasType(
|
|
17
|
+
"MorphoMarketBlockTypedDict", Union[int, str]
|
|
18
|
+
)
|
|
19
|
+
r"""The block number you want to get this data at."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
MorphoMarketBlock = TypeAliasType("MorphoMarketBlock", Union[int, str])
|
|
23
|
+
r"""The block number you want to get this data at."""
|
|
24
|
+
|
|
25
|
+
|
|
15
26
|
class MorphoMarketRequestTypedDict(TypedDict):
|
|
16
27
|
chain: MorphoMarketChain
|
|
28
|
+
block: NotRequired[MorphoMarketBlockTypedDict]
|
|
29
|
+
r"""The block number you want to get this data at."""
|
|
17
30
|
unique_market_key: str
|
|
18
31
|
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
19
32
|
|
|
@@ -24,6 +37,12 @@ class MorphoMarketRequest(BaseModel):
|
|
|
24
37
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
25
38
|
] = MorphoMarketChain.ETHEREUM_MAINNET
|
|
26
39
|
|
|
40
|
+
block: Annotated[
|
|
41
|
+
Optional[MorphoMarketBlock],
|
|
42
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
43
|
+
] = None
|
|
44
|
+
r"""The block number you want to get this data at."""
|
|
45
|
+
|
|
27
46
|
unique_market_key: Annotated[
|
|
28
47
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
29
48
|
] = "0x83b7ad16905809ea36482f4fbf6cfee9c9f316d128de9a5da1952607d5e4df5e"
|
|
@@ -11,7 +11,8 @@ from compass_api_sdk.types import (
|
|
|
11
11
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
12
12
|
from enum import Enum
|
|
13
13
|
from pydantic import model_serializer
|
|
14
|
-
from
|
|
14
|
+
from typing import Optional, Union
|
|
15
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class MorphoMarketsChain(str, Enum):
|
|
@@ -19,8 +20,20 @@ class MorphoMarketsChain(str, Enum):
|
|
|
19
20
|
BASE_MAINNET = "base:mainnet"
|
|
20
21
|
|
|
21
22
|
|
|
23
|
+
MorphoMarketsBlockTypedDict = TypeAliasType(
|
|
24
|
+
"MorphoMarketsBlockTypedDict", Union[int, str]
|
|
25
|
+
)
|
|
26
|
+
r"""The block number you want to get this data at"""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
MorphoMarketsBlock = TypeAliasType("MorphoMarketsBlock", Union[int, str])
|
|
30
|
+
r"""The block number you want to get this data at"""
|
|
31
|
+
|
|
32
|
+
|
|
22
33
|
class MorphoMarketsRequestTypedDict(TypedDict):
|
|
23
34
|
chain: MorphoMarketsChain
|
|
35
|
+
block: NotRequired[MorphoMarketsBlockTypedDict]
|
|
36
|
+
r"""The block number you want to get this data at"""
|
|
24
37
|
collateral_token: NotRequired[Nullable[str]]
|
|
25
38
|
r"""Collateral token to identify the market."""
|
|
26
39
|
loan_token: NotRequired[Nullable[str]]
|
|
@@ -33,6 +46,12 @@ class MorphoMarketsRequest(BaseModel):
|
|
|
33
46
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
34
47
|
] = MorphoMarketsChain.ETHEREUM_MAINNET
|
|
35
48
|
|
|
49
|
+
block: Annotated[
|
|
50
|
+
Optional[MorphoMarketsBlock],
|
|
51
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
52
|
+
] = None
|
|
53
|
+
r"""The block number you want to get this data at"""
|
|
54
|
+
|
|
36
55
|
collateral_token: Annotated[
|
|
37
56
|
OptionalNullable[str],
|
|
38
57
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
@@ -47,7 +66,7 @@ class MorphoMarketsRequest(BaseModel):
|
|
|
47
66
|
|
|
48
67
|
@model_serializer(mode="wrap")
|
|
49
68
|
def serialize_model(self, handler):
|
|
50
|
-
optional_fields = ["collateral_token", "loan_token"]
|
|
69
|
+
optional_fields = ["block", "collateral_token", "loan_token"]
|
|
51
70
|
nullable_fields = ["collateral_token", "loan_token"]
|
|
52
71
|
null_default_fields = []
|
|
53
72
|
|
|
@@ -4,7 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
7
|
+
from typing import Optional, Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class MorphoUserPositionChain(str, Enum):
|
|
@@ -12,8 +13,20 @@ class MorphoUserPositionChain(str, Enum):
|
|
|
12
13
|
BASE_MAINNET = "base:mainnet"
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
MorphoUserPositionBlockTypedDict = TypeAliasType(
|
|
17
|
+
"MorphoUserPositionBlockTypedDict", Union[int, str]
|
|
18
|
+
)
|
|
19
|
+
r"""The block number you want to get this data at."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
MorphoUserPositionBlock = TypeAliasType("MorphoUserPositionBlock", Union[int, str])
|
|
23
|
+
r"""The block number you want to get this data at."""
|
|
24
|
+
|
|
25
|
+
|
|
15
26
|
class MorphoUserPositionRequestTypedDict(TypedDict):
|
|
16
27
|
chain: MorphoUserPositionChain
|
|
28
|
+
block: NotRequired[MorphoUserPositionBlockTypedDict]
|
|
29
|
+
r"""The block number you want to get this data at."""
|
|
17
30
|
user_address: str
|
|
18
31
|
r"""The user wallet address of the desired user position."""
|
|
19
32
|
|
|
@@ -24,6 +37,12 @@ class MorphoUserPositionRequest(BaseModel):
|
|
|
24
37
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
25
38
|
] = MorphoUserPositionChain.ETHEREUM_MAINNET
|
|
26
39
|
|
|
40
|
+
block: Annotated[
|
|
41
|
+
Optional[MorphoUserPositionBlock],
|
|
42
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
43
|
+
] = None
|
|
44
|
+
r"""The block number you want to get this data at."""
|
|
45
|
+
|
|
27
46
|
user_address: Annotated[
|
|
28
47
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
29
48
|
] = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B"
|
|
@@ -4,7 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
7
|
+
from typing import Optional, Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class MorphoVaultPositionChain(str, Enum):
|
|
@@ -12,8 +13,20 @@ class MorphoVaultPositionChain(str, Enum):
|
|
|
12
13
|
BASE_MAINNET = "base:mainnet"
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
MorphoVaultPositionBlockTypedDict = TypeAliasType(
|
|
17
|
+
"MorphoVaultPositionBlockTypedDict", Union[int, str]
|
|
18
|
+
)
|
|
19
|
+
r"""The block number you want to get this data at."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
MorphoVaultPositionBlock = TypeAliasType("MorphoVaultPositionBlock", Union[int, str])
|
|
23
|
+
r"""The block number you want to get this data at."""
|
|
24
|
+
|
|
25
|
+
|
|
15
26
|
class MorphoVaultPositionRequestTypedDict(TypedDict):
|
|
16
27
|
chain: MorphoVaultPositionChain
|
|
28
|
+
block: NotRequired[MorphoVaultPositionBlockTypedDict]
|
|
29
|
+
r"""The block number you want to get this data at."""
|
|
17
30
|
user_address: str
|
|
18
31
|
r"""The user address of the desired vault position."""
|
|
19
32
|
vault_address: str
|
|
@@ -26,6 +39,12 @@ class MorphoVaultPositionRequest(BaseModel):
|
|
|
26
39
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
27
40
|
] = MorphoVaultPositionChain.ETHEREUM_MAINNET
|
|
28
41
|
|
|
42
|
+
block: Annotated[
|
|
43
|
+
Optional[MorphoVaultPositionBlock],
|
|
44
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
45
|
+
] = None
|
|
46
|
+
r"""The block number you want to get this data at."""
|
|
47
|
+
|
|
29
48
|
user_address: Annotated[
|
|
30
49
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
31
50
|
] = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B"
|
|
@@ -4,7 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
7
|
+
from typing import Optional, Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class MorphoVaultChain(str, Enum):
|
|
@@ -12,8 +13,18 @@ class MorphoVaultChain(str, Enum):
|
|
|
12
13
|
BASE_MAINNET = "base:mainnet"
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
MorphoVaultBlockTypedDict = TypeAliasType("MorphoVaultBlockTypedDict", Union[int, str])
|
|
17
|
+
r"""The block number you want to get this data at."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
MorphoVaultBlock = TypeAliasType("MorphoVaultBlock", Union[int, str])
|
|
21
|
+
r"""The block number you want to get this data at."""
|
|
22
|
+
|
|
23
|
+
|
|
15
24
|
class MorphoVaultRequestTypedDict(TypedDict):
|
|
16
25
|
chain: MorphoVaultChain
|
|
26
|
+
block: NotRequired[MorphoVaultBlockTypedDict]
|
|
27
|
+
r"""The block number you want to get this data at."""
|
|
17
28
|
vault_address: str
|
|
18
29
|
r"""The vault address of the desired vault data & metrics."""
|
|
19
30
|
|
|
@@ -24,6 +35,12 @@ class MorphoVaultRequest(BaseModel):
|
|
|
24
35
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
25
36
|
] = MorphoVaultChain.ETHEREUM_MAINNET
|
|
26
37
|
|
|
38
|
+
block: Annotated[
|
|
39
|
+
Optional[MorphoVaultBlock],
|
|
40
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
41
|
+
] = None
|
|
42
|
+
r"""The block number you want to get this data at."""
|
|
43
|
+
|
|
27
44
|
vault_address: Annotated[
|
|
28
45
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
29
46
|
] = "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa"
|
|
@@ -11,7 +11,8 @@ from compass_api_sdk.types import (
|
|
|
11
11
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
12
12
|
from enum import Enum
|
|
13
13
|
from pydantic import model_serializer
|
|
14
|
-
from
|
|
14
|
+
from typing import Optional, Union
|
|
15
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class MorphoVaultsChain(str, Enum):
|
|
@@ -19,8 +20,20 @@ class MorphoVaultsChain(str, Enum):
|
|
|
19
20
|
BASE_MAINNET = "base:mainnet"
|
|
20
21
|
|
|
21
22
|
|
|
23
|
+
MorphoVaultsBlockTypedDict = TypeAliasType(
|
|
24
|
+
"MorphoVaultsBlockTypedDict", Union[int, str]
|
|
25
|
+
)
|
|
26
|
+
r"""The block number you want to get this data at."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
MorphoVaultsBlock = TypeAliasType("MorphoVaultsBlock", Union[int, str])
|
|
30
|
+
r"""The block number you want to get this data at."""
|
|
31
|
+
|
|
32
|
+
|
|
22
33
|
class MorphoVaultsRequestTypedDict(TypedDict):
|
|
23
34
|
chain: MorphoVaultsChain
|
|
35
|
+
block: NotRequired[MorphoVaultsBlockTypedDict]
|
|
36
|
+
r"""The block number you want to get this data at."""
|
|
24
37
|
deposit_token: NotRequired[Nullable[str]]
|
|
25
38
|
r"""Token address that will filter vaults by this deposit token."""
|
|
26
39
|
|
|
@@ -31,6 +44,12 @@ class MorphoVaultsRequest(BaseModel):
|
|
|
31
44
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
32
45
|
] = MorphoVaultsChain.ETHEREUM_MAINNET
|
|
33
46
|
|
|
47
|
+
block: Annotated[
|
|
48
|
+
Optional[MorphoVaultsBlock],
|
|
49
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
50
|
+
] = None
|
|
51
|
+
r"""The block number you want to get this data at."""
|
|
52
|
+
|
|
34
53
|
deposit_token: Annotated[
|
|
35
54
|
OptionalNullable[str],
|
|
36
55
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
@@ -39,7 +58,7 @@ class MorphoVaultsRequest(BaseModel):
|
|
|
39
58
|
|
|
40
59
|
@model_serializer(mode="wrap")
|
|
41
60
|
def serialize_model(self, handler):
|
|
42
|
-
optional_fields = ["deposit_token"]
|
|
61
|
+
optional_fields = ["block", "deposit_token"]
|
|
43
62
|
nullable_fields = ["deposit_token"]
|
|
44
63
|
null_default_fields = []
|
|
45
64
|
|
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .chain import Chain
|
|
5
5
|
from compass_api_sdk.types import BaseModel
|
|
6
|
-
from
|
|
6
|
+
from typing import Optional, Union
|
|
7
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
BlockTypedDict = TypeAliasType("BlockTypedDict", Union[int, str])
|
|
11
|
+
r"""The block number you want to get this data at."""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
Block = TypeAliasType("Block", Union[int, str])
|
|
15
|
+
r"""The block number you want to get this data at."""
|
|
7
16
|
|
|
8
17
|
|
|
9
18
|
class MulticallAuthorizationRequestTypedDict(TypedDict):
|
|
@@ -20,6 +29,8 @@ class MulticallAuthorizationRequestTypedDict(TypedDict):
|
|
|
20
29
|
r"""The chain to use."""
|
|
21
30
|
sender: str
|
|
22
31
|
r"""The Ethereum address to use for authorization"""
|
|
32
|
+
block: NotRequired[BlockTypedDict]
|
|
33
|
+
r"""The block number you want to get this data at."""
|
|
23
34
|
|
|
24
35
|
|
|
25
36
|
class MulticallAuthorizationRequest(BaseModel):
|
|
@@ -37,3 +48,6 @@ class MulticallAuthorizationRequest(BaseModel):
|
|
|
37
48
|
|
|
38
49
|
sender: str
|
|
39
50
|
r"""The Ethereum address to use for authorization"""
|
|
51
|
+
|
|
52
|
+
block: Optional[Block] = None
|
|
53
|
+
r"""The block number you want to get this data at."""
|
|
@@ -4,7 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
7
|
+
from typing import Optional, Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class PendleMarketChain(str, Enum):
|
|
@@ -15,9 +16,21 @@ class PendleMarketChain(str, Enum):
|
|
|
15
16
|
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
PendleMarketBlockTypedDict = TypeAliasType(
|
|
20
|
+
"PendleMarketBlockTypedDict", Union[int, str]
|
|
21
|
+
)
|
|
22
|
+
r"""The block number you want to get this data at."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
PendleMarketBlock = TypeAliasType("PendleMarketBlock", Union[int, str])
|
|
26
|
+
r"""The block number you want to get this data at."""
|
|
27
|
+
|
|
28
|
+
|
|
18
29
|
class PendleMarketRequestTypedDict(TypedDict):
|
|
19
30
|
chain: PendleMarketChain
|
|
20
31
|
r"""The chain to use."""
|
|
32
|
+
block: NotRequired[PendleMarketBlockTypedDict]
|
|
33
|
+
r"""The block number you want to get this data at."""
|
|
21
34
|
user_address: str
|
|
22
35
|
r"""The user address of the desired position."""
|
|
23
36
|
market_address: str
|
|
@@ -31,6 +44,12 @@ class PendleMarketRequest(BaseModel):
|
|
|
31
44
|
] = PendleMarketChain.ETHEREUM_MAINNET
|
|
32
45
|
r"""The chain to use."""
|
|
33
46
|
|
|
47
|
+
block: Annotated[
|
|
48
|
+
Optional[PendleMarketBlock],
|
|
49
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
50
|
+
] = None
|
|
51
|
+
r"""The block number you want to get this data at."""
|
|
52
|
+
|
|
34
53
|
user_address: Annotated[
|
|
35
54
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
36
55
|
] = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B"
|
|
@@ -4,7 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
7
|
+
from typing import Optional, Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class PendlePositionChain(str, Enum):
|
|
@@ -15,9 +16,21 @@ class PendlePositionChain(str, Enum):
|
|
|
15
16
|
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
PendlePositionBlockTypedDict = TypeAliasType(
|
|
20
|
+
"PendlePositionBlockTypedDict", Union[int, str]
|
|
21
|
+
)
|
|
22
|
+
r"""The block number you want to get this data at."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
PendlePositionBlock = TypeAliasType("PendlePositionBlock", Union[int, str])
|
|
26
|
+
r"""The block number you want to get this data at."""
|
|
27
|
+
|
|
28
|
+
|
|
18
29
|
class PendlePositionRequestTypedDict(TypedDict):
|
|
19
30
|
chain: PendlePositionChain
|
|
20
31
|
r"""The chain to use."""
|
|
32
|
+
block: NotRequired[PendlePositionBlockTypedDict]
|
|
33
|
+
r"""The block number you want to get this data at."""
|
|
21
34
|
user_address: str
|
|
22
35
|
r"""The user address of the desired position."""
|
|
23
36
|
market_address: str
|
|
@@ -31,6 +44,12 @@ class PendlePositionRequest(BaseModel):
|
|
|
31
44
|
] = PendlePositionChain.ETHEREUM_MAINNET
|
|
32
45
|
r"""The chain to use."""
|
|
33
46
|
|
|
47
|
+
block: Annotated[
|
|
48
|
+
Optional[PendlePositionBlock],
|
|
49
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
50
|
+
] = None
|
|
51
|
+
r"""The block number you want to get this data at."""
|
|
52
|
+
|
|
34
53
|
user_address: Annotated[
|
|
35
54
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
36
55
|
] = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B"
|
|
@@ -5,12 +5,22 @@ from compass_api_sdk.types import BaseModel
|
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata, validate_const
|
|
6
6
|
import pydantic
|
|
7
7
|
from pydantic.functional_validators import AfterValidator
|
|
8
|
-
from typing import Literal, Optional
|
|
9
|
-
from typing_extensions import Annotated, TypedDict
|
|
8
|
+
from typing import Literal, Optional, Union
|
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
SkyPositionBlockTypedDict = TypeAliasType("SkyPositionBlockTypedDict", Union[int, str])
|
|
13
|
+
r"""The block number you want to get this data at."""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
SkyPositionBlock = TypeAliasType("SkyPositionBlock", Union[int, str])
|
|
17
|
+
r"""The block number you want to get this data at."""
|
|
10
18
|
|
|
11
19
|
|
|
12
20
|
class SkyPositionRequestTypedDict(TypedDict):
|
|
13
21
|
chain: Literal["ethereum:mainnet"]
|
|
22
|
+
block: NotRequired[SkyPositionBlockTypedDict]
|
|
23
|
+
r"""The block number you want to get this data at."""
|
|
14
24
|
user_address: str
|
|
15
25
|
r"""The user address of the desired position."""
|
|
16
26
|
|
|
@@ -25,6 +35,12 @@ class SkyPositionRequest(BaseModel):
|
|
|
25
35
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
26
36
|
] = "ethereum:mainnet"
|
|
27
37
|
|
|
38
|
+
block: Annotated[
|
|
39
|
+
Optional[SkyPositionBlock],
|
|
40
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
41
|
+
] = None
|
|
42
|
+
r"""The block number you want to get this data at."""
|
|
43
|
+
|
|
28
44
|
user_address: Annotated[
|
|
29
45
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
30
46
|
] = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B"
|
|
@@ -4,7 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
7
|
+
from typing import Optional, Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class TokenAddressChain(str, Enum):
|
|
@@ -15,6 +16,16 @@ class TokenAddressChain(str, Enum):
|
|
|
15
16
|
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
TokenAddressBlockTypedDict = TypeAliasType(
|
|
20
|
+
"TokenAddressBlockTypedDict", Union[int, str]
|
|
21
|
+
)
|
|
22
|
+
r"""The block number you want to get this data at."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
TokenAddressBlock = TypeAliasType("TokenAddressBlock", Union[int, str])
|
|
26
|
+
r"""The block number you want to get this data at."""
|
|
27
|
+
|
|
28
|
+
|
|
18
29
|
class TokenAddressToken(str, Enum):
|
|
19
30
|
r"""A class representing the token.
|
|
20
31
|
|
|
@@ -71,6 +82,8 @@ class TokenAddressToken(str, Enum):
|
|
|
71
82
|
class TokenAddressRequestTypedDict(TypedDict):
|
|
72
83
|
chain: TokenAddressChain
|
|
73
84
|
r"""The chain to use."""
|
|
85
|
+
block: NotRequired[TokenAddressBlockTypedDict]
|
|
86
|
+
r"""The block number you want to get this data at."""
|
|
74
87
|
token: TokenAddressToken
|
|
75
88
|
r"""The token symbol to get the address for.."""
|
|
76
89
|
|
|
@@ -82,6 +95,12 @@ class TokenAddressRequest(BaseModel):
|
|
|
82
95
|
] = TokenAddressChain.ARBITRUM_MAINNET
|
|
83
96
|
r"""The chain to use."""
|
|
84
97
|
|
|
98
|
+
block: Annotated[
|
|
99
|
+
Optional[TokenAddressBlock],
|
|
100
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
101
|
+
] = None
|
|
102
|
+
r"""The block number you want to get this data at."""
|
|
103
|
+
|
|
85
104
|
token: Annotated[
|
|
86
105
|
TokenAddressToken,
|
|
87
106
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
@@ -5,8 +5,8 @@ from .token_enum import TokenEnum
|
|
|
5
5
|
from compass_api_sdk.types import BaseModel
|
|
6
6
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
7
7
|
from enum import Enum
|
|
8
|
-
from typing import Union
|
|
9
|
-
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
8
|
+
from typing import Optional, Union
|
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class TokenBalanceChain(str, Enum):
|
|
@@ -17,6 +17,16 @@ class TokenBalanceChain(str, Enum):
|
|
|
17
17
|
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
TokenBalanceBlockTypedDict = TypeAliasType(
|
|
21
|
+
"TokenBalanceBlockTypedDict", Union[int, str]
|
|
22
|
+
)
|
|
23
|
+
r"""The block number you want to get this data at."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
TokenBalanceBlock = TypeAliasType("TokenBalanceBlock", Union[int, str])
|
|
27
|
+
r"""The block number you want to get this data at."""
|
|
28
|
+
|
|
29
|
+
|
|
20
30
|
TokenBalanceTokenTypedDict = TypeAliasType(
|
|
21
31
|
"TokenBalanceTokenTypedDict", Union[TokenEnum, str]
|
|
22
32
|
)
|
|
@@ -32,6 +42,8 @@ class TokenBalanceRequestTypedDict(TypedDict):
|
|
|
32
42
|
r"""The symbol of the token for which the balance is checked.."""
|
|
33
43
|
chain: TokenBalanceChain
|
|
34
44
|
r"""The chain to use."""
|
|
45
|
+
block: NotRequired[TokenBalanceBlockTypedDict]
|
|
46
|
+
r"""The block number you want to get this data at."""
|
|
35
47
|
user: str
|
|
36
48
|
r"""The user to get the ERC20 balance of."""
|
|
37
49
|
|
|
@@ -49,6 +61,12 @@ class TokenBalanceRequest(BaseModel):
|
|
|
49
61
|
] = TokenBalanceChain.ARBITRUM_MAINNET
|
|
50
62
|
r"""The chain to use."""
|
|
51
63
|
|
|
64
|
+
block: Annotated[
|
|
65
|
+
Optional[TokenBalanceBlock],
|
|
66
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
67
|
+
] = None
|
|
68
|
+
r"""The block number you want to get this data at."""
|
|
69
|
+
|
|
52
70
|
user: Annotated[
|
|
53
71
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
54
72
|
] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"
|