compass_api_sdk 1.0.0__py3-none-any.whl → 1.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.
- compass_api_sdk/_version.py +3 -3
- compass_api_sdk/aave_v3.py +8 -0
- compass_api_sdk/ethena.py +880 -0
- compass_api_sdk/models/__init__.py +143 -28
- compass_api_sdk/models/bundlertransactionresponse.py +17 -0
- compass_api_sdk/models/compass_api_backend_models_vaults_read_response_vault_userposition.py +8 -4
- compass_api_sdk/models/cooldownposition.py +35 -0
- compass_api_sdk/models/ethenadepositparams.py +82 -0
- compass_api_sdk/models/ethenadepositrequest.py +95 -0
- compass_api_sdk/models/ethenagetvaultresponse.py +109 -0
- compass_api_sdk/models/ethenarequesttowithdrawparams.py +28 -0
- compass_api_sdk/models/ethenarequesttowithdrawrequest.py +41 -0
- compass_api_sdk/models/ethenarequesttowithdrawtransactionresponse.py +37 -0
- compass_api_sdk/models/ethenawithdrawparams.py +70 -0
- compass_api_sdk/models/ethenawithdrawrequest.py +83 -0
- compass_api_sdk/models/odostransactionresponse.py +37 -0
- compass_api_sdk/models/pendletxresponse.py +2 -11
- compass_api_sdk/models/setallowanceparams.py +1 -0
- compass_api_sdk/models/setallowancerequest.py +1 -0
- compass_api_sdk/models/token_enum.py +31 -25
- compass_api_sdk/models/tokentransferparams.py +21 -21
- compass_api_sdk/models/tokentransferrequest.py +21 -21
- compass_api_sdk/models/transactionresponse.py +2 -11
- compass_api_sdk/models/{compass_api_backend_models_vaults_read_response_vault_asset.py → underlyingtoken.py} +2 -2
- compass_api_sdk/models/uniswapbuyexactlytransactionresponse.py +2 -10
- compass_api_sdk/models/uniswapsellexactlytransactionresponse.py +2 -10
- compass_api_sdk/models/useroperation.py +25 -19
- compass_api_sdk/models/v1_aave_avg_rateop.py +31 -25
- compass_api_sdk/models/v1_aave_liquidity_changeop.py +31 -25
- compass_api_sdk/models/v1_aave_rateop.py +31 -25
- compass_api_sdk/models/v1_aave_reserve_overviewop.py +31 -25
- compass_api_sdk/models/v1_aave_std_rateop.py +31 -25
- compass_api_sdk/models/v1_aave_token_priceop.py +31 -25
- compass_api_sdk/models/v1_aave_user_position_per_tokenop.py +31 -25
- compass_api_sdk/models/v1_aerodrome_slipstream_pool_priceop.py +62 -50
- compass_api_sdk/models/v1_ethena_vaultop.py +75 -0
- compass_api_sdk/models/v1_generic_allowanceop.py +1 -0
- compass_api_sdk/models/v1_token_addressop.py +31 -25
- compass_api_sdk/models/v1_token_priceop.py +4 -16
- compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +6 -3
- compass_api_sdk/models/v1_uniswap_pool_priceop.py +62 -50
- compass_api_sdk/models/v1_uniswap_quote_buy_exactlyop.py +62 -50
- compass_api_sdk/models/v1_uniswap_quote_sell_exactlyop.py +62 -50
- compass_api_sdk/models/vaultgetvaultresponse.py +3 -6
- compass_api_sdk/sdk.py +3 -0
- compass_api_sdk/swap.py +4 -4
- compass_api_sdk/token_sdk.py +20 -20
- compass_api_sdk/transaction_bundler.py +4 -4
- {compass_api_sdk-1.0.0.dist-info → compass_api_sdk-1.0.1.dist-info}/METADATA +150 -135
- {compass_api_sdk-1.0.0.dist-info → compass_api_sdk-1.0.1.dist-info}/RECORD +51 -39
- compass_api_sdk/models/tokentransfererc20params.py +0 -63
- {compass_api_sdk-1.0.0.dist-info → compass_api_sdk-1.0.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .apy import Apy, ApyTypedDict
|
|
5
|
+
from .compass_api_backend_models_vaults_read_response_vault_userposition import (
|
|
6
|
+
CompassAPIBackendModelsVaultsReadResponseVaultUserPosition,
|
|
7
|
+
CompassAPIBackendModelsVaultsReadResponseVaultUserPositionTypedDict,
|
|
8
|
+
)
|
|
9
|
+
from .cooldownposition import CooldownPosition, CooldownPositionTypedDict
|
|
10
|
+
from .underlyingtoken import UnderlyingToken, UnderlyingTokenTypedDict
|
|
11
|
+
from compass_api_sdk.types import (
|
|
12
|
+
BaseModel,
|
|
13
|
+
Nullable,
|
|
14
|
+
OptionalNullable,
|
|
15
|
+
UNSET,
|
|
16
|
+
UNSET_SENTINEL,
|
|
17
|
+
)
|
|
18
|
+
from pydantic import model_serializer
|
|
19
|
+
from typing_extensions import NotRequired, TypedDict
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class EthenaGetVaultResponseTypedDict(TypedDict):
|
|
23
|
+
name: str
|
|
24
|
+
r"""Name of the vault."""
|
|
25
|
+
symbol: str
|
|
26
|
+
r"""Symbol of the vault."""
|
|
27
|
+
decimals: int
|
|
28
|
+
r"""Number of decimals used for the vault's share precision."""
|
|
29
|
+
total_assets: str
|
|
30
|
+
r"""Total amount of assets deposited in the vault."""
|
|
31
|
+
total_supply: str
|
|
32
|
+
r"""Total amount of shares issued from the vault."""
|
|
33
|
+
share_price: str
|
|
34
|
+
r"""The price of one vault share in terms of the underlying asset."""
|
|
35
|
+
underlying_token: UnderlyingTokenTypedDict
|
|
36
|
+
apy: ApyTypedDict
|
|
37
|
+
cooldown_duration_days: int
|
|
38
|
+
r"""The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made."""
|
|
39
|
+
user_position: NotRequired[
|
|
40
|
+
Nullable[CompassAPIBackendModelsVaultsReadResponseVaultUserPositionTypedDict]
|
|
41
|
+
]
|
|
42
|
+
r"""The user's position in the vault."""
|
|
43
|
+
cooldown_position: NotRequired[Nullable[CooldownPositionTypedDict]]
|
|
44
|
+
r"""The user's cooldown position."""
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class EthenaGetVaultResponse(BaseModel):
|
|
48
|
+
name: str
|
|
49
|
+
r"""Name of the vault."""
|
|
50
|
+
|
|
51
|
+
symbol: str
|
|
52
|
+
r"""Symbol of the vault."""
|
|
53
|
+
|
|
54
|
+
decimals: int
|
|
55
|
+
r"""Number of decimals used for the vault's share precision."""
|
|
56
|
+
|
|
57
|
+
total_assets: str
|
|
58
|
+
r"""Total amount of assets deposited in the vault."""
|
|
59
|
+
|
|
60
|
+
total_supply: str
|
|
61
|
+
r"""Total amount of shares issued from the vault."""
|
|
62
|
+
|
|
63
|
+
share_price: str
|
|
64
|
+
r"""The price of one vault share in terms of the underlying asset."""
|
|
65
|
+
|
|
66
|
+
underlying_token: UnderlyingToken
|
|
67
|
+
|
|
68
|
+
apy: Apy
|
|
69
|
+
|
|
70
|
+
cooldown_duration_days: int
|
|
71
|
+
r"""The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made."""
|
|
72
|
+
|
|
73
|
+
user_position: OptionalNullable[
|
|
74
|
+
CompassAPIBackendModelsVaultsReadResponseVaultUserPosition
|
|
75
|
+
] = UNSET
|
|
76
|
+
r"""The user's position in the vault."""
|
|
77
|
+
|
|
78
|
+
cooldown_position: OptionalNullable[CooldownPosition] = UNSET
|
|
79
|
+
r"""The user's cooldown position."""
|
|
80
|
+
|
|
81
|
+
@model_serializer(mode="wrap")
|
|
82
|
+
def serialize_model(self, handler):
|
|
83
|
+
optional_fields = ["user_position", "cooldown_position"]
|
|
84
|
+
nullable_fields = ["user_position", "cooldown_position"]
|
|
85
|
+
null_default_fields = []
|
|
86
|
+
|
|
87
|
+
serialized = handler(self)
|
|
88
|
+
|
|
89
|
+
m = {}
|
|
90
|
+
|
|
91
|
+
for n, f in type(self).model_fields.items():
|
|
92
|
+
k = f.alias or n
|
|
93
|
+
val = serialized.get(k)
|
|
94
|
+
serialized.pop(k, None)
|
|
95
|
+
|
|
96
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
97
|
+
is_set = (
|
|
98
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
99
|
+
or k in null_default_fields
|
|
100
|
+
) # pylint: disable=no-member
|
|
101
|
+
|
|
102
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
103
|
+
m[k] = val
|
|
104
|
+
elif val != UNSET_SENTINEL and (
|
|
105
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
106
|
+
):
|
|
107
|
+
m[k] = val
|
|
108
|
+
|
|
109
|
+
return m
|
|
@@ -0,0 +1,28 @@
|
|
|
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 validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import Any, Literal, Optional
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class EthenaRequestToWithdrawParamsTypedDict(TypedDict):
|
|
13
|
+
amount: Any
|
|
14
|
+
r"""The amount of USDe to request to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be requested to be withdrawn."""
|
|
15
|
+
action_type: Literal["ETHENA_REQUEST_WITHDRAW"]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class EthenaRequestToWithdrawParams(BaseModel):
|
|
19
|
+
amount: Any
|
|
20
|
+
r"""The amount of USDe to request to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be requested to be withdrawn."""
|
|
21
|
+
|
|
22
|
+
ACTION_TYPE: Annotated[
|
|
23
|
+
Annotated[
|
|
24
|
+
Optional[Literal["ETHENA_REQUEST_WITHDRAW"]],
|
|
25
|
+
AfterValidator(validate_const("ETHENA_REQUEST_WITHDRAW")),
|
|
26
|
+
],
|
|
27
|
+
pydantic.Field(alias="action_type"),
|
|
28
|
+
] = "ETHENA_REQUEST_WITHDRAW"
|
|
@@ -0,0 +1,41 @@
|
|
|
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 validate_const
|
|
6
|
+
from enum import Enum
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Any, Literal, Optional
|
|
10
|
+
from typing_extensions import Annotated, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class EthenaRequestToWithdrawRequestChain(str, Enum):
|
|
14
|
+
ETHEREUM = "ethereum"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class EthenaRequestToWithdrawRequestTypedDict(TypedDict):
|
|
18
|
+
amount: Any
|
|
19
|
+
r"""The amount of USDe to request to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be requested to be withdrawn."""
|
|
20
|
+
chain: EthenaRequestToWithdrawRequestChain
|
|
21
|
+
sender: str
|
|
22
|
+
r"""The address of the transaction sender."""
|
|
23
|
+
action_type: Literal["ETHENA_REQUEST_WITHDRAW"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class EthenaRequestToWithdrawRequest(BaseModel):
|
|
27
|
+
amount: Any
|
|
28
|
+
r"""The amount of USDe to request to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be requested to be withdrawn."""
|
|
29
|
+
|
|
30
|
+
chain: EthenaRequestToWithdrawRequestChain
|
|
31
|
+
|
|
32
|
+
sender: str
|
|
33
|
+
r"""The address of the transaction sender."""
|
|
34
|
+
|
|
35
|
+
ACTION_TYPE: Annotated[
|
|
36
|
+
Annotated[
|
|
37
|
+
Optional[Literal["ETHENA_REQUEST_WITHDRAW"]],
|
|
38
|
+
AfterValidator(validate_const("ETHENA_REQUEST_WITHDRAW")),
|
|
39
|
+
],
|
|
40
|
+
pydantic.Field(alias="action_type"),
|
|
41
|
+
] = "ETHENA_REQUEST_WITHDRAW"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
|
|
5
|
+
from .useroperationresponse import UserOperationResponse, UserOperationResponseTypedDict
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
|
+
from typing import Union
|
|
8
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
EthenaRequestToWithdrawTransactionResponseTransactionTypedDict = TypeAliasType(
|
|
12
|
+
"EthenaRequestToWithdrawTransactionResponseTransactionTypedDict",
|
|
13
|
+
Union[UserOperationResponseTypedDict, UnsignedTransactionTypedDict],
|
|
14
|
+
)
|
|
15
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
EthenaRequestToWithdrawTransactionResponseTransaction = TypeAliasType(
|
|
19
|
+
"EthenaRequestToWithdrawTransactionResponseTransaction",
|
|
20
|
+
Union[UserOperationResponse, UnsignedTransaction],
|
|
21
|
+
)
|
|
22
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class EthenaRequestToWithdrawTransactionResponseTypedDict(TypedDict):
|
|
26
|
+
transaction: EthenaRequestToWithdrawTransactionResponseTransactionTypedDict
|
|
27
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
28
|
+
cooldown_duration_days: int
|
|
29
|
+
r"""The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class EthenaRequestToWithdrawTransactionResponse(BaseModel):
|
|
33
|
+
transaction: EthenaRequestToWithdrawTransactionResponseTransaction
|
|
34
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
35
|
+
|
|
36
|
+
cooldown_duration_days: int
|
|
37
|
+
r"""The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made."""
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from compass_api_sdk.utils import validate_const
|
|
12
|
+
import pydantic
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
|
+
from typing import Any, Literal, Optional
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class EthenaWithdrawParamsTypedDict(TypedDict):
|
|
20
|
+
amount: Any
|
|
21
|
+
r"""The amount of USDe to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be withdrawn."""
|
|
22
|
+
action_type: Literal["ETHENA_WITHDRAW"]
|
|
23
|
+
receiver: NotRequired[Nullable[str]]
|
|
24
|
+
r"""The address which will receive the USDe withdrawn. Defaults to the sender."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class EthenaWithdrawParams(BaseModel):
|
|
28
|
+
amount: Any
|
|
29
|
+
r"""The amount of USDe to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be withdrawn."""
|
|
30
|
+
|
|
31
|
+
ACTION_TYPE: Annotated[
|
|
32
|
+
Annotated[
|
|
33
|
+
Optional[Literal["ETHENA_WITHDRAW"]],
|
|
34
|
+
AfterValidator(validate_const("ETHENA_WITHDRAW")),
|
|
35
|
+
],
|
|
36
|
+
pydantic.Field(alias="action_type"),
|
|
37
|
+
] = "ETHENA_WITHDRAW"
|
|
38
|
+
|
|
39
|
+
receiver: OptionalNullable[str] = UNSET
|
|
40
|
+
r"""The address which will receive the USDe withdrawn. Defaults to the sender."""
|
|
41
|
+
|
|
42
|
+
@model_serializer(mode="wrap")
|
|
43
|
+
def serialize_model(self, handler):
|
|
44
|
+
optional_fields = ["action_type", "receiver"]
|
|
45
|
+
nullable_fields = ["receiver"]
|
|
46
|
+
null_default_fields = []
|
|
47
|
+
|
|
48
|
+
serialized = handler(self)
|
|
49
|
+
|
|
50
|
+
m = {}
|
|
51
|
+
|
|
52
|
+
for n, f in type(self).model_fields.items():
|
|
53
|
+
k = f.alias or n
|
|
54
|
+
val = serialized.get(k)
|
|
55
|
+
serialized.pop(k, None)
|
|
56
|
+
|
|
57
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
58
|
+
is_set = (
|
|
59
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
60
|
+
or k in null_default_fields
|
|
61
|
+
) # pylint: disable=no-member
|
|
62
|
+
|
|
63
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
64
|
+
m[k] = val
|
|
65
|
+
elif val != UNSET_SENTINEL and (
|
|
66
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
67
|
+
):
|
|
68
|
+
m[k] = val
|
|
69
|
+
|
|
70
|
+
return m
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from compass_api_sdk.utils import validate_const
|
|
12
|
+
from enum import Enum
|
|
13
|
+
import pydantic
|
|
14
|
+
from pydantic import model_serializer
|
|
15
|
+
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from typing import Any, Literal, Optional
|
|
17
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class EthenaWithdrawRequestChain(str, Enum):
|
|
21
|
+
ETHEREUM = "ethereum"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class EthenaWithdrawRequestTypedDict(TypedDict):
|
|
25
|
+
amount: Any
|
|
26
|
+
r"""The amount of USDe to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be withdrawn."""
|
|
27
|
+
chain: EthenaWithdrawRequestChain
|
|
28
|
+
sender: str
|
|
29
|
+
r"""The address of the transaction sender."""
|
|
30
|
+
action_type: Literal["ETHENA_WITHDRAW"]
|
|
31
|
+
receiver: NotRequired[Nullable[str]]
|
|
32
|
+
r"""The address which will receive the USDe withdrawn. Defaults to the sender."""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class EthenaWithdrawRequest(BaseModel):
|
|
36
|
+
amount: Any
|
|
37
|
+
r"""The amount of USDe to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be withdrawn."""
|
|
38
|
+
|
|
39
|
+
chain: EthenaWithdrawRequestChain
|
|
40
|
+
|
|
41
|
+
sender: str
|
|
42
|
+
r"""The address of the transaction sender."""
|
|
43
|
+
|
|
44
|
+
ACTION_TYPE: Annotated[
|
|
45
|
+
Annotated[
|
|
46
|
+
Optional[Literal["ETHENA_WITHDRAW"]],
|
|
47
|
+
AfterValidator(validate_const("ETHENA_WITHDRAW")),
|
|
48
|
+
],
|
|
49
|
+
pydantic.Field(alias="action_type"),
|
|
50
|
+
] = "ETHENA_WITHDRAW"
|
|
51
|
+
|
|
52
|
+
receiver: OptionalNullable[str] = UNSET
|
|
53
|
+
r"""The address which will receive the USDe withdrawn. Defaults to the sender."""
|
|
54
|
+
|
|
55
|
+
@model_serializer(mode="wrap")
|
|
56
|
+
def serialize_model(self, handler):
|
|
57
|
+
optional_fields = ["action_type", "receiver"]
|
|
58
|
+
nullable_fields = ["receiver"]
|
|
59
|
+
null_default_fields = []
|
|
60
|
+
|
|
61
|
+
serialized = handler(self)
|
|
62
|
+
|
|
63
|
+
m = {}
|
|
64
|
+
|
|
65
|
+
for n, f in type(self).model_fields.items():
|
|
66
|
+
k = f.alias or n
|
|
67
|
+
val = serialized.get(k)
|
|
68
|
+
serialized.pop(k, None)
|
|
69
|
+
|
|
70
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
71
|
+
is_set = (
|
|
72
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
73
|
+
or k in null_default_fields
|
|
74
|
+
) # pylint: disable=no-member
|
|
75
|
+
|
|
76
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
77
|
+
m[k] = val
|
|
78
|
+
elif val != UNSET_SENTINEL and (
|
|
79
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
80
|
+
):
|
|
81
|
+
m[k] = val
|
|
82
|
+
|
|
83
|
+
return m
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
|
|
5
|
+
from .useroperationresponse import UserOperationResponse, UserOperationResponseTypedDict
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
|
+
from typing import Union
|
|
8
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
OdosTransactionResponseTransactionTypedDict = TypeAliasType(
|
|
12
|
+
"OdosTransactionResponseTransactionTypedDict",
|
|
13
|
+
Union[UserOperationResponseTypedDict, UnsignedTransactionTypedDict],
|
|
14
|
+
)
|
|
15
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
OdosTransactionResponseTransaction = TypeAliasType(
|
|
19
|
+
"OdosTransactionResponseTransaction",
|
|
20
|
+
Union[UserOperationResponse, UnsignedTransaction],
|
|
21
|
+
)
|
|
22
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class OdosTransactionResponseTypedDict(TypedDict):
|
|
26
|
+
transaction: OdosTransactionResponseTransactionTypedDict
|
|
27
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
28
|
+
amount_out_quote: str
|
|
29
|
+
r"""The estimated amount out for the transaction. The actual output amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class OdosTransactionResponse(BaseModel):
|
|
33
|
+
transaction: OdosTransactionResponseTransaction
|
|
34
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
35
|
+
|
|
36
|
+
amount_out_quote: str
|
|
37
|
+
r"""The estimated amount out for the transaction. The actual output amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote."""
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .unsignedmulticalltransaction import (
|
|
5
|
-
UnsignedMulticallTransaction,
|
|
6
|
-
UnsignedMulticallTransactionTypedDict,
|
|
7
|
-
)
|
|
8
4
|
from .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
|
|
9
5
|
from .useroperationresponse import UserOperationResponse, UserOperationResponseTypedDict
|
|
10
6
|
from compass_api_sdk.types import BaseModel
|
|
@@ -14,18 +10,13 @@ from typing_extensions import TypeAliasType, TypedDict
|
|
|
14
10
|
|
|
15
11
|
PendleTxResponseTransactionTypedDict = TypeAliasType(
|
|
16
12
|
"PendleTxResponseTransactionTypedDict",
|
|
17
|
-
Union[
|
|
18
|
-
UserOperationResponseTypedDict,
|
|
19
|
-
UnsignedTransactionTypedDict,
|
|
20
|
-
UnsignedMulticallTransactionTypedDict,
|
|
21
|
-
],
|
|
13
|
+
Union[UserOperationResponseTypedDict, UnsignedTransactionTypedDict],
|
|
22
14
|
)
|
|
23
15
|
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
24
16
|
|
|
25
17
|
|
|
26
18
|
PendleTxResponseTransaction = TypeAliasType(
|
|
27
|
-
"PendleTxResponseTransaction",
|
|
28
|
-
Union[UserOperationResponse, UnsignedTransaction, UnsignedMulticallTransaction],
|
|
19
|
+
"PendleTxResponseTransaction", Union[UserOperationResponse, UnsignedTransaction]
|
|
29
20
|
)
|
|
30
21
|
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
31
22
|
|
|
@@ -13,25 +13,50 @@ class TokenEnum(str, Enum):
|
|
|
13
13
|
|
|
14
14
|
ONE_INCH = "1INCH"
|
|
15
15
|
AAVE = "AAVE"
|
|
16
|
+
AERO = "AERO"
|
|
17
|
+
ARB = "ARB"
|
|
16
18
|
BAL = "BAL"
|
|
19
|
+
BNKR = "BNKR"
|
|
17
20
|
CB_BTC = "cbBTC"
|
|
18
21
|
CB_ETH = "cbETH"
|
|
22
|
+
CLANKER = "CLANKER"
|
|
23
|
+
COPI = "COPI"
|
|
19
24
|
CRV = "CRV"
|
|
20
25
|
CRV_USD = "crvUSD"
|
|
26
|
+
CYBER = "CYBER"
|
|
21
27
|
DAI = "DAI"
|
|
28
|
+
DOGINME = "DOGINME"
|
|
29
|
+
E_BTC = "eBTC"
|
|
22
30
|
ENS = "ENS"
|
|
31
|
+
ETH = "ETH"
|
|
32
|
+
ETHFI = "ETHFI"
|
|
23
33
|
ET_HX = "ETHx"
|
|
34
|
+
EURC = "EURC"
|
|
35
|
+
EUR = "EUR"
|
|
36
|
+
EURS = "EURS"
|
|
37
|
+
E_US_DE = "eUSDe"
|
|
38
|
+
EZ_ETH = "ezETH"
|
|
39
|
+
FBTC = "FBTC"
|
|
24
40
|
FRAX = "FRAX"
|
|
25
41
|
FXS = "FXS"
|
|
26
42
|
GHO = "GHO"
|
|
27
43
|
KNC = "KNC"
|
|
44
|
+
LBTC = "LBTC"
|
|
28
45
|
LDO = "LDO"
|
|
29
46
|
LINK = "LINK"
|
|
47
|
+
LS_ETH = "LsETH"
|
|
30
48
|
LUSD = "LUSD"
|
|
49
|
+
MAI = "MAI"
|
|
31
50
|
MKR = "MKR"
|
|
32
51
|
OS_ETH = "osETH"
|
|
52
|
+
PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
|
|
53
|
+
PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
|
|
54
|
+
PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
|
|
55
|
+
PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
|
|
56
|
+
PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
|
|
33
57
|
PYUSD = "PYUSD"
|
|
34
58
|
R_ETH = "rETH"
|
|
59
|
+
RLUSD = "RLUSD"
|
|
35
60
|
RPL = "RPL"
|
|
36
61
|
RS_ETH = "rsETH"
|
|
37
62
|
S_DAI = "sDAI"
|
|
@@ -40,36 +65,17 @@ class TokenEnum(str, Enum):
|
|
|
40
65
|
S_US_DE = "sUSDe"
|
|
41
66
|
T_BTC = "tBTC"
|
|
42
67
|
UNI = "UNI"
|
|
68
|
+
US_DB_C = "USDbC"
|
|
69
|
+
USD_CE = "USDCe"
|
|
43
70
|
USDC = "USDC"
|
|
44
71
|
US_DE = "USDe"
|
|
45
72
|
USDS = "USDS"
|
|
73
|
+
US_DTB = "USDtb"
|
|
46
74
|
USDT = "USDT"
|
|
75
|
+
VIRTUAL = "VIRTUAL"
|
|
47
76
|
WBTC = "WBTC"
|
|
48
77
|
WE_ETH = "weETH"
|
|
78
|
+
WELL = "WELL"
|
|
49
79
|
WETH = "WETH"
|
|
50
|
-
WST_ETH = "wstETH"
|
|
51
|
-
ARB = "ARB"
|
|
52
|
-
EURS = "EURS"
|
|
53
|
-
MAI = "MAI"
|
|
54
|
-
USD_CE = "USDCe"
|
|
55
|
-
ETH = "ETH"
|
|
56
|
-
AERO = "AERO"
|
|
57
|
-
EUR = "EUR"
|
|
58
|
-
VIRTUAL = "VIRTUAL"
|
|
59
|
-
EZ_ETH = "ezETH"
|
|
60
|
-
CYBER = "CYBER"
|
|
61
80
|
WRS_ETH = "wrsETH"
|
|
62
|
-
|
|
63
|
-
EURC = "EURC"
|
|
64
|
-
E_US_DE = "eUSDe"
|
|
65
|
-
FBTC = "FBTC"
|
|
66
|
-
LBTC = "LBTC"
|
|
67
|
-
PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
|
|
68
|
-
PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
|
|
69
|
-
PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
|
|
70
|
-
PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
|
|
71
|
-
PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
|
|
72
|
-
RLUSD = "RLUSD"
|
|
73
|
-
USD_0 = "USD₮0"
|
|
74
|
-
US_DB_C = "USDbC"
|
|
75
|
-
US_DTB = "USDtb"
|
|
81
|
+
WST_ETH = "wstETH"
|
|
@@ -10,53 +10,53 @@ from typing import Literal, Optional, Union
|
|
|
10
10
|
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
"
|
|
13
|
+
TokenTransferParamsTokenTypedDict = TypeAliasType(
|
|
14
|
+
"TokenTransferParamsTokenTypedDict", Union[TokenEnum, str]
|
|
15
15
|
)
|
|
16
|
-
r"""
|
|
16
|
+
r"""The symbol or address of the token to transfer."""
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
"
|
|
19
|
+
TokenTransferParamsToken = TypeAliasType(
|
|
20
|
+
"TokenTransferParamsToken", Union[TokenEnum, str]
|
|
21
21
|
)
|
|
22
|
-
r"""
|
|
22
|
+
r"""The symbol or address of the token to transfer."""
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
"
|
|
25
|
+
TokenTransferParamsAmountTypedDict = TypeAliasType(
|
|
26
|
+
"TokenTransferParamsAmountTypedDict", Union[float, str]
|
|
27
27
|
)
|
|
28
|
-
r"""
|
|
28
|
+
r"""Amount of token to transfer"""
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
"
|
|
31
|
+
TokenTransferParamsAmount = TypeAliasType(
|
|
32
|
+
"TokenTransferParamsAmount", Union[float, str]
|
|
33
33
|
)
|
|
34
|
-
r"""
|
|
34
|
+
r"""Amount of token to transfer"""
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class TokenTransferParamsTypedDict(TypedDict):
|
|
38
38
|
r"""Parameters model for transferring ETH or ERC20 tokens."""
|
|
39
39
|
|
|
40
|
-
amount: TokenTransferParamsAmountTypedDict
|
|
41
|
-
r"""Amount of token to transfer"""
|
|
42
|
-
token: TokenTransferParamsTokenTypedDict
|
|
43
|
-
r"""The symbol of the token to transfer.."""
|
|
44
40
|
to: str
|
|
45
41
|
r"""The recipient of the tokens."""
|
|
42
|
+
token: TokenTransferParamsTokenTypedDict
|
|
43
|
+
r"""The symbol or address of the token to transfer."""
|
|
44
|
+
amount: TokenTransferParamsAmountTypedDict
|
|
45
|
+
r"""Amount of token to transfer"""
|
|
46
46
|
action_type: Literal["TOKEN_TRANSFER"]
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
class TokenTransferParams(BaseModel):
|
|
50
50
|
r"""Parameters model for transferring ETH or ERC20 tokens."""
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
r"""
|
|
52
|
+
to: str
|
|
53
|
+
r"""The recipient of the tokens."""
|
|
54
54
|
|
|
55
55
|
token: TokenTransferParamsToken
|
|
56
|
-
r"""The symbol of the token to transfer
|
|
56
|
+
r"""The symbol or address of the token to transfer."""
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
r"""
|
|
58
|
+
amount: TokenTransferParamsAmount
|
|
59
|
+
r"""Amount of token to transfer"""
|
|
60
60
|
|
|
61
61
|
ACTION_TYPE: Annotated[
|
|
62
62
|
Annotated[
|