compass_api_sdk 1.1.1rc0__py3-none-any.whl → 1.1.3__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 (106) hide show
  1. compass_api_sdk/_version.py +3 -3
  2. compass_api_sdk/aave_v3.py +68 -44
  3. compass_api_sdk/aerodrome_slipstream.py +62 -32
  4. compass_api_sdk/erc_4626_vaults.py +12 -0
  5. compass_api_sdk/ethena.py +18 -0
  6. compass_api_sdk/models/__init__.py +0 -254
  7. compass_api_sdk/models/aaveborrowparams.py +4 -13
  8. compass_api_sdk/models/aaveborrowrequest.py +10 -14
  9. compass_api_sdk/models/aavelooprequest.py +18 -26
  10. compass_api_sdk/models/aaverepayparams.py +4 -13
  11. compass_api_sdk/models/aaverepayrequest.py +10 -14
  12. compass_api_sdk/models/aavesupplyparams.py +4 -13
  13. compass_api_sdk/models/aavesupplyrequest.py +10 -14
  14. compass_api_sdk/models/aavewithdrawparams.py +4 -13
  15. compass_api_sdk/models/aavewithdrawrequest.py +10 -14
  16. compass_api_sdk/models/aerodromeposition.py +4 -25
  17. compass_api_sdk/models/aerodromeslipstreambuyexactlyparams.py +8 -25
  18. compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +14 -26
  19. compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +6 -1
  20. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionparams.py +8 -25
  21. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +14 -26
  22. compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +8 -25
  23. compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py +8 -25
  24. compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +13 -25
  25. compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +6 -1
  26. compass_api_sdk/models/batcheduseroperationsrequest.py +15 -4
  27. compass_api_sdk/models/compass_api_backend_models_generic_read_response_portfolio_tokenbalance.py +4 -13
  28. compass_api_sdk/models/ethenadepositrequest.py +6 -1
  29. compass_api_sdk/models/ethenarequesttowithdrawrequest.py +6 -1
  30. compass_api_sdk/models/ethenaunstakerequest.py +6 -1
  31. compass_api_sdk/models/morphoborrowrequest.py +6 -1
  32. compass_api_sdk/models/morphodepositrequest.py +6 -1
  33. compass_api_sdk/models/morphorepayrequest.py +11 -1
  34. compass_api_sdk/models/morphosupplycollateralrequest.py +11 -1
  35. compass_api_sdk/models/morphowithdrawcollateralrequest.py +6 -1
  36. compass_api_sdk/models/morphowithdrawrequest.py +6 -1
  37. compass_api_sdk/models/multicallexecuterequest.py +7 -2
  38. compass_api_sdk/models/odosswapparams.py +4 -25
  39. compass_api_sdk/models/odosswaprequest.py +10 -28
  40. compass_api_sdk/models/pendlemanageliquidityparams.py +2 -15
  41. compass_api_sdk/models/pendlemanageliquidityrequest.py +8 -16
  42. compass_api_sdk/models/pendleredeemyieldrequest.py +6 -1
  43. compass_api_sdk/models/pendletradeptparams.py +2 -15
  44. compass_api_sdk/models/pendletradeptrequest.py +8 -16
  45. compass_api_sdk/models/pendletradeytparams.py +2 -15
  46. compass_api_sdk/models/pendletradeytrequest.py +8 -16
  47. compass_api_sdk/models/reserve.py +6 -15
  48. compass_api_sdk/models/setallowanceparams.py +2 -15
  49. compass_api_sdk/models/setallowancerequest.py +8 -16
  50. compass_api_sdk/models/skybuyrequest.py +6 -1
  51. compass_api_sdk/models/skydepositrequest.py +6 -1
  52. compass_api_sdk/models/skysellrequest.py +7 -2
  53. compass_api_sdk/models/skywithdrawrequest.py +6 -1
  54. compass_api_sdk/models/tokenbalanceresponse.py +5 -15
  55. compass_api_sdk/models/tokentransferparams.py +2 -15
  56. compass_api_sdk/models/tokentransferrequest.py +8 -16
  57. compass_api_sdk/models/uniswapbuyexactlyparams.py +8 -33
  58. compass_api_sdk/models/uniswapbuyexactlyrequest.py +14 -34
  59. compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +6 -1
  60. compass_api_sdk/models/uniswapmintliquidityprovisionparams.py +8 -25
  61. compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +14 -26
  62. compass_api_sdk/models/uniswappoolpriceresponse.py +8 -25
  63. compass_api_sdk/models/uniswapsellexactlyparams.py +4 -29
  64. compass_api_sdk/models/uniswapsellexactlyrequest.py +10 -30
  65. compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +6 -1
  66. compass_api_sdk/models/unsignedmulticalltransaction.py +34 -3
  67. compass_api_sdk/models/unsignedtransaction.py +34 -3
  68. compass_api_sdk/models/unwrapwethrequest.py +6 -1
  69. compass_api_sdk/models/v1_aave_avg_rateop.py +5 -83
  70. compass_api_sdk/models/v1_aave_liquidity_changeop.py +5 -83
  71. compass_api_sdk/models/v1_aave_rateop.py +5 -83
  72. compass_api_sdk/models/v1_aave_reserve_overviewop.py +5 -83
  73. compass_api_sdk/models/v1_aave_std_rateop.py +5 -83
  74. compass_api_sdk/models/v1_aave_token_priceop.py +5 -83
  75. compass_api_sdk/models/v1_aave_user_position_per_tokenop.py +5 -83
  76. compass_api_sdk/models/v1_aerodrome_slipstream_pool_priceop.py +10 -166
  77. compass_api_sdk/models/v1_generic_allowanceop.py +7 -21
  78. compass_api_sdk/models/v1_morpho_marketsop.py +9 -29
  79. compass_api_sdk/models/v1_morpho_vaultsop.py +5 -15
  80. compass_api_sdk/models/v1_sky_positionop.py +4 -5
  81. compass_api_sdk/models/v1_token_balanceop.py +10 -23
  82. compass_api_sdk/models/v1_token_priceop.py +7 -8
  83. compass_api_sdk/models/v1_uniswap_pool_priceop.py +10 -166
  84. compass_api_sdk/models/v1_uniswap_quote_buy_exactlyop.py +10 -166
  85. compass_api_sdk/models/v1_uniswap_quote_sell_exactlyop.py +10 -166
  86. compass_api_sdk/models/vaultdepositrequest.py +6 -1
  87. compass_api_sdk/models/vaultwithdrawrequest.py +6 -1
  88. compass_api_sdk/models/wrapethrequest.py +6 -1
  89. compass_api_sdk/morpho.py +48 -24
  90. compass_api_sdk/pendle.py +30 -20
  91. compass_api_sdk/sdk.py +3 -3
  92. compass_api_sdk/sky.py +38 -16
  93. compass_api_sdk/smart_account.py +6 -0
  94. compass_api_sdk/swap.py +10 -12
  95. compass_api_sdk/{token_sdk.py → token.py} +19 -197
  96. compass_api_sdk/transaction_bundler.py +20 -8
  97. compass_api_sdk/uniswap_v3.py +74 -68
  98. compass_api_sdk/universal.py +24 -188
  99. {compass_api_sdk-1.1.1rc0.dist-info → compass_api_sdk-1.1.3.dist-info}/METADATA +5 -7
  100. {compass_api_sdk-1.1.1rc0.dist-info → compass_api_sdk-1.1.3.dist-info}/RECORD +101 -106
  101. compass_api_sdk/models/token_enum.py +0 -81
  102. compass_api_sdk/models/tokenaddressresponse.py +0 -15
  103. compass_api_sdk/models/tokeninfo.py +0 -17
  104. compass_api_sdk/models/v1_generic_supported_tokensop.py +0 -24
  105. compass_api_sdk/models/v1_token_addressop.py +0 -109
  106. {compass_api_sdk-1.1.1rc0.dist-info → compass_api_sdk-1.1.3.dist-info}/WHEEL +0 -0
