compass_api_sdk 1.0.0__py3-none-any.whl → 1.0.2__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 +864 -0
- compass_api_sdk/models/__init__.py +140 -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/ethenaunstakeparams.py +65 -0
- compass_api_sdk/models/ethenaunstakerequest.py +78 -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/unsignedmulticalltransaction.py +12 -12
- compass_api_sdk/models/unsignedtransaction.py +12 -12
- compass_api_sdk/models/useroperation.py +29 -23
- compass_api_sdk/models/useroperationresponse.py +2 -2
- 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_sky_positionop.py +2 -2
- 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/sky.py +2 -2
- 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.2.dist-info}/METADATA +150 -135
- {compass_api_sdk-1.0.0.dist-info → compass_api_sdk-1.0.2.dist-info}/RECORD +56 -44
- compass_api_sdk/models/tokentransfererc20params.py +0 -63
- {compass_api_sdk-1.0.0.dist-info → compass_api_sdk-1.0.2.dist-info}/WHEEL +0 -0
|
@@ -23,25 +23,50 @@ class V1UniswapQuoteSellExactlyTokenInToken(str, Enum):
|
|
|
23
23
|
|
|
24
24
|
ONE_INCH = "1INCH"
|
|
25
25
|
AAVE = "AAVE"
|
|
26
|
+
AERO = "AERO"
|
|
27
|
+
ARB = "ARB"
|
|
26
28
|
BAL = "BAL"
|
|
29
|
+
BNKR = "BNKR"
|
|
27
30
|
CB_BTC = "cbBTC"
|
|
28
31
|
CB_ETH = "cbETH"
|
|
32
|
+
CLANKER = "CLANKER"
|
|
33
|
+
COPI = "COPI"
|
|
29
34
|
CRV = "CRV"
|
|
30
35
|
CRV_USD = "crvUSD"
|
|
36
|
+
CYBER = "CYBER"
|
|
31
37
|
DAI = "DAI"
|
|
38
|
+
DOGINME = "DOGINME"
|
|
39
|
+
E_BTC = "eBTC"
|
|
32
40
|
ENS = "ENS"
|
|
41
|
+
ETH = "ETH"
|
|
42
|
+
ETHFI = "ETHFI"
|
|
33
43
|
ET_HX = "ETHx"
|
|
44
|
+
EURC = "EURC"
|
|
45
|
+
EUR = "EUR"
|
|
46
|
+
EURS = "EURS"
|
|
47
|
+
E_US_DE = "eUSDe"
|
|
48
|
+
EZ_ETH = "ezETH"
|
|
49
|
+
FBTC = "FBTC"
|
|
34
50
|
FRAX = "FRAX"
|
|
35
51
|
FXS = "FXS"
|
|
36
52
|
GHO = "GHO"
|
|
37
53
|
KNC = "KNC"
|
|
54
|
+
LBTC = "LBTC"
|
|
38
55
|
LDO = "LDO"
|
|
39
56
|
LINK = "LINK"
|
|
57
|
+
LS_ETH = "LsETH"
|
|
40
58
|
LUSD = "LUSD"
|
|
59
|
+
MAI = "MAI"
|
|
41
60
|
MKR = "MKR"
|
|
42
61
|
OS_ETH = "osETH"
|
|
62
|
+
PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
|
|
63
|
+
PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
|
|
64
|
+
PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
|
|
65
|
+
PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
|
|
66
|
+
PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
|
|
43
67
|
PYUSD = "PYUSD"
|
|
44
68
|
R_ETH = "rETH"
|
|
69
|
+
RLUSD = "RLUSD"
|
|
45
70
|
RPL = "RPL"
|
|
46
71
|
RS_ETH = "rsETH"
|
|
47
72
|
S_DAI = "sDAI"
|
|
@@ -50,39 +75,20 @@ class V1UniswapQuoteSellExactlyTokenInToken(str, Enum):
|
|
|
50
75
|
S_US_DE = "sUSDe"
|
|
51
76
|
T_BTC = "tBTC"
|
|
52
77
|
UNI = "UNI"
|
|
78
|
+
US_DB_C = "USDbC"
|
|
79
|
+
USD_CE = "USDCe"
|
|
53
80
|
USDC = "USDC"
|
|
54
81
|
US_DE = "USDe"
|
|
55
82
|
USDS = "USDS"
|
|
83
|
+
US_DTB = "USDtb"
|
|
56
84
|
USDT = "USDT"
|
|
85
|
+
VIRTUAL = "VIRTUAL"
|
|
57
86
|
WBTC = "WBTC"
|
|
58
87
|
WE_ETH = "weETH"
|
|
88
|
+
WELL = "WELL"
|
|
59
89
|
WETH = "WETH"
|
|
60
|
-
WST_ETH = "wstETH"
|
|
61
|
-
ARB = "ARB"
|
|
62
|
-
EURS = "EURS"
|
|
63
|
-
MAI = "MAI"
|
|
64
|
-
USD_CE = "USDCe"
|
|
65
|
-
ETH = "ETH"
|
|
66
|
-
AERO = "AERO"
|
|
67
|
-
EUR = "EUR"
|
|
68
|
-
VIRTUAL = "VIRTUAL"
|
|
69
|
-
EZ_ETH = "ezETH"
|
|
70
|
-
CYBER = "CYBER"
|
|
71
90
|
WRS_ETH = "wrsETH"
|
|
72
|
-
|
|
73
|
-
EURC = "EURC"
|
|
74
|
-
E_US_DE = "eUSDe"
|
|
75
|
-
FBTC = "FBTC"
|
|
76
|
-
LBTC = "LBTC"
|
|
77
|
-
PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
|
|
78
|
-
PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
|
|
79
|
-
PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
|
|
80
|
-
PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
|
|
81
|
-
PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
|
|
82
|
-
RLUSD = "RLUSD"
|
|
83
|
-
USD_0 = "USD₮0"
|
|
84
|
-
US_DB_C = "USDbC"
|
|
85
|
-
US_DTB = "USDtb"
|
|
91
|
+
WST_ETH = "wstETH"
|
|
86
92
|
|
|
87
93
|
|
|
88
94
|
class V1UniswapQuoteSellExactlyTokenOutToken(str, Enum):
|
|
@@ -94,25 +100,50 @@ class V1UniswapQuoteSellExactlyTokenOutToken(str, Enum):
|
|
|
94
100
|
|
|
95
101
|
ONE_INCH = "1INCH"
|
|
96
102
|
AAVE = "AAVE"
|
|
103
|
+
AERO = "AERO"
|
|
104
|
+
ARB = "ARB"
|
|
97
105
|
BAL = "BAL"
|
|
106
|
+
BNKR = "BNKR"
|
|
98
107
|
CB_BTC = "cbBTC"
|
|
99
108
|
CB_ETH = "cbETH"
|
|
109
|
+
CLANKER = "CLANKER"
|
|
110
|
+
COPI = "COPI"
|
|
100
111
|
CRV = "CRV"
|
|
101
112
|
CRV_USD = "crvUSD"
|
|
113
|
+
CYBER = "CYBER"
|
|
102
114
|
DAI = "DAI"
|
|
115
|
+
DOGINME = "DOGINME"
|
|
116
|
+
E_BTC = "eBTC"
|
|
103
117
|
ENS = "ENS"
|
|
118
|
+
ETH = "ETH"
|
|
119
|
+
ETHFI = "ETHFI"
|
|
104
120
|
ET_HX = "ETHx"
|
|
121
|
+
EURC = "EURC"
|
|
122
|
+
EUR = "EUR"
|
|
123
|
+
EURS = "EURS"
|
|
124
|
+
E_US_DE = "eUSDe"
|
|
125
|
+
EZ_ETH = "ezETH"
|
|
126
|
+
FBTC = "FBTC"
|
|
105
127
|
FRAX = "FRAX"
|
|
106
128
|
FXS = "FXS"
|
|
107
129
|
GHO = "GHO"
|
|
108
130
|
KNC = "KNC"
|
|
131
|
+
LBTC = "LBTC"
|
|
109
132
|
LDO = "LDO"
|
|
110
133
|
LINK = "LINK"
|
|
134
|
+
LS_ETH = "LsETH"
|
|
111
135
|
LUSD = "LUSD"
|
|
136
|
+
MAI = "MAI"
|
|
112
137
|
MKR = "MKR"
|
|
113
138
|
OS_ETH = "osETH"
|
|
139
|
+
PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
|
|
140
|
+
PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
|
|
141
|
+
PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
|
|
142
|
+
PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
|
|
143
|
+
PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
|
|
114
144
|
PYUSD = "PYUSD"
|
|
115
145
|
R_ETH = "rETH"
|
|
146
|
+
RLUSD = "RLUSD"
|
|
116
147
|
RPL = "RPL"
|
|
117
148
|
RS_ETH = "rsETH"
|
|
118
149
|
S_DAI = "sDAI"
|
|
@@ -121,39 +152,20 @@ class V1UniswapQuoteSellExactlyTokenOutToken(str, Enum):
|
|
|
121
152
|
S_US_DE = "sUSDe"
|
|
122
153
|
T_BTC = "tBTC"
|
|
123
154
|
UNI = "UNI"
|
|
155
|
+
US_DB_C = "USDbC"
|
|
156
|
+
USD_CE = "USDCe"
|
|
124
157
|
USDC = "USDC"
|
|
125
158
|
US_DE = "USDe"
|
|
126
159
|
USDS = "USDS"
|
|
160
|
+
US_DTB = "USDtb"
|
|
127
161
|
USDT = "USDT"
|
|
162
|
+
VIRTUAL = "VIRTUAL"
|
|
128
163
|
WBTC = "WBTC"
|
|
129
164
|
WE_ETH = "weETH"
|
|
165
|
+
WELL = "WELL"
|
|
130
166
|
WETH = "WETH"
|
|
131
|
-
WST_ETH = "wstETH"
|
|
132
|
-
ARB = "ARB"
|
|
133
|
-
EURS = "EURS"
|
|
134
|
-
MAI = "MAI"
|
|
135
|
-
USD_CE = "USDCe"
|
|
136
|
-
ETH = "ETH"
|
|
137
|
-
AERO = "AERO"
|
|
138
|
-
EUR = "EUR"
|
|
139
|
-
VIRTUAL = "VIRTUAL"
|
|
140
|
-
EZ_ETH = "ezETH"
|
|
141
|
-
CYBER = "CYBER"
|
|
142
167
|
WRS_ETH = "wrsETH"
|
|
143
|
-
|
|
144
|
-
EURC = "EURC"
|
|
145
|
-
E_US_DE = "eUSDe"
|
|
146
|
-
FBTC = "FBTC"
|
|
147
|
-
LBTC = "LBTC"
|
|
148
|
-
PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
|
|
149
|
-
PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
|
|
150
|
-
PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
|
|
151
|
-
PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
|
|
152
|
-
PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
|
|
153
|
-
RLUSD = "RLUSD"
|
|
154
|
-
USD_0 = "USD₮0"
|
|
155
|
-
US_DB_C = "USDbC"
|
|
156
|
-
US_DTB = "USDtb"
|
|
168
|
+
WST_ETH = "wstETH"
|
|
157
169
|
|
|
158
170
|
|
|
159
171
|
class V1UniswapQuoteSellExactlyFeeEnum(str, Enum):
|
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .apy import Apy, ApyTypedDict
|
|
5
|
-
from .compass_api_backend_models_vaults_read_response_vault_asset import (
|
|
6
|
-
CompassAPIBackendModelsVaultsReadResponseVaultAsset,
|
|
7
|
-
CompassAPIBackendModelsVaultsReadResponseVaultAssetTypedDict,
|
|
8
|
-
)
|
|
9
5
|
from .compass_api_backend_models_vaults_read_response_vault_userposition import (
|
|
10
6
|
CompassAPIBackendModelsVaultsReadResponseVaultUserPosition,
|
|
11
7
|
CompassAPIBackendModelsVaultsReadResponseVaultUserPositionTypedDict,
|
|
12
8
|
)
|
|
9
|
+
from .underlyingtoken import UnderlyingToken, UnderlyingTokenTypedDict
|
|
13
10
|
from compass_api_sdk.types import (
|
|
14
11
|
BaseModel,
|
|
15
12
|
Nullable,
|
|
@@ -34,7 +31,7 @@ class VaultGetVaultResponseTypedDict(TypedDict):
|
|
|
34
31
|
r"""Total amount of shares issued from the vault."""
|
|
35
32
|
share_price: str
|
|
36
33
|
r"""The price of one vault share in terms of the underlying asset."""
|
|
37
|
-
|
|
34
|
+
underlying_token: UnderlyingTokenTypedDict
|
|
38
35
|
apy: ApyTypedDict
|
|
39
36
|
user_position: NotRequired[
|
|
40
37
|
Nullable[CompassAPIBackendModelsVaultsReadResponseVaultUserPositionTypedDict]
|
|
@@ -61,7 +58,7 @@ class VaultGetVaultResponse(BaseModel):
|
|
|
61
58
|
share_price: str
|
|
62
59
|
r"""The price of one vault share in terms of the underlying asset."""
|
|
63
60
|
|
|
64
|
-
|
|
61
|
+
underlying_token: UnderlyingToken
|
|
65
62
|
|
|
66
63
|
apy: Apy
|
|
67
64
|
|
compass_api_sdk/sdk.py
CHANGED
|
@@ -17,6 +17,7 @@ if TYPE_CHECKING:
|
|
|
17
17
|
from compass_api_sdk.aave_v3 import AaveV3
|
|
18
18
|
from compass_api_sdk.aerodrome_slipstream import AerodromeSlipstream
|
|
19
19
|
from compass_api_sdk.erc_4626_vaults import ERC4626Vaults
|
|
20
|
+
from compass_api_sdk.ethena import Ethena
|
|
20
21
|
from compass_api_sdk.morpho import Morpho
|
|
21
22
|
from compass_api_sdk.pendle import Pendle
|
|
22
23
|
from compass_api_sdk.sky import Sky
|
|
@@ -43,6 +44,7 @@ class CompassAPI(BaseSDK):
|
|
|
43
44
|
transaction_bundler: "TransactionBundler"
|
|
44
45
|
smart_account: "SmartAccount"
|
|
45
46
|
erc_4626_vaults: "ERC4626Vaults"
|
|
47
|
+
ethena: "Ethena"
|
|
46
48
|
_sub_sdk_map = {
|
|
47
49
|
"aave_v3": ("compass_api_sdk.aave_v3", "AaveV3"),
|
|
48
50
|
"aerodrome_slipstream": (
|
|
@@ -62,6 +64,7 @@ class CompassAPI(BaseSDK):
|
|
|
62
64
|
),
|
|
63
65
|
"smart_account": ("compass_api_sdk.smart_account", "SmartAccount"),
|
|
64
66
|
"erc_4626_vaults": ("compass_api_sdk.erc_4626_vaults", "ERC4626Vaults"),
|
|
67
|
+
"ethena": ("compass_api_sdk.ethena", "Ethena"),
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
def __init__(
|
compass_api_sdk/sky.py
CHANGED
|
@@ -23,7 +23,7 @@ class Sky(BaseSDK):
|
|
|
23
23
|
|
|
24
24
|
Check the USDS overall position.
|
|
25
25
|
|
|
26
|
-
:param user_address: The user
|
|
26
|
+
:param user_address: The user-address of the desired position.
|
|
27
27
|
:param chain:
|
|
28
28
|
:param retries: Override the default retry configuration for this method
|
|
29
29
|
:param server_url: Override the default server URL for this method
|
|
@@ -113,7 +113,7 @@ class Sky(BaseSDK):
|
|
|
113
113
|
|
|
114
114
|
Check the USDS overall position.
|
|
115
115
|
|
|
116
|
-
:param user_address: The user
|
|
116
|
+
:param user_address: The user-address of the desired position.
|
|
117
117
|
:param chain:
|
|
118
118
|
:param retries: Override the default retry configuration for this method
|
|
119
119
|
:param server_url: Override the default server URL for this method
|
compass_api_sdk/swap.py
CHANGED
|
@@ -28,7 +28,7 @@ class Swap(BaseSDK):
|
|
|
28
28
|
server_url: Optional[str] = None,
|
|
29
29
|
timeout_ms: Optional[int] = None,
|
|
30
30
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
31
|
-
) -> models.
|
|
31
|
+
) -> models.OdosTransactionResponse:
|
|
32
32
|
r"""Odos Swap
|
|
33
33
|
|
|
34
34
|
Swap between two tokens using Odos Smart Order Routing.
|
|
@@ -113,7 +113,7 @@ class Swap(BaseSDK):
|
|
|
113
113
|
|
|
114
114
|
response_data: Any = None
|
|
115
115
|
if utils.match_response(http_res, "200", "application/json"):
|
|
116
|
-
return unmarshal_json_response(models.
|
|
116
|
+
return unmarshal_json_response(models.OdosTransactionResponse, http_res)
|
|
117
117
|
if utils.match_response(http_res, "422", "application/json"):
|
|
118
118
|
response_data = unmarshal_json_response(
|
|
119
119
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -147,7 +147,7 @@ class Swap(BaseSDK):
|
|
|
147
147
|
server_url: Optional[str] = None,
|
|
148
148
|
timeout_ms: Optional[int] = None,
|
|
149
149
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
150
|
-
) -> models.
|
|
150
|
+
) -> models.OdosTransactionResponse:
|
|
151
151
|
r"""Odos Swap
|
|
152
152
|
|
|
153
153
|
Swap between two tokens using Odos Smart Order Routing.
|
|
@@ -232,7 +232,7 @@ class Swap(BaseSDK):
|
|
|
232
232
|
|
|
233
233
|
response_data: Any = None
|
|
234
234
|
if utils.match_response(http_res, "200", "application/json"):
|
|
235
|
-
return unmarshal_json_response(models.
|
|
235
|
+
return unmarshal_json_response(models.OdosTransactionResponse, http_res)
|
|
236
236
|
if utils.match_response(http_res, "422", "application/json"):
|
|
237
237
|
response_data = unmarshal_json_response(
|
|
238
238
|
errors.HTTPValidationErrorData, http_res
|
compass_api_sdk/token_sdk.py
CHANGED
|
@@ -193,7 +193,7 @@ class TokenSDK(BaseSDK):
|
|
|
193
193
|
self,
|
|
194
194
|
*,
|
|
195
195
|
chain: models.V1TokenPriceChain = models.V1TokenPriceChain.ETHEREUM,
|
|
196
|
-
token:
|
|
196
|
+
token: Any,
|
|
197
197
|
block: OptionalNullable[int] = UNSET,
|
|
198
198
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
199
199
|
server_url: Optional[str] = None,
|
|
@@ -290,7 +290,7 @@ class TokenSDK(BaseSDK):
|
|
|
290
290
|
self,
|
|
291
291
|
*,
|
|
292
292
|
chain: models.V1TokenPriceChain = models.V1TokenPriceChain.ETHEREUM,
|
|
293
|
-
token:
|
|
293
|
+
token: Any,
|
|
294
294
|
block: OptionalNullable[int] = UNSET,
|
|
295
295
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
296
296
|
server_url: Optional[str] = None,
|
|
@@ -572,14 +572,14 @@ class TokenSDK(BaseSDK):
|
|
|
572
572
|
def token_transfer(
|
|
573
573
|
self,
|
|
574
574
|
*,
|
|
575
|
+
to: str,
|
|
576
|
+
token: Union[
|
|
577
|
+
models.TokenTransferRequestToken, models.TokenTransferRequestTokenTypedDict
|
|
578
|
+
],
|
|
575
579
|
amount: Union[
|
|
576
580
|
models.TokenTransferRequestAmount,
|
|
577
581
|
models.TokenTransferRequestAmountTypedDict,
|
|
578
582
|
],
|
|
579
|
-
token: Union[
|
|
580
|
-
models.TokenTransferRequestToken, models.TokenTransferRequestTokenTypedDict
|
|
581
|
-
],
|
|
582
|
-
to: str,
|
|
583
583
|
chain: models.TokenTransferRequestChain,
|
|
584
584
|
sender: str,
|
|
585
585
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -587,13 +587,13 @@ class TokenSDK(BaseSDK):
|
|
|
587
587
|
timeout_ms: Optional[int] = None,
|
|
588
588
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
589
589
|
) -> models.TransactionResponse:
|
|
590
|
-
r"""Transfer
|
|
590
|
+
r"""Transfer Tokens
|
|
591
591
|
|
|
592
592
|
Sends native ETH or ERC20 tokens from the sender's address to another address.
|
|
593
593
|
|
|
594
|
-
:param amount: Amount of token to transfer
|
|
595
|
-
:param token: The symbol of the token to transfer..
|
|
596
594
|
:param to: The recipient of the tokens.
|
|
595
|
+
:param token: The symbol or address of the token to transfer.
|
|
596
|
+
:param amount: Amount of token to transfer
|
|
597
597
|
:param chain:
|
|
598
598
|
:param sender: The address of the transaction sender.
|
|
599
599
|
:param retries: Override the default retry configuration for this method
|
|
@@ -612,9 +612,9 @@ class TokenSDK(BaseSDK):
|
|
|
612
612
|
base_url = self._get_url(base_url, url_variables)
|
|
613
613
|
|
|
614
614
|
request = models.TokenTransferRequest(
|
|
615
|
-
amount=amount,
|
|
616
|
-
token=token,
|
|
617
615
|
to=to,
|
|
616
|
+
token=token,
|
|
617
|
+
amount=amount,
|
|
618
618
|
chain=chain,
|
|
619
619
|
sender=sender,
|
|
620
620
|
)
|
|
@@ -679,14 +679,14 @@ class TokenSDK(BaseSDK):
|
|
|
679
679
|
async def token_transfer_async(
|
|
680
680
|
self,
|
|
681
681
|
*,
|
|
682
|
+
to: str,
|
|
683
|
+
token: Union[
|
|
684
|
+
models.TokenTransferRequestToken, models.TokenTransferRequestTokenTypedDict
|
|
685
|
+
],
|
|
682
686
|
amount: Union[
|
|
683
687
|
models.TokenTransferRequestAmount,
|
|
684
688
|
models.TokenTransferRequestAmountTypedDict,
|
|
685
689
|
],
|
|
686
|
-
token: Union[
|
|
687
|
-
models.TokenTransferRequestToken, models.TokenTransferRequestTokenTypedDict
|
|
688
|
-
],
|
|
689
|
-
to: str,
|
|
690
690
|
chain: models.TokenTransferRequestChain,
|
|
691
691
|
sender: str,
|
|
692
692
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -694,13 +694,13 @@ class TokenSDK(BaseSDK):
|
|
|
694
694
|
timeout_ms: Optional[int] = None,
|
|
695
695
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
696
696
|
) -> models.TransactionResponse:
|
|
697
|
-
r"""Transfer
|
|
697
|
+
r"""Transfer Tokens
|
|
698
698
|
|
|
699
699
|
Sends native ETH or ERC20 tokens from the sender's address to another address.
|
|
700
700
|
|
|
701
|
-
:param amount: Amount of token to transfer
|
|
702
|
-
:param token: The symbol of the token to transfer..
|
|
703
701
|
:param to: The recipient of the tokens.
|
|
702
|
+
:param token: The symbol or address of the token to transfer.
|
|
703
|
+
:param amount: Amount of token to transfer
|
|
704
704
|
:param chain:
|
|
705
705
|
:param sender: The address of the transaction sender.
|
|
706
706
|
:param retries: Override the default retry configuration for this method
|
|
@@ -719,9 +719,9 @@ class TokenSDK(BaseSDK):
|
|
|
719
719
|
base_url = self._get_url(base_url, url_variables)
|
|
720
720
|
|
|
721
721
|
request = models.TokenTransferRequest(
|
|
722
|
-
amount=amount,
|
|
723
|
-
token=token,
|
|
724
722
|
to=to,
|
|
723
|
+
token=token,
|
|
724
|
+
amount=amount,
|
|
725
725
|
chain=chain,
|
|
726
726
|
sender=sender,
|
|
727
727
|
)
|
|
@@ -222,7 +222,7 @@ class TransactionBundler(BaseSDK):
|
|
|
222
222
|
server_url: Optional[str] = None,
|
|
223
223
|
timeout_ms: Optional[int] = None,
|
|
224
224
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
225
|
-
) -> models.
|
|
225
|
+
) -> models.BundlerTransactionResponse:
|
|
226
226
|
r"""Construct Bundled Transaction
|
|
227
227
|
|
|
228
228
|
Bundle arbitrary transactions together into a single multicall transaction using
|
|
@@ -303,7 +303,7 @@ class TransactionBundler(BaseSDK):
|
|
|
303
303
|
|
|
304
304
|
response_data: Any = None
|
|
305
305
|
if utils.match_response(http_res, "200", "application/json"):
|
|
306
|
-
return unmarshal_json_response(models.
|
|
306
|
+
return unmarshal_json_response(models.BundlerTransactionResponse, http_res)
|
|
307
307
|
if utils.match_response(http_res, "422", "application/json"):
|
|
308
308
|
response_data = unmarshal_json_response(
|
|
309
309
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -331,7 +331,7 @@ class TransactionBundler(BaseSDK):
|
|
|
331
331
|
server_url: Optional[str] = None,
|
|
332
332
|
timeout_ms: Optional[int] = None,
|
|
333
333
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
334
|
-
) -> models.
|
|
334
|
+
) -> models.BundlerTransactionResponse:
|
|
335
335
|
r"""Construct Bundled Transaction
|
|
336
336
|
|
|
337
337
|
Bundle arbitrary transactions together into a single multicall transaction using
|
|
@@ -412,7 +412,7 @@ class TransactionBundler(BaseSDK):
|
|
|
412
412
|
|
|
413
413
|
response_data: Any = None
|
|
414
414
|
if utils.match_response(http_res, "200", "application/json"):
|
|
415
|
-
return unmarshal_json_response(models.
|
|
415
|
+
return unmarshal_json_response(models.BundlerTransactionResponse, http_res)
|
|
416
416
|
if utils.match_response(http_res, "422", "application/json"):
|
|
417
417
|
response_data = unmarshal_json_response(
|
|
418
418
|
errors.HTTPValidationErrorData, http_res
|