compass_api_sdk 0.9.41__py3-none-any.whl → 0.9.43__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 +40 -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/uniswapbuyexactlyparams.py +32 -24
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +32 -24
- compass_api_sdk/models/vaultgetvaultresponse.py +10 -3
- 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 +61 -60
- 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.41.dist-info → compass_api_sdk-0.9.43.dist-info}/METADATA +2 -3
- {compass_api_sdk-0.9.41.dist-info → compass_api_sdk-0.9.43.dist-info}/RECORD +26 -26
- compass_api_sdk/models/pendle_positionop.py +0 -87
- compass_api_sdk/models/pendlegetuserpositionresponse.py +0 -56
- {compass_api_sdk-0.9.41.dist-info → compass_api_sdk-0.9.43.dist-info}/WHEEL +0 -0
compass_api_sdk/sky.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
|
|
|
@@ -80,11 +81,9 @@ class Sky(BaseSDK):
|
|
|
80
81
|
|
|
81
82
|
response_data: Any = None
|
|
82
83
|
if utils.match_response(http_res, "200", "application/json"):
|
|
83
|
-
return
|
|
84
|
-
models.SkyCheckPositionResponse, http_res
|
|
85
|
-
)
|
|
84
|
+
return unmarshal_json_response(models.SkyCheckPositionResponse, http_res)
|
|
86
85
|
if utils.match_response(http_res, "422", "application/json"):
|
|
87
|
-
response_data =
|
|
86
|
+
response_data = unmarshal_json_response(
|
|
88
87
|
errors.HTTPValidationErrorData, http_res
|
|
89
88
|
)
|
|
90
89
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -169,11 +168,9 @@ class Sky(BaseSDK):
|
|
|
169
168
|
|
|
170
169
|
response_data: Any = None
|
|
171
170
|
if utils.match_response(http_res, "200", "application/json"):
|
|
172
|
-
return
|
|
173
|
-
models.SkyCheckPositionResponse, http_res
|
|
174
|
-
)
|
|
171
|
+
return unmarshal_json_response(models.SkyCheckPositionResponse, http_res)
|
|
175
172
|
if utils.match_response(http_res, "422", "application/json"):
|
|
176
|
-
response_data =
|
|
173
|
+
response_data = unmarshal_json_response(
|
|
177
174
|
errors.HTTPValidationErrorData, http_res
|
|
178
175
|
)
|
|
179
176
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -273,9 +270,9 @@ class Sky(BaseSDK):
|
|
|
273
270
|
|
|
274
271
|
response_data: Any = None
|
|
275
272
|
if utils.match_response(http_res, "200", "application/json"):
|
|
276
|
-
return
|
|
273
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
277
274
|
if utils.match_response(http_res, "422", "application/json"):
|
|
278
|
-
response_data =
|
|
275
|
+
response_data = unmarshal_json_response(
|
|
279
276
|
errors.HTTPValidationErrorData, http_res
|
|
280
277
|
)
|
|
281
278
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -375,9 +372,9 @@ class Sky(BaseSDK):
|
|
|
375
372
|
|
|
376
373
|
response_data: Any = None
|
|
377
374
|
if utils.match_response(http_res, "200", "application/json"):
|
|
378
|
-
return
|
|
375
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
379
376
|
if utils.match_response(http_res, "422", "application/json"):
|
|
380
|
-
response_data =
|
|
377
|
+
response_data = unmarshal_json_response(
|
|
381
378
|
errors.HTTPValidationErrorData, http_res
|
|
382
379
|
)
|
|
383
380
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -479,9 +476,9 @@ class Sky(BaseSDK):
|
|
|
479
476
|
|
|
480
477
|
response_data: Any = None
|
|
481
478
|
if utils.match_response(http_res, "200", "application/json"):
|
|
482
|
-
return
|
|
479
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
483
480
|
if utils.match_response(http_res, "422", "application/json"):
|
|
484
|
-
response_data =
|
|
481
|
+
response_data = unmarshal_json_response(
|
|
485
482
|
errors.HTTPValidationErrorData, http_res
|
|
486
483
|
)
|
|
487
484
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -583,9 +580,9 @@ class Sky(BaseSDK):
|
|
|
583
580
|
|
|
584
581
|
response_data: Any = None
|
|
585
582
|
if utils.match_response(http_res, "200", "application/json"):
|
|
586
|
-
return
|
|
583
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
587
584
|
if utils.match_response(http_res, "422", "application/json"):
|
|
588
|
-
response_data =
|
|
585
|
+
response_data = unmarshal_json_response(
|
|
589
586
|
errors.HTTPValidationErrorData, http_res
|
|
590
587
|
)
|
|
591
588
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -683,9 +680,9 @@ class Sky(BaseSDK):
|
|
|
683
680
|
|
|
684
681
|
response_data: Any = None
|
|
685
682
|
if utils.match_response(http_res, "200", "application/json"):
|
|
686
|
-
return
|
|
683
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
687
684
|
if utils.match_response(http_res, "422", "application/json"):
|
|
688
|
-
response_data =
|
|
685
|
+
response_data = unmarshal_json_response(
|
|
689
686
|
errors.HTTPValidationErrorData, http_res
|
|
690
687
|
)
|
|
691
688
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -783,9 +780,9 @@ class Sky(BaseSDK):
|
|
|
783
780
|
|
|
784
781
|
response_data: Any = None
|
|
785
782
|
if utils.match_response(http_res, "200", "application/json"):
|
|
786
|
-
return
|
|
783
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
787
784
|
if utils.match_response(http_res, "422", "application/json"):
|
|
788
|
-
response_data =
|
|
785
|
+
response_data = unmarshal_json_response(
|
|
789
786
|
errors.HTTPValidationErrorData, http_res
|
|
790
787
|
)
|
|
791
788
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -879,9 +876,9 @@ class Sky(BaseSDK):
|
|
|
879
876
|
|
|
880
877
|
response_data: Any = None
|
|
881
878
|
if utils.match_response(http_res, "200", "application/json"):
|
|
882
|
-
return
|
|
879
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
883
880
|
if utils.match_response(http_res, "422", "application/json"):
|
|
884
|
-
response_data =
|
|
881
|
+
response_data = unmarshal_json_response(
|
|
885
882
|
errors.HTTPValidationErrorData, http_res
|
|
886
883
|
)
|
|
887
884
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -975,9 +972,9 @@ class Sky(BaseSDK):
|
|
|
975
972
|
|
|
976
973
|
response_data: Any = None
|
|
977
974
|
if utils.match_response(http_res, "200", "application/json"):
|
|
978
|
-
return
|
|
975
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
979
976
|
if utils.match_response(http_res, "422", "application/json"):
|
|
980
|
-
response_data =
|
|
977
|
+
response_data = unmarshal_json_response(
|
|
981
978
|
errors.HTTPValidationErrorData, http_res
|
|
982
979
|
)
|
|
983
980
|
raise errors.HTTPValidationError(response_data, http_res)
|
compass_api_sdk/smart_account.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, List, Mapping, Optional, Union
|
|
8
9
|
|
|
9
10
|
|
|
@@ -91,11 +92,11 @@ class SmartAccount(BaseSDK):
|
|
|
91
92
|
|
|
92
93
|
response_data: Any = None
|
|
93
94
|
if utils.match_response(http_res, "200", "application/json"):
|
|
94
|
-
return
|
|
95
|
+
return unmarshal_json_response(
|
|
95
96
|
models.BatchedUserOperationsResponse, http_res
|
|
96
97
|
)
|
|
97
98
|
if utils.match_response(http_res, "422", "application/json"):
|
|
98
|
-
response_data =
|
|
99
|
+
response_data = unmarshal_json_response(
|
|
99
100
|
errors.HTTPValidationErrorData, http_res
|
|
100
101
|
)
|
|
101
102
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -191,11 +192,11 @@ class SmartAccount(BaseSDK):
|
|
|
191
192
|
|
|
192
193
|
response_data: Any = None
|
|
193
194
|
if utils.match_response(http_res, "200", "application/json"):
|
|
194
|
-
return
|
|
195
|
+
return unmarshal_json_response(
|
|
195
196
|
models.BatchedUserOperationsResponse, http_res
|
|
196
197
|
)
|
|
197
198
|
if utils.match_response(http_res, "422", "application/json"):
|
|
198
|
-
response_data =
|
|
199
|
+
response_data = unmarshal_json_response(
|
|
199
200
|
errors.HTTPValidationErrorData, http_res
|
|
200
201
|
)
|
|
201
202
|
raise errors.HTTPValidationError(response_data, http_res)
|
compass_api_sdk/token_sdk.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
|
|
|
@@ -83,9 +84,9 @@ class TokenSDK(BaseSDK):
|
|
|
83
84
|
|
|
84
85
|
response_data: Any = None
|
|
85
86
|
if utils.match_response(http_res, "200", "application/json"):
|
|
86
|
-
return
|
|
87
|
+
return unmarshal_json_response(models.TokenAddressResponse, http_res)
|
|
87
88
|
if utils.match_response(http_res, "422", "application/json"):
|
|
88
|
-
response_data =
|
|
89
|
+
response_data = unmarshal_json_response(
|
|
89
90
|
errors.HTTPValidationErrorData, http_res
|
|
90
91
|
)
|
|
91
92
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -173,9 +174,9 @@ class TokenSDK(BaseSDK):
|
|
|
173
174
|
|
|
174
175
|
response_data: Any = None
|
|
175
176
|
if utils.match_response(http_res, "200", "application/json"):
|
|
176
|
-
return
|
|
177
|
+
return unmarshal_json_response(models.TokenAddressResponse, http_res)
|
|
177
178
|
if utils.match_response(http_res, "422", "application/json"):
|
|
178
|
-
response_data =
|
|
179
|
+
response_data = unmarshal_json_response(
|
|
179
180
|
errors.HTTPValidationErrorData, http_res
|
|
180
181
|
)
|
|
181
182
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -270,9 +271,9 @@ class TokenSDK(BaseSDK):
|
|
|
270
271
|
|
|
271
272
|
response_data: Any = None
|
|
272
273
|
if utils.match_response(http_res, "200", "application/json"):
|
|
273
|
-
return
|
|
274
|
+
return unmarshal_json_response(models.TokenPriceResponse, http_res)
|
|
274
275
|
if utils.match_response(http_res, "422", "application/json"):
|
|
275
|
-
response_data =
|
|
276
|
+
response_data = unmarshal_json_response(
|
|
276
277
|
errors.HTTPValidationErrorData, http_res
|
|
277
278
|
)
|
|
278
279
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -367,9 +368,9 @@ class TokenSDK(BaseSDK):
|
|
|
367
368
|
|
|
368
369
|
response_data: Any = None
|
|
369
370
|
if utils.match_response(http_res, "200", "application/json"):
|
|
370
|
-
return
|
|
371
|
+
return unmarshal_json_response(models.TokenPriceResponse, http_res)
|
|
371
372
|
if utils.match_response(http_res, "422", "application/json"):
|
|
372
|
-
response_data =
|
|
373
|
+
response_data = unmarshal_json_response(
|
|
373
374
|
errors.HTTPValidationErrorData, http_res
|
|
374
375
|
)
|
|
375
376
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -460,9 +461,9 @@ class TokenSDK(BaseSDK):
|
|
|
460
461
|
|
|
461
462
|
response_data: Any = None
|
|
462
463
|
if utils.match_response(http_res, "200", "application/json"):
|
|
463
|
-
return
|
|
464
|
+
return unmarshal_json_response(models.TokenBalanceResponse, http_res)
|
|
464
465
|
if utils.match_response(http_res, "422", "application/json"):
|
|
465
|
-
response_data =
|
|
466
|
+
response_data = unmarshal_json_response(
|
|
466
467
|
errors.HTTPValidationErrorData, http_res
|
|
467
468
|
)
|
|
468
469
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -553,9 +554,9 @@ class TokenSDK(BaseSDK):
|
|
|
553
554
|
|
|
554
555
|
response_data: Any = None
|
|
555
556
|
if utils.match_response(http_res, "200", "application/json"):
|
|
556
|
-
return
|
|
557
|
+
return unmarshal_json_response(models.TokenBalanceResponse, http_res)
|
|
557
558
|
if utils.match_response(http_res, "422", "application/json"):
|
|
558
|
-
response_data =
|
|
559
|
+
response_data = unmarshal_json_response(
|
|
559
560
|
errors.HTTPValidationErrorData, http_res
|
|
560
561
|
)
|
|
561
562
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -660,9 +661,9 @@ class TokenSDK(BaseSDK):
|
|
|
660
661
|
|
|
661
662
|
response_data: Any = None
|
|
662
663
|
if utils.match_response(http_res, "200", "application/json"):
|
|
663
|
-
return
|
|
664
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
664
665
|
if utils.match_response(http_res, "422", "application/json"):
|
|
665
|
-
response_data =
|
|
666
|
+
response_data = unmarshal_json_response(
|
|
666
667
|
errors.HTTPValidationErrorData, http_res
|
|
667
668
|
)
|
|
668
669
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -767,9 +768,9 @@ class TokenSDK(BaseSDK):
|
|
|
767
768
|
|
|
768
769
|
response_data: Any = None
|
|
769
770
|
if utils.match_response(http_res, "200", "application/json"):
|
|
770
|
-
return
|
|
771
|
+
return unmarshal_json_response(models.TxResponse, http_res)
|
|
771
772
|
if utils.match_response(http_res, "422", "application/json"):
|
|
772
|
-
response_data =
|
|
773
|
+
response_data = unmarshal_json_response(
|
|
773
774
|
errors.HTTPValidationErrorData, http_res
|
|
774
775
|
)
|
|
775
776
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -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, List, Mapping, Optional, Union
|
|
8
9
|
|
|
9
10
|
|
|
@@ -91,11 +92,11 @@ class TransactionBundler(BaseSDK):
|
|
|
91
92
|
|
|
92
93
|
response_data: Any = None
|
|
93
94
|
if utils.match_response(http_res, "200", "application/json"):
|
|
94
|
-
return
|
|
95
|
+
return unmarshal_json_response(
|
|
95
96
|
models.MulticallAuthorizationResponse, http_res
|
|
96
97
|
)
|
|
97
98
|
if utils.match_response(http_res, "422", "application/json"):
|
|
98
|
-
response_data =
|
|
99
|
+
response_data = unmarshal_json_response(
|
|
99
100
|
errors.HTTPValidationErrorData, http_res
|
|
100
101
|
)
|
|
101
102
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -191,11 +192,11 @@ class TransactionBundler(BaseSDK):
|
|
|
191
192
|
|
|
192
193
|
response_data: Any = None
|
|
193
194
|
if utils.match_response(http_res, "200", "application/json"):
|
|
194
|
-
return
|
|
195
|
+
return unmarshal_json_response(
|
|
195
196
|
models.MulticallAuthorizationResponse, http_res
|
|
196
197
|
)
|
|
197
198
|
if utils.match_response(http_res, "422", "application/json"):
|
|
198
|
-
response_data =
|
|
199
|
+
response_data = unmarshal_json_response(
|
|
199
200
|
errors.HTTPValidationErrorData, http_res
|
|
200
201
|
)
|
|
201
202
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -302,11 +303,11 @@ class TransactionBundler(BaseSDK):
|
|
|
302
303
|
|
|
303
304
|
response_data: Any = None
|
|
304
305
|
if utils.match_response(http_res, "200", "application/json"):
|
|
305
|
-
return
|
|
306
|
+
return unmarshal_json_response(
|
|
306
307
|
models.UnsignedMulticallTransaction, http_res
|
|
307
308
|
)
|
|
308
309
|
if utils.match_response(http_res, "422", "application/json"):
|
|
309
|
-
response_data =
|
|
310
|
+
response_data = unmarshal_json_response(
|
|
310
311
|
errors.HTTPValidationErrorData, http_res
|
|
311
312
|
)
|
|
312
313
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -413,11 +414,11 @@ class TransactionBundler(BaseSDK):
|
|
|
413
414
|
|
|
414
415
|
response_data: Any = None
|
|
415
416
|
if utils.match_response(http_res, "200", "application/json"):
|
|
416
|
-
return
|
|
417
|
+
return unmarshal_json_response(
|
|
417
418
|
models.UnsignedMulticallTransaction, http_res
|
|
418
419
|
)
|
|
419
420
|
if utils.match_response(http_res, "422", "application/json"):
|
|
420
|
-
response_data =
|
|
421
|
+
response_data = unmarshal_json_response(
|
|
421
422
|
errors.HTTPValidationErrorData, http_res
|
|
422
423
|
)
|
|
423
424
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -547,11 +548,11 @@ class TransactionBundler(BaseSDK):
|
|
|
547
548
|
|
|
548
549
|
response_data: Any = None
|
|
549
550
|
if utils.match_response(http_res, "200", "application/json"):
|
|
550
|
-
return
|
|
551
|
+
return unmarshal_json_response(
|
|
551
552
|
models.UnsignedMulticallTransaction, http_res
|
|
552
553
|
)
|
|
553
554
|
if utils.match_response(http_res, "422", "application/json"):
|
|
554
|
-
response_data =
|
|
555
|
+
response_data = unmarshal_json_response(
|
|
555
556
|
errors.HTTPValidationErrorData, http_res
|
|
556
557
|
)
|
|
557
558
|
raise errors.HTTPValidationError(response_data, http_res)
|
|
@@ -681,11 +682,11 @@ class TransactionBundler(BaseSDK):
|
|
|
681
682
|
|
|
682
683
|
response_data: Any = None
|
|
683
684
|
if utils.match_response(http_res, "200", "application/json"):
|
|
684
|
-
return
|
|
685
|
+
return unmarshal_json_response(
|
|
685
686
|
models.UnsignedMulticallTransaction, http_res
|
|
686
687
|
)
|
|
687
688
|
if utils.match_response(http_res, "422", "application/json"):
|
|
688
|
-
response_data =
|
|
689
|
+
response_data = unmarshal_json_response(
|
|
689
690
|
errors.HTTPValidationErrorData, http_res
|
|
690
691
|
)
|
|
691
692
|
raise errors.HTTPValidationError(response_data, http_res)
|