compass_api_sdk/pendle.py CHANGED
@@ -568,9 +568,7 @@ class Pendle(BaseSDK):
568
568
  *,
569
569
  market_address: str,
570
570
  action: models.PendleTradePtRequestAction,
571
- token: Union[
572
- models.PendleTradePtRequestToken, models.PendleTradePtRequestTokenTypedDict
573
- ],
571
+ token: str,
574
572
  amount_in: Union[
575
573
  models.PendleTradePtRequestAmountIn,
576
574
  models.PendleTradePtRequestAmountInTypedDict,
@@ -578,6 +576,7 @@ class Pendle(BaseSDK):
578
576
  max_slippage_percent: float,
579
577
  chain: models.PendleTradePtRequestChain,
580
578
  sender: str,
579
+ estimate_gas: Optional[bool] = True,
581
580
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
582
581
  server_url: Optional[str] = None,
583
582
  timeout_ms: Optional[int] = None,
@@ -607,6 +606,7 @@ class Pendle(BaseSDK):
607
606
  :param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed.
608
607
  :param chain:
609
608
  :param sender: The address of the transaction sender.
609
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
610
610
  :param retries: Override the default retry configuration for this method
611
611
  :param server_url: Override the default server URL for this method
612
612
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -630,6 +630,7 @@ class Pendle(BaseSDK):
630
630
  max_slippage_percent=max_slippage_percent,
631
631
  chain=chain,
632
632
  sender=sender,
633
+ estimate_gas=estimate_gas,
633
634
  )
634
635
 
635
636
  req = self._build_request(
@@ -694,9 +695,7 @@ class Pendle(BaseSDK):
694
695
  *,
695
696
  market_address: str,
696
697
  action: models.PendleTradePtRequestAction,
697
- token: Union[
698
- models.PendleTradePtRequestToken, models.PendleTradePtRequestTokenTypedDict
699
- ],
698
+ token: str,
700
699
  amount_in: Union[
701
700
  models.PendleTradePtRequestAmountIn,
702
701
  models.PendleTradePtRequestAmountInTypedDict,
@@ -704,6 +703,7 @@ class Pendle(BaseSDK):
704
703
  max_slippage_percent: float,
705
704
  chain: models.PendleTradePtRequestChain,
706
705
  sender: str,
706
+ estimate_gas: Optional[bool] = True,
707
707
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
708
708
  server_url: Optional[str] = None,
709
709
  timeout_ms: Optional[int] = None,
@@ -733,6 +733,7 @@ class Pendle(BaseSDK):
733
733
  :param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed.
734
734
  :param chain:
735
735
  :param sender: The address of the transaction sender.
736
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
736
737
  :param retries: Override the default retry configuration for this method
737
738
  :param server_url: Override the default server URL for this method
738
739
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -756,6 +757,7 @@ class Pendle(BaseSDK):
756
757
  max_slippage_percent=max_slippage_percent,
757
758
  chain=chain,
758
759
  sender=sender,
760
+ estimate_gas=estimate_gas,
759
761
  )
760
762
 
761
763
  req = self._build_request_async(
@@ -820,9 +822,7 @@ class Pendle(BaseSDK):
820
822
  *,
821
823
  market_address: str,
822
824
  action: models.PendleTradeYtRequestAction,
823
- token: Union[
824
- models.PendleTradeYtRequestToken, models.PendleTradeYtRequestTokenTypedDict
825
- ],
825
+ token: str,
826
826
  amount_in: Union[
827
827
  models.PendleTradeYtRequestAmountIn,
828
828
  models.PendleTradeYtRequestAmountInTypedDict,
@@ -830,6 +830,7 @@ class Pendle(BaseSDK):
830
830
  max_slippage_percent: float,
831
831
  chain: models.PendleTradeYtRequestChain,
832
832
  sender: str,
833
+ estimate_gas: Optional[bool] = True,
833
834
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
834
835
  server_url: Optional[str] = None,
835
836
  timeout_ms: Optional[int] = None,
@@ -859,6 +860,7 @@ class Pendle(BaseSDK):
859
860
  :param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed.
860
861
  :param chain:
861
862
  :param sender: The address of the transaction sender.
863
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
862
864
  :param retries: Override the default retry configuration for this method
863
865
  :param server_url: Override the default server URL for this method
864
866
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -882,6 +884,7 @@ class Pendle(BaseSDK):
882
884
  max_slippage_percent=max_slippage_percent,
883
885
  chain=chain,
884
886
  sender=sender,
887
+ estimate_gas=estimate_gas,
885
888
  )
886
889
 
887
890
  req = self._build_request(
@@ -946,9 +949,7 @@ class Pendle(BaseSDK):
946
949
  *,
947
950
  market_address: str,
948
951
  action: models.PendleTradeYtRequestAction,
949
- token: Union[
950
- models.PendleTradeYtRequestToken, models.PendleTradeYtRequestTokenTypedDict
951
- ],
952
+ token: str,
952
953
  amount_in: Union[
953
954
  models.PendleTradeYtRequestAmountIn,
954
955
  models.PendleTradeYtRequestAmountInTypedDict,
@@ -956,6 +957,7 @@ class Pendle(BaseSDK):
956
957
  max_slippage_percent: float,
957
958
  chain: models.PendleTradeYtRequestChain,
958
959
  sender: str,
960
+ estimate_gas: Optional[bool] = True,
959
961
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
960
962
  server_url: Optional[str] = None,
961
963
  timeout_ms: Optional[int] = None,
@@ -985,6 +987,7 @@ class Pendle(BaseSDK):
985
987
  :param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed.
986
988
  :param chain:
987
989
  :param sender: The address of the transaction sender.
990
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
988
991
  :param retries: Override the default retry configuration for this method
989
992
  :param server_url: Override the default server URL for this method
990
993
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1008,6 +1011,7 @@ class Pendle(BaseSDK):
1008
1011
  max_slippage_percent=max_slippage_percent,
1009
1012
  chain=chain,
1010
1013
  sender=sender,
1014
+ estimate_gas=estimate_gas,
1011
1015
  )
1012
1016
 
1013
1017
  req = self._build_request_async(
@@ -1072,10 +1076,7 @@ class Pendle(BaseSDK):
1072
1076
  *,
1073
1077
  market_address: str,
1074
1078
  action: models.PendleManageLiquidityRequestAction,
1075
- token: Union[
1076
- models.PendleManageLiquidityRequestToken,
1077
- models.PendleManageLiquidityRequestTokenTypedDict,
1078
- ],
1079
+ token: str,
1079
1080
  amount_in: Union[
1080
1081
  models.PendleManageLiquidityRequestAmountIn,
1081
1082
  models.PendleManageLiquidityRequestAmountInTypedDict,
@@ -1083,6 +1084,7 @@ class Pendle(BaseSDK):
1083
1084
  max_slippage_percent: float,
1084
1085
  chain: models.PendleManageLiquidityRequestChain,
1085
1086
  sender: str,
1087
+ estimate_gas: Optional[bool] = True,
1086
1088
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1087
1089
  server_url: Optional[str] = None,
1088
1090
  timeout_ms: Optional[int] = None,
@@ -1115,6 +1117,7 @@ class Pendle(BaseSDK):
1115
1117
  :param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed.
1116
1118
  :param chain:
1117
1119
  :param sender: The address of the transaction sender.
1120
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
1118
1121
  :param retries: Override the default retry configuration for this method
1119
1122
  :param server_url: Override the default server URL for this method
1120
1123
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1138,6 +1141,7 @@ class Pendle(BaseSDK):
1138
1141
  max_slippage_percent=max_slippage_percent,
1139
1142
  chain=chain,
1140
1143
  sender=sender,
1144
+ estimate_gas=estimate_gas,
1141
1145
  )
1142
1146
 
1143
1147
  req = self._build_request(
@@ -1202,10 +1206,7 @@ class Pendle(BaseSDK):
1202
1206
  *,
1203
1207
  market_address: str,
1204
1208
  action: models.PendleManageLiquidityRequestAction,
1205
- token: Union[
1206
- models.PendleManageLiquidityRequestToken,
1207
- models.PendleManageLiquidityRequestTokenTypedDict,
1208
- ],
1209
+ token: str,
1209
1210
  amount_in: Union[
1210
1211
  models.PendleManageLiquidityRequestAmountIn,
1211
1212
  models.PendleManageLiquidityRequestAmountInTypedDict,
@@ -1213,6 +1214,7 @@ class Pendle(BaseSDK):
1213
1214
  max_slippage_percent: float,
1214
1215
  chain: models.PendleManageLiquidityRequestChain,
1215
1216
  sender: str,
1217
+ estimate_gas: Optional[bool] = True,
1216
1218
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1217
1219
  server_url: Optional[str] = None,
1218
1220
  timeout_ms: Optional[int] = None,
@@ -1245,6 +1247,7 @@ class Pendle(BaseSDK):
1245
1247
  :param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed.
1246
1248
  :param chain:
1247
1249
  :param sender: The address of the transaction sender.
1250
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
1248
1251
  :param retries: Override the default retry configuration for this method
1249
1252
  :param server_url: Override the default server URL for this method
1250
1253
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1268,6 +1271,7 @@ class Pendle(BaseSDK):
1268
1271
  max_slippage_percent=max_slippage_percent,
1269
1272
  chain=chain,
1270
1273
  sender=sender,
1274
+ estimate_gas=estimate_gas,
1271
1275
  )
1272
1276
 
1273
1277
  req = self._build_request_async(
@@ -1333,6 +1337,7 @@ class Pendle(BaseSDK):
1333
1337
  market_address: str,
1334
1338
  chain: models.PendleRedeemYieldRequestChain,
1335
1339
  sender: str,
1340
+ estimate_gas: Optional[bool] = True,
1336
1341
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1337
1342
  server_url: Optional[str] = None,
1338
1343
  timeout_ms: Optional[int] = None,
@@ -1353,6 +1358,7 @@ class Pendle(BaseSDK):
1353
1358
  :param market_address: The address of the market identifying which Yield Token (YT) you would like to claim yield from.
1354
1359
  :param chain:
1355
1360
  :param sender: The address of the transaction sender.
1361
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
1356
1362
  :param retries: Override the default retry configuration for this method
1357
1363
  :param server_url: Override the default server URL for this method
1358
1364
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1372,6 +1378,7 @@ class Pendle(BaseSDK):
1372
1378
  market_address=market_address,
1373
1379
  chain=chain,
1374
1380
  sender=sender,
1381
+ estimate_gas=estimate_gas,
1375
1382
  )
1376
1383
 
1377
1384
  req = self._build_request(
@@ -1437,6 +1444,7 @@ class Pendle(BaseSDK):
1437
1444
  market_address: str,
1438
1445
  chain: models.PendleRedeemYieldRequestChain,
1439
1446
  sender: str,
1447
+ estimate_gas: Optional[bool] = True,
1440
1448
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1441
1449
  server_url: Optional[str] = None,
1442
1450
  timeout_ms: Optional[int] = None,
@@ -1457,6 +1465,7 @@ class Pendle(BaseSDK):
1457
1465
  :param market_address: The address of the market identifying which Yield Token (YT) you would like to claim yield from.
1458
1466
  :param chain:
1459
1467
  :param sender: The address of the transaction sender.
1468
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
1460
1469
  :param retries: Override the default retry configuration for this method
1461
1470
  :param server_url: Override the default server URL for this method
1462
1471
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1476,6 +1485,7 @@ class Pendle(BaseSDK):
1476
1485
  market_address=market_address,
1477
1486
  chain=chain,
1478
1487
  sender=sender,
1488
+ estimate_gas=estimate_gas,
1479
1489
  )
1480
1490
 
1481
1491
  req = self._build_request_async(
compass_api_sdk/sdk.py CHANGED
@@ -24,7 +24,7 @@ if TYPE_CHECKING:
24
24
  from compass_api_sdk.sky import Sky
25
25
  from compass_api_sdk.smart_account import SmartAccount
26
26
  from compass_api_sdk.swap import Swap
27
- from compass_api_sdk.token_sdk import TokenSDK
27
+ from compass_api_sdk.token import Token
28
28
  from compass_api_sdk.transaction_bundler import TransactionBundler
29
29
  from compass_api_sdk.uniswap_v3 import UniswapV3
30
30
  from compass_api_sdk.universal import Universal
@@ -37,7 +37,7 @@ class CompassAPI(BaseSDK):
37
37
  aerodrome_slipstream: "AerodromeSlipstream"
38
38
  morpho: "Morpho"
39
39
  sky: "Sky"
40
- token: "TokenSDK"
40
+ token: "Token"
41
41
  uniswap_v3: "UniswapV3"
42
42
  universal: "Universal"
43
43
  pendle: "Pendle"
@@ -54,7 +54,7 @@ class CompassAPI(BaseSDK):
54
54
  ),
55
55
  "morpho": ("compass_api_sdk.morpho", "Morpho"),
56
56
  "sky": ("compass_api_sdk.sky", "Sky"),
57
- "token": ("compass_api_sdk.token_sdk", "TokenSDK"),
57
+ "token": ("compass_api_sdk.token", "Token"),
58
58
  "uniswap_v3": ("compass_api_sdk.uniswap_v3", "UniswapV3"),
59
59
  "universal": ("compass_api_sdk.universal", "Universal"),
60
60
  "pendle": ("compass_api_sdk.pendle", "Pendle"),
compass_api_sdk/sky.py CHANGED
@@ -12,8 +12,8 @@ class Sky(BaseSDK):
12
12
  def sky_position(
13
13
  self,
14
14
  *,
15
- user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
16
- chain: Optional[models.V1SkyPositionChain] = models.V1SkyPositionChain.ETHEREUM,
15
+ chain: models.V1SkyPositionChain = models.V1SkyPositionChain.ETHEREUM,
16
+ user_address: str = "0xacCEE9C7A5a759f814C7A770e2D8F78d662b1F60",
17
17
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
18
18
  server_url: Optional[str] = None,
19
19
  timeout_ms: Optional[int] = None,
@@ -23,8 +23,8 @@ class Sky(BaseSDK):
23
23
 
24
24
  Check the USDS overall position.
25
25
 
26
- :param user_address: The user-address of the desired position.
27
26
  :param chain:
27
+ :param user_address: The user-address of the desired position.
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
30
30
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -102,8 +102,8 @@ class Sky(BaseSDK):
102
102
  async def sky_position_async(
103
103
  self,
104
104
  *,
105
- user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
106
- chain: Optional[models.V1SkyPositionChain] = models.V1SkyPositionChain.ETHEREUM,
105
+ chain: models.V1SkyPositionChain = models.V1SkyPositionChain.ETHEREUM,
106
+ user_address: str = "0xacCEE9C7A5a759f814C7A770e2D8F78d662b1F60",
107
107
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
108
108
  server_url: Optional[str] = None,
109
109
  timeout_ms: Optional[int] = None,
@@ -113,8 +113,8 @@ class Sky(BaseSDK):
113
113
 
114
114
  Check the USDS overall position.
115
115
 
116
- :param user_address: The user-address of the desired position.
117
116
  :param chain:
117
+ :param user_address: The user-address of the desired position.
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
120
120
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -196,6 +196,7 @@ class Sky(BaseSDK):
196
196
  amount: Union[models.SkyBuyRequestAmount, models.SkyBuyRequestAmountTypedDict],
197
197
  chain: models.SkyBuyRequestChain,
198
198
  sender: str,
199
+ estimate_gas: Optional[bool] = True,
199
200
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
200
201
  server_url: Optional[str] = None,
201
202
  timeout_ms: Optional[int] = None,
@@ -216,6 +217,7 @@ class Sky(BaseSDK):
216
217
  In order to make this transaction, token allowances need to be set for the following contracts.
217
218
 
218
219
  - `SkyUsdcUsdsConverter`
220
+ - `SkyDaiUsdsConverter`
219
221
  </Info>
220
222
 
221
223
 
@@ -223,6 +225,7 @@ class Sky(BaseSDK):
223
225
  :param amount: The amount of USDS you would like to buy 1:1 with 'token_in'.
224
226
  :param chain:
225
227
  :param sender: The address of the transaction sender.
228
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
226
229
  :param retries: Override the default retry configuration for this method
227
230
  :param server_url: Override the default server URL for this method
228
231
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -243,6 +246,7 @@ class Sky(BaseSDK):
243
246
  amount=amount,
244
247
  chain=chain,
245
248
  sender=sender,
249
+ estimate_gas=estimate_gas,
246
250
  )
247
251
 
248
252
  req = self._build_request(
@@ -309,6 +313,7 @@ class Sky(BaseSDK):
309
313
  amount: Union[models.SkyBuyRequestAmount, models.SkyBuyRequestAmountTypedDict],
310
314
  chain: models.SkyBuyRequestChain,
311
315
  sender: str,
316
+ estimate_gas: Optional[bool] = True,
312
317
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
313
318
  server_url: Optional[str] = None,
314
319
  timeout_ms: Optional[int] = None,
@@ -329,6 +334,7 @@ class Sky(BaseSDK):
329
334
  In order to make this transaction, token allowances need to be set for the following contracts.
330
335
 
331
336
  - `SkyUsdcUsdsConverter`
337
+ - `SkyDaiUsdsConverter`
332
338
  </Info>
333
339
 
334
340
 
@@ -336,6 +342,7 @@ class Sky(BaseSDK):
336
342
  :param amount: The amount of USDS you would like to buy 1:1 with 'token_in'.
337
343
  :param chain:
338
344
  :param sender: The address of the transaction sender.
345
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
339
346
  :param retries: Override the default retry configuration for this method
340
347
  :param server_url: Override the default server URL for this method
341
348
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -356,6 +363,7 @@ class Sky(BaseSDK):
356
363
  amount=amount,
357
364
  chain=chain,
358
365
  sender=sender,
366
+ estimate_gas=estimate_gas,
359
367
  )
360
368
 
361
369
  req = self._build_request_async(
@@ -422,10 +430,9 @@ class Sky(BaseSDK):
422
430
  amount: Union[
423
431
  models.SkySellRequestAmount, models.SkySellRequestAmountTypedDict
424
432
  ],
433
+ chain: models.SkySellRequestChain,
425
434
  sender: str,
426
- chain: Optional[
427
- models.SkySellRequestChain
428
- ] = models.SkySellRequestChain.ETHEREUM,
435
+ estimate_gas: Optional[bool] = True,
429
436
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
430
437
  server_url: Optional[str] = None,
431
438
  timeout_ms: Optional[int] = None,
@@ -446,13 +453,15 @@ class Sky(BaseSDK):
446
453
  In order to make this transaction, token allowances need to be set for the following contracts.
447
454
 
448
455
  - `SkyUsdcUsdsConverter`
456
+ - `SkyDaiUsdsConverter`
449
457
  </Info>
450
458
 
451
459
 
452
460
  :param token_out: The token you would like to swap 1:1 with USDS. Choose from DAI or USDC.
453
461
  :param amount: The amount of USDS you would like to sell 1:1 for 'token_out'.
454
- :param sender: The address of the transaction sender.
455
462
  :param chain:
463
+ :param sender: The address of the transaction sender.
464
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
456
465
  :param retries: Override the default retry configuration for this method
457
466
  :param server_url: Override the default server URL for this method
458
467
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -473,6 +482,7 @@ class Sky(BaseSDK):
473
482
  amount=amount,
474
483
  chain=chain,
475
484
  sender=sender,
485
+ estimate_gas=estimate_gas,
476
486
  )
477
487
 
478
488
  req = self._build_request(
@@ -539,10 +549,9 @@ class Sky(BaseSDK):
539
549
  amount: Union[
540
550
  models.SkySellRequestAmount, models.SkySellRequestAmountTypedDict
541
551
  ],
552
+ chain: models.SkySellRequestChain,
542
553
  sender: str,
543
- chain: Optional[
544
- models.SkySellRequestChain
545
- ] = models.SkySellRequestChain.ETHEREUM,
554
+ estimate_gas: Optional[bool] = True,
546
555
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
547
556
  server_url: Optional[str] = None,
548
557
  timeout_ms: Optional[int] = None,
@@ -563,13 +572,15 @@ class Sky(BaseSDK):
563
572
  In order to make this transaction, token allowances need to be set for the following contracts.
564
573
 
565
574
  - `SkyUsdcUsdsConverter`
575
+ - `SkyDaiUsdsConverter`
566
576
  </Info>
567
577
 
568
578
 
569
579
  :param token_out: The token you would like to swap 1:1 with USDS. Choose from DAI or USDC.
570
580
  :param amount: The amount of USDS you would like to sell 1:1 for 'token_out'.
571
- :param sender: The address of the transaction sender.
572
581
  :param chain:
582
+ :param sender: The address of the transaction sender.
583
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
573
584
  :param retries: Override the default retry configuration for this method
574
585
  :param server_url: Override the default server URL for this method
575
586
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -590,6 +601,7 @@ class Sky(BaseSDK):
590
601
  amount=amount,
591
602
  chain=chain,
592
603
  sender=sender,
604
+ estimate_gas=estimate_gas,
593
605
  )
594
606
 
595
607
  req = self._build_request_async(
@@ -660,6 +672,7 @@ class Sky(BaseSDK):
660
672
  chain: Optional[
661
673
  models.SkyDepositRequestChain
662
674
  ] = models.SkyDepositRequestChain.ETHEREUM,
675
+ estimate_gas: Optional[bool] = True,
663
676
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
664
677
  server_url: Optional[str] = None,
665
678
  timeout_ms: Optional[int] = None,
@@ -685,6 +698,7 @@ class Sky(BaseSDK):
685
698
  :param sender: The address of the transaction sender.
686
699
  :param receiver: The address which will receive the sUSDS. Defaults to the sender.
687
700
  :param chain:
701
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
688
702
  :param retries: Override the default retry configuration for this method
689
703
  :param server_url: Override the default server URL for this method
690
704
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -705,6 +719,7 @@ class Sky(BaseSDK):
705
719
  receiver=receiver,
706
720
  chain=chain,
707
721
  sender=sender,
722
+ estimate_gas=estimate_gas,
708
723
  )
709
724
 
710
725
  req = self._build_request(
@@ -775,6 +790,7 @@ class Sky(BaseSDK):
775
790
  chain: Optional[
776
791
  models.SkyDepositRequestChain
777
792
  ] = models.SkyDepositRequestChain.ETHEREUM,
793
+ estimate_gas: Optional[bool] = True,
778
794
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
779
795
  server_url: Optional[str] = None,
780
796
  timeout_ms: Optional[int] = None,
@@ -800,6 +816,7 @@ class Sky(BaseSDK):
800
816
  :param sender: The address of the transaction sender.
801
817
  :param receiver: The address which will receive the sUSDS. Defaults to the sender.
802
818
  :param chain:
819
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
803
820
  :param retries: Override the default retry configuration for this method
804
821
  :param server_url: Override the default server URL for this method
805
822
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -820,6 +837,7 @@ class Sky(BaseSDK):
820
837
  receiver=receiver,
821
838
  chain=chain,
822
839
  sender=sender,
840
+ estimate_gas=estimate_gas,
823
841
  )
824
842
 
825
843
  req = self._build_request_async(
@@ -888,6 +906,7 @@ class Sky(BaseSDK):
888
906
  chain: Optional[
889
907
  models.SkyWithdrawRequestChain
890
908
  ] = models.SkyWithdrawRequestChain.ETHEREUM,
909
+ estimate_gas: Optional[bool] = True,
891
910
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
892
911
  server_url: Optional[str] = None,
893
912
  timeout_ms: Optional[int] = None,
@@ -905,7 +924,6 @@ class Sky(BaseSDK):
905
924
 
906
925
  In order to make this transaction, token allowances need to be set for the following contracts.
907
926
 
908
- - `SkyUsdcUsdsConverter`
909
927
  - `SkyUsdsVault`
910
928
  </Info>
911
929
 
@@ -914,6 +932,7 @@ class Sky(BaseSDK):
914
932
  :param sender: The address of the transaction sender.
915
933
  :param receiver: The address which will receive the withdrawn USDS. Defaults to the sender.
916
934
  :param chain:
935
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
917
936
  :param retries: Override the default retry configuration for this method
918
937
  :param server_url: Override the default server URL for this method
919
938
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -934,6 +953,7 @@ class Sky(BaseSDK):
934
953
  receiver=receiver,
935
954
  chain=chain,
936
955
  sender=sender,
956
+ estimate_gas=estimate_gas,
937
957
  )
938
958
 
939
959
  req = self._build_request(
@@ -1002,6 +1022,7 @@ class Sky(BaseSDK):
1002
1022
  chain: Optional[
1003
1023
  models.SkyWithdrawRequestChain
1004
1024
  ] = models.SkyWithdrawRequestChain.ETHEREUM,
1025
+ estimate_gas: Optional[bool] = True,
1005
1026
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1006
1027
  server_url: Optional[str] = None,
1007
1028
  timeout_ms: Optional[int] = None,
@@ -1019,7 +1040,6 @@ class Sky(BaseSDK):
1019
1040
 
1020
1041
  In order to make this transaction, token allowances need to be set for the following contracts.
1021
1042
 
1022
- - `SkyUsdcUsdsConverter`
1023
1043
  - `SkyUsdsVault`
1024
1044
  </Info>
1025
1045
 
@@ -1028,6 +1048,7 @@ class Sky(BaseSDK):
1028
1048
  :param sender: The address of the transaction sender.
1029
1049
  :param receiver: The address which will receive the withdrawn USDS. Defaults to the sender.
1030
1050
  :param chain:
1051
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
1031
1052
  :param retries: Override the default retry configuration for this method
1032
1053
  :param server_url: Override the default server URL for this method
1033
1054
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1048,6 +1069,7 @@ class Sky(BaseSDK):
1048
1069
  receiver=receiver,
1049
1070
  chain=chain,
1050
1071
  sender=sender,
1072
+ estimate_gas=estimate_gas,
1051
1073
  )
1052
1074
 
1053
1075
  req = self._build_request_async(
@@ -17,6 +17,7 @@ class SmartAccount(BaseSDK):
17
17
  operations: Union[
18
18
  List[models.UserOperation], List[models.UserOperationTypedDict]
19
19
  ],
20
+ estimate_gas: Optional[bool] = True,
20
21
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
21
22
  server_url: Optional[str] = None,
22
23
  timeout_ms: Optional[int] = None,
@@ -29,6 +30,7 @@ class SmartAccount(BaseSDK):
29
30
  :param chain:
30
31
  :param sender: The address of the transaction sender.
31
32
  :param operations: List of possible user operations
33
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
32
34
  :param retries: Override the default retry configuration for this method
33
35
  :param server_url: Override the default server URL for this method
34
36
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -47,6 +49,7 @@ class SmartAccount(BaseSDK):
47
49
  request = models.BatchedUserOperationsRequest(
48
50
  chain=chain,
49
51
  sender=sender,
52
+ estimate_gas=estimate_gas,
50
53
  operations=utils.get_pydantic_model(operations, List[models.UserOperation]),
51
54
  )
52
55
 
@@ -117,6 +120,7 @@ class SmartAccount(BaseSDK):
117
120
  operations: Union[
118
121
  List[models.UserOperation], List[models.UserOperationTypedDict]
119
122
  ],
123
+ estimate_gas: Optional[bool] = True,
120
124
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
121
125
  server_url: Optional[str] = None,
122
126
  timeout_ms: Optional[int] = None,
@@ -129,6 +133,7 @@ class SmartAccount(BaseSDK):
129
133
  :param chain:
130
134
  :param sender: The address of the transaction sender.
131
135
  :param operations: List of possible user operations
136
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
132
137
  :param retries: Override the default retry configuration for this method
133
138
  :param server_url: Override the default server URL for this method
134
139
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -147,6 +152,7 @@ class SmartAccount(BaseSDK):
147
152
  request = models.BatchedUserOperationsRequest(
148
153
  chain=chain,
149
154
  sender=sender,
155
+ estimate_gas=estimate_gas,
150
156
  operations=utils.get_pydantic_model(operations, List[models.UserOperation]),
151
157
  )
152
158
 
compass_api_sdk/swap.py CHANGED
@@ -12,18 +12,15 @@ class Swap(BaseSDK):
12
12
  def swap_odos(
13
13
  self,
14
14
  *,
15
- token_in: Union[
16
- models.OdosSwapRequestTokenIn, models.OdosSwapRequestTokenInTypedDict
17
- ],
18
- token_out: Union[
19
- models.OdosSwapRequestTokenOut, models.OdosSwapRequestTokenOutTypedDict
20
- ],
15
+ token_in: str,
16
+ token_out: str,
21
17
  amount: Union[
22
18
  models.OdosSwapRequestAmount, models.OdosSwapRequestAmountTypedDict
23
19
  ],
24
20
  max_slippage_percent: float,
25
21
  chain: models.OdosSwapRequestChain,
26
22
  sender: str,
23
+ estimate_gas: Optional[bool] = True,
27
24
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
28
25
  server_url: Optional[str] = None,
29
26
  timeout_ms: Optional[int] = None,
@@ -47,6 +44,7 @@ class Swap(BaseSDK):
47
44
  :param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed.
48
45
  :param chain:
49
46
  :param sender: The address of the transaction sender.
47
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
50
48
  :param retries: Override the default retry configuration for this method
51
49
  :param server_url: Override the default server URL for this method
52
50
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -69,6 +67,7 @@ class Swap(BaseSDK):
69
67
  max_slippage_percent=max_slippage_percent,
70
68
  chain=chain,
71
69
  sender=sender,
70
+ estimate_gas=estimate_gas,
72
71
  )
73
72
 
74
73
  req = self._build_request(
@@ -131,18 +130,15 @@ class Swap(BaseSDK):
131
130
  async def swap_odos_async(
132
131
  self,
133
132
  *,
134
- token_in: Union[
135
- models.OdosSwapRequestTokenIn, models.OdosSwapRequestTokenInTypedDict
136
- ],
137
- token_out: Union[
138
- models.OdosSwapRequestTokenOut, models.OdosSwapRequestTokenOutTypedDict
139
- ],
133
+ token_in: str,
134
+ token_out: str,
140
135
  amount: Union[
141
136
  models.OdosSwapRequestAmount, models.OdosSwapRequestAmountTypedDict
142
137
  ],
143
138
  max_slippage_percent: float,
144
139
  chain: models.OdosSwapRequestChain,
145
140
  sender: str,
141
+ estimate_gas: Optional[bool] = True,
146
142
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
147
143
  server_url: Optional[str] = None,
148
144
  timeout_ms: Optional[int] = None,
@@ -166,6 +162,7 @@ class Swap(BaseSDK):
166
162
  :param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed.
167
163
  :param chain:
168
164
  :param sender: The address of the transaction sender.
165
+ :param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
169
166
  :param retries: Override the default retry configuration for this method
170
167
  :param server_url: Override the default server URL for this method
171
168
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -188,6 +185,7 @@ class Swap(BaseSDK):
188
185
  max_slippage_percent=max_slippage_percent,
189
186
  chain=chain,
190
187
  sender=sender,
188
+ estimate_gas=estimate_gas,
191
189
  )
192
190
 
193
191
  req = self._build_request_async(