compass_api_sdk 0.9.40__py3-none-any.whl → 0.9.42__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 +53 -64
- compass_api_sdk/aerodrome_slipstream.py +29 -28
- compass_api_sdk/erc_4626_vaults.py +13 -12
- compass_api_sdk/models/__init__.py +16 -24
- compass_api_sdk/models/compass_api_backend_models_pendle_read_response_market_userposition.py +82 -0
- compass_api_sdk/models/{userposition.py → compass_api_backend_models_vaults_read_response_vault_userposition.py} +2 -2
- compass_api_sdk/models/pendle_marketop.py +10 -2
- compass_api_sdk/models/pendlegetmarketresponse.py +52 -2
- compass_api_sdk/models/vaultgetvaultresponse.py +19 -6
- compass_api_sdk/morpho.py +49 -60
- compass_api_sdk/pendle.py +71 -268
- compass_api_sdk/sky.py +21 -24
- compass_api_sdk/smart_account.py +5 -4
- compass_api_sdk/token_sdk.py +17 -16
- compass_api_sdk/transaction_bundler.py +13 -12
- compass_api_sdk/uniswap_v3.py +41 -52
- compass_api_sdk/universal.py +33 -32
- compass_api_sdk/utils/__init__.py +0 -3
- compass_api_sdk/utils/serializers.py +1 -18
- compass_api_sdk/utils/unmarshal_json_response.py +24 -0
- {compass_api_sdk-0.9.40.dist-info → compass_api_sdk-0.9.42.dist-info}/METADATA +2 -3
- {compass_api_sdk-0.9.40.dist-info → compass_api_sdk-0.9.42.dist-info}/RECORD +24 -24
- compass_api_sdk/models/pendle_positionop.py +0 -87
- compass_api_sdk/models/pendlegetuserpositionresponse.py +0 -56
- {compass_api_sdk-0.9.40.dist-info → compass_api_sdk-0.9.42.dist-info}/WHEEL +0 -0
compass_api_sdk/morpho.py
CHANGED
|
@@ -4,6 +4,7 @@ from .basesdk import BaseSDK
|
|
|
4
4
|
from compass_api_sdk import errors, models, utils
|
|
5
5
|
from compass_api_sdk._hooks import HookContext
|
|
6
6
|
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
7
|
+
from compass_api_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
7
8
|
from typing import Any, Mapping, Optional, Union
|
|
8
9
|
|
|
9
10
|
|
|
@@ -87,11 +88,9 @@ class Morpho(BaseSDK):
|
|
|
87
88
|
|
|
88
89
|
response_data: Any = None
|
|
89
90
|
if utils.match_response(http_res, "200", "application/json"):
|
|
90
|
-
return
|
|
91
|
-
models.MorphoGetVaultsResponse, http_res
|
|
92
|
-
)
|
|
91
|
+
return unmarshal_json_response(models.MorphoGetVaultsResponse, http_res)
|
|
93
92
|
if utils.match_response(http_res, "422", "application/json"):
|
|
94
|
-
response_data =
|
|
93
|
+
response_data = unmarshal_json_response(
|
|
95
94
|
errors.HTTPValidationErrorData, http_res
|
|
96
95
|
)
|
|
97
96
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -183,11 +182,9 @@ class Morpho(BaseSDK):
|
|
|
183
182
|
|
|
184
183
|
response_data: Any = None
|
|
185
184
|
if utils.match_response(http_res, "200", "application/json"):
|
|
186
|
-
return
|
|
187
|
-
models.MorphoGetVaultsResponse, http_res
|
|
188
|
-
)
|
|
185
|
+
return unmarshal_json_response(models.MorphoGetVaultsResponse, http_res)
|
|
189
186
|
if utils.match_response(http_res, "422", "application/json"):
|
|
190
|
-
response_data =
|
|
187
|
+
response_data = unmarshal_json_response(
|
|
191
188
|
errors.HTTPValidationErrorData, http_res
|
|
192
189
|
)
|
|
193
190
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -283,9 +280,9 @@ class Morpho(BaseSDK):
|
|
|
283
280
|
|
|
284
281
|
response_data: Any = None
|
|
285
282
|
if utils.match_response(http_res, "200", "application/json"):
|
|
286
|
-
return
|
|
283
|
+
return unmarshal_json_response(models.VaultGetVaultResponse, http_res)
|
|
287
284
|
if utils.match_response(http_res, "422", "application/json"):
|
|
288
|
-
response_data =
|
|
285
|
+
response_data = unmarshal_json_response(
|
|
289
286
|
errors.HTTPValidationErrorData, http_res
|
|
290
287
|
)
|
|
291
288
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -381,9 +378,9 @@ class Morpho(BaseSDK):
|
|
|
381
378
|
|
|
382
379
|
response_data: Any = None
|
|
383
380
|
if utils.match_response(http_res, "200", "application/json"):
|
|
384
|
-
return
|
|
381
|
+
return unmarshal_json_response(models.VaultGetVaultResponse, http_res)
|
|
385
382
|
if utils.match_response(http_res, "422", "application/json"):
|
|
386
|
-
response_data =
|
|
383
|
+
response_data = unmarshal_json_response(
|
|
387
384
|
errors.HTTPValidationErrorData, http_res
|
|
388
385
|
)
|
|
389
386
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -477,11 +474,9 @@ class Morpho(BaseSDK):
|
|
|
477
474
|
|
|
478
475
|
response_data: Any = None
|
|
479
476
|
if utils.match_response(http_res, "200", "application/json"):
|
|
480
|
-
return
|
|
481
|
-
models.MorphoGetMarketsResponse, http_res
|
|
482
|
-
)
|
|
477
|
+
return unmarshal_json_response(models.MorphoGetMarketsResponse, http_res)
|
|
483
478
|
if utils.match_response(http_res, "422", "application/json"):
|
|
484
|
-
response_data =
|
|
479
|
+
response_data = unmarshal_json_response(
|
|
485
480
|
errors.HTTPValidationErrorData, http_res
|
|
486
481
|
)
|
|
487
482
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -575,11 +570,9 @@ class Morpho(BaseSDK):
|
|
|
575
570
|
|
|
576
571
|
response_data: Any = None
|
|
577
572
|
if utils.match_response(http_res, "200", "application/json"):
|
|
578
|
-
return
|
|
579
|
-
models.MorphoGetMarketsResponse, http_res
|
|
580
|
-
)
|
|
573
|
+
return unmarshal_json_response(models.MorphoGetMarketsResponse, http_res)
|
|
581
574
|
if utils.match_response(http_res, "422", "application/json"):
|
|
582
|
-
response_data =
|
|
575
|
+
response_data = unmarshal_json_response(
|
|
583
576
|
errors.HTTPValidationErrorData, http_res
|
|
584
577
|
)
|
|
585
578
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -676,11 +669,9 @@ class Morpho(BaseSDK):
|
|
|
676
669
|
|
|
677
670
|
response_data: Any = None
|
|
678
671
|
if utils.match_response(http_res, "200", "application/json"):
|
|
679
|
-
return
|
|
680
|
-
models.MorphoGetMarketResponse, http_res
|
|
681
|
-
)
|
|
672
|
+
return unmarshal_json_response(models.MorphoGetMarketResponse, http_res)
|
|
682
673
|
if utils.match_response(http_res, "422", "application/json"):
|
|
683
|
-
response_data =
|
|
674
|
+
response_data = unmarshal_json_response(
|
|
684
675
|
errors.HTTPValidationErrorData, http_res
|
|
685
676
|
)
|
|
686
677
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -777,11 +768,9 @@ class Morpho(BaseSDK):
|
|
|
777
768
|
|
|
778
769
|
response_data: Any = None
|
|
779
770
|
if utils.match_response(http_res, "200", "application/json"):
|
|
780
|
-
return
|
|
781
|
-
models.MorphoGetMarketResponse, http_res
|
|
782
|
-
)
|
|
771
|
+
return unmarshal_json_response(models.MorphoGetMarketResponse, http_res)
|
|
783
772
|
if utils.match_response(http_res, "422", "application/json"):
|
|
784
|
-
response_data =
|
|
773
|
+
response_data = unmarshal_json_response(
|
|
785
774
|
errors.HTTPValidationErrorData, http_res
|
|
786
775
|
)
|
|
787
776
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -873,11 +862,11 @@ class Morpho(BaseSDK):
|
|
|
873
862
|
|
|
874
863
|
response_data: Any = None
|
|
875
864
|
if utils.match_response(http_res, "200", "application/json"):
|
|
876
|
-
return
|
|
865
|
+
return unmarshal_json_response(
|
|
877
866
|
models.MorphoCheckMarketPositionResponse, http_res
|
|
878
867
|
)
|
|
879
868
|
if utils.match_response(http_res, "422", "application/json"):
|
|
880
|
-
response_data =
|
|
869
|
+
response_data = unmarshal_json_response(
|
|
881
870
|
errors.HTTPValidationErrorData, http_res
|
|
882
871
|
)
|
|
883
872
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -969,11 +958,11 @@ class Morpho(BaseSDK):
|
|
|
969
958
|
|
|
970
959
|
response_data: Any = None
|
|
971
960
|
if utils.match_response(http_res, "200", "application/json"):
|
|
972
|
-
return
|
|
961
|
+
return unmarshal_json_response(
|
|
973
962
|
models.MorphoCheckMarketPositionResponse, http_res
|
|
974
963
|
)
|
|
975
964
|
if utils.match_response(http_res, "422", "application/json"):
|
|
976
|
-
response_data =
|
|
965
|
+
response_data = unmarshal_json_response(
|
|
977
966
|
errors.HTTPValidationErrorData, http_res
|
|
978
967
|
)
|
|
979
968
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1064,11 +1053,11 @@ class Morpho(BaseSDK):
|
|
|
1064
1053
|
|
|
1065
1054
|
response_data: Any = None
|
|
1066
1055
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1067
|
-
return
|
|
1056
|
+
return unmarshal_json_response(
|
|
1068
1057
|
models.MorphoCheckUserPositionResponse, http_res
|
|
1069
1058
|
)
|
|
1070
1059
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1071
|
-
response_data =
|
|
1060
|
+
response_data = unmarshal_json_response(
|
|
1072
1061
|
errors.HTTPValidationErrorData, http_res
|
|
1073
1062
|
)
|
|
1074
1063
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1159,11 +1148,11 @@ class Morpho(BaseSDK):
|
|
|
1159
1148
|
|
|
1160
1149
|
response_data: Any = None
|
|
1161
1150
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1162
|
-
return
|
|
1151
|
+
return unmarshal_json_response(
|
|
1163
1152
|
models.MorphoCheckUserPositionResponse, http_res
|
|
1164
1153
|
)
|
|
1165
1154
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1166
|
-
response_data =
|
|
1155
|
+
response_data = unmarshal_json_response(
|
|
1167
1156
|
errors.HTTPValidationErrorData, http_res
|
|
1168
1157
|
)
|
|
1169
1158
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1276,9 +1265,9 @@ class Morpho(BaseSDK):
|
|
|
1276
1265
|
|
|
1277
1266
|
response_data: Any = None
|
|
1278
1267
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1279
|
-
return
|
|
1268
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
1280
1269
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1281
|
-
response_data =
|
|
1270
|
+
response_data = unmarshal_json_response(
|
|
1282
1271
|
errors.HTTPValidationErrorData, http_res
|
|
1283
1272
|
)
|
|
1284
1273
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1391,9 +1380,9 @@ class Morpho(BaseSDK):
|
|
|
1391
1380
|
|
|
1392
1381
|
response_data: Any = None
|
|
1393
1382
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1394
|
-
return
|
|
1383
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
1395
1384
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1396
|
-
response_data =
|
|
1385
|
+
response_data = unmarshal_json_response(
|
|
1397
1386
|
errors.HTTPValidationErrorData, http_res
|
|
1398
1387
|
)
|
|
1399
1388
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1503,9 +1492,9 @@ class Morpho(BaseSDK):
|
|
|
1503
1492
|
|
|
1504
1493
|
response_data: Any = None
|
|
1505
1494
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1506
|
-
return
|
|
1495
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
1507
1496
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1508
|
-
response_data =
|
|
1497
|
+
response_data = unmarshal_json_response(
|
|
1509
1498
|
errors.HTTPValidationErrorData, http_res
|
|
1510
1499
|
)
|
|
1511
1500
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1615,9 +1604,9 @@ class Morpho(BaseSDK):
|
|
|
1615
1604
|
|
|
1616
1605
|
response_data: Any = None
|
|
1617
1606
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1618
|
-
return
|
|
1607
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
1619
1608
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1620
|
-
response_data =
|
|
1609
|
+
response_data = unmarshal_json_response(
|
|
1621
1610
|
errors.HTTPValidationErrorData, http_res
|
|
1622
1611
|
)
|
|
1623
1612
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1728,9 +1717,9 @@ class Morpho(BaseSDK):
|
|
|
1728
1717
|
|
|
1729
1718
|
response_data: Any = None
|
|
1730
1719
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1731
|
-
return
|
|
1720
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
1732
1721
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1733
|
-
response_data =
|
|
1722
|
+
response_data = unmarshal_json_response(
|
|
1734
1723
|
errors.HTTPValidationErrorData, http_res
|
|
1735
1724
|
)
|
|
1736
1725
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1841,9 +1830,9 @@ class Morpho(BaseSDK):
|
|
|
1841
1830
|
|
|
1842
1831
|
response_data: Any = None
|
|
1843
1832
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1844
|
-
return
|
|
1833
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
1845
1834
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1846
|
-
response_data =
|
|
1835
|
+
response_data = unmarshal_json_response(
|
|
1847
1836
|
errors.HTTPValidationErrorData, http_res
|
|
1848
1837
|
)
|
|
1849
1838
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -1954,9 +1943,9 @@ class Morpho(BaseSDK):
|
|
|
1954
1943
|
|
|
1955
1944
|
response_data: Any = None
|
|
1956
1945
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1957
|
-
return
|
|
1946
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
1958
1947
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1959
|
-
response_data =
|
|
1948
|
+
response_data = unmarshal_json_response(
|
|
1960
1949
|
errors.HTTPValidationErrorData, http_res
|
|
1961
1950
|
)
|
|
1962
1951
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -2067,9 +2056,9 @@ class Morpho(BaseSDK):
|
|
|
2067
2056
|
|
|
2068
2057
|
response_data: Any = None
|
|
2069
2058
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2070
|
-
return
|
|
2059
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
2071
2060
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2072
|
-
response_data =
|
|
2061
|
+
response_data = unmarshal_json_response(
|
|
2073
2062
|
errors.HTTPValidationErrorData, http_res
|
|
2074
2063
|
)
|
|
2075
2064
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -2182,9 +2171,9 @@ class Morpho(BaseSDK):
|
|
|
2182
2171
|
|
|
2183
2172
|
response_data: Any = None
|
|
2184
2173
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2185
|
-
return
|
|
2174
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
2186
2175
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2187
|
-
response_data =
|
|
2176
|
+
response_data = unmarshal_json_response(
|
|
2188
2177
|
errors.HTTPValidationErrorData, http_res
|
|
2189
2178
|
)
|
|
2190
2179
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -2297,9 +2286,9 @@ class Morpho(BaseSDK):
|
|
|
2297
2286
|
|
|
2298
2287
|
response_data: Any = None
|
|
2299
2288
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2300
|
-
return
|
|
2289
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
2301
2290
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2302
|
-
response_data =
|
|
2291
|
+
response_data = unmarshal_json_response(
|
|
2303
2292
|
errors.HTTPValidationErrorData, http_res
|
|
2304
2293
|
)
|
|
2305
2294
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -2407,9 +2396,9 @@ class Morpho(BaseSDK):
|
|
|
2407
2396
|
|
|
2408
2397
|
response_data: Any = None
|
|
2409
2398
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2410
|
-
return
|
|
2399
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
2411
2400
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2412
|
-
response_data =
|
|
2401
|
+
response_data = unmarshal_json_response(
|
|
2413
2402
|
errors.HTTPValidationErrorData, http_res
|
|
2414
2403
|
)
|
|
2415
2404
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -2517,9 +2506,9 @@ class Morpho(BaseSDK):
|
|
|
2517
2506
|
|
|
2518
2507
|
response_data: Any = None
|
|
2519
2508
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2520
|
-
return
|
|
2509
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
2521
2510
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2522
|
-
response_data =
|
|
2511
|
+
response_data = unmarshal_json_response(
|
|
2523
2512
|
errors.HTTPValidationErrorData, http_res
|
|
2524
2513
|
)
|
|
2525
2514
|
raise errors.HTTPValidationError(response_data, http_res)
|