compass_api_sdk 0.0.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 (137) hide show
  1. compass_api_sdk/__init__.py +17 -0
  2. compass_api_sdk/_hooks/__init__.py +5 -0
  3. compass_api_sdk/_hooks/registration.py +13 -0
  4. compass_api_sdk/_hooks/sdkhooks.py +76 -0
  5. compass_api_sdk/_hooks/types.py +106 -0
  6. compass_api_sdk/_version.py +15 -0
  7. compass_api_sdk/aave_v3.py +1903 -0
  8. compass_api_sdk/aerodrome_slipstream.py +1875 -0
  9. compass_api_sdk/basesdk.py +362 -0
  10. compass_api_sdk/errors/__init__.py +7 -0
  11. compass_api_sdk/errors/apierror.py +22 -0
  12. compass_api_sdk/errors/httpvalidationerror.py +21 -0
  13. compass_api_sdk/httpclient.py +136 -0
  14. compass_api_sdk/models/__init__.py +777 -0
  15. compass_api_sdk/models/aave_liquidity_changeop.py +108 -0
  16. compass_api_sdk/models/aave_token_priceop.py +98 -0
  17. compass_api_sdk/models/aave_user_position_per_tokenop.py +104 -0
  18. compass_api_sdk/models/aave_user_position_summaryop.py +35 -0
  19. compass_api_sdk/models/aaveborrowrequest.py +105 -0
  20. compass_api_sdk/models/aaveliquiditychangeresponse.py +26 -0
  21. compass_api_sdk/models/aaverepayrequest.py +105 -0
  22. compass_api_sdk/models/aavesupplyrequest.py +93 -0
  23. compass_api_sdk/models/aavetokenpriceresponse.py +15 -0
  24. compass_api_sdk/models/aaveuserpositionpertokenresponse.py +73 -0
  25. compass_api_sdk/models/aaveuserpositionsummaryresponse.py +50 -0
  26. compass_api_sdk/models/aavewithdrawrequest.py +58 -0
  27. compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +35 -0
  28. compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +173 -0
  29. compass_api_sdk/models/aerodromelppositionsresponse.py +21 -0
  30. compass_api_sdk/models/aerodromeposition.py +70 -0
  31. compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +92 -0
  32. compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +109 -0
  33. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +186 -0
  34. compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +57 -0
  35. compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +96 -0
  36. compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +50 -0
  37. compass_api_sdk/models/allowanceinforesponse.py +48 -0
  38. compass_api_sdk/models/balanceinforesponse.py +43 -0
  39. compass_api_sdk/models/chain.py +12 -0
  40. compass_api_sdk/models/chaininfo.py +53 -0
  41. compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_asset.py +22 -0
  42. compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_asset.py +23 -0
  43. compass_api_sdk/models/ensnameinforesponse.py +24 -0
  44. compass_api_sdk/models/feeenum.py +16 -0
  45. compass_api_sdk/models/generic_allowanceop.py +121 -0
  46. compass_api_sdk/models/generic_balanceop.py +104 -0
  47. compass_api_sdk/models/generic_ensop.py +35 -0
  48. compass_api_sdk/models/generic_portfolioop.py +35 -0
  49. compass_api_sdk/models/generic_price_usdop.py +98 -0
  50. compass_api_sdk/models/generic_supported_tokensop.py +29 -0
  51. compass_api_sdk/models/generic_visualize_portfolioop.py +35 -0
  52. compass_api_sdk/models/image.py +15 -0
  53. compass_api_sdk/models/increaseallowancerequest.py +77 -0
  54. compass_api_sdk/models/interestratemode.py +14 -0
  55. compass_api_sdk/models/marketstate.py +35 -0
  56. compass_api_sdk/models/morpho_market_positionop.py +39 -0
  57. compass_api_sdk/models/morpho_marketsop.py +78 -0
  58. compass_api_sdk/models/morpho_vault_positionop.py +39 -0
  59. compass_api_sdk/models/morpho_vaultsop.py +72 -0
  60. compass_api_sdk/models/morphoborrowrequest.py +91 -0
  61. compass_api_sdk/models/morphocheckmarketpositionresponse.py +23 -0
  62. compass_api_sdk/models/morphocheckvaultpositionresponse.py +20 -0
  63. compass_api_sdk/models/morphodepositrequest.py +86 -0
  64. compass_api_sdk/models/morphogetmarketsresponse.py +17 -0
  65. compass_api_sdk/models/morphogetvaultsresponse.py +17 -0
  66. compass_api_sdk/models/morphomarket.py +80 -0
  67. compass_api_sdk/models/morphorepayrequest.py +79 -0
  68. compass_api_sdk/models/morphosetvaultallowancerequest.py +44 -0
  69. compass_api_sdk/models/morphosupplycollateralrequest.py +91 -0
  70. compass_api_sdk/models/morphovault.py +47 -0
  71. compass_api_sdk/models/morphowithdrawcollateralrequest.py +91 -0
  72. compass_api_sdk/models/morphowithdrawrequest.py +74 -0
  73. compass_api_sdk/models/portfolio.py +22 -0
  74. compass_api_sdk/models/priceresponse.py +15 -0
  75. compass_api_sdk/models/security.py +24 -0
  76. compass_api_sdk/models/token_addressop.py +98 -0
  77. compass_api_sdk/models/token_balanceop.py +49 -0
  78. compass_api_sdk/models/token_enum.py +57 -0
  79. compass_api_sdk/models/token_priceop.py +97 -0
  80. compass_api_sdk/models/tokenaddressresponse.py +15 -0
  81. compass_api_sdk/models/tokenbalance.py +49 -0
  82. compass_api_sdk/models/tokenbalanceresponse.py +44 -0
  83. compass_api_sdk/models/tokeninfo.py +17 -0
  84. compass_api_sdk/models/tokenpriceresponse.py +15 -0
  85. compass_api_sdk/models/tokentransferrequest.py +66 -0
  86. compass_api_sdk/models/transfererc20request.py +62 -0
  87. compass_api_sdk/models/transferethrequest.py +46 -0
  88. compass_api_sdk/models/uniswap_liquidity_provision_in_rangeop.py +34 -0
  89. compass_api_sdk/models/uniswap_liquidity_provision_positionsop.py +35 -0
  90. compass_api_sdk/models/uniswap_pool_priceop.py +193 -0
  91. compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +209 -0
  92. compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +209 -0
  93. compass_api_sdk/models/uniswapbuyexactlyrequest.py +104 -0
  94. compass_api_sdk/models/uniswapbuyquoteinforesponse.py +20 -0
  95. compass_api_sdk/models/uniswapcheckinrangeresponse.py +15 -0
  96. compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +99 -0
  97. compass_api_sdk/models/uniswaplppositionsinforesponse.py +24 -0
  98. compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +185 -0
  99. compass_api_sdk/models/uniswappoolpriceresponse.py +47 -0
  100. compass_api_sdk/models/uniswappositionssolidityresponse.py +46 -0
  101. compass_api_sdk/models/uniswapsellexactlyrequest.py +104 -0
  102. compass_api_sdk/models/uniswapsellquoteinforesponse.py +20 -0
  103. compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +51 -0
  104. compass_api_sdk/models/unsignedtransaction.py +58 -0
  105. compass_api_sdk/models/unwrapwethrequest.py +41 -0
  106. compass_api_sdk/models/validationerror.py +26 -0
  107. compass_api_sdk/models/vaultstate.py +32 -0
  108. compass_api_sdk/models/weeklyapys.py +23 -0
  109. compass_api_sdk/models/wrapethrequest.py +41 -0
  110. compass_api_sdk/morpho.py +2577 -0
  111. compass_api_sdk/py.typed +1 -0
  112. compass_api_sdk/sdk.py +155 -0
  113. compass_api_sdk/sdkconfiguration.py +56 -0
  114. compass_api_sdk/token_sdk.py +861 -0
  115. compass_api_sdk/types/__init__.py +21 -0
  116. compass_api_sdk/types/basemodel.py +39 -0
  117. compass_api_sdk/uniswap_v3.py +2551 -0
  118. compass_api_sdk/universal.py +2625 -0
  119. compass_api_sdk/utils/__init__.py +100 -0
  120. compass_api_sdk/utils/annotations.py +55 -0
  121. compass_api_sdk/utils/datetimes.py +23 -0
  122. compass_api_sdk/utils/enums.py +74 -0
  123. compass_api_sdk/utils/eventstreaming.py +238 -0
  124. compass_api_sdk/utils/forms.py +202 -0
  125. compass_api_sdk/utils/headers.py +136 -0
  126. compass_api_sdk/utils/logger.py +22 -0
  127. compass_api_sdk/utils/metadata.py +118 -0
  128. compass_api_sdk/utils/queryparams.py +205 -0
  129. compass_api_sdk/utils/requestbodies.py +66 -0
  130. compass_api_sdk/utils/retries.py +217 -0
  131. compass_api_sdk/utils/security.py +174 -0
  132. compass_api_sdk/utils/serializers.py +248 -0
  133. compass_api_sdk/utils/url.py +155 -0
  134. compass_api_sdk/utils/values.py +137 -0
  135. compass_api_sdk-0.0.1.dist-info/METADATA +534 -0
  136. compass_api_sdk-0.0.1.dist-info/RECORD +137 -0
  137. compass_api_sdk-0.0.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,91 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .chain import Chain
