compass_api_sdk 0.9.52__py3-none-any.whl → 1.0.0__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/aave_v3.py +70 -124
- compass_api_sdk/aerodrome_slipstream.py +86 -88
- compass_api_sdk/erc_4626_vaults.py +18 -42
- compass_api_sdk/models/__init__.py +908 -962
- compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_borrow_aaveborrowrequest.py → aaveborrowrequest.py} +10 -18
- compass_api_sdk/models/aavehistoricaltransactionsresponse.py +65 -0
- compass_api_sdk/models/{compass_api_backend_models_multicall_transact_request_aave_loop_request_aavelooprequest.py → aavelooprequest.py} +5 -11
- compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_repay_aaverepayrequest.py → aaverepayrequest.py} +10 -18
- compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_supply_aavesupplyrequest.py → aavesupplyrequest.py} +10 -18
- compass_api_sdk/models/{compass_api_backend_models_aave_transact_request_withdraw_aavewithdrawrequest.py → aavewithdrawrequest.py} +11 -19
- compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_read_response_positions_aerodromelppositionsresponse.py → aerodromelppositionsresponse.py} +2 -6
- compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_transact_request_swap_buy_exactly_aerodromeslipstreambuyexactlyrequest.py → aerodromeslipstreambuyexactlyrequest.py} +17 -27
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +125 -0
- compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_transact_request_liquidity_provision_mint_aerodromeslipstreammintliquidityprovisionrequest.py → aerodromeslipstreammintliquidityprovisionrequest.py} +33 -39
- compass_api_sdk/models/{compass_api_backend_models_aerodrome_slipstream_transact_request_swap_sell_exactly_aerodromeslipstreamsellexactlyrequest.py → aerodromeslipstreamsellexactlyrequest.py} +17 -27
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +66 -0
- compass_api_sdk/models/batcheduseroperationsrequest.py +36 -0
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_borrow.py → borrow.py} +2 -4
- compass_api_sdk/models/{compass_api_backend_config_chain_chain.py → chain.py} +1 -1
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_liquidationcall.py → liquidationcall.py} +2 -6
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_marketposition.py → marketposition.py} +2 -6
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_borrow_morphoborrowrequest.py → morphoborrowrequest.py} +11 -19
- compass_api_sdk/models/morphocheckuserpositionresponse.py +32 -0
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_deposit_morphodepositrequest.py → morphodepositrequest.py} +11 -23
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_morphogetmarketresponse.py → morphogetmarketresponse.py} +2 -6
- compass_api_sdk/models/morphogetmarketsresponse.py +17 -0
- compass_api_sdk/models/morphogetvaultsresponse.py +17 -0
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_markets_morphomarket.py → morphomarket.py} +2 -4
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_repay_morphorepayrequest.py → morphorepayrequest.py} +5 -9
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_supply_collateral_morphosupplycollateralrequest.py → morphosupplycollateralrequest.py} +11 -19
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vaults_morphovault.py → morphovault.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_withdraw_collateral_morphowithdrawcollateralrequest.py → morphowithdrawcollateralrequest.py} +11 -19
- compass_api_sdk/models/{compass_api_backend_models_morpho_transact_request_withdraw_morphowithdrawrequest.py → morphowithdrawrequest.py} +5 -15
- compass_api_sdk/models/{compass_api_backend_models_multicall_read_request_get_authorization_multicallauthorizationrequest.py → multicallauthorizationrequest.py} +5 -11
- compass_api_sdk/models/{compass_api_backend_models_multicall_transact_request_multicall_execution_request_multicallexecuterequest.py → multicallexecuterequest.py} +8 -21
- compass_api_sdk/models/odosswaprequest.py +90 -0
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_positions_openposition.py → openposition.py} +2 -4
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_market_pendlegetmarketresponse.py → pendlegetmarketresponse.py} +2 -4
- compass_api_sdk/models/pendlelistmarketsresponse.py +17 -0
- compass_api_sdk/models/pendlelistuserpositionsresponse.py +17 -0
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_markets_pendlemarket.py → pendlemarket.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_pendle_transact_request_redeem_yield_pendleredeemyieldrequest.py → pendleredeemyieldrequest.py} +5 -11
- compass_api_sdk/models/{compass_api_backend_models_generic_read_response_portfolio_portfolio.py → portfolio.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_positions_position.py → position.py} +7 -18
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_redeemunderlying.py → redeemunderlying.py} +2 -6
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_repay.py → repay.py} +2 -4
- compass_api_sdk/models/setallowancerequest.py +112 -0
- compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_buy_skybuyrequest.py → skybuyrequest.py} +13 -18
- compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_deposit_skydepositrequest.py → skydepositrequest.py} +10 -22
- compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_sell_skysellrequest.py → skysellrequest.py} +13 -21
- compass_api_sdk/models/{compass_api_backend_models_sky_transact_request_withdraw_skywithdrawrequest.py → skywithdrawrequest.py} +5 -13
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_supply.py → supply.py} +2 -4
- compass_api_sdk/models/supportedchaininfo.py +19 -0
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_swapborrowrate.py → swapborrowrate.py} +2 -6
- compass_api_sdk/models/tokentransferrequest.py +82 -0
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +111 -0
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +115 -0
- compass_api_sdk/models/{compass_api_backend_models_uniswap_transact_liquidity_provision_request_mint_uniswapmintliquidityprovisionrequest.py → uniswapmintliquidityprovisionrequest.py} +29 -43
- compass_api_sdk/models/uniswapsellexactlyrequest.py +111 -0
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +67 -0
- compass_api_sdk/models/{compass_api_backend_models_generic_transact_request_unwrap_weth_unwrapwethrequest.py → unwrapwethrequest.py} +10 -22
- compass_api_sdk/models/{compass_api_backend_models_aave_read_response_historical_transactions_usageascollateral.py → usageascollateral.py} +2 -6
- compass_api_sdk/models/{compass_api_backend_models_multicall_transact_request_multicall_execution_request_useroperation.py → useroperation.py} +2 -6
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_vault.py → vault.py} +2 -4
- compass_api_sdk/models/{compass_api_backend_models_vaults_transact_request_deposit_vaultdepositrequest.py → vaultdepositrequest.py} +11 -19
- compass_api_sdk/models/{compass_api_backend_models_vaults_read_response_vault_vaultgetvaultresponse.py → vaultgetvaultresponse.py} +2 -4
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_vaultposition.py → vaultposition.py} +5 -12
- compass_api_sdk/models/{compass_api_backend_models_vaults_transact_request_withdraw_vaultwithdrawrequest.py → vaultwithdrawrequest.py} +5 -11
- compass_api_sdk/models/{compass_api_backend_models_generic_transact_request_wrap_eth_wrapethrequest.py → wrapethrequest.py} +10 -20
- compass_api_sdk/morpho.py +82 -170
- compass_api_sdk/pendle.py +18 -56
- compass_api_sdk/sky.py +56 -106
- compass_api_sdk/smart_account.py +10 -38
- compass_api_sdk/swap.py +12 -26
- compass_api_sdk/token_sdk.py +12 -22
- compass_api_sdk/transaction_bundler.py +22 -70
- compass_api_sdk/uniswap_v3.py +90 -106
- compass_api_sdk/universal.py +44 -92
- {compass_api_sdk-0.9.52.dist-info → compass_api_sdk-1.0.0.dist-info}/METADATA +1 -1
- {compass_api_sdk-0.9.52.dist-info → compass_api_sdk-1.0.0.dist-info}/RECORD +82 -82
- compass_api_sdk/models/compass_api_backend_models_aave_read_response_historical_transactions_aavehistoricaltransactionsresponse.py +0 -115
- compass_api_sdk/models/compass_api_backend_models_aerodrome_slipstream_transact_request_liquidity_provision_increase_aerodromeslipstreamincreaseliquidityprovisionrequest.py +0 -125
- compass_api_sdk/models/compass_api_backend_models_aerodrome_slipstream_transact_request_liquidity_provision_withdraw_aerodromeslipstreamwithdrawliquidityprovisionrequest.py +0 -68
- compass_api_sdk/models/compass_api_backend_models_generic_read_response_chains_supportedchaininfo.py +0 -21
- compass_api_sdk/models/compass_api_backend_models_generic_transact_request_allowance_setallowancerequest.py +0 -139
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_check_user_position_morphocheckuserpositionresponse.py +0 -48
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_morphogetmarketsresponse.py +0 -26
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_morphogetvaultsresponse.py +0 -24
- compass_api_sdk/models/compass_api_backend_models_pendle_read_response_markets_pendlelistmarketsresponse.py +0 -24
- compass_api_sdk/models/compass_api_backend_models_pendle_read_response_positions_pendlelistuserpositionsresponse.py +0 -24
- compass_api_sdk/models/compass_api_backend_models_smart_account_transact_request_user_operations_batcheduseroperationsrequest.py +0 -49
- compass_api_sdk/models/compass_api_backend_models_swap_transact_request_odos_odosswaprequest.py +0 -108
- compass_api_sdk/models/compass_api_backend_models_token_transact_request_transfer_tokentransferrequest.py +0 -98
- compass_api_sdk/models/compass_api_backend_models_uniswap_transact_liquidity_provision_request_increase_uniswapincreaseliquidityprovisionrequest.py +0 -129
- compass_api_sdk/models/compass_api_backend_models_uniswap_transact_liquidity_provision_request_withdraw_uniswapwithdrawliquidityprovisionrequest.py +0 -68
- compass_api_sdk/models/compass_api_backend_models_uniswap_transact_swap_request_buy_exactly_uniswapbuyexactlyrequest.py +0 -123
- compass_api_sdk/models/compass_api_backend_models_uniswap_transact_swap_request_sell_exactly_uniswapsellexactlyrequest.py +0 -123
- {compass_api_sdk-0.9.52.dist-info → compass_api_sdk-1.0.0.dist-info}/WHEEL +0 -0
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
5
|
-
CompassAPIBackendModelsPendleReadResponsePositionsOpenPosition,
|
|
6
|
-
CompassAPIBackendModelsPendleReadResponsePositionsOpenPositionTypedDict,
|
|
7
|
-
)
|
|
4
|
+
from .openposition import OpenPosition, OpenPositionTypedDict
|
|
8
5
|
from .syposition import SyPosition, SyPositionTypedDict
|
|
9
6
|
from compass_api_sdk.types import BaseModel
|
|
10
7
|
from datetime import datetime
|
|
@@ -13,22 +10,18 @@ from typing import List
|
|
|
13
10
|
from typing_extensions import Annotated, TypedDict
|
|
14
11
|
|
|
15
12
|
|
|
16
|
-
class
|
|
13
|
+
class PositionTypedDict(TypedDict):
|
|
17
14
|
chain_id: int
|
|
18
15
|
total_open: int
|
|
19
16
|
total_closed: int
|
|
20
17
|
total_sy: int
|
|
21
|
-
open_positions: List[
|
|
22
|
-
|
|
23
|
-
]
|
|
24
|
-
closed_positions: List[
|
|
25
|
-
CompassAPIBackendModelsPendleReadResponsePositionsOpenPositionTypedDict
|
|
26
|
-
]
|
|
18
|
+
open_positions: List[OpenPositionTypedDict]
|
|
19
|
+
closed_positions: List[OpenPositionTypedDict]
|
|
27
20
|
sy_positions: List[SyPositionTypedDict]
|
|
28
21
|
updated_at: datetime
|
|
29
22
|
|
|
30
23
|
|
|
31
|
-
class
|
|
24
|
+
class Position(BaseModel):
|
|
32
25
|
chain_id: Annotated[int, pydantic.Field(alias="chainId")]
|
|
33
26
|
|
|
34
27
|
total_open: Annotated[int, pydantic.Field(alias="totalOpen")]
|
|
@@ -37,14 +30,10 @@ class CompassAPIBackendModelsPendleReadResponsePositionsPosition(BaseModel):
|
|
|
37
30
|
|
|
38
31
|
total_sy: Annotated[int, pydantic.Field(alias="totalSy")]
|
|
39
32
|
|
|
40
|
-
open_positions: Annotated[
|
|
41
|
-
List[CompassAPIBackendModelsPendleReadResponsePositionsOpenPosition],
|
|
42
|
-
pydantic.Field(alias="openPositions"),
|
|
43
|
-
]
|
|
33
|
+
open_positions: Annotated[List[OpenPosition], pydantic.Field(alias="openPositions")]
|
|
44
34
|
|
|
45
35
|
closed_positions: Annotated[
|
|
46
|
-
List[
|
|
47
|
-
pydantic.Field(alias="closedPositions"),
|
|
36
|
+
List[OpenPosition], pydantic.Field(alias="closedPositions")
|
|
48
37
|
]
|
|
49
38
|
|
|
50
39
|
sy_positions: Annotated[List[SyPosition], pydantic.Field(alias="syPositions")]
|
|
@@ -7,9 +7,7 @@ import pydantic
|
|
|
7
7
|
from typing_extensions import Annotated, TypedDict
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
11
|
-
TypedDict
|
|
12
|
-
):
|
|
10
|
+
class RedeemUnderlyingTypedDict(TypedDict):
|
|
13
11
|
id: str
|
|
14
12
|
r"""The id of a historical transaction on aave"""
|
|
15
13
|
timestamp: int
|
|
@@ -26,9 +24,7 @@ class CompassAPIBackendModelsAaveReadResponseHistoricalTransactionsRedeemUnderly
|
|
|
26
24
|
block: int
|
|
27
25
|
|
|
28
26
|
|
|
29
|
-
class
|
|
30
|
-
BaseModel
|
|
31
|
-
):
|
|
27
|
+
class RedeemUnderlying(BaseModel):
|
|
32
28
|
id: str
|
|
33
29
|
r"""The id of a historical transaction on aave"""
|
|
34
30
|
|
|
@@ -10,9 +10,7 @@ from typing import Literal
|
|
|
10
10
|
from typing_extensions import Annotated, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class
|
|
14
|
-
TypedDict
|
|
15
|
-
):
|
|
13
|
+
class RepayTypedDict(TypedDict):
|
|
16
14
|
id: str
|
|
17
15
|
r"""The id of a historical transaction on aave"""
|
|
18
16
|
timestamp: int
|
|
@@ -28,7 +26,7 @@ class CompassAPIBackendModelsAaveReadResponseHistoricalTransactionsRepayTypedDic
|
|
|
28
26
|
r"""The type of transaction"""
|
|
29
27
|
|
|
30
28
|
|
|
31
|
-
class
|
|
29
|
+
class Repay(BaseModel):
|
|
32
30
|
id: str
|
|
33
31
|
r"""The id of a historical transaction on aave"""
|
|
34
32
|
|
|
@@ -0,0 +1,112 @@
|
|
|
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 validate_const
|
|
7
|
+
from enum import Enum
|
|
8
|
+
import pydantic
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from typing import Literal, Optional, Union
|
|
11
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
SetAllowanceRequestTokenTypedDict = TypeAliasType(
|
|
15
|
+
"SetAllowanceRequestTokenTypedDict", Union[TokenEnum, str]
|
|
16
|
+
)
|
|
17
|
+
r"""The symbol or address of the token for which the allowance is set.."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
SetAllowanceRequestToken = TypeAliasType(
|
|
21
|
+
"SetAllowanceRequestToken", Union[TokenEnum, str]
|
|
22
|
+
)
|
|
23
|
+
r"""The symbol or address of the token for which the allowance is set.."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class SetAllowanceRequestContractEnum(str, Enum):
|
|
27
|
+
AAVE_V3_POOL = "AaveV3Pool"
|
|
28
|
+
AERODROME_BASIC_ROUTER = "AerodromeBasicRouter"
|
|
29
|
+
AERODROME_SLIPSTREAM_ROUTER = "AerodromeSlipstreamRouter"
|
|
30
|
+
AERODROME_SLIPSTREAM_NONFUNGIBLE_POSITION_MANAGER = (
|
|
31
|
+
"AerodromeSlipstreamNonfungiblePositionManager"
|
|
32
|
+
)
|
|
33
|
+
UNISWAP_V3_ROUTER = "UniswapV3Router"
|
|
34
|
+
UNISWAP_V3_NFT_POSITION_MANAGER = "UniswapV3NFTPositionManager"
|
|
35
|
+
MORPHO = "Morpho"
|
|
36
|
+
SKY_DAI_USDS_CONVERTER = "SkyDaiUsdsConverter"
|
|
37
|
+
SKY_USDC_USDS_CONVERTER = "SkyUsdcUsdsConverter"
|
|
38
|
+
SKY_USDS_VAULT = "SkyUsdsVault"
|
|
39
|
+
PENDLE_ROUTER = "PendleRouter"
|
|
40
|
+
ODOS_ROUTER = "OdosRouter"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
SetAllowanceRequestContractUnionTypedDict = TypeAliasType(
|
|
44
|
+
"SetAllowanceRequestContractUnionTypedDict",
|
|
45
|
+
Union[SetAllowanceRequestContractEnum, str],
|
|
46
|
+
)
|
|
47
|
+
r"""The name or address of the contract to set spending allowance for."""
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
SetAllowanceRequestContractUnion = TypeAliasType(
|
|
51
|
+
"SetAllowanceRequestContractUnion", Union[SetAllowanceRequestContractEnum, str]
|
|
52
|
+
)
|
|
53
|
+
r"""The name or address of the contract to set spending allowance for."""
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
SetAllowanceRequestAmountTypedDict = TypeAliasType(
|
|
57
|
+
"SetAllowanceRequestAmountTypedDict", Union[float, str]
|
|
58
|
+
)
|
|
59
|
+
r"""The amount to set the allowance to."""
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
SetAllowanceRequestAmount = TypeAliasType(
|
|
63
|
+
"SetAllowanceRequestAmount", Union[float, str]
|
|
64
|
+
)
|
|
65
|
+
r"""The amount to set the allowance to."""
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class SetAllowanceRequestChain(str, Enum):
|
|
69
|
+
ARBITRUM = "arbitrum"
|
|
70
|
+
BASE = "base"
|
|
71
|
+
ETHEREUM = "ethereum"
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class SetAllowanceRequestTypedDict(TypedDict):
|
|
75
|
+
r"""Request model for increasing token allowance for a contract."""
|
|
76
|
+
|
|
77
|
+
token: SetAllowanceRequestTokenTypedDict
|
|
78
|
+
r"""The symbol or address of the token for which the allowance is set.."""
|
|
79
|
+
contract: SetAllowanceRequestContractUnionTypedDict
|
|
80
|
+
r"""The name or address of the contract to set spending allowance for."""
|
|
81
|
+
amount: SetAllowanceRequestAmountTypedDict
|
|
82
|
+
r"""The amount to set the allowance to."""
|
|
83
|
+
chain: SetAllowanceRequestChain
|
|
84
|
+
sender: str
|
|
85
|
+
r"""The address of the transaction sender."""
|
|
86
|
+
action_type: Literal["SET_ALLOWANCE"]
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class SetAllowanceRequest(BaseModel):
|
|
90
|
+
r"""Request model for increasing token allowance for a contract."""
|
|
91
|
+
|
|
92
|
+
token: SetAllowanceRequestToken
|
|
93
|
+
r"""The symbol or address of the token for which the allowance is set.."""
|
|
94
|
+
|
|
95
|
+
contract: SetAllowanceRequestContractUnion
|
|
96
|
+
r"""The name or address of the contract to set spending allowance for."""
|
|
97
|
+
|
|
98
|
+
amount: SetAllowanceRequestAmount
|
|
99
|
+
r"""The amount to set the allowance to."""
|
|
100
|
+
|
|
101
|
+
chain: SetAllowanceRequestChain
|
|
102
|
+
|
|
103
|
+
sender: str
|
|
104
|
+
r"""The address of the transaction sender."""
|
|
105
|
+
|
|
106
|
+
ACTION_TYPE: Annotated[
|
|
107
|
+
Annotated[
|
|
108
|
+
Optional[Literal["SET_ALLOWANCE"]],
|
|
109
|
+
AfterValidator(validate_const("SET_ALLOWANCE")),
|
|
110
|
+
],
|
|
111
|
+
pydantic.Field(alias="action_type"),
|
|
112
|
+
] = "SET_ALLOWANCE"
|
|
@@ -10,51 +10,46 @@ from typing import Literal, Optional, Union
|
|
|
10
10
|
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class
|
|
13
|
+
class SkyBuyRequestTokenIn(str, Enum):
|
|
14
14
|
r"""The token you would like to swap 1:1 for USDS. Choose from DAI or USDC."""
|
|
15
15
|
|
|
16
16
|
DAI = "DAI"
|
|
17
17
|
USDC = "USDC"
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"CompassAPIBackendModelsSkyTransactRequestBuySkyBuyRequestAmountTypedDict",
|
|
23
|
-
Union[float, str],
|
|
24
|
-
)
|
|
20
|
+
SkyBuyRequestAmountTypedDict = TypeAliasType(
|
|
21
|
+
"SkyBuyRequestAmountTypedDict", Union[float, str]
|
|
25
22
|
)
|
|
26
23
|
r"""The amount of USDS you would like to buy 1:1 with 'token_in'."""
|
|
27
24
|
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
"CompassAPIBackendModelsSkyTransactRequestBuySkyBuyRequestAmount", Union[float, str]
|
|
31
|
-
)
|
|
26
|
+
SkyBuyRequestAmount = TypeAliasType("SkyBuyRequestAmount", Union[float, str])
|
|
32
27
|
r"""The amount of USDS you would like to buy 1:1 with 'token_in'."""
|
|
33
28
|
|
|
34
29
|
|
|
35
|
-
class
|
|
30
|
+
class SkyBuyRequestChain(str, Enum):
|
|
36
31
|
ETHEREUM = "ethereum"
|
|
37
32
|
|
|
38
33
|
|
|
39
|
-
class
|
|
40
|
-
token_in:
|
|
34
|
+
class SkyBuyRequestTypedDict(TypedDict):
|
|
35
|
+
token_in: SkyBuyRequestTokenIn
|
|
41
36
|
r"""The token you would like to swap 1:1 for USDS. Choose from DAI or USDC."""
|
|
42
|
-
amount:
|
|
37
|
+
amount: SkyBuyRequestAmountTypedDict
|
|
43
38
|
r"""The amount of USDS you would like to buy 1:1 with 'token_in'."""
|
|
44
|
-
chain:
|
|
39
|
+
chain: SkyBuyRequestChain
|
|
45
40
|
sender: str
|
|
46
41
|
r"""The address of the transaction sender."""
|
|
47
42
|
action_type: Literal["SKY_BUY"]
|
|
48
43
|
|
|
49
44
|
|
|
50
|
-
class
|
|
51
|
-
token_in:
|
|
45
|
+
class SkyBuyRequest(BaseModel):
|
|
46
|
+
token_in: SkyBuyRequestTokenIn
|
|
52
47
|
r"""The token you would like to swap 1:1 for USDS. Choose from DAI or USDC."""
|
|
53
48
|
|
|
54
|
-
amount:
|
|
49
|
+
amount: SkyBuyRequestAmount
|
|
55
50
|
r"""The amount of USDS you would like to buy 1:1 with 'token_in'."""
|
|
56
51
|
|
|
57
|
-
chain:
|
|
52
|
+
chain: SkyBuyRequestChain
|
|
58
53
|
|
|
59
54
|
sender: str
|
|
60
55
|
r"""The address of the transaction sender."""
|
|
@@ -17,43 +17,33 @@ from typing import Literal, Optional, Union
|
|
|
17
17
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
Union[float, str],
|
|
20
|
+
SkyDepositRequestAmountTypedDict = TypeAliasType(
|
|
21
|
+
"SkyDepositRequestAmountTypedDict", Union[float, str]
|
|
23
22
|
)
|
|
24
23
|
r"""The amount of USDS you would like to deposit for sUSDS to earn yield."""
|
|
25
24
|
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
"CompassAPIBackendModelsSkyTransactRequestDepositSkyDepositRequestAmount",
|
|
29
|
-
Union[float, str],
|
|
30
|
-
)
|
|
26
|
+
SkyDepositRequestAmount = TypeAliasType("SkyDepositRequestAmount", Union[float, str])
|
|
31
27
|
r"""The amount of USDS you would like to deposit for sUSDS to earn yield."""
|
|
32
28
|
|
|
33
29
|
|
|
34
|
-
class
|
|
30
|
+
class SkyDepositRequestChain(str, Enum):
|
|
35
31
|
ETHEREUM = "ethereum"
|
|
36
32
|
|
|
37
33
|
|
|
38
|
-
class
|
|
39
|
-
|
|
40
|
-
):
|
|
41
|
-
amount: (
|
|
42
|
-
CompassAPIBackendModelsSkyTransactRequestDepositSkyDepositRequestAmountTypedDict
|
|
43
|
-
)
|
|
34
|
+
class SkyDepositRequestTypedDict(TypedDict):
|
|
35
|
+
amount: SkyDepositRequestAmountTypedDict
|
|
44
36
|
r"""The amount of USDS you would like to deposit for sUSDS to earn yield."""
|
|
45
37
|
sender: str
|
|
46
38
|
r"""The address of the transaction sender."""
|
|
47
39
|
action_type: Literal["SKY_DEPOSIT"]
|
|
48
40
|
receiver: NotRequired[Nullable[str]]
|
|
49
41
|
r"""The address which will receive the sUSDS. Defaults to the sender."""
|
|
50
|
-
chain: NotRequired[
|
|
51
|
-
CompassAPIBackendModelsSkyTransactRequestDepositSkyDepositRequestChain
|
|
52
|
-
]
|
|
42
|
+
chain: NotRequired[SkyDepositRequestChain]
|
|
53
43
|
|
|
54
44
|
|
|
55
|
-
class
|
|
56
|
-
amount:
|
|
45
|
+
class SkyDepositRequest(BaseModel):
|
|
46
|
+
amount: SkyDepositRequestAmount
|
|
57
47
|
r"""The amount of USDS you would like to deposit for sUSDS to earn yield."""
|
|
58
48
|
|
|
59
49
|
sender: str
|
|
@@ -70,9 +60,7 @@ class CompassAPIBackendModelsSkyTransactRequestDepositSkyDepositRequest(BaseMode
|
|
|
70
60
|
receiver: OptionalNullable[str] = UNSET
|
|
71
61
|
r"""The address which will receive the sUSDS. Defaults to the sender."""
|
|
72
62
|
|
|
73
|
-
chain: Optional[
|
|
74
|
-
CompassAPIBackendModelsSkyTransactRequestDepositSkyDepositRequestChain
|
|
75
|
-
] = CompassAPIBackendModelsSkyTransactRequestDepositSkyDepositRequestChain.ETHEREUM
|
|
63
|
+
chain: Optional[SkyDepositRequestChain] = SkyDepositRequestChain.ETHEREUM
|
|
76
64
|
|
|
77
65
|
@model_serializer(mode="wrap")
|
|
78
66
|
def serialize_model(self, handler):
|
|
@@ -10,49 +10,43 @@ from typing import Literal, Optional, Union
|
|
|
10
10
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class
|
|
13
|
+
class SkySellRequestTokenOut(str, Enum):
|
|
14
14
|
r"""The token you would like to swap 1:1 with USDS. Choose from DAI or USDC."""
|
|
15
15
|
|
|
16
16
|
DAI = "DAI"
|
|
17
17
|
USDC = "USDC"
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"CompassAPIBackendModelsSkyTransactRequestSellSkySellRequestAmountTypedDict",
|
|
23
|
-
Union[float, str],
|
|
24
|
-
)
|
|
20
|
+
SkySellRequestAmountTypedDict = TypeAliasType(
|
|
21
|
+
"SkySellRequestAmountTypedDict", Union[float, str]
|
|
25
22
|
)
|
|
26
23
|
r"""The amount of USDS you would like to sell 1:1 for 'token_out'."""
|
|
27
24
|
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
"CompassAPIBackendModelsSkyTransactRequestSellSkySellRequestAmount",
|
|
31
|
-
Union[float, str],
|
|
32
|
-
)
|
|
26
|
+
SkySellRequestAmount = TypeAliasType("SkySellRequestAmount", Union[float, str])
|
|
33
27
|
r"""The amount of USDS you would like to sell 1:1 for 'token_out'."""
|
|
34
28
|
|
|
35
29
|
|
|
36
|
-
class
|
|
30
|
+
class SkySellRequestChain(str, Enum):
|
|
37
31
|
ETHEREUM = "ethereum"
|
|
38
32
|
|
|
39
33
|
|
|
40
|
-
class
|
|
41
|
-
token_out:
|
|
34
|
+
class SkySellRequestTypedDict(TypedDict):
|
|
35
|
+
token_out: SkySellRequestTokenOut
|
|
42
36
|
r"""The token you would like to swap 1:1 with USDS. Choose from DAI or USDC."""
|
|
43
|
-
amount:
|
|
37
|
+
amount: SkySellRequestAmountTypedDict
|
|
44
38
|
r"""The amount of USDS you would like to sell 1:1 for 'token_out'."""
|
|
45
39
|
sender: str
|
|
46
40
|
r"""The address of the transaction sender."""
|
|
47
41
|
action_type: Literal["SKY_SELL"]
|
|
48
|
-
chain: NotRequired[
|
|
42
|
+
chain: NotRequired[SkySellRequestChain]
|
|
49
43
|
|
|
50
44
|
|
|
51
|
-
class
|
|
52
|
-
token_out:
|
|
45
|
+
class SkySellRequest(BaseModel):
|
|
46
|
+
token_out: SkySellRequestTokenOut
|
|
53
47
|
r"""The token you would like to swap 1:1 with USDS. Choose from DAI or USDC."""
|
|
54
48
|
|
|
55
|
-
amount:
|
|
49
|
+
amount: SkySellRequestAmount
|
|
56
50
|
r"""The amount of USDS you would like to sell 1:1 for 'token_out'."""
|
|
57
51
|
|
|
58
52
|
sender: str
|
|
@@ -65,6 +59,4 @@ class CompassAPIBackendModelsSkyTransactRequestSellSkySellRequest(BaseModel):
|
|
|
65
59
|
pydantic.Field(alias="action_type"),
|
|
66
60
|
] = "SKY_SELL"
|
|
67
61
|
|
|
68
|
-
chain: Optional[
|
|
69
|
-
CompassAPIBackendModelsSkyTransactRequestSellSkySellRequestChain
|
|
70
|
-
] = CompassAPIBackendModelsSkyTransactRequestSellSkySellRequestChain.ETHEREUM
|
|
62
|
+
chain: Optional[SkySellRequestChain] = SkySellRequestChain.ETHEREUM
|
|
@@ -17,15 +17,11 @@ from typing import Any, Literal, Optional
|
|
|
17
17
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
class
|
|
21
|
-
str, Enum
|
|
22
|
-
):
|
|
20
|
+
class SkyWithdrawRequestChain(str, Enum):
|
|
23
21
|
ETHEREUM = "ethereum"
|
|
24
22
|
|
|
25
23
|
|
|
26
|
-
class
|
|
27
|
-
TypedDict
|
|
28
|
-
):
|
|
24
|
+
class SkyWithdrawRequestTypedDict(TypedDict):
|
|
29
25
|
amount: Any
|
|
30
26
|
r"""The amount of USDS you would like to withdraw. If set to 'ALL', your total deposited USDS amount will be withdrawn."""
|
|
31
27
|
sender: str
|
|
@@ -33,12 +29,10 @@ class CompassAPIBackendModelsSkyTransactRequestWithdrawSkyWithdrawRequestTypedDi
|
|
|
33
29
|
action_type: Literal["SKY_WITHDRAW"]
|
|
34
30
|
receiver: NotRequired[Nullable[str]]
|
|
35
31
|
r"""The address which will receive the withdrawn USDS. Defaults to the sender."""
|
|
36
|
-
chain: NotRequired[
|
|
37
|
-
CompassAPIBackendModelsSkyTransactRequestWithdrawSkyWithdrawRequestChain
|
|
38
|
-
]
|
|
32
|
+
chain: NotRequired[SkyWithdrawRequestChain]
|
|
39
33
|
|
|
40
34
|
|
|
41
|
-
class
|
|
35
|
+
class SkyWithdrawRequest(BaseModel):
|
|
42
36
|
amount: Any
|
|
43
37
|
r"""The amount of USDS you would like to withdraw. If set to 'ALL', your total deposited USDS amount will be withdrawn."""
|
|
44
38
|
|
|
@@ -56,9 +50,7 @@ class CompassAPIBackendModelsSkyTransactRequestWithdrawSkyWithdrawRequest(BaseMo
|
|
|
56
50
|
receiver: OptionalNullable[str] = UNSET
|
|
57
51
|
r"""The address which will receive the withdrawn USDS. Defaults to the sender."""
|
|
58
52
|
|
|
59
|
-
chain: Optional[
|
|
60
|
-
CompassAPIBackendModelsSkyTransactRequestWithdrawSkyWithdrawRequestChain
|
|
61
|
-
] = CompassAPIBackendModelsSkyTransactRequestWithdrawSkyWithdrawRequestChain.ETHEREUM
|
|
53
|
+
chain: Optional[SkyWithdrawRequestChain] = SkyWithdrawRequestChain.ETHEREUM
|
|
62
54
|
|
|
63
55
|
@model_serializer(mode="wrap")
|
|
64
56
|
def serialize_model(self, handler):
|
|
@@ -10,9 +10,7 @@ from typing import Literal
|
|
|
10
10
|
from typing_extensions import Annotated, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class
|
|
14
|
-
TypedDict
|
|
15
|
-
):
|
|
13
|
+
class SupplyTypedDict(TypedDict):
|
|
16
14
|
id: str
|
|
17
15
|
r"""The id of a historical transaction on aave"""
|
|
18
16
|
timestamp: int
|
|
@@ -29,7 +27,7 @@ class CompassAPIBackendModelsAaveReadResponseHistoricalTransactionsSupplyTypedDi
|
|
|
29
27
|
r"""The type of transaction"""
|
|
30
28
|
|
|
31
29
|
|
|
32
|
-
class
|
|
30
|
+
class Supply(BaseModel):
|
|
33
31
|
id: str
|
|
34
32
|
r"""The id of a historical transaction on aave"""
|
|
35
33
|
|
|
@@ -0,0 +1,19 @@
|
|
|
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 BaseModel
|
|
6
|
+
from typing import List
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SupportedChainInfoTypedDict(TypedDict):
|
|
11
|
+
r"""Response model for a chain."""
|
|
12
|
+
|
|
13
|
+
chains: List[Chain]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class SupportedChainInfo(BaseModel):
|
|
17
|
+
r"""Response model for a chain."""
|
|
18
|
+
|
|
19
|
+
chains: List[Chain]
|
|
@@ -10,9 +10,7 @@ from typing import Literal
|
|
|
10
10
|
from typing_extensions import Annotated, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class
|
|
14
|
-
TypedDict
|
|
15
|
-
):
|
|
13
|
+
class SwapBorrowRateTypedDict(TypedDict):
|
|
16
14
|
id: str
|
|
17
15
|
r"""The id of a historical transaction on aave"""
|
|
18
16
|
timestamp: int
|
|
@@ -28,9 +26,7 @@ class CompassAPIBackendModelsAaveReadResponseHistoricalTransactionsSwapBorrowRat
|
|
|
28
26
|
action: Literal["SwapBorrowRate"]
|
|
29
27
|
|
|
30
28
|
|
|
31
|
-
class
|
|
32
|
-
BaseModel
|
|
33
|
-
):
|
|
29
|
+
class SwapBorrowRate(BaseModel):
|
|
34
30
|
id: str
|
|
35
31
|
r"""The id of a historical transaction on aave"""
|
|
36
32
|
|
|
@@ -0,0 +1,82 @@
|
|
|
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 validate_const
|
|
7
|
+
from enum import Enum
|
|
8
|
+
import pydantic
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from typing import Literal, Optional, Union
|
|
11
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
TokenTransferRequestAmountTypedDict = TypeAliasType(
|
|
15
|
+
"TokenTransferRequestAmountTypedDict", Union[float, str]
|
|
16
|
+
)
|
|
17
|
+
r"""Amount of token to transfer"""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
TokenTransferRequestAmount = TypeAliasType(
|
|
21
|
+
"TokenTransferRequestAmount", Union[float, str]
|
|
22
|
+
)
|
|
23
|
+
r"""Amount of token to transfer"""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
TokenTransferRequestTokenTypedDict = TypeAliasType(
|
|
27
|
+
"TokenTransferRequestTokenTypedDict", Union[TokenEnum, str]
|
|
28
|
+
)
|
|
29
|
+
r"""The symbol of the token to transfer.."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
TokenTransferRequestToken = TypeAliasType(
|
|
33
|
+
"TokenTransferRequestToken", Union[TokenEnum, str]
|
|
34
|
+
)
|
|
35
|
+
r"""The symbol of the token to transfer.."""
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class TokenTransferRequestChain(str, Enum):
|
|
39
|
+
ARBITRUM = "arbitrum"
|
|
40
|
+
BASE = "base"
|
|
41
|
+
ETHEREUM = "ethereum"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class TokenTransferRequestTypedDict(TypedDict):
|
|
45
|
+
r"""Request model for transferring ETH or ERC20 tokens."""
|
|
46
|
+
|
|
47
|
+
amount: TokenTransferRequestAmountTypedDict
|
|
48
|
+
r"""Amount of token to transfer"""
|
|
49
|
+
token: TokenTransferRequestTokenTypedDict
|
|
50
|
+
r"""The symbol of the token to transfer.."""
|
|
51
|
+
to: str
|
|
52
|
+
r"""The recipient of the tokens."""
|
|
53
|
+
chain: TokenTransferRequestChain
|
|
54
|
+
sender: str
|
|
55
|
+
r"""The address of the transaction sender."""
|
|
56
|
+
action_type: Literal["TOKEN_TRANSFER"]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class TokenTransferRequest(BaseModel):
|
|
60
|
+
r"""Request model for transferring ETH or ERC20 tokens."""
|
|
61
|
+
|
|
62
|
+
amount: TokenTransferRequestAmount
|
|
63
|
+
r"""Amount of token to transfer"""
|
|
64
|
+
|
|
65
|
+
token: TokenTransferRequestToken
|
|
66
|
+
r"""The symbol of the token to transfer.."""
|
|
67
|
+
|
|
68
|
+
to: str
|
|
69
|
+
r"""The recipient of the tokens."""
|
|
70
|
+
|
|
71
|
+
chain: TokenTransferRequestChain
|
|
72
|
+
|
|
73
|
+
sender: str
|
|
74
|
+
r"""The address of the transaction sender."""
|
|
75
|
+
|
|
76
|
+
ACTION_TYPE: Annotated[
|
|
77
|
+
Annotated[
|
|
78
|
+
Optional[Literal["TOKEN_TRANSFER"]],
|
|
79
|
+
AfterValidator(validate_const("TOKEN_TRANSFER")),
|
|
80
|
+
],
|
|
81
|
+
pydantic.Field(alias="action_type"),
|
|
82
|
+
] = "TOKEN_TRANSFER"
|