compass_api_sdk 0.1.14__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.

Files changed (38) hide show
  1. compass_api_sdk/_version.py +3 -3
  2. compass_api_sdk/aave_v3.py +214 -0
  3. compass_api_sdk/models/__init__.py +62 -25
  4. compass_api_sdk/models/aave_reserve_overviewop.py +97 -0
  5. compass_api_sdk/models/aavehistoricaltransactionsresponse.py +45 -11
  6. compass_api_sdk/models/aavelooprequest.py +87 -0
  7. compass_api_sdk/models/aavereserveoverviewresponse.py +25 -0
  8. compass_api_sdk/models/borrow.py +46 -12
  9. compass_api_sdk/models/liquidationcall.py +45 -18
  10. compass_api_sdk/models/morpho_market_positionop.py +5 -9
  11. compass_api_sdk/models/morpho_marketsop.py +5 -9
  12. compass_api_sdk/models/morpho_vault_positionop.py +5 -9
  13. compass_api_sdk/models/morpho_vaultsop.py +19 -17
  14. compass_api_sdk/models/morphoborrowrequest.py +8 -5
  15. compass_api_sdk/models/morphodepositrequest.py +8 -5
  16. compass_api_sdk/models/morphorepayrequest.py +8 -5
  17. compass_api_sdk/models/morphosetvaultallowancerequest.py +8 -5
  18. compass_api_sdk/models/morphosupplycollateralrequest.py +8 -5
  19. compass_api_sdk/models/morphowithdrawcollateralrequest.py +8 -5
  20. compass_api_sdk/models/morphowithdrawrequest.py +8 -5
  21. compass_api_sdk/models/redeemunderlying.py +31 -4
  22. compass_api_sdk/models/repay.py +35 -4
  23. compass_api_sdk/models/reserve.py +67 -6
  24. compass_api_sdk/models/supply.py +37 -4
  25. compass_api_sdk/models/swapborrowrate.py +37 -8
  26. compass_api_sdk/models/uniswapbuyexactlyparams.py +6 -6
  27. compass_api_sdk/models/uniswapbuyexactlyrequest.py +6 -6
  28. compass_api_sdk/models/usageascollateral.py +36 -4
  29. compass_api_sdk/morpho.py +63 -47
  30. compass_api_sdk/transaction_batching.py +284 -0
  31. compass_api_sdk/uniswap_v3.py +10 -10
  32. {compass_api_sdk-0.1.14.dist-info → compass_api_sdk-0.2.1.dist-info}/METADATA +12 -11
  33. {compass_api_sdk-0.1.14.dist-info → compass_api_sdk-0.2.1.dist-info}/RECORD +34 -35
  34. compass_api_sdk/models/aavehistoricaltransactionbase.py +0 -113
  35. compass_api_sdk/models/action.py +0 -14
  36. compass_api_sdk/models/collateralreserve.py +0 -16
  37. compass_api_sdk/models/principalreserve.py +0 -16
  38. {compass_api_sdk-0.1.14.dist-info → compass_api_sdk-0.2.1.dist-info}/WHEEL +0 -0