5
+ from compass_api_sdk.types import (
6
+ BaseModel,
7
+ Nullable,
8
+ OptionalNullable,
9
+ UNSET,
10
+ UNSET_SENTINEL,
11
+ )
12
+ from pydantic import model_serializer
13
+ from typing import Union
14
+ from typing_extensions import NotRequired, TypeAliasType, TypedDict
15
+
16
+
17
+ MorphoSupplyCollateralRequestAmountTypedDict = TypeAliasType(
18
+ "MorphoSupplyCollateralRequestAmountTypedDict", Union[float, str]
19
+ )
20
+ r"""Amount of the token to supply to the market as collateral."""
21
+
22
+
23
+ MorphoSupplyCollateralRequestAmount = TypeAliasType(
24
+ "MorphoSupplyCollateralRequestAmount", Union[float, str]
25
+ )
26
+ r"""Amount of the token to supply to the market as collateral."""
27
+
28
+
29
+ class MorphoSupplyCollateralRequestTypedDict(TypedDict):
30
+ amount: MorphoSupplyCollateralRequestAmountTypedDict
31
+ r"""Amount of the token to supply to the market as collateral."""
32
+ unique_market_key: str
33
+ r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
34
+ chain: Chain
35
+ r"""The chain to use."""
36
+ sender: str
37
+ r"""The address of the transaction sender."""
38
+ on_behalf_of: NotRequired[Nullable[str]]
39
+ r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
40
+ callback_data: NotRequired[Nullable[bytes]]
41
+ r"""An optional field for callback byte data that will be triggered upon successful supplying of collateral."""
42
+
43
+
44
+ class MorphoSupplyCollateralRequest(BaseModel):
45
+ amount: MorphoSupplyCollateralRequestAmount
46
+ r"""Amount of the token to supply to the market as collateral."""
47
+
48
+ unique_market_key: str
49
+ r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
50
+
51
+ chain: Chain
52
+ r"""The chain to use."""
53
+
54
+ sender: str
55
+ r"""The address of the transaction sender."""
56
+
57
+ on_behalf_of: OptionalNullable[str] = UNSET
58
+ r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
59
+
60
+ callback_data: OptionalNullable[bytes] = UNSET
61
+ r"""An optional field for callback byte data that will be triggered upon successful supplying of collateral."""
62
+
63
+ @model_serializer(mode="wrap")
64
+ def serialize_model(self, handler):
65
+ optional_fields = ["on_behalf_of", "callback_data"]
66
+ nullable_fields = ["on_behalf_of", "callback_data"]
67
+ null_default_fields = []
68
+
69
+ serialized = handler(self)
70
+
71
+ m = {}
72
+
73
+ for n, f in type(self).model_fields.items():
74
+ k = f.alias or n
75
+ val = serialized.get(k)
76
+ serialized.pop(k, None)
77
+
78
+ optional_nullable = k in optional_fields and k in nullable_fields
79
+ is_set = (
80
+ self.__pydantic_fields_set__.intersection({n})
81
+ or k in null_default_fields
82
+ ) # pylint: disable=no-member
83
+
84
+ if val is not None and val != UNSET_SENTINEL:
85
+ m[k] = val
86
+ elif val != UNSET_SENTINEL and (
87
+ not k in optional_fields or (optional_nullable and is_set)
88
+ ):
89
+ m[k] = val
90
+
91
+ return m
@@ -0,0 +1,47 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .chaininfo import ChainInfo, ChainInfoTypedDict
5
+ from .compass_api_backend_models_morpho_read_response_get_vaults_asset import (
6
+ CompassAPIBackendModelsMorphoReadResponseGetVaultsAsset,
7
+ CompassAPIBackendModelsMorphoReadResponseGetVaultsAssetTypedDict,
8
+ )
9
+ from .vaultstate import VaultState, VaultStateTypedDict
10
+ from compass_api_sdk.types import BaseModel
11
+ import pydantic
12
+ from typing_extensions import Annotated, TypedDict
13
+
14
+
15
+ class MorphoVaultTypedDict(TypedDict):
16
+ address: str
17
+ symbol: str
18
+ name: str
19
+ creation_block_number: int
20
+ creation_timestamp: int
21
+ creator_address: str
22
+ whitelisted: bool
23
+ asset: CompassAPIBackendModelsMorphoReadResponseGetVaultsAssetTypedDict
24
+ chain: ChainInfoTypedDict
25
+ state: VaultStateTypedDict
26
+
27
+
28
+ class MorphoVault(BaseModel):
29
+ address: str
30
+
31
+ symbol: str
32
+
33
+ name: str
34
+
35
+ creation_block_number: Annotated[int, pydantic.Field(alias="creationBlockNumber")]
36
+
37
+ creation_timestamp: Annotated[int, pydantic.Field(alias="creationTimestamp")]
38
+
39
+ creator_address: Annotated[str, pydantic.Field(alias="creatorAddress")]
40
+
41
+ whitelisted: bool
42
+
43
+ asset: CompassAPIBackendModelsMorphoReadResponseGetVaultsAsset
44
+
45
+ chain: ChainInfo
46
+
47
+ state: VaultState
@@ -0,0 +1,91 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .chain import Chain
5
+ from compass_api_sdk.types import (
6
+ BaseModel,
7
+ Nullable,
8
+ OptionalNullable,
9
+ UNSET,
10
+ UNSET_SENTINEL,
11
+ )
12
+ from pydantic import model_serializer
13
+ from typing import Union
14
+ from typing_extensions import NotRequired, TypeAliasType, TypedDict
15
+
16
+
17
+ MorphoWithdrawCollateralRequestAmountTypedDict = TypeAliasType(
18
+ "MorphoWithdrawCollateralRequestAmountTypedDict", Union[float, str]
19
+ )
20
+ r"""Amount of the token to supply to the market as collateral."""
21
+
22
+
23
+ MorphoWithdrawCollateralRequestAmount = TypeAliasType(
24
+ "MorphoWithdrawCollateralRequestAmount", Union[float, str]
25
+ )
26
+ r"""Amount of the token to supply to the market as collateral."""
27
+
28
+
29
+ class MorphoWithdrawCollateralRequestTypedDict(TypedDict):
30
+ amount: MorphoWithdrawCollateralRequestAmountTypedDict
31
+ r"""Amount of the token to supply to the market as collateral."""
32
+ unique_market_key: str
33
+ r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
34
+ chain: Chain
35
+ r"""The chain to use."""
36
+ sender: str
37
+ r"""The address of the transaction sender."""
38
+ on_behalf_of: NotRequired[Nullable[str]]
39
+ r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
40
+ receiver: NotRequired[Nullable[str]]
41
+ r"""The address where the withdrawn collateral will be received. Defaults to sender."""
42
+
43
+
44
+ class MorphoWithdrawCollateralRequest(BaseModel):
45
+ amount: MorphoWithdrawCollateralRequestAmount
46
+ r"""Amount of the token to supply to the market as collateral."""
47
+
48
+ unique_market_key: str
49
+ r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
50
+
51
+ chain: Chain
52
+ r"""The chain to use."""
53
+
54
+ sender: str
55
+ r"""The address of the transaction sender."""
56
+
57
+ on_behalf_of: OptionalNullable[str] = UNSET
58
+ r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
59
+
60
+ receiver: OptionalNullable[str] = UNSET
61
+ r"""The address where the withdrawn collateral will be received. Defaults to sender."""
62
+
63
+ @model_serializer(mode="wrap")
64
+ def serialize_model(self, handler):
65
+ optional_fields = ["on_behalf_of", "receiver"]
66
+ nullable_fields = ["on_behalf_of", "receiver"]
67
+ null_default_fields = []
68
+
69
+ serialized = handler(self)
70
+
71
+ m = {}
72
+
73
+ for n, f in type(self).model_fields.items():
74
+ k = f.alias or n
75
+ val = serialized.get(k)
76
+ serialized.pop(k, None)
77
+
78
+ optional_nullable = k in optional_fields and k in nullable_fields
79
+ is_set = (
80
+ self.__pydantic_fields_set__.intersection({n})
81
+ or k in null_default_fields
82
+ ) # pylint: disable=no-member
83
+
84
+ if val is not None and val != UNSET_SENTINEL:
85
+ m[k] = val
86
+ elif val != UNSET_SENTINEL and (
87
+ not k in optional_fields or (optional_nullable and is_set)
88
+ ):
89
+ m[k] = val
90
+
91
+ return m
@@ -0,0 +1,74 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .chain import Chain
5
+ from compass_api_sdk.types import (
6
+ BaseModel,
7
+ Nullable,
8
+ OptionalNullable,
9
+ UNSET,
10
+ UNSET_SENTINEL,
11
+ )
12
+ from pydantic import model_serializer
13
+ from typing import Any
14
+ from typing_extensions import NotRequired, TypedDict
15
+
16
+
17
+ class MorphoWithdrawRequestTypedDict(TypedDict):
18
+ vault_address: str
19
+ r"""The vault address you are withdrawing from."""
20
+ amount: Any
21
+ r"""The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn."""
22
+ chain: Chain
23
+ r"""The chain to use."""
24
+ sender: str
25
+ r"""The address of the transaction sender."""
26
+ receiver: NotRequired[Nullable[str]]
27
+ r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
28
+
29
+
30
+ class MorphoWithdrawRequest(BaseModel):
31
+ vault_address: str
32
+ r"""The vault address you are withdrawing from."""
33
+
34
+ amount: Any
35
+ r"""The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn."""
36
+
37
+ chain: Chain
38
+ r"""The chain to use."""
39
+
40
+ sender: str
41
+ r"""The address of the transaction sender."""
42
+
43
+ receiver: OptionalNullable[str] = UNSET
44
+ r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
45
+
46
+ @model_serializer(mode="wrap")
47
+ def serialize_model(self, handler):
48
+ optional_fields = ["receiver"]
49
+ nullable_fields = ["receiver"]
50
+ null_default_fields = []
51
+
52
+ serialized = handler(self)
53
+
54
+ m = {}
55
+
56
+ for n, f in type(self).model_fields.items():
57
+ k = f.alias or n
58
+ val = serialized.get(k)
59
+ serialized.pop(k, None)
60
+
61
+ optional_nullable = k in optional_fields and k in nullable_fields
62
+ is_set = (
63
+ self.__pydantic_fields_set__.intersection({n})
64
+ or k in null_default_fields
65
+ ) # pylint: disable=no-member
66
+
67
+ if val is not None and val != UNSET_SENTINEL:
68
+ m[k] = val
69
+ elif val != UNSET_SENTINEL and (
70
+ not k in optional_fields or (optional_nullable and is_set)
71
+ ):
72
+ m[k] = val
73
+
74
+ return m
@@ -0,0 +1,22 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .tokenbalance import TokenBalance, TokenBalanceTypedDict
5
+ from compass_api_sdk.types import BaseModel
6
+ from typing import List
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class PortfolioTypedDict(TypedDict):
11
+ total_value_in_usd: str
12
+ r"""Total value of the portfolio in USD"""
13
+ token_balances: List[TokenBalanceTypedDict]
14
+ r"""List of token balances in the portfolio"""
15
+
16
+
17
+ class Portfolio(BaseModel):
18
+ total_value_in_usd: str
19
+ r"""Total value of the portfolio in USD"""
20
+
21
+ token_balances: List[TokenBalance]
22
+ r"""List of token balances in the portfolio"""
@@ -0,0 +1,15 @@
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 PriceResponseTypedDict(TypedDict):
9
+ token_price_in_usd: str
10
+ r"""Price of the token in USD"""
11
+
12
+
13
+ class PriceResponse(BaseModel):
14
+ token_price_in_usd: str
15
+ r"""Price of the token in USD"""
@@ -0,0 +1,24 @@
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, SecurityMetadata
6
+ from typing_extensions import Annotated, TypedDict
7
+
8
+
9
+ class SecurityTypedDict(TypedDict):
10
+ api_key_auth: str
11
+
12
+
13
+ class Security(BaseModel):
14
+ api_key_auth: Annotated[
15
+ str,
16
+ FieldMetadata(
17
+ security=SecurityMetadata(
18
+ scheme=True,
19
+ scheme_type="apiKey",
20
+ sub_type="header",
21
+ field_name="x-api-key",
22
+ )
23
+ ),
24
+ ]
@@ -0,0 +1,98 @@
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 import Optional
8
+ from typing_extensions import Annotated, NotRequired, TypedDict
9
+
10
+
11
+ class TokenAddressChain(str, Enum):
12
+ r"""The chain to use."""
13
+
14
+ BASE_MAINNET = "base:mainnet"
15
+ ETHEREUM_MAINNET = "ethereum:mainnet"
16
+ ARBITRUM_MAINNET = "arbitrum:mainnet"
17
+
18
+
19
+ class TokenAddressToken(str, Enum):
20
+ r"""A class representing the token.
21
+
22
+ This class is used to represent the token in the system. Notice individual
23
+ endpoints' documentation where per chain tokens are presented.
24
+ """
25
+
26
+ ONE_INCH = "1INCH"
27
+ AAVE = "AAVE"
28
+ BAL = "BAL"
29
+ CB_BTC = "cbBTC"
30
+ CB_ETH = "cbETH"
31
+ CRV = "CRV"
32
+ CRV_USD = "crvUSD"
33
+ DAI = "DAI"
34
+ ENS = "ENS"
35
+ ET_HX = "ETHx"
36
+ FRAX = "FRAX"
37
+ FXS = "FXS"
38
+ GHO = "GHO"
39
+ KNC = "KNC"
40
+ LDO = "LDO"
41
+ LINK = "LINK"
42
+ LUSD = "LUSD"
43
+ MKR = "MKR"
44
+ OS_ETH = "osETH"
45
+ PYUSD = "PYUSD"
46
+ R_ETH = "rETH"
47
+ RPL = "RPL"
48
+ RS_ETH = "rsETH"
49
+ S_DAI = "sDAI"
50
+ SNX = "SNX"
51
+ STG = "STG"
52
+ S_US_DE = "sUSDe"
53
+ T_BTC = "tBTC"
54
+ UNI = "UNI"
55
+ USDC = "USDC"
56
+ US_DE = "USDe"
57
+ USDS = "USDS"
58
+ USDT = "USDT"
59
+ WBTC = "WBTC"
60
+ WE_ETH = "weETH"
61
+ WETH = "WETH"
62
+ WST_ETH = "wstETH"
63
+ ARB = "ARB"
64
+ EURS = "EURS"
65
+ MAI = "MAI"
66
+ USD_CE = "USDCe"
67
+ AERO = "AERO"
68
+ EUR = "EUR"
69
+ VIRTUAL = "VIRTUAL"
70
+
71
+
72
+ class TokenAddressRequestTypedDict(TypedDict):
73
+ chain: NotRequired[TokenAddressChain]
74
+ r"""The chain to use."""
75
+ token: NotRequired[TokenAddressToken]
76
+ r"""A class representing the token.
77
+
78
+ This class is used to represent the token in the system. Notice individual
79
+ endpoints' documentation where per chain tokens are presented.
80
+ """
81
+
82
+
83
+ class TokenAddressRequest(BaseModel):
84
+ chain: Annotated[
85
+ Optional[TokenAddressChain],
86
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
87
+ ] = TokenAddressChain.ARBITRUM_MAINNET
88
+ r"""The chain to use."""
89
+
90
+ token: Annotated[
91
+ Optional[TokenAddressToken],
92
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
93
+ ] = TokenAddressToken.WETH
94
+ r"""A class representing the token.
95
+
96
+ This class is used to represent the token in the system. Notice individual
97
+ endpoints' documentation where per chain tokens are presented.
98
+ """
@@ -0,0 +1,49 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .token_enum import TokenEnum
5
+ from compass_api_sdk.types import BaseModel
6
+ from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
7
+ from enum import Enum
8
+ from typing import Union
9
+ from typing_extensions import Annotated, TypeAliasType, TypedDict
10
+
11
+
12
+ class TokenBalanceChain(str, Enum):
13
+ r"""The chain to use."""
14
+
15
+ BASE_MAINNET = "base:mainnet"
16
+ ETHEREUM_MAINNET = "ethereum:mainnet"
17
+ ARBITRUM_MAINNET = "arbitrum:mainnet"
18
+
19
+
20
+ TokenBalanceTokenTypedDict = TypeAliasType(
21
+ "TokenBalanceTokenTypedDict", Union[TokenEnum, str]
22
+ )
23
+
24
+
25
+ TokenBalanceToken = TypeAliasType("TokenBalanceToken", Union[TokenEnum, str])
26
+
27
+
28
+ class TokenBalanceRequestTypedDict(TypedDict):
29
+ token: TokenBalanceTokenTypedDict
30
+ chain: TokenBalanceChain
31
+ r"""The chain to use."""
32
+ user: str
33
+
34
+
35
+ class TokenBalanceRequest(BaseModel):
36
+ token: Annotated[
37
+ TokenBalanceToken,
38
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
39
+ ]
40
+
41
+ chain: Annotated[
42
+ TokenBalanceChain,
43
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
44
+ ] = TokenBalanceChain.ARBITRUM_MAINNET
45
+ r"""The chain to use."""
46
+
47
+ user: Annotated[
48
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
49
+ ] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"
@@ -0,0 +1,57 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from enum import Enum
5
+
6
+
7
+ class TokenEnum(str, Enum):
8
+ r"""A class representing the token.
9
+
10
+ This class is used to represent the token in the system. Notice individual
11
+ endpoints' documentation where per chain tokens are presented.
12
+ """
13
+
14
+ ONE_INCH = "1INCH"
15
+ AAVE = "AAVE"
16
+ BAL = "BAL"
17
+ CB_BTC = "cbBTC"
18
+ CB_ETH = "cbETH"
19
+ CRV = "CRV"
20
+ CRV_USD = "crvUSD"
21
+ DAI = "DAI"
22
+ ENS = "ENS"
23
+ ET_HX = "ETHx"
24
+ FRAX = "FRAX"
25
+ FXS = "FXS"
26
+ GHO = "GHO"
27
+ KNC = "KNC"
28
+ LDO = "LDO"
29
+ LINK = "LINK"
30
+ LUSD = "LUSD"
31
+ MKR = "MKR"
32
+ OS_ETH = "osETH"
33
+ PYUSD = "PYUSD"
34
+ R_ETH = "rETH"
35
+ RPL = "RPL"
36
+ RS_ETH = "rsETH"
37
+ S_DAI = "sDAI"
38
+ SNX = "SNX"
39
+ STG = "STG"
40
+ S_US_DE = "sUSDe"
41
+ T_BTC = "tBTC"
42
+ UNI = "UNI"
43
+ USDC = "USDC"
44
+ US_DE = "USDe"
45
+ USDS = "USDS"
46
+ USDT = "USDT"
47
+ WBTC = "WBTC"
48
+ WE_ETH = "weETH"
49
+ WETH = "WETH"
50
+ WST_ETH = "wstETH"
51
+ ARB = "ARB"
52
+ EURS = "EURS"
53
+ MAI = "MAI"
54
+ USD_CE = "USDCe"
55
+ AERO = "AERO"
56
+ EUR = "EUR"
57
+ VIRTUAL = "VIRTUAL"
@@ -0,0 +1,97 @@
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 TokenPriceChain(str, Enum):
11
+ r"""The chain to use."""
12
+
13
+ BASE_MAINNET = "base:mainnet"
14
+ ETHEREUM_MAINNET = "ethereum:mainnet"
15
+ ARBITRUM_MAINNET = "arbitrum:mainnet"
16
+
17
+
18
+ class TokenPriceToken(str, Enum):
19
+ r"""A class representing the token.
20
+
21
+ This class is used to represent the token in the system. Notice individual
22
+ endpoints' documentation where per chain tokens are presented.
23
+ """
24
+
25
+ ONE_INCH = "1INCH"
26
+ AAVE = "AAVE"
27
+ BAL = "BAL"
28
+ CB_BTC = "cbBTC"
29
+ CB_ETH = "cbETH"
30
+ CRV = "CRV"
31
+ CRV_USD = "crvUSD"
32
+ DAI = "DAI"
33
+ ENS = "ENS"
34
+ ET_HX = "ETHx"
35
+ FRAX = "FRAX"
36
+ FXS = "FXS"
37
+ GHO = "GHO"
38
+ KNC = "KNC"
39
+ LDO = "LDO"
40
+ LINK = "LINK"
41
+ LUSD = "LUSD"
42
+ MKR = "MKR"
43
+ OS_ETH = "osETH"
44
+ PYUSD = "PYUSD"
45
+ R_ETH = "rETH"
46
+ RPL = "RPL"
47
+ RS_ETH = "rsETH"
48
+ S_DAI = "sDAI"
49
+ SNX = "SNX"
50
+ STG = "STG"
51
+ S_US_DE = "sUSDe"
52
+ T_BTC = "tBTC"
53
+ UNI = "UNI"
54
+ USDC = "USDC"
55
+ US_DE = "USDe"
56
+ USDS = "USDS"
57
+ USDT = "USDT"
58
+ WBTC = "WBTC"
59
+ WE_ETH = "weETH"
60
+ WETH = "WETH"
61
+ WST_ETH = "wstETH"
62
+ ARB = "ARB"
63
+ EURS = "EURS"
64
+ MAI = "MAI"
65
+ USD_CE = "USDCe"
66
+ AERO = "AERO"
67
+ EUR = "EUR"
68
+ VIRTUAL = "VIRTUAL"
69
+
70
+
71
+ class TokenPriceRequestTypedDict(TypedDict):
72
+ chain: TokenPriceChain
73
+ r"""The chain to use."""
74
+ token: TokenPriceToken
75
+ r"""A class representing the token.
76
+
77
+ This class is used to represent the token in the system. Notice individual
78
+ endpoints' documentation where per chain tokens are presented.
79
+ """
80
+
81
+
82
+ class TokenPriceRequest(BaseModel):
83
+ chain: Annotated[
84
+ TokenPriceChain,
85
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
86
+ ] = TokenPriceChain.ARBITRUM_MAINNET
87
+ r"""The chain to use."""
88
+
89
+ token: Annotated[
90
+ TokenPriceToken,
91
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
92
+ ] = TokenPriceToken.WBTC
93
+ r"""A class representing the token.
94
+
95
+ This class is used to represent the token in the system. Notice individual
96
+ endpoints' documentation where per chain tokens are presented.
97
+ """
@@ -0,0 +1,15 @@
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 TokenAddressResponseTypedDict(TypedDict):
9
+ address: str
10
+ r"""Address of the token provided"""
11
+
12
+
13
+ class TokenAddressResponse(BaseModel):
14
+ address: str
15
+ r"""Address of the token provided"""