compass_api_sdk 0.2.0__py3-none-any.whl → 0.2.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 +2 -2
- compass_api_sdk/models/__init__.py +46 -25
- compass_api_sdk/models/aavehistoricaltransactionsresponse.py +45 -11
- compass_api_sdk/models/aavelooprequest.py +87 -0
- compass_api_sdk/models/borrow.py +46 -12
- compass_api_sdk/models/liquidationcall.py +45 -18
- compass_api_sdk/models/morpho_market_positionop.py +5 -9
- compass_api_sdk/models/morpho_marketsop.py +5 -9
- compass_api_sdk/models/morpho_vault_positionop.py +5 -9
- compass_api_sdk/models/morpho_vaultsop.py +19 -17
- compass_api_sdk/models/morphoborrowrequest.py +8 -5
- compass_api_sdk/models/morphodepositrequest.py +8 -5
- compass_api_sdk/models/morphorepayrequest.py +8 -5
- compass_api_sdk/models/morphosetvaultallowancerequest.py +8 -5
- compass_api_sdk/models/morphosupplycollateralrequest.py +8 -5
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +8 -5
- compass_api_sdk/models/morphowithdrawrequest.py +8 -5
- compass_api_sdk/models/redeemunderlying.py +31 -4
- compass_api_sdk/models/repay.py +35 -4
- compass_api_sdk/models/reserve.py +67 -6
- compass_api_sdk/models/supply.py +37 -4
- compass_api_sdk/models/swapborrowrate.py +37 -8
- compass_api_sdk/models/uniswapbuyexactlyparams.py +6 -6
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +6 -6
- compass_api_sdk/models/usageascollateral.py +36 -4
- compass_api_sdk/morpho.py +63 -47
- compass_api_sdk/transaction_batching.py +284 -0
- compass_api_sdk/uniswap_v3.py +10 -10
- {compass_api_sdk-0.2.0.dist-info → compass_api_sdk-0.2.1.dist-info}/METADATA +2 -1
- {compass_api_sdk-0.2.0.dist-info → compass_api_sdk-0.2.1.dist-info}/RECORD +31 -34
- compass_api_sdk/models/aavehistoricaltransactionbase.py +0 -113
- compass_api_sdk/models/action.py +0 -14
- compass_api_sdk/models/collateralreserve.py +0 -16
- compass_api_sdk/models/principalreserve.py +0 -16
- {compass_api_sdk-0.2.0.dist-info → compass_api_sdk-0.2.1.dist-info}/WHEEL +0 -0
|
@@ -3,25 +3,54 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .reserve import Reserve, ReserveTypedDict
|
|
5
5
|
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
6
7
|
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal
|
|
7
10
|
from typing_extensions import Annotated, TypedDict
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
class SwapBorrowRateTypedDict(TypedDict):
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
id: str
|
|
15
|
+
r"""The id of a historical transaction on aave"""
|
|
16
|
+
timestamp: int
|
|
17
|
+
r"""Timestamp in unix time"""
|
|
18
|
+
tx_hash: str
|
|
19
|
+
r"""Transaction hash. You can paste these into the search bar on etherscan"""
|
|
20
|
+
borrow_rate_mode_from: int
|
|
21
|
+
borrow_rate_mode_to: int
|
|
22
|
+
variable_borrow_rate: int
|
|
23
|
+
stable_borrow_rate: int
|
|
15
24
|
reserve: ReserveTypedDict
|
|
25
|
+
block: int
|
|
26
|
+
action: Literal["SwapBorrowRate"]
|
|
16
27
|
|
|
17
28
|
|
|
18
29
|
class SwapBorrowRate(BaseModel):
|
|
19
|
-
|
|
30
|
+
id: str
|
|
31
|
+
r"""The id of a historical transaction on aave"""
|
|
20
32
|
|
|
21
|
-
|
|
33
|
+
timestamp: int
|
|
34
|
+
r"""Timestamp in unix time"""
|
|
22
35
|
|
|
23
|
-
|
|
36
|
+
tx_hash: Annotated[str, pydantic.Field(alias="txHash")]
|
|
37
|
+
r"""Transaction hash. You can paste these into the search bar on etherscan"""
|
|
24
38
|
|
|
25
|
-
|
|
39
|
+
borrow_rate_mode_from: Annotated[int, pydantic.Field(alias="borrowRateModeFrom")]
|
|
40
|
+
|
|
41
|
+
borrow_rate_mode_to: Annotated[int, pydantic.Field(alias="borrowRateModeTo")]
|
|
42
|
+
|
|
43
|
+
variable_borrow_rate: Annotated[int, pydantic.Field(alias="variableBorrowRate")]
|
|
44
|
+
|
|
45
|
+
stable_borrow_rate: Annotated[int, pydantic.Field(alias="stableBorrowRate")]
|
|
26
46
|
|
|
27
47
|
reserve: Reserve
|
|
48
|
+
|
|
49
|
+
block: int
|
|
50
|
+
|
|
51
|
+
ACTION: Annotated[
|
|
52
|
+
Annotated[
|
|
53
|
+
Literal["SwapBorrowRate"], AfterValidator(validate_const("SwapBorrowRate"))
|
|
54
|
+
],
|
|
55
|
+
pydantic.Field(alias="action"),
|
|
56
|
+
] = "SwapBorrowRate"
|
|
@@ -8,14 +8,14 @@ from typing import Optional, Union
|
|
|
8
8
|
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
"
|
|
11
|
+
UniswapBuyExactlyParamsAmountTypedDict = TypeAliasType(
|
|
12
|
+
"UniswapBuyExactlyParamsAmountTypedDict", Union[float, str]
|
|
13
13
|
)
|
|
14
14
|
r"""The amount of the token to swap to"""
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
"
|
|
17
|
+
UniswapBuyExactlyParamsAmount = TypeAliasType(
|
|
18
|
+
"UniswapBuyExactlyParamsAmount", Union[float, str]
|
|
19
19
|
)
|
|
20
20
|
r"""The amount of the token to swap to"""
|
|
21
21
|
|
|
@@ -38,7 +38,7 @@ class UniswapBuyExactlyParamsTypedDict(TypedDict):
|
|
|
38
38
|
|
|
39
39
|
Uniswap supports 4 different fee levels.
|
|
40
40
|
"""
|
|
41
|
-
|
|
41
|
+
amount: UniswapBuyExactlyParamsAmountTypedDict
|
|
42
42
|
r"""The amount of the token to swap to"""
|
|
43
43
|
max_slippage_percent: float
|
|
44
44
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
|
|
@@ -67,7 +67,7 @@ class UniswapBuyExactlyParams(BaseModel):
|
|
|
67
67
|
Uniswap supports 4 different fee levels.
|
|
68
68
|
"""
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
amount: UniswapBuyExactlyParamsAmount
|
|
71
71
|
r"""The amount of the token to swap to"""
|
|
72
72
|
|
|
73
73
|
max_slippage_percent: float
|
|
@@ -9,14 +9,14 @@ from typing import Optional, Union
|
|
|
9
9
|
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
"
|
|
12
|
+
UniswapBuyExactlyRequestAmountTypedDict = TypeAliasType(
|
|
13
|
+
"UniswapBuyExactlyRequestAmountTypedDict", Union[float, str]
|
|
14
14
|
)
|
|
15
15
|
r"""The amount of the token to swap to"""
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
"
|
|
18
|
+
UniswapBuyExactlyRequestAmount = TypeAliasType(
|
|
19
|
+
"UniswapBuyExactlyRequestAmount", Union[float, str]
|
|
20
20
|
)
|
|
21
21
|
r"""The amount of the token to swap to"""
|
|
22
22
|
|
|
@@ -41,7 +41,7 @@ class UniswapBuyExactlyRequestTypedDict(TypedDict):
|
|
|
41
41
|
|
|
42
42
|
Uniswap supports 4 different fee levels.
|
|
43
43
|
"""
|
|
44
|
-
|
|
44
|
+
amount: UniswapBuyExactlyRequestAmountTypedDict
|
|
45
45
|
r"""The amount of the token to swap to"""
|
|
46
46
|
max_slippage_percent: float
|
|
47
47
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
|
|
@@ -76,7 +76,7 @@ class UniswapBuyExactlyRequest(BaseModel):
|
|
|
76
76
|
Uniswap supports 4 different fee levels.
|
|
77
77
|
"""
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
amount: UniswapBuyExactlyRequestAmount
|
|
80
80
|
r"""The amount of the token to swap to"""
|
|
81
81
|
|
|
82
82
|
max_slippage_percent: float
|
|
@@ -3,19 +3,51 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .reserve import Reserve, ReserveTypedDict
|
|
5
5
|
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
6
7
|
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal
|
|
7
10
|
from typing_extensions import Annotated, TypedDict
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
class UsageAsCollateralTypedDict(TypedDict):
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
id: str
|
|
15
|
+
r"""The id of a historical transaction on aave"""
|
|
16
|
+
timestamp: int
|
|
17
|
+
r"""Timestamp in unix time"""
|
|
18
|
+
tx_hash: str
|
|
19
|
+
r"""Transaction hash. You can paste these into the search bar on etherscan"""
|
|
20
|
+
from_state: bool
|
|
21
|
+
to_state: bool
|
|
13
22
|
reserve: ReserveTypedDict
|
|
23
|
+
block: int
|
|
24
|
+
action: Literal["UsageAsCollateral"]
|
|
25
|
+
r"""The type of transaction"""
|
|
14
26
|
|
|
15
27
|
|
|
16
28
|
class UsageAsCollateral(BaseModel):
|
|
17
|
-
|
|
29
|
+
id: str
|
|
30
|
+
r"""The id of a historical transaction on aave"""
|
|
18
31
|
|
|
19
|
-
|
|
32
|
+
timestamp: int
|
|
33
|
+
r"""Timestamp in unix time"""
|
|
34
|
+
|
|
35
|
+
tx_hash: Annotated[str, pydantic.Field(alias="txHash")]
|
|
36
|
+
r"""Transaction hash. You can paste these into the search bar on etherscan"""
|
|
37
|
+
|
|
38
|
+
from_state: Annotated[bool, pydantic.Field(alias="fromState")]
|
|
39
|
+
|
|
40
|
+
to_state: Annotated[bool, pydantic.Field(alias="toState")]
|
|
20
41
|
|
|
21
42
|
reserve: Reserve
|
|
43
|
+
|
|
44
|
+
block: int
|
|
45
|
+
|
|
46
|
+
ACTION: Annotated[
|
|
47
|
+
Annotated[
|
|
48
|
+
Literal["UsageAsCollateral"],
|
|
49
|
+
AfterValidator(validate_const("UsageAsCollateral")),
|
|
50
|
+
],
|
|
51
|
+
pydantic.Field(alias="action"),
|
|
52
|
+
] = "UsageAsCollateral"
|
|
53
|
+
r"""The type of transaction"""
|
compass_api_sdk/morpho.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from .basesdk import BaseSDK
|
|
4
4
|
from compass_api_sdk import errors, models, utils
|
|
5
5
|
from compass_api_sdk._hooks import HookContext
|
|
6
|
-
from compass_api_sdk.types import
|
|
6
|
+
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
7
7
|
from typing import Any, Mapping, Optional, Union
|
|
8
8
|
|
|
9
9
|
|
|
@@ -11,8 +11,10 @@ class Morpho(BaseSDK):
|
|
|
11
11
|
def vaults(
|
|
12
12
|
self,
|
|
13
13
|
*,
|
|
14
|
-
chain:
|
|
15
|
-
|
|
14
|
+
chain: Optional[
|
|
15
|
+
models.MorphoVaultsChain
|
|
16
|
+
] = models.MorphoVaultsChain.ETHEREUM_MAINNET,
|
|
17
|
+
deposit_token: OptionalNullable[str] = UNSET,
|
|
16
18
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
17
19
|
server_url: Optional[str] = None,
|
|
18
20
|
timeout_ms: Optional[int] = None,
|
|
@@ -26,7 +28,7 @@ class Morpho(BaseSDK):
|
|
|
26
28
|
tokens into a vault you receive shares. You earn yield on these shares by their
|
|
27
29
|
exchange value increasing over time.
|
|
28
30
|
|
|
29
|
-
:param chain:
|
|
31
|
+
:param chain:
|
|
30
32
|
:param deposit_token:
|
|
31
33
|
:param retries: Override the default retry configuration for this method
|
|
32
34
|
:param server_url: Override the default server URL for this method
|
|
@@ -115,8 +117,10 @@ class Morpho(BaseSDK):
|
|
|
115
117
|
async def vaults_async(
|
|
116
118
|
self,
|
|
117
119
|
*,
|
|
118
|
-
chain:
|
|
119
|
-
|
|
120
|
+
chain: Optional[
|
|
121
|
+
models.MorphoVaultsChain
|
|
122
|
+
] = models.MorphoVaultsChain.ETHEREUM_MAINNET,
|
|
123
|
+
deposit_token: OptionalNullable[str] = UNSET,
|
|
120
124
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
121
125
|
server_url: Optional[str] = None,
|
|
122
126
|
timeout_ms: Optional[int] = None,
|
|
@@ -130,7 +134,7 @@ class Morpho(BaseSDK):
|
|
|
130
134
|
tokens into a vault you receive shares. You earn yield on these shares by their
|
|
131
135
|
exchange value increasing over time.
|
|
132
136
|
|
|
133
|
-
:param chain:
|
|
137
|
+
:param chain:
|
|
134
138
|
:param deposit_token:
|
|
135
139
|
:param retries: Override the default retry configuration for this method
|
|
136
140
|
:param server_url: Override the default server URL for this method
|
|
@@ -219,9 +223,11 @@ class Morpho(BaseSDK):
|
|
|
219
223
|
def vault_position(
|
|
220
224
|
self,
|
|
221
225
|
*,
|
|
222
|
-
chain: models.MorphoVaultPositionChain = models.MorphoVaultPositionChain.ETHEREUM_MAINNET,
|
|
223
226
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
224
227
|
vault_address: str = "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
|
|
228
|
+
chain: Optional[
|
|
229
|
+
models.MorphoVaultPositionChain
|
|
230
|
+
] = models.MorphoVaultPositionChain.ETHEREUM_MAINNET,
|
|
225
231
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
226
232
|
server_url: Optional[str] = None,
|
|
227
233
|
timeout_ms: Optional[int] = None,
|
|
@@ -232,9 +238,9 @@ class Morpho(BaseSDK):
|
|
|
232
238
|
Check how many shares you own and the equivalent token amount of a given
|
|
233
239
|
vault.
|
|
234
240
|
|
|
235
|
-
:param chain: The chain to use.
|
|
236
241
|
:param user_address:
|
|
237
242
|
:param vault_address:
|
|
243
|
+
:param chain:
|
|
238
244
|
:param retries: Override the default retry configuration for this method
|
|
239
245
|
:param server_url: Override the default server URL for this method
|
|
240
246
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -325,9 +331,11 @@ class Morpho(BaseSDK):
|
|
|
325
331
|
async def vault_position_async(
|
|
326
332
|
self,
|
|
327
333
|
*,
|
|
328
|
-
chain: models.MorphoVaultPositionChain = models.MorphoVaultPositionChain.ETHEREUM_MAINNET,
|
|
329
334
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
330
335
|
vault_address: str = "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
|
|
336
|
+
chain: Optional[
|
|
337
|
+
models.MorphoVaultPositionChain
|
|
338
|
+
] = models.MorphoVaultPositionChain.ETHEREUM_MAINNET,
|
|
331
339
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
332
340
|
server_url: Optional[str] = None,
|
|
333
341
|
timeout_ms: Optional[int] = None,
|
|
@@ -338,9 +346,9 @@ class Morpho(BaseSDK):
|
|
|
338
346
|
Check how many shares you own and the equivalent token amount of a given
|
|
339
347
|
vault.
|
|
340
348
|
|
|
341
|
-
:param chain: The chain to use.
|
|
342
349
|
:param user_address:
|
|
343
350
|
:param vault_address:
|
|
351
|
+
:param chain:
|
|
344
352
|
:param retries: Override the default retry configuration for this method
|
|
345
353
|
:param server_url: Override the default server URL for this method
|
|
346
354
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -431,7 +439,9 @@ class Morpho(BaseSDK):
|
|
|
431
439
|
def markets(
|
|
432
440
|
self,
|
|
433
441
|
*,
|
|
434
|
-
chain:
|
|
442
|
+
chain: Optional[
|
|
443
|
+
models.MorphoMarketsChain
|
|
444
|
+
] = models.MorphoMarketsChain.ETHEREUM_MAINNET,
|
|
435
445
|
collateral_token: OptionalNullable[str] = UNSET,
|
|
436
446
|
loan_token: OptionalNullable[str] = UNSET,
|
|
437
447
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -446,7 +456,7 @@ class Morpho(BaseSDK):
|
|
|
446
456
|
Each market has one unique token that can be borrowed against one unique token that
|
|
447
457
|
can be used as collateral.
|
|
448
458
|
|
|
449
|
-
:param chain:
|
|
459
|
+
:param chain:
|
|
450
460
|
:param collateral_token:
|
|
451
461
|
:param loan_token:
|
|
452
462
|
:param retries: Override the default retry configuration for this method
|
|
@@ -537,7 +547,9 @@ class Morpho(BaseSDK):
|
|
|
537
547
|
async def markets_async(
|
|
538
548
|
self,
|
|
539
549
|
*,
|
|
540
|
-
chain:
|
|
550
|
+
chain: Optional[
|
|
551
|
+
models.MorphoMarketsChain
|
|
552
|
+
] = models.MorphoMarketsChain.ETHEREUM_MAINNET,
|
|
541
553
|
collateral_token: OptionalNullable[str] = UNSET,
|
|
542
554
|
loan_token: OptionalNullable[str] = UNSET,
|
|
543
555
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -552,7 +564,7 @@ class Morpho(BaseSDK):
|
|
|
552
564
|
Each market has one unique token that can be borrowed against one unique token that
|
|
553
565
|
can be used as collateral.
|
|
554
566
|
|
|
555
|
-
:param chain:
|
|
567
|
+
:param chain:
|
|
556
568
|
:param collateral_token:
|
|
557
569
|
:param loan_token:
|
|
558
570
|
:param retries: Override the default retry configuration for this method
|
|
@@ -643,9 +655,11 @@ class Morpho(BaseSDK):
|
|
|
643
655
|
def market_position(
|
|
644
656
|
self,
|
|
645
657
|
*,
|
|
646
|
-
chain: models.MorphoMarketPositionChain = models.MorphoMarketPositionChain.ETHEREUM_MAINNET,
|
|
647
658
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
648
659
|
unique_market_key: str = "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
|
|
660
|
+
chain: Optional[
|
|
661
|
+
models.MorphoMarketPositionChain
|
|
662
|
+
] = models.MorphoMarketPositionChain.ETHEREUM_MAINNET,
|
|
649
663
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
650
664
|
server_url: Optional[str] = None,
|
|
651
665
|
timeout_ms: Optional[int] = None,
|
|
@@ -656,9 +670,9 @@ class Morpho(BaseSDK):
|
|
|
656
670
|
Check how many shares you've borrowed and the equivalent token amount of a given
|
|
657
671
|
market.
|
|
658
672
|
|
|
659
|
-
:param chain: The chain to use.
|
|
660
673
|
:param user_address:
|
|
661
674
|
:param unique_market_key:
|
|
675
|
+
:param chain:
|
|
662
676
|
:param retries: Override the default retry configuration for this method
|
|
663
677
|
:param server_url: Override the default server URL for this method
|
|
664
678
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -749,9 +763,11 @@ class Morpho(BaseSDK):
|
|
|
749
763
|
async def market_position_async(
|
|
750
764
|
self,
|
|
751
765
|
*,
|
|
752
|
-
chain: models.MorphoMarketPositionChain = models.MorphoMarketPositionChain.ETHEREUM_MAINNET,
|
|
753
766
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
754
767
|
unique_market_key: str = "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
|
|
768
|
+
chain: Optional[
|
|
769
|
+
models.MorphoMarketPositionChain
|
|
770
|
+
] = models.MorphoMarketPositionChain.ETHEREUM_MAINNET,
|
|
755
771
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
756
772
|
server_url: Optional[str] = None,
|
|
757
773
|
timeout_ms: Optional[int] = None,
|
|
@@ -762,9 +778,9 @@ class Morpho(BaseSDK):
|
|
|
762
778
|
Check how many shares you've borrowed and the equivalent token amount of a given
|
|
763
779
|
market.
|
|
764
780
|
|
|
765
|
-
:param chain: The chain to use.
|
|
766
781
|
:param user_address:
|
|
767
782
|
:param unique_market_key:
|
|
783
|
+
:param chain:
|
|
768
784
|
:param retries: Override the default retry configuration for this method
|
|
769
785
|
:param server_url: Override the default server URL for this method
|
|
770
786
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -860,7 +876,7 @@ class Morpho(BaseSDK):
|
|
|
860
876
|
models.MorphoSetVaultAllowanceRequestAmount,
|
|
861
877
|
models.MorphoSetVaultAllowanceRequestAmountTypedDict,
|
|
862
878
|
],
|
|
863
|
-
chain: models.
|
|
879
|
+
chain: models.MorphoSetVaultAllowanceRequestChain,
|
|
864
880
|
sender: str,
|
|
865
881
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
866
882
|
server_url: Optional[str] = None,
|
|
@@ -877,7 +893,7 @@ class Morpho(BaseSDK):
|
|
|
877
893
|
|
|
878
894
|
:param vault_address: The vault address you are increasing the allowance for.
|
|
879
895
|
:param amount: The amount of tokens to increase the allowance by.
|
|
880
|
-
:param chain:
|
|
896
|
+
:param chain:
|
|
881
897
|
:param sender: The address of the transaction sender.
|
|
882
898
|
:param retries: Override the default retry configuration for this method
|
|
883
899
|
:param server_url: Override the default server URL for this method
|
|
@@ -976,7 +992,7 @@ class Morpho(BaseSDK):
|
|
|
976
992
|
models.MorphoSetVaultAllowanceRequestAmount,
|
|
977
993
|
models.MorphoSetVaultAllowanceRequestAmountTypedDict,
|
|
978
994
|
],
|
|
979
|
-
chain: models.
|
|
995
|
+
chain: models.MorphoSetVaultAllowanceRequestChain,
|
|
980
996
|
sender: str,
|
|
981
997
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
982
998
|
server_url: Optional[str] = None,
|
|
@@ -993,7 +1009,7 @@ class Morpho(BaseSDK):
|
|
|
993
1009
|
|
|
994
1010
|
:param vault_address: The vault address you are increasing the allowance for.
|
|
995
1011
|
:param amount: The amount of tokens to increase the allowance by.
|
|
996
|
-
:param chain:
|
|
1012
|
+
:param chain:
|
|
997
1013
|
:param sender: The address of the transaction sender.
|
|
998
1014
|
:param retries: Override the default retry configuration for this method
|
|
999
1015
|
:param server_url: Override the default server URL for this method
|
|
@@ -1092,7 +1108,7 @@ class Morpho(BaseSDK):
|
|
|
1092
1108
|
models.MorphoDepositRequestAmount,
|
|
1093
1109
|
models.MorphoDepositRequestAmountTypedDict,
|
|
1094
1110
|
],
|
|
1095
|
-
chain: models.
|
|
1111
|
+
chain: models.MorphoDepositRequestChain,
|
|
1096
1112
|
sender: str,
|
|
1097
1113
|
receiver: OptionalNullable[str] = UNSET,
|
|
1098
1114
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -1116,7 +1132,7 @@ class Morpho(BaseSDK):
|
|
|
1116
1132
|
|
|
1117
1133
|
:param vault_address: The vault address you are depositing to.
|
|
1118
1134
|
:param amount: The amount of tokens to deposit into the vault.
|
|
1119
|
-
:param chain:
|
|
1135
|
+
:param chain:
|
|
1120
1136
|
:param sender: The address of the transaction sender.
|
|
1121
1137
|
:param receiver: The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender.
|
|
1122
1138
|
:param retries: Override the default retry configuration for this method
|
|
@@ -1217,7 +1233,7 @@ class Morpho(BaseSDK):
|
|
|
1217
1233
|
models.MorphoDepositRequestAmount,
|
|
1218
1234
|
models.MorphoDepositRequestAmountTypedDict,
|
|
1219
1235
|
],
|
|
1220
|
-
chain: models.
|
|
1236
|
+
chain: models.MorphoDepositRequestChain,
|
|
1221
1237
|
sender: str,
|
|
1222
1238
|
receiver: OptionalNullable[str] = UNSET,
|
|
1223
1239
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -1241,7 +1257,7 @@ class Morpho(BaseSDK):
|
|
|
1241
1257
|
|
|
1242
1258
|
:param vault_address: The vault address you are depositing to.
|
|
1243
1259
|
:param amount: The amount of tokens to deposit into the vault.
|
|
1244
|
-
:param chain:
|
|
1260
|
+
:param chain:
|
|
1245
1261
|
:param sender: The address of the transaction sender.
|
|
1246
1262
|
:param receiver: The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender.
|
|
1247
1263
|
:param retries: Override the default retry configuration for this method
|
|
@@ -1339,7 +1355,7 @@ class Morpho(BaseSDK):
|
|
|
1339
1355
|
*,
|
|
1340
1356
|
vault_address: str,
|
|
1341
1357
|
amount: Any,
|
|
1342
|
-
chain: models.
|
|
1358
|
+
chain: models.MorphoWithdrawRequestChain,
|
|
1343
1359
|
sender: str,
|
|
1344
1360
|
receiver: OptionalNullable[str] = UNSET,
|
|
1345
1361
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -1363,7 +1379,7 @@ class Morpho(BaseSDK):
|
|
|
1363
1379
|
|
|
1364
1380
|
:param vault_address: The vault address you are withdrawing from.
|
|
1365
1381
|
:param amount: The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn.
|
|
1366
|
-
:param chain:
|
|
1382
|
+
:param chain:
|
|
1367
1383
|
:param sender: The address of the transaction sender.
|
|
1368
1384
|
:param receiver: The address which will receive the tokens withdrawn. Defaults to the sender.
|
|
1369
1385
|
:param retries: Override the default retry configuration for this method
|
|
@@ -1461,7 +1477,7 @@ class Morpho(BaseSDK):
|
|
|
1461
1477
|
*,
|
|
1462
1478
|
vault_address: str,
|
|
1463
1479
|
amount: Any,
|
|
1464
|
-
chain: models.
|
|
1480
|
+
chain: models.MorphoWithdrawRequestChain,
|
|
1465
1481
|
sender: str,
|
|
1466
1482
|
receiver: OptionalNullable[str] = UNSET,
|
|
1467
1483
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -1485,7 +1501,7 @@ class Morpho(BaseSDK):
|
|
|
1485
1501
|
|
|
1486
1502
|
:param vault_address: The vault address you are withdrawing from.
|
|
1487
1503
|
:param amount: The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn.
|
|
1488
|
-
:param chain:
|
|
1504
|
+
:param chain:
|
|
1489
1505
|
:param sender: The address of the transaction sender.
|
|
1490
1506
|
:param receiver: The address which will receive the tokens withdrawn. Defaults to the sender.
|
|
1491
1507
|
:param retries: Override the default retry configuration for this method
|
|
@@ -1586,7 +1602,7 @@ class Morpho(BaseSDK):
|
|
|
1586
1602
|
models.MorphoSupplyCollateralRequestAmountTypedDict,
|
|
1587
1603
|
],
|
|
1588
1604
|
unique_market_key: str,
|
|
1589
|
-
chain: models.
|
|
1605
|
+
chain: models.MorphoSupplyCollateralRequestChain,
|
|
1590
1606
|
sender: str,
|
|
1591
1607
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
1592
1608
|
callback_data: OptionalNullable[bytes] = UNSET,
|
|
@@ -1606,7 +1622,7 @@ class Morpho(BaseSDK):
|
|
|
1606
1622
|
|
|
1607
1623
|
:param amount: Amount of the token to supply to the market as collateral.
|
|
1608
1624
|
:param unique_market_key: The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
1609
|
-
:param chain:
|
|
1625
|
+
:param chain:
|
|
1610
1626
|
:param sender: The address of the transaction sender.
|
|
1611
1627
|
:param on_behalf_of: The address on behalf of whom the supplied collateral is made. Defaults to sender.
|
|
1612
1628
|
:param callback_data: An optional field for callback byte data that will be triggered upon successful supplying of collateral.
|
|
@@ -1709,7 +1725,7 @@ class Morpho(BaseSDK):
|
|
|
1709
1725
|
models.MorphoSupplyCollateralRequestAmountTypedDict,
|
|
1710
1726
|
],
|
|
1711
1727
|
unique_market_key: str,
|
|
1712
|
-
chain: models.
|
|
1728
|
+
chain: models.MorphoSupplyCollateralRequestChain,
|
|
1713
1729
|
sender: str,
|
|
1714
1730
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
1715
1731
|
callback_data: OptionalNullable[bytes] = UNSET,
|
|
@@ -1729,7 +1745,7 @@ class Morpho(BaseSDK):
|
|
|
1729
1745
|
|
|
1730
1746
|
:param amount: Amount of the token to supply to the market as collateral.
|
|
1731
1747
|
:param unique_market_key: The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
1732
|
-
:param chain:
|
|
1748
|
+
:param chain:
|
|
1733
1749
|
:param sender: The address of the transaction sender.
|
|
1734
1750
|
:param on_behalf_of: The address on behalf of whom the supplied collateral is made. Defaults to sender.
|
|
1735
1751
|
:param callback_data: An optional field for callback byte data that will be triggered upon successful supplying of collateral.
|
|
@@ -1832,7 +1848,7 @@ class Morpho(BaseSDK):
|
|
|
1832
1848
|
models.MorphoWithdrawCollateralRequestAmountTypedDict,
|
|
1833
1849
|
],
|
|
1834
1850
|
unique_market_key: str,
|
|
1835
|
-
chain: models.
|
|
1851
|
+
chain: models.MorphoWithdrawCollateralRequestChain,
|
|
1836
1852
|
sender: str,
|
|
1837
1853
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
1838
1854
|
receiver: OptionalNullable[str] = UNSET,
|
|
@@ -1852,7 +1868,7 @@ class Morpho(BaseSDK):
|
|
|
1852
1868
|
|
|
1853
1869
|
:param amount: Amount of the token to supply to the market as collateral.
|
|
1854
1870
|
:param unique_market_key: The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
1855
|
-
:param chain:
|
|
1871
|
+
:param chain:
|
|
1856
1872
|
:param sender: The address of the transaction sender.
|
|
1857
1873
|
:param on_behalf_of: The address on behalf of whom the withdraw is made. Defaults to sender.
|
|
1858
1874
|
:param receiver: The address where the withdrawn collateral will be received. Defaults to sender.
|
|
@@ -1955,7 +1971,7 @@ class Morpho(BaseSDK):
|
|
|
1955
1971
|
models.MorphoWithdrawCollateralRequestAmountTypedDict,
|
|
1956
1972
|
],
|
|
1957
1973
|
unique_market_key: str,
|
|
1958
|
-
chain: models.
|
|
1974
|
+
chain: models.MorphoWithdrawCollateralRequestChain,
|
|
1959
1975
|
sender: str,
|
|
1960
1976
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
1961
1977
|
receiver: OptionalNullable[str] = UNSET,
|
|
@@ -1975,7 +1991,7 @@ class Morpho(BaseSDK):
|
|
|
1975
1991
|
|
|
1976
1992
|
:param amount: Amount of the token to supply to the market as collateral.
|
|
1977
1993
|
:param unique_market_key: The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
1978
|
-
:param chain:
|
|
1994
|
+
:param chain:
|
|
1979
1995
|
:param sender: The address of the transaction sender.
|
|
1980
1996
|
:param on_behalf_of: The address on behalf of whom the withdraw is made. Defaults to sender.
|
|
1981
1997
|
:param receiver: The address where the withdrawn collateral will be received. Defaults to sender.
|
|
@@ -2077,7 +2093,7 @@ class Morpho(BaseSDK):
|
|
|
2077
2093
|
models.MorphoBorrowRequestAmount, models.MorphoBorrowRequestAmountTypedDict
|
|
2078
2094
|
],
|
|
2079
2095
|
unique_market_key: str,
|
|
2080
|
-
chain: models.
|
|
2096
|
+
chain: models.MorphoBorrowRequestChain,
|
|
2081
2097
|
sender: str,
|
|
2082
2098
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
2083
2099
|
receiver: OptionalNullable[str] = UNSET,
|
|
@@ -2100,7 +2116,7 @@ class Morpho(BaseSDK):
|
|
|
2100
2116
|
|
|
2101
2117
|
:param amount: Amount of the token to borrow from the market.
|
|
2102
2118
|
:param unique_market_key: The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
2103
|
-
:param chain:
|
|
2119
|
+
:param chain:
|
|
2104
2120
|
:param sender: The address of the transaction sender.
|
|
2105
2121
|
:param on_behalf_of: The address where the collateral is borrowed against. Defaults to sender.
|
|
2106
2122
|
:param receiver: The address of the receiver of the tokens borrowed. Defaults to the transaction sender.
|
|
@@ -2202,7 +2218,7 @@ class Morpho(BaseSDK):
|
|
|
2202
2218
|
models.MorphoBorrowRequestAmount, models.MorphoBorrowRequestAmountTypedDict
|
|
2203
2219
|
],
|
|
2204
2220
|
unique_market_key: str,
|
|
2205
|
-
chain: models.
|
|
2221
|
+
chain: models.MorphoBorrowRequestChain,
|
|
2206
2222
|
sender: str,
|
|
2207
2223
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
2208
2224
|
receiver: OptionalNullable[str] = UNSET,
|
|
@@ -2225,7 +2241,7 @@ class Morpho(BaseSDK):
|
|
|
2225
2241
|
|
|
2226
2242
|
:param amount: Amount of the token to borrow from the market.
|
|
2227
2243
|
:param unique_market_key: The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
2228
|
-
:param chain:
|
|
2244
|
+
:param chain:
|
|
2229
2245
|
:param sender: The address of the transaction sender.
|
|
2230
2246
|
:param on_behalf_of: The address where the collateral is borrowed against. Defaults to sender.
|
|
2231
2247
|
:param receiver: The address of the receiver of the tokens borrowed. Defaults to the transaction sender.
|
|
@@ -2325,7 +2341,7 @@ class Morpho(BaseSDK):
|
|
|
2325
2341
|
*,
|
|
2326
2342
|
amount: Any,
|
|
2327
2343
|
unique_market_key: str,
|
|
2328
|
-
chain: models.
|
|
2344
|
+
chain: models.MorphoRepayRequestChain,
|
|
2329
2345
|
sender: str,
|
|
2330
2346
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
2331
2347
|
callback_data: OptionalNullable[bytes] = UNSET,
|
|
@@ -2345,7 +2361,7 @@ class Morpho(BaseSDK):
|
|
|
2345
2361
|
|
|
2346
2362
|
:param amount: Amount of the token to repay to the market. If set to 'ALL', all debt plus interest will be paid back if the user has a sufficient token balance in their wallet.
|
|
2347
2363
|
:param unique_market_key: The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
2348
|
-
:param chain:
|
|
2364
|
+
:param chain:
|
|
2349
2365
|
:param sender: The address of the transaction sender.
|
|
2350
2366
|
:param on_behalf_of: The address on behalf of whom the repayment is made. Defaults to sender.
|
|
2351
2367
|
:param callback_data: An optional field for callback byte data that will be triggered upon successful repaying of debt.
|
|
@@ -2445,7 +2461,7 @@ class Morpho(BaseSDK):
|
|
|
2445
2461
|
*,
|
|
2446
2462
|
amount: Any,
|
|
2447
2463
|
unique_market_key: str,
|
|
2448
|
-
chain: models.
|
|
2464
|
+
chain: models.MorphoRepayRequestChain,
|
|
2449
2465
|
sender: str,
|
|
2450
2466
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
2451
2467
|
callback_data: OptionalNullable[bytes] = UNSET,
|
|
@@ -2465,7 +2481,7 @@ class Morpho(BaseSDK):
|
|
|
2465
2481
|
|
|
2466
2482
|
:param amount: Amount of the token to repay to the market. If set to 'ALL', all debt plus interest will be paid back if the user has a sufficient token balance in their wallet.
|
|
2467
2483
|
:param unique_market_key: The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
2468
|
-
:param chain:
|
|
2484
|
+
:param chain:
|
|
2469
2485
|
:param sender: The address of the transaction sender.
|
|
2470
2486
|
:param on_behalf_of: The address on behalf of whom the repayment is made. Defaults to sender.
|
|
2471
2487
|
:param callback_data: An optional field for callback byte data that will be triggered upon successful repaying of debt.
|