@@ -1,113 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from __future__ import annotations
4
- from .action import Action
5
- from .borrow import Borrow, BorrowTypedDict
6
- from .liquidationcall import LiquidationCall, LiquidationCallTypedDict
7
- from .redeemunderlying import RedeemUnderlying, RedeemUnderlyingTypedDict
8
- from .repay import Repay, RepayTypedDict
9
- from .supply import Supply, SupplyTypedDict
10
- from .swapborrowrate import SwapBorrowRate, SwapBorrowRateTypedDict
11
- from .usageascollateral import UsageAsCollateral, UsageAsCollateralTypedDict
12
- from compass_api_sdk.types import (
13
- BaseModel,
14
- Nullable,
15
- OptionalNullable,
16
- UNSET,
17
- UNSET_SENTINEL,
18
- )
19
- import pydantic
20
- from pydantic import model_serializer
21
- from typing_extensions import Annotated, NotRequired, TypedDict
22
-
23
-
24
- class AaveHistoricalTransactionBaseTypedDict(TypedDict):
25
- id: str
26
- timestamp: int
27
- tx_hash: str
28
- action: Action
29
- supply: NotRequired[Nullable[SupplyTypedDict]]
30
- redeem_underlying: NotRequired[Nullable[RedeemUnderlyingTypedDict]]
31
- borrow: NotRequired[Nullable[BorrowTypedDict]]
32
- usage_as_collateral: NotRequired[Nullable[UsageAsCollateralTypedDict]]
33
- repay: NotRequired[Nullable[RepayTypedDict]]
34
- swap_borrow_rate: NotRequired[Nullable[SwapBorrowRateTypedDict]]
35
- liquidation_call: NotRequired[Nullable[LiquidationCallTypedDict]]
36
-
37
-
38
- class AaveHistoricalTransactionBase(BaseModel):
39
- id: str
40
-
41
- timestamp: int
42
-
43
- tx_hash: Annotated[str, pydantic.Field(alias="txHash")]
44
-
45
- action: Action
46
-
47
- supply: OptionalNullable[Supply] = UNSET
48
-
49
- redeem_underlying: Annotated[
50
- OptionalNullable[RedeemUnderlying], pydantic.Field(alias="redeemUnderlying")
51
- ] = UNSET
52
-
53
- borrow: OptionalNullable[Borrow] = UNSET
54
-
55
- usage_as_collateral: Annotated[
56
- OptionalNullable[UsageAsCollateral], pydantic.Field(alias="usageAsCollateral")
57
- ] = UNSET
58
-
59
- repay: OptionalNullable[Repay] = UNSET
60
-
61
- swap_borrow_rate: Annotated[
62
- OptionalNullable[SwapBorrowRate], pydantic.Field(alias="swapBorrowRate")
63
- ] = UNSET
64
-
65
- liquidation_call: Annotated[
66
- OptionalNullable[LiquidationCall], pydantic.Field(alias="liquidationCall")
67
- ] = UNSET
68
-
69
- @model_serializer(mode="wrap")
70
- def serialize_model(self, handler):
71
- optional_fields = [
72
- "supply",
73
- "redeemUnderlying",
74
- "borrow",
75
- "usageAsCollateral",
76
- "repay",
77
- "swapBorrowRate",
78
- "liquidationCall",
79
- ]
80
- nullable_fields = [
81
- "supply",
82
- "redeemUnderlying",
83
- "borrow",
84
- "usageAsCollateral",
85
- "repay",
86
- "swapBorrowRate",
87
- "liquidationCall",
88
- ]
89
- null_default_fields = []
90
-
91
- serialized = handler(self)
92
-
93
- m = {}
94
-
95
- for n, f in type(self).model_fields.items():
96
- k = f.alias or n
97
- val = serialized.get(k)
98
- serialized.pop(k, None)
99
-
100
- optional_nullable = k in optional_fields and k in nullable_fields
101
- is_set = (
102
- self.__pydantic_fields_set__.intersection({n})
103
- or k in null_default_fields
104
- ) # pylint: disable=no-member
105
-
106
- if val is not None and val != UNSET_SENTINEL:
107
- m[k] = val
108
- elif val != UNSET_SENTINEL and (
109
- not k in optional_fields or (optional_nullable and is_set)
110
- ):
111
- m[k] = val
112
-
113
- return m
@@ -1,14 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from __future__ import annotations
4
- from enum import Enum
5
-
6
-
7
- class Action(str, Enum):
8
- SUPPLY = "supply"
9
- REDEEM_UNDERLYING = "redeemUnderlying"
10
- BORROW = "borrow"
11
- USAGE_AS_COLLATERAL = "usageAsCollateral"
12
- REPAY = "repay"
13
- SWAP_BORROW_RATE = "swapBorrowRate"
14
- LIQUIDATION_CALL = "liquidationCall"
@@ -1,16 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from __future__ import annotations
4
- from compass_api_sdk.types import BaseModel
5
- from typing_extensions import TypedDict
6
-
7
-
8
- class CollateralReserveTypedDict(TypedDict):
9
- symbol: str
10
- decimals: int
11
-
12
-
13
- class CollateralReserve(BaseModel):
14
- symbol: str
15
-
16
- decimals: int
@@ -1,16 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from __future__ import annotations
4
- from compass_api_sdk.types import BaseModel
5
- from typing_extensions import TypedDict
6
-
7
-
8
- class PrincipalReserveTypedDict(TypedDict):
9
- symbol: str
10
- decimals: int
11
-
12
-
13
- class PrincipalReserve(BaseModel):
14
- symbol: str
15
-
16
- decimals: int