compass_api_sdk 1.1.1rc0__py3-none-any.whl → 1.1.3rc0__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 (79) hide show
  1. compass_api_sdk/_version.py +3 -3
  2. compass_api_sdk/aave_v3.py +44 -44
  3. compass_api_sdk/aerodrome_slipstream.py +32 -32
  4. compass_api_sdk/models/__init__.py +0 -254
  5. compass_api_sdk/models/aaveborrowparams.py +4 -13
  6. compass_api_sdk/models/aaveborrowrequest.py +4 -13
  7. compass_api_sdk/models/aavelooprequest.py +8 -25
  8. compass_api_sdk/models/aaverepayparams.py +4 -13
  9. compass_api_sdk/models/aaverepayrequest.py +4 -13
  10. compass_api_sdk/models/aavesupplyparams.py +4 -13
  11. compass_api_sdk/models/aavesupplyrequest.py +4 -13
  12. compass_api_sdk/models/aavewithdrawparams.py +4 -13
  13. compass_api_sdk/models/aavewithdrawrequest.py +4 -13
  14. compass_api_sdk/models/aerodromeposition.py +4 -25
  15. compass_api_sdk/models/aerodromeslipstreambuyexactlyparams.py +8 -25
  16. compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +8 -25
  17. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionparams.py +8 -25
  18. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +8 -25
  19. compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +8 -25
  20. compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py +8 -25
  21. compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +8 -25
  22. compass_api_sdk/models/batcheduseroperationsrequest.py +8 -2
  23. compass_api_sdk/models/compass_api_backend_models_generic_read_response_portfolio_tokenbalance.py +4 -13
  24. compass_api_sdk/models/odosswapparams.py +4 -25
  25. compass_api_sdk/models/odosswaprequest.py +4 -27
  26. compass_api_sdk/models/pendlemanageliquidityparams.py +2 -15
  27. compass_api_sdk/models/pendlemanageliquidityrequest.py +2 -15
  28. compass_api_sdk/models/pendletradeptparams.py +2 -15
  29. compass_api_sdk/models/pendletradeptrequest.py +2 -15
  30. compass_api_sdk/models/pendletradeytparams.py +2 -15
  31. compass_api_sdk/models/pendletradeytrequest.py +2 -15
  32. compass_api_sdk/models/reserve.py +6 -15
  33. compass_api_sdk/models/setallowanceparams.py +2 -15
  34. compass_api_sdk/models/setallowancerequest.py +2 -15
  35. compass_api_sdk/models/skysellrequest.py +4 -4
  36. compass_api_sdk/models/tokenbalanceresponse.py +5 -15
  37. compass_api_sdk/models/tokentransferparams.py +2 -15
  38. compass_api_sdk/models/tokentransferrequest.py +2 -15
  39. compass_api_sdk/models/uniswapbuyexactlyparams.py +8 -33
  40. compass_api_sdk/models/uniswapbuyexactlyrequest.py +8 -33
  41. compass_api_sdk/models/uniswapmintliquidityprovisionparams.py +8 -25
  42. compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +8 -25
  43. compass_api_sdk/models/uniswappoolpriceresponse.py +8 -25
  44. compass_api_sdk/models/uniswapsellexactlyparams.py +4 -29
  45. compass_api_sdk/models/uniswapsellexactlyrequest.py +4 -29
  46. compass_api_sdk/models/v1_aave_avg_rateop.py +5 -83
  47. compass_api_sdk/models/v1_aave_liquidity_changeop.py +5 -83
  48. compass_api_sdk/models/v1_aave_rateop.py +5 -83
  49. compass_api_sdk/models/v1_aave_reserve_overviewop.py +5 -83
  50. compass_api_sdk/models/v1_aave_std_rateop.py +5 -83
  51. compass_api_sdk/models/v1_aave_token_priceop.py +5 -83
  52. compass_api_sdk/models/v1_aave_user_position_per_tokenop.py +5 -83
  53. compass_api_sdk/models/v1_aerodrome_slipstream_pool_priceop.py +10 -166
  54. compass_api_sdk/models/v1_generic_allowanceop.py +7 -21
  55. compass_api_sdk/models/v1_morpho_marketsop.py +9 -29
  56. compass_api_sdk/models/v1_morpho_vaultsop.py +5 -15
  57. compass_api_sdk/models/v1_sky_positionop.py +4 -5
  58. compass_api_sdk/models/v1_token_balanceop.py +10 -23
  59. compass_api_sdk/models/v1_token_priceop.py +7 -8
  60. compass_api_sdk/models/v1_uniswap_pool_priceop.py +10 -166
  61. compass_api_sdk/models/v1_uniswap_quote_buy_exactlyop.py +10 -166
  62. compass_api_sdk/models/v1_uniswap_quote_sell_exactlyop.py +10 -166
  63. compass_api_sdk/morpho.py +12 -24
  64. compass_api_sdk/pendle.py +6 -20
  65. compass_api_sdk/sdk.py +3 -3
  66. compass_api_sdk/sky.py +14 -16
  67. compass_api_sdk/swap.py +4 -12
  68. compass_api_sdk/{token_sdk.py → token.py} +13 -197
  69. compass_api_sdk/transaction_bundler.py +8 -8
  70. compass_api_sdk/uniswap_v3.py +44 -68
  71. compass_api_sdk/universal.py +6 -188
  72. {compass_api_sdk-1.1.1rc0.dist-info → compass_api_sdk-1.1.3rc0.dist-info}/METADATA +5 -7
  73. {compass_api_sdk-1.1.1rc0.dist-info → compass_api_sdk-1.1.3rc0.dist-info}/RECORD +74 -79
  74. compass_api_sdk/models/token_enum.py +0 -81
  75. compass_api_sdk/models/tokenaddressresponse.py +0 -15
  76. compass_api_sdk/models/tokeninfo.py +0 -17
  77. compass_api_sdk/models/v1_generic_supported_tokensop.py +0 -24
  78. compass_api_sdk/models/v1_token_addressop.py +0 -109
  79. {compass_api_sdk-1.1.1rc0.dist-info → compass_api_sdk-1.1.3rc0.dist-info}/WHEEL +0 -0
@@ -13,8 +13,8 @@ class UniswapV3(BaseSDK):
13
13
  self,
14
14
  *,
15
15
  chain: models.V1UniswapQuoteBuyExactlyChain = models.V1UniswapQuoteBuyExactlyChain.ARBITRUM,
16
- token_in: models.V1UniswapQuoteBuyExactlyTokenInToken = models.V1UniswapQuoteBuyExactlyTokenInToken.USDC,
17
- token_out: models.V1UniswapQuoteBuyExactlyTokenOutToken = models.V1UniswapQuoteBuyExactlyTokenOutToken.USDT,
16
+ token_in: str = "USDC",
17
+ token_out: str = "USDT",
18
18
  fee: models.V1UniswapQuoteBuyExactlyFeeEnum = models.V1UniswapQuoteBuyExactlyFeeEnum.ZERO_DOT_01,
19
19
  amount_out: Union[
20
20
  models.V1UniswapQuoteBuyExactlyAmountOut,
@@ -34,8 +34,8 @@ class UniswapV3(BaseSDK):
34
34
  into account the current pool state and the specified fee tier.
35
35
 
36
36
  :param chain:
37
- :param token_in: The symbol of the token to swap from.
38
- :param token_out: The symbol of the token to swap to.
37
+ :param token_in: The symbol or address of the token to swap from.
38
+ :param token_out: The symbol or address of the token to swap to.
39
39
  :param fee: The fee to pay for the swap
40
40
  :param amount_out: The amount of the token to swap to
41
41
  :param retries: Override the default retry configuration for this method
@@ -119,8 +119,8 @@ class UniswapV3(BaseSDK):
119
119
  self,
120
120
  *,
121
121
  chain: models.V1UniswapQuoteBuyExactlyChain = models.V1UniswapQuoteBuyExactlyChain.ARBITRUM,
122
- token_in: models.V1UniswapQuoteBuyExactlyTokenInToken = models.V1UniswapQuoteBuyExactlyTokenInToken.USDC,
123
- token_out: models.V1UniswapQuoteBuyExactlyTokenOutToken = models.V1UniswapQuoteBuyExactlyTokenOutToken.USDT,
122
+ token_in: str = "USDC",
123
+ token_out: str = "USDT",
124
124
  fee: models.V1UniswapQuoteBuyExactlyFeeEnum = models.V1UniswapQuoteBuyExactlyFeeEnum.ZERO_DOT_01,
125
125
  amount_out: Union[
126
126
  models.V1UniswapQuoteBuyExactlyAmountOut,
@@ -140,8 +140,8 @@ class UniswapV3(BaseSDK):
140
140
  into account the current pool state and the specified fee tier.
141
141
 
142
142
  :param chain:
143
- :param token_in: The symbol of the token to swap from.
144
- :param token_out: The symbol of the token to swap to.
143
+ :param token_in: The symbol or address of the token to swap from.
144
+ :param token_out: The symbol or address of the token to swap to.
145
145
  :param fee: The fee to pay for the swap
146
146
  :param amount_out: The amount of the token to swap to
147
147
  :param retries: Override the default retry configuration for this method
@@ -225,8 +225,8 @@ class UniswapV3(BaseSDK):
225
225
  self,
226
226
  *,
227
227
  chain: models.V1UniswapQuoteSellExactlyChain = models.V1UniswapQuoteSellExactlyChain.ARBITRUM,
228
- token_in: models.V1UniswapQuoteSellExactlyTokenInToken = models.V1UniswapQuoteSellExactlyTokenInToken.USDC,
229
- token_out: models.V1UniswapQuoteSellExactlyTokenOutToken = models.V1UniswapQuoteSellExactlyTokenOutToken.USDT,
228
+ token_in: str = "USDC",
229
+ token_out: str = "USDT",
230
230
  fee: models.V1UniswapQuoteSellExactlyFeeEnum = models.V1UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01,
231
231
  amount_in: Union[
232
232
  models.V1UniswapQuoteSellExactlyAmountIn,
@@ -246,8 +246,8 @@ class UniswapV3(BaseSDK):
246
246
  into account the current pool state and the specified fee tier.
247
247
 
248
248
  :param chain:
249
- :param token_in: The symbol of the token to swap from.
250
- :param token_out: The symbol of the token to swap to.
249
+ :param token_in: The symbol or address of the token to swap from.
250
+ :param token_out: The symbol or address of the token to swap to.
251
251
  :param fee: The fee to pay for the swap
252
252
  :param amount_in: The amount of the token to swap from
253
253
  :param retries: Override the default retry configuration for this method
@@ -333,8 +333,8 @@ class UniswapV3(BaseSDK):
333
333
  self,
334
334
  *,
335
335
  chain: models.V1UniswapQuoteSellExactlyChain = models.V1UniswapQuoteSellExactlyChain.ARBITRUM,
336
- token_in: models.V1UniswapQuoteSellExactlyTokenInToken = models.V1UniswapQuoteSellExactlyTokenInToken.USDC,
337
- token_out: models.V1UniswapQuoteSellExactlyTokenOutToken = models.V1UniswapQuoteSellExactlyTokenOutToken.USDT,
336
+ token_in: str = "USDC",
337
+ token_out: str = "USDT",
338
338
  fee: models.V1UniswapQuoteSellExactlyFeeEnum = models.V1UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01,
339
339
  amount_in: Union[
340
340
  models.V1UniswapQuoteSellExactlyAmountIn,
@@ -354,8 +354,8 @@ class UniswapV3(BaseSDK):
354
354
  into account the current pool state and the specified fee tier.
355
355
 
356
356
  :param chain:
357
- :param token_in: The symbol of the token to swap from.
358
- :param token_out: The symbol of the token to swap to.
357
+ :param token_in: The symbol or address of the token to swap from.
358
+ :param token_out: The symbol or address of the token to swap to.
359
359
  :param fee: The fee to pay for the swap
360
360
  :param amount_in: The amount of the token to swap from
361
361
  :param retries: Override the default retry configuration for this method
@@ -441,8 +441,8 @@ class UniswapV3(BaseSDK):
441
441
  self,
442
442
  *,
443
443
  chain: models.V1UniswapPoolPriceChain = models.V1UniswapPoolPriceChain.ARBITRUM,
444
- token_in: models.V1UniswapPoolPriceTokenInToken = models.V1UniswapPoolPriceTokenInToken.USDC,
445
- token_out: models.V1UniswapPoolPriceTokenOutToken = models.V1UniswapPoolPriceTokenOutToken.USDT,
444
+ token_in: str = "USDC",
445
+ token_out: str = "USDT",
446
446
  fee: models.V1UniswapPoolPriceFeeEnum = models.V1UniswapPoolPriceFeeEnum.ZERO_DOT_01,
447
447
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
448
448
  server_url: Optional[str] = None,
@@ -456,8 +456,8 @@ class UniswapV3(BaseSDK):
456
456
  The price is calculated based on the current pool state and the specified fee tier.
457
457
 
458
458
  :param chain:
459
- :param token_in: The symbol of a token in the pool
460
- :param token_out: The symbol of a token in the pool
459
+ :param token_in: The symbol or address of a token in the pool
460
+ :param token_out: The symbol or address of a token in the pool
461
461
  :param fee: The fee of the pool
462
462
  :param retries: Override the default retry configuration for this method
463
463
  :param server_url: Override the default server URL for this method
@@ -539,8 +539,8 @@ class UniswapV3(BaseSDK):
539
539
  self,
540
540
  *,
541
541
  chain: models.V1UniswapPoolPriceChain = models.V1UniswapPoolPriceChain.ARBITRUM,
542
- token_in: models.V1UniswapPoolPriceTokenInToken = models.V1UniswapPoolPriceTokenInToken.USDC,
543
- token_out: models.V1UniswapPoolPriceTokenOutToken = models.V1UniswapPoolPriceTokenOutToken.USDT,
542
+ token_in: str = "USDC",
543
+ token_out: str = "USDT",
544
544
  fee: models.V1UniswapPoolPriceFeeEnum = models.V1UniswapPoolPriceFeeEnum.ZERO_DOT_01,
545
545
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
546
546
  server_url: Optional[str] = None,
@@ -554,8 +554,8 @@ class UniswapV3(BaseSDK):
554
554
  The price is calculated based on the current pool state and the specified fee tier.
555
555
 
556
556
  :param chain:
557
- :param token_in: The symbol of a token in the pool
558
- :param token_out: The symbol of a token in the pool
557
+ :param token_in: The symbol or address of a token in the pool
558
+ :param token_out: The symbol or address of a token in the pool
559
559
  :param fee: The fee of the pool
560
560
  :param retries: Override the default retry configuration for this method
561
561
  :param server_url: Override the default server URL for this method
@@ -1026,14 +1026,8 @@ class UniswapV3(BaseSDK):
1026
1026
  def uniswap_swap_buy_exactly(
1027
1027
  self,
1028
1028
  *,
1029
- token_in: Union[
1030
- models.UniswapBuyExactlyRequestTokenIn,
1031
- models.UniswapBuyExactlyRequestTokenInTypedDict,
1032
- ],
1033
- token_out: Union[
1034
- models.UniswapBuyExactlyRequestTokenOut,
1035
- models.UniswapBuyExactlyRequestTokenOutTypedDict,
1036
- ],
1029
+ token_in: str,
1030
+ token_out: str,
1037
1031
  fee: models.FeeEnum,
1038
1032
  amount_out: Union[
1039
1033
  models.UniswapBuyExactlyRequestAmountOut,
@@ -1065,8 +1059,8 @@ class UniswapV3(BaseSDK):
1065
1059
  </Info>
1066
1060
 
1067
1061
 
1068
- :param token_in: The symbol or address of the token to swap from.
1069
- :param token_out: The symbol or address of the token to swap to.
1062
+ :param token_in: The symbol or address of the token to swap from..
1063
+ :param token_out: The symbol or address of the token to swap to..
1070
1064
  :param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
1071
1065
  :param amount_out: The amount of 'token_out' to buy.
1072
1066
  :param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed.
@@ -1159,14 +1153,8 @@ class UniswapV3(BaseSDK):
1159
1153
  async def uniswap_swap_buy_exactly_async(
1160
1154
  self,
1161
1155
  *,
1162
- token_in: Union[
1163
- models.UniswapBuyExactlyRequestTokenIn,
1164
- models.UniswapBuyExactlyRequestTokenInTypedDict,
1165
- ],
1166
- token_out: Union[
1167
- models.UniswapBuyExactlyRequestTokenOut,
1168
- models.UniswapBuyExactlyRequestTokenOutTypedDict,
1169
- ],
1156
+ token_in: str,
1157
+ token_out: str,
1170
1158
  fee: models.FeeEnum,
1171
1159
  amount_out: Union[
1172
1160
  models.UniswapBuyExactlyRequestAmountOut,
@@ -1198,8 +1186,8 @@ class UniswapV3(BaseSDK):
1198
1186
  </Info>
1199
1187
 
1200
1188
 
1201
- :param token_in: The symbol or address of the token to swap from.
1202
- :param token_out: The symbol or address of the token to swap to.
1189
+ :param token_in: The symbol or address of the token to swap from..
1190
+ :param token_out: The symbol or address of the token to swap to..
1203
1191
  :param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
1204
1192
  :param amount_out: The amount of 'token_out' to buy.
1205
1193
  :param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed.
@@ -1292,14 +1280,8 @@ class UniswapV3(BaseSDK):
1292
1280
  def uniswap_swap_sell_exactly(
1293
1281
  self,
1294
1282
  *,
1295
- token_in: Union[
1296
- models.UniswapSellExactlyRequestTokenIn,
1297
- models.UniswapSellExactlyRequestTokenInTypedDict,
1298
- ],
1299
- token_out: Union[
1300
- models.UniswapSellExactlyRequestTokenOut,
1301
- models.UniswapSellExactlyRequestTokenOutTypedDict,
1302
- ],
1283
+ token_in: str,
1284
+ token_out: str,
1303
1285
  fee: models.FeeEnum,
1304
1286
  amount_in: Union[
1305
1287
  models.UniswapSellExactlyRequestAmountIn,
@@ -1425,14 +1407,8 @@ class UniswapV3(BaseSDK):
1425
1407
  async def uniswap_swap_sell_exactly_async(
1426
1408
  self,
1427
1409
  *,
1428
- token_in: Union[
1429
- models.UniswapSellExactlyRequestTokenIn,
1430
- models.UniswapSellExactlyRequestTokenInTypedDict,
1431
- ],
1432
- token_out: Union[
1433
- models.UniswapSellExactlyRequestTokenOut,
1434
- models.UniswapSellExactlyRequestTokenOutTypedDict,
1435
- ],
1410
+ token_in: str,
1411
+ token_out: str,
1436
1412
  fee: models.FeeEnum,
1437
1413
  amount_in: Union[
1438
1414
  models.UniswapSellExactlyRequestAmountIn,
@@ -1558,8 +1534,8 @@ class UniswapV3(BaseSDK):
1558
1534
  def uniswap_liquidity_provision_mint(
1559
1535
  self,
1560
1536
  *,
1561
- token0: models.TokenEnum,
1562
- token1: models.TokenEnum,
1537
+ token0: str,
1538
+ token1: str,
1563
1539
  fee: models.FeeEnum,
1564
1540
  tick_lower: int,
1565
1541
  tick_upper: int,
@@ -1607,8 +1583,8 @@ class UniswapV3(BaseSDK):
1607
1583
  </Info>
1608
1584
 
1609
1585
 
1610
- :param token0: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
1611
- :param token1: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
1586
+ :param token0: The symbol or address of the first token in the pair.
1587
+ :param token1: The symbol or address of the second token in the pair.
1612
1588
  :param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
1613
1589
  :param tick_lower: The lower tick of the range to mint the position in
1614
1590
  :param tick_upper: The upper tick of the range to mint the position in
@@ -1713,8 +1689,8 @@ class UniswapV3(BaseSDK):
1713
1689
  async def uniswap_liquidity_provision_mint_async(
1714
1690
  self,
1715
1691
  *,
1716
- token0: models.TokenEnum,
1717
- token1: models.TokenEnum,
1692
+ token0: str,
1693
+ token1: str,
1718
1694
  fee: models.FeeEnum,
1719
1695
  tick_lower: int,
1720
1696
  tick_upper: int,
@@ -1762,8 +1738,8 @@ class UniswapV3(BaseSDK):
1762
1738
  </Info>
1763
1739
 
1764
1740
 
1765
- :param token0: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
1766
- :param token1: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
1741
+ :param token0: The symbol or address of the first token in the pair.
1742
+ :param token1: The symbol or address of the second token in the pair.
1767
1743
  :param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
1768
1744
  :param tick_lower: The lower tick of the range to mint the position in
1769
1745
  :param tick_upper: The upper tick of the range to mint the position in
@@ -195,180 +195,6 @@ class Universal(BaseSDK):
195
195
 
196
196
  raise errors.APIError("Unexpected response received", http_res)
197
197
 
198
- def generic_supported_tokens(
199
- self,
200
- *,
201
- chain: models.V1GenericSupportedTokensChain = models.V1GenericSupportedTokensChain.ARBITRUM,
202
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
203
- server_url: Optional[str] = None,
204
- timeout_ms: Optional[int] = None,
205
- http_headers: Optional[Mapping[str, str]] = None,
206
- ) -> models.TokenInfo:
207
- r"""List Supported Tokens
208
-
209
- Get the list of supported tokens on a chain by the Compass API.
210
-
211
- :param chain:
212
- :param retries: Override the default retry configuration for this method
213
- :param server_url: Override the default server URL for this method
214
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
215
- :param http_headers: Additional headers to set or replace on requests.
216
- """
217
- base_url = None
218
- url_variables = None
219
- if timeout_ms is None:
220
- timeout_ms = self.sdk_configuration.timeout_ms
221
-
222
- if server_url is not None:
223
- base_url = server_url
224
- else:
225
- base_url = self._get_url(base_url, url_variables)
226
-
227
- request = models.V1GenericSupportedTokensRequest(
228
- chain=chain,
229
- )
230
-
231
- req = self._build_request(
232
- method="GET",
233
- path="/v1/generic/supported_tokens",
234
- base_url=base_url,
235
- url_variables=url_variables,
236
- request=request,
237
- request_body_required=False,
238
- request_has_path_params=False,
239
- request_has_query_params=True,
240
- user_agent_header="user-agent",
241
- accept_header_value="application/json",
242
- http_headers=http_headers,
243
- security=self.sdk_configuration.security,
244
- timeout_ms=timeout_ms,
245
- )
246
-
247
- if retries == UNSET:
248
- if self.sdk_configuration.retry_config is not UNSET:
249
- retries = self.sdk_configuration.retry_config
250
-
251
- retry_config = None
252
- if isinstance(retries, utils.RetryConfig):
253
- retry_config = (retries, ["429", "500", "502", "503", "504"])
254
-
255
- http_res = self.do_request(
256
- hook_ctx=HookContext(
257
- config=self.sdk_configuration,
258
- base_url=base_url or "",
259
- operation_id="v1_generic_supported_tokens",
260
- oauth2_scopes=[],
261
- security_source=self.sdk_configuration.security,
262
- ),
263
- request=req,
264
- error_status_codes=["422", "4XX", "5XX"],
265
- retry_config=retry_config,
266
- )
267
-
268
- response_data: Any = None
269
- if utils.match_response(http_res, "200", "application/json"):
270
- return unmarshal_json_response(models.TokenInfo, http_res)
271
- if utils.match_response(http_res, "422", "application/json"):
272
- response_data = unmarshal_json_response(
273
- errors.HTTPValidationErrorData, http_res
274
- )
275
- raise errors.HTTPValidationError(response_data, http_res)
276
- if utils.match_response(http_res, "4XX", "*"):
277
- http_res_text = utils.stream_to_text(http_res)
278
- raise errors.APIError("API error occurred", http_res, http_res_text)
279
- if utils.match_response(http_res, "5XX", "*"):
280
- http_res_text = utils.stream_to_text(http_res)
281
- raise errors.APIError("API error occurred", http_res, http_res_text)
282
-
283
- raise errors.APIError("Unexpected response received", http_res)
284
-
285
- async def generic_supported_tokens_async(
286
- self,
287
- *,
288
- chain: models.V1GenericSupportedTokensChain = models.V1GenericSupportedTokensChain.ARBITRUM,
289
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
290
- server_url: Optional[str] = None,
291
- timeout_ms: Optional[int] = None,
292
- http_headers: Optional[Mapping[str, str]] = None,
293
- ) -> models.TokenInfo:
294
- r"""List Supported Tokens
295
-
296
- Get the list of supported tokens on a chain by the Compass API.
297
-
298
- :param chain:
299
- :param retries: Override the default retry configuration for this method
300
- :param server_url: Override the default server URL for this method
301
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
302
- :param http_headers: Additional headers to set or replace on requests.
303
- """
304
- base_url = None
305
- url_variables = None
306
- if timeout_ms is None:
307
- timeout_ms = self.sdk_configuration.timeout_ms
308
-
309
- if server_url is not None:
310
- base_url = server_url
311
- else:
312
- base_url = self._get_url(base_url, url_variables)
313
-
314
- request = models.V1GenericSupportedTokensRequest(
315
- chain=chain,
316
- )
317
-
318
- req = self._build_request_async(
319
- method="GET",
320
- path="/v1/generic/supported_tokens",
321
- base_url=base_url,
322
- url_variables=url_variables,
323
- request=request,
324
- request_body_required=False,
325
- request_has_path_params=False,
326
- request_has_query_params=True,
327
- user_agent_header="user-agent",
328
- accept_header_value="application/json",
329
- http_headers=http_headers,
330
- security=self.sdk_configuration.security,
331
- timeout_ms=timeout_ms,
332
- )
333
-
334
- if retries == UNSET:
335
- if self.sdk_configuration.retry_config is not UNSET:
336
- retries = self.sdk_configuration.retry_config
337
-
338
- retry_config = None
339
- if isinstance(retries, utils.RetryConfig):
340
- retry_config = (retries, ["429", "500", "502", "503", "504"])
341
-
342
- http_res = await self.do_request_async(
343
- hook_ctx=HookContext(
344
- config=self.sdk_configuration,
345
- base_url=base_url or "",
346
- operation_id="v1_generic_supported_tokens",
347
- oauth2_scopes=[],
348
- security_source=self.sdk_configuration.security,
349
- ),
350
- request=req,
351
- error_status_codes=["422", "4XX", "5XX"],
352
- retry_config=retry_config,
353
- )
354
-
355
- response_data: Any = None
356
- if utils.match_response(http_res, "200", "application/json"):
357
- return unmarshal_json_response(models.TokenInfo, http_res)
358
- if utils.match_response(http_res, "422", "application/json"):
359
- response_data = unmarshal_json_response(
360
- errors.HTTPValidationErrorData, http_res
361
- )
362
- raise errors.HTTPValidationError(response_data, http_res)
363
- if utils.match_response(http_res, "4XX", "*"):
364
- http_res_text = await utils.stream_to_text_async(http_res)
365
- raise errors.APIError("API error occurred", http_res, http_res_text)
366
- if utils.match_response(http_res, "5XX", "*"):
367
- http_res_text = await utils.stream_to_text_async(http_res)
368
- raise errors.APIError("API error occurred", http_res, http_res_text)
369
-
370
- raise errors.APIError("Unexpected response received", http_res)
371
-
372
198
  def generic_supported_chains(
373
199
  self,
374
200
  *,
@@ -547,9 +373,7 @@ class Universal(BaseSDK):
547
373
  self,
548
374
  *,
549
375
  chain: models.V1GenericAllowanceChain = models.V1GenericAllowanceChain.ARBITRUM,
550
- token: Union[
551
- models.V1GenericAllowanceToken, models.V1GenericAllowanceTokenTypedDict
552
- ],
376
+ token: str = "USDC",
553
377
  contract: Union[
554
378
  models.V1GenericAllowanceContractUnion,
555
379
  models.V1GenericAllowanceContractUnionTypedDict,
@@ -571,7 +395,7 @@ class Universal(BaseSDK):
571
395
  the user's tokens securely and efficiently.
572
396
 
573
397
  :param chain:
574
- :param token: The symbol or address of the token for which the allowance is checked..
398
+ :param token: The symbol or address of the token for which the allowance is checked.
575
399
  :param contract: The name or address of the contract to check allowance for.
576
400
  :param user: The user to get the ERC20 allowance of.
577
401
  :param retries: Override the default retry configuration for this method
@@ -654,9 +478,7 @@ class Universal(BaseSDK):
654
478
  self,
655
479
  *,
656
480
  chain: models.V1GenericAllowanceChain = models.V1GenericAllowanceChain.ARBITRUM,
657
- token: Union[
658
- models.V1GenericAllowanceToken, models.V1GenericAllowanceTokenTypedDict
659
- ],
481
+ token: str = "USDC",
660
482
  contract: Union[
661
483
  models.V1GenericAllowanceContractUnion,
662
484
  models.V1GenericAllowanceContractUnionTypedDict,
@@ -678,7 +500,7 @@ class Universal(BaseSDK):
678
500
  the user's tokens securely and efficiently.
679
501
 
680
502
  :param chain:
681
- :param token: The symbol or address of the token for which the allowance is checked..
503
+ :param token: The symbol or address of the token for which the allowance is checked.
682
504
  :param contract: The name or address of the contract to check allowance for.
683
505
  :param user: The user to get the ERC20 allowance of.
684
506
  :param retries: Override the default retry configuration for this method
@@ -1342,9 +1164,7 @@ class Universal(BaseSDK):
1342
1164
  def generic_allowance_set(
1343
1165
  self,
1344
1166
  *,
1345
- token: Union[
1346
- models.SetAllowanceRequestToken, models.SetAllowanceRequestTokenTypedDict
1347
- ],
1167
+ token: str,
1348
1168
  contract: Union[
1349
1169
  models.SetAllowanceRequestContractUnion,
1350
1170
  models.SetAllowanceRequestContractUnionTypedDict,
@@ -1458,9 +1278,7 @@ class Universal(BaseSDK):
1458
1278
  async def generic_allowance_set_async(
1459
1279
  self,
1460
1280
  *,
1461
- token: Union[
1462
- models.SetAllowanceRequestToken, models.SetAllowanceRequestTokenTypedDict
1463
- ],
1281
+ token: str,
1464
1282
  contract: Union[
1465
1283
  models.SetAllowanceRequestContractUnion,
1466
1284
  models.SetAllowanceRequestContractUnionTypedDict,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compass_api_sdk
3
- Version: 1.1.1rc0
3
+ Version: 1.1.3rc0
4
4
  Summary: Compass API SDK.
5
5
  Author: royalnine
6
6
  Requires-Python: >=3.9.2
@@ -282,12 +282,11 @@ with CompassAPI(
282
282
 
283
283
  * [swap_odos](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/swap/README.md#swap_odos) - Odos Swap
284
284
 
285
- ### [token](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/tokensdk/README.md)
285
+ ### [token](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/token/README.md)
286
286
 
287
- * [token_address](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/tokensdk/README.md#token_address) - Token Address
288
- * [token_price](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/tokensdk/README.md#token_price) - Token Price
289
- * [token_balance](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/tokensdk/README.md#token_balance) - Token Balance
290
- * [token_transfer](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/tokensdk/README.md#token_transfer) - Transfer Tokens
287
+ * [token_price](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/token/README.md#token_price) - Token Price
288
+ * [token_balance](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/token/README.md#token_balance) - Token Balance
289
+ * [token_transfer](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/token/README.md#token_transfer) - Transfer Tokens
291
290
 
292
291
  ### [transaction_bundler](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/transactionbundler/README.md)
293
292
 
@@ -311,7 +310,6 @@ with CompassAPI(
311
310
  ### [universal](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md)
312
311
 
313
312
  * [generic_portfolio](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_portfolio) - List User Portfolio
314
- * [generic_supported_tokens](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_supported_tokens) - List Supported Tokens
315
313
  * [generic_supported_chains](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_supported_chains) - List Supported Chains
316
314
  * [generic_allowance](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_allowance) - Get Allowance
317
315
  * [generic_ens](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_ens) - Resolve ENS