compass_api_sdk 0.1.0__py3-none-any.whl → 0.1.2__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 (172) hide show
  1. {compass_api_sdk-0.1.0.dist-info → compass_api_sdk-0.1.2.dist-info}/METADATA +40 -39
  2. compass_api_sdk-0.1.2.dist-info/RECORD +165 -0
  3. {compass_api_sdk → compassapisdk}/_hooks/sdkhooks.py +1 -1
  4. {compass_api_sdk → compassapisdk}/_hooks/types.py +1 -1
  5. {compass_api_sdk → compassapisdk}/_version.py +2 -2
  6. {compass_api_sdk → compassapisdk}/aave_v3.py +9 -9
  7. {compass_api_sdk → compassapisdk}/aerodrome_slipstream.py +3 -3
  8. {compass_api_sdk → compassapisdk}/basesdk.py +3 -3
  9. {compass_api_sdk → compassapisdk}/errors/httpvalidationerror.py +3 -3
  10. {compass_api_sdk → compassapisdk}/models/__init__.py +431 -47
  11. {compass_api_sdk → compassapisdk}/models/aave_liquidity_changeop.py +2 -2
  12. {compass_api_sdk → compassapisdk}/models/aave_token_priceop.py +2 -2
  13. {compass_api_sdk → compassapisdk}/models/aave_user_position_per_tokenop.py +5 -7
  14. {compass_api_sdk → compassapisdk}/models/aave_user_position_summaryop.py +5 -7
  15. compassapisdk/models/aaveborrowparams.py +94 -0
  16. {compass_api_sdk → compassapisdk}/models/aaveborrowrequest.py +1 -1
  17. {compass_api_sdk → compassapisdk}/models/aaveliquiditychangeresponse.py +1 -1
  18. compassapisdk/models/aaverepayparams.py +94 -0
  19. {compass_api_sdk → compassapisdk}/models/aaverepayrequest.py +1 -1
  20. compassapisdk/models/aavesupplyparams.py +82 -0
  21. {compass_api_sdk → compassapisdk}/models/aavesupplyrequest.py +1 -1
  22. {compass_api_sdk → compassapisdk}/models/aavetokenpriceresponse.py +1 -1
  23. {compass_api_sdk → compassapisdk}/models/aaveuserpositionpertokenresponse.py +1 -1
  24. {compass_api_sdk → compassapisdk}/models/aaveuserpositionsummaryresponse.py +1 -1
  25. compassapisdk/models/aavewithdrawparams.py +45 -0
  26. {compass_api_sdk → compassapisdk}/models/aavewithdrawrequest.py +1 -1
  27. {compass_api_sdk → compassapisdk}/models/aerodrome_slipstream_liquidity_provision_positionsop.py +2 -2
  28. {compass_api_sdk → compassapisdk}/models/aerodrome_slipstream_pool_priceop.py +2 -2
  29. compassapisdk/models/aerodromeaddliquidityethparams.py +153 -0
  30. compassapisdk/models/aerodromeaddliquidityparams.py +160 -0
  31. {compass_api_sdk → compassapisdk}/models/aerodromelppositionsresponse.py +1 -1
  32. {compass_api_sdk → compassapisdk}/models/aerodromeposition.py +1 -1
  33. compassapisdk/models/aerodromeremoveliquidityethrequest.py +139 -0
  34. compassapisdk/models/aerodromeremoveliquidityrequest.py +152 -0
  35. compassapisdk/models/aerodromeslipstreambuyexactlyparams.py +81 -0
  36. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreambuyexactlyrequest.py +1 -1
  37. compassapisdk/models/aerodromeslipstreamincreaseliquidityprovisionparams.py +110 -0
  38. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +1 -1
  39. compassapisdk/models/aerodromeslipstreammintliquidityprovisionparams.py +175 -0
  40. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreammintliquidityprovisionrequest.py +1 -1
  41. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreampoolpriceresponse.py +1 -1
  42. compassapisdk/models/aerodromeslipstreamsellexactlyparams.py +85 -0
  43. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreamsellexactlyrequest.py +1 -1
  44. compassapisdk/models/aerodromeslipstreamwithdrawliquidityprovisionparams.py +51 -0
  45. {compass_api_sdk → compassapisdk}/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +1 -1
  46. compassapisdk/models/aerodromeswapethfortokenparams.py +110 -0
  47. compassapisdk/models/aerodromeswaptokenforethparams.py +110 -0
  48. compassapisdk/models/aerodromeswaptokensparams.py +135 -0
  49. {compass_api_sdk → compassapisdk}/models/allowanceinforesponse.py +1 -1
  50. {compass_api_sdk → compassapisdk}/models/chaininfo.py +1 -1
  51. {compass_api_sdk → compassapisdk}/models/compass_api_backend_models_morpho_read_response_get_markets_asset.py +1 -1
  52. {compass_api_sdk → compassapisdk}/models/compass_api_backend_models_morpho_read_response_get_vaults_asset.py +1 -1
  53. compassapisdk/models/contractname.py +34 -0
  54. {compass_api_sdk → compassapisdk}/models/ensnameinforesponse.py +1 -1
  55. {compass_api_sdk → compassapisdk}/models/generic_allowanceop.py +2 -2
  56. {compass_api_sdk → compassapisdk}/models/generic_ensop.py +2 -2
  57. {compass_api_sdk → compassapisdk}/models/generic_portfolioop.py +2 -2
  58. {compass_api_sdk → compassapisdk}/models/generic_supported_tokensop.py +2 -2
  59. {compass_api_sdk → compassapisdk}/models/generic_visualize_portfolioop.py +2 -2
  60. {compass_api_sdk → compassapisdk}/models/image.py +1 -1
  61. compassapisdk/models/increaseallowanceanyparams.py +62 -0
  62. compassapisdk/models/increaseallowanceparams.py +66 -0
  63. {compass_api_sdk → compassapisdk}/models/increaseallowancerequest.py +4 -4
  64. {compass_api_sdk → compassapisdk}/models/marketstate.py +1 -1
  65. {compass_api_sdk → compassapisdk}/models/morpho_market_positionop.py +2 -2
  66. {compass_api_sdk → compassapisdk}/models/morpho_marketsop.py +2 -2
  67. {compass_api_sdk → compassapisdk}/models/morpho_vault_positionop.py +2 -2
  68. {compass_api_sdk → compassapisdk}/models/morpho_vaultsop.py +2 -2
  69. {compass_api_sdk → compassapisdk}/models/morphoborrowrequest.py +1 -1
  70. {compass_api_sdk → compassapisdk}/models/morphocheckmarketpositionresponse.py +1 -1
  71. {compass_api_sdk → compassapisdk}/models/morphocheckvaultpositionresponse.py +1 -1
  72. {compass_api_sdk → compassapisdk}/models/morphodepositrequest.py +1 -1
  73. {compass_api_sdk → compassapisdk}/models/morphogetmarketsresponse.py +1 -1
  74. {compass_api_sdk → compassapisdk}/models/morphogetvaultsresponse.py +1 -1
  75. {compass_api_sdk → compassapisdk}/models/morphomarket.py +1 -1
  76. {compass_api_sdk → compassapisdk}/models/morphorepayrequest.py +1 -1
  77. {compass_api_sdk → compassapisdk}/models/morphosetvaultallowancerequest.py +1 -1
  78. {compass_api_sdk → compassapisdk}/models/morphosupplycollateralrequest.py +1 -1
  79. {compass_api_sdk → compassapisdk}/models/morphovault.py +1 -1
  80. {compass_api_sdk → compassapisdk}/models/morphowithdrawcollateralrequest.py +1 -1
  81. {compass_api_sdk → compassapisdk}/models/morphowithdrawrequest.py +1 -1
  82. compassapisdk/models/multicallaction.py +170 -0
  83. compassapisdk/models/multicallactiontype.py +33 -0
  84. compassapisdk/models/multicallauthorizationrequest.py +35 -0
  85. compassapisdk/models/multicallauthorizationresponse.py +31 -0
  86. compassapisdk/models/multicallexecuterequest.py +36 -0
  87. {compass_api_sdk → compassapisdk}/models/portfolio.py +1 -1
  88. {compass_api_sdk → compassapisdk}/models/security.py +2 -2
  89. compassapisdk/models/signedauthorization.py +42 -0
  90. {compass_api_sdk → compassapisdk}/models/token_addressop.py +2 -2
  91. {compass_api_sdk → compassapisdk}/models/token_balanceop.py +2 -2
  92. {compass_api_sdk → compassapisdk}/models/token_priceop.py +2 -2
  93. {compass_api_sdk → compassapisdk}/models/tokenaddressresponse.py +1 -1
  94. {compass_api_sdk → compassapisdk}/models/tokenbalance.py +1 -1
  95. {compass_api_sdk → compassapisdk}/models/tokenbalanceresponse.py +1 -1
  96. {compass_api_sdk → compassapisdk}/models/tokeninfo.py +1 -1
  97. {compass_api_sdk → compassapisdk}/models/tokenpriceresponse.py +1 -1
  98. compass_api_sdk/models/transfererc20request.py → compassapisdk/models/tokentransfererc20params.py +11 -22
  99. {compass_api_sdk → compassapisdk}/models/tokentransferrequest.py +1 -1
  100. {compass_api_sdk → compassapisdk}/models/uniswap_liquidity_provision_in_rangeop.py +2 -2
  101. {compass_api_sdk → compassapisdk}/models/uniswap_liquidity_provision_positionsop.py +2 -2
  102. {compass_api_sdk → compassapisdk}/models/uniswap_pool_priceop.py +2 -2
  103. {compass_api_sdk → compassapisdk}/models/uniswap_quote_buy_exactlyop.py +2 -2
  104. {compass_api_sdk → compassapisdk}/models/uniswap_quote_sell_exactlyop.py +2 -2
  105. compassapisdk/models/uniswapbuyexactlyparams.py +89 -0
  106. {compass_api_sdk → compassapisdk}/models/uniswapbuyexactlyrequest.py +1 -1
  107. {compass_api_sdk → compassapisdk}/models/uniswapbuyquoteinforesponse.py +1 -1
  108. {compass_api_sdk → compassapisdk}/models/uniswapcheckinrangeresponse.py +1 -1
  109. compassapisdk/models/uniswapincreaseliquidityprovisionparams.py +84 -0
  110. {compass_api_sdk → compassapisdk}/models/uniswapincreaseliquidityprovisionrequest.py +1 -1
  111. {compass_api_sdk → compassapisdk}/models/uniswaplppositionsinforesponse.py +1 -1
  112. compassapisdk/models/uniswapmintliquidityprovisionparams.py +170 -0
  113. {compass_api_sdk → compassapisdk}/models/uniswapmintliquidityprovisionrequest.py +1 -1
  114. {compass_api_sdk → compassapisdk}/models/uniswappoolpriceresponse.py +1 -1
  115. {compass_api_sdk → compassapisdk}/models/uniswappositionssolidityresponse.py +1 -1
  116. compassapisdk/models/uniswapsellexactlyparams.py +93 -0
  117. {compass_api_sdk → compassapisdk}/models/uniswapsellexactlyrequest.py +1 -1
  118. {compass_api_sdk → compassapisdk}/models/uniswapsellquoteinforesponse.py +1 -1
  119. compassapisdk/models/uniswapwithdrawliquidityprovisionparams.py +50 -0
  120. {compass_api_sdk → compassapisdk}/models/uniswapwithdrawliquidityprovisionrequest.py +1 -1
  121. compassapisdk/models/unsignedmulticalltransaction.py +67 -0
  122. {compass_api_sdk → compassapisdk}/models/unsignedtransaction.py +1 -1
  123. compassapisdk/models/unwrapwethparams.py +30 -0
  124. {compass_api_sdk → compassapisdk}/models/unwrapwethrequest.py +1 -1
  125. {compass_api_sdk → compassapisdk}/models/validationerror.py +1 -1
  126. {compass_api_sdk → compassapisdk}/models/vaultstate.py +1 -1
  127. {compass_api_sdk → compassapisdk}/models/weeklyapys.py +1 -1
  128. compassapisdk/models/wrapethparams.py +30 -0
  129. {compass_api_sdk → compassapisdk}/models/wrapethrequest.py +1 -1
  130. {compass_api_sdk → compassapisdk}/morpho.py +3 -3
  131. {compass_api_sdk → compassapisdk}/sdk.py +12 -9
  132. {compass_api_sdk → compassapisdk}/sdkconfiguration.py +2 -2
  133. {compass_api_sdk → compassapisdk}/token_sdk.py +3 -3
  134. compassapisdk/transaction_batching.py +473 -0
  135. {compass_api_sdk → compassapisdk}/uniswap_v3.py +3 -3
  136. {compass_api_sdk → compassapisdk}/universal.py +144 -1012
  137. compass_api_sdk/_hooks/registration.py +0 -13
  138. compass_api_sdk/models/balanceinforesponse.py +0 -43
  139. compass_api_sdk/models/generic_balanceop.py +0 -104
  140. compass_api_sdk/models/generic_price_usdop.py +0 -97
  141. compass_api_sdk/models/priceresponse.py +0 -15
  142. compass_api_sdk/models/transferethrequest.py +0 -46
  143. compass_api_sdk-0.1.0.dist-info/RECORD +0 -137
  144. {compass_api_sdk-0.1.0.dist-info → compass_api_sdk-0.1.2.dist-info}/WHEEL +0 -0
  145. {compass_api_sdk → compassapisdk}/__init__.py +0 -0
  146. {compass_api_sdk → compassapisdk}/_hooks/__init__.py +0 -0
  147. {compass_api_sdk → compassapisdk}/errors/__init__.py +0 -0
  148. {compass_api_sdk → compassapisdk}/errors/apierror.py +0 -0
  149. {compass_api_sdk → compassapisdk}/httpclient.py +0 -0
  150. {compass_api_sdk → compassapisdk}/models/chain.py +0 -0
  151. {compass_api_sdk → compassapisdk}/models/feeenum.py +0 -0
  152. {compass_api_sdk → compassapisdk}/models/interestratemode.py +0 -0
  153. {compass_api_sdk → compassapisdk}/models/token_enum.py +0 -0
  154. {compass_api_sdk → compassapisdk}/py.typed +0 -0
  155. {compass_api_sdk → compassapisdk}/types/__init__.py +0 -0
  156. {compass_api_sdk → compassapisdk}/types/basemodel.py +0 -0
  157. {compass_api_sdk → compassapisdk}/utils/__init__.py +0 -0
  158. {compass_api_sdk → compassapisdk}/utils/annotations.py +0 -0
  159. {compass_api_sdk → compassapisdk}/utils/datetimes.py +0 -0
  160. {compass_api_sdk → compassapisdk}/utils/enums.py +0 -0
  161. {compass_api_sdk → compassapisdk}/utils/eventstreaming.py +0 -0
  162. {compass_api_sdk → compassapisdk}/utils/forms.py +0 -0
  163. {compass_api_sdk → compassapisdk}/utils/headers.py +0 -0
  164. {compass_api_sdk → compassapisdk}/utils/logger.py +0 -0
  165. {compass_api_sdk → compassapisdk}/utils/metadata.py +0 -0
  166. {compass_api_sdk → compassapisdk}/utils/queryparams.py +0 -0
  167. {compass_api_sdk → compassapisdk}/utils/requestbodies.py +0 -0
  168. {compass_api_sdk → compassapisdk}/utils/retries.py +0 -0
  169. {compass_api_sdk → compassapisdk}/utils/security.py +0 -0
  170. {compass_api_sdk → compassapisdk}/utils/serializers.py +0 -0
  171. {compass_api_sdk → compassapisdk}/utils/url.py +0 -0
  172. {compass_api_sdk → compassapisdk}/utils/values.py +0 -0
@@ -1,9 +1,9 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from .basesdk import BaseSDK
4
- from compass_api_sdk import errors, models, utils
5
- from compass_api_sdk._hooks import HookContext
6
- from compass_api_sdk.types import OptionalNullable, UNSET
4
+ from compassapisdk import errors, models, utils
5
+ from compassapisdk._hooks import HookContext
6
+ from compassapisdk.types import OptionalNullable, UNSET
7
7
  from typing import Any, Mapping, Optional, Union
8
8
 
9
9
 
@@ -422,216 +422,6 @@ class Universal(BaseSDK):
422
422
  http_res,
423
423
  )
424
424
 
425
- def price_usd(
426
- self,
427
- *,
428
- chain: models.GenericPriceUsdChain = models.GenericPriceUsdChain.ARBITRUM_MAINNET,
429
- token: models.GenericPriceUsdToken = models.GenericPriceUsdToken.WBTC,
430
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
431
- server_url: Optional[str] = None,
432
- timeout_ms: Optional[int] = None,
433
- http_headers: Optional[Mapping[str, str]] = None,
434
- ) -> models.PriceResponse:
435
- r"""Token price
436
-
437
- Retrieves the price of the specified token relative to USD using Chainlink's on-
438
- chain price feeds.
439
-
440
- Chainlink is a decentralized oracle that aggregates price data from off-chain
441
- sources. This ensures the price is tamper-resistant but the price might be stale
442
- with the update frequency of the oracle.
443
-
444
- :param chain: The chain to use.
445
- :param token: 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.
446
- :param retries: Override the default retry configuration for this method
447
- :param server_url: Override the default server URL for this method
448
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
449
- :param http_headers: Additional headers to set or replace on requests.
450
- """
451
- base_url = None
452
- url_variables = None
453
- if timeout_ms is None:
454
- timeout_ms = self.sdk_configuration.timeout_ms
455
-
456
- if server_url is not None:
457
- base_url = server_url
458
- else:
459
- base_url = self._get_url(base_url, url_variables)
460
-
461
- request = models.GenericPriceUsdRequest(
462
- chain=chain,
463
- token=token,
464
- )
465
-
466
- req = self._build_request(
467
- method="GET",
468
- path="/v0/generic/price/usd/get",
469
- base_url=base_url,
470
- url_variables=url_variables,
471
- request=request,
472
- request_body_required=False,
473
- request_has_path_params=False,
474
- request_has_query_params=True,
475
- user_agent_header="user-agent",
476
- accept_header_value="application/json",
477
- http_headers=http_headers,
478
- security=self.sdk_configuration.security,
479
- timeout_ms=timeout_ms,
480
- )
481
-
482
- if retries == UNSET:
483
- if self.sdk_configuration.retry_config is not UNSET:
484
- retries = self.sdk_configuration.retry_config
485
-
486
- retry_config = None
487
- if isinstance(retries, utils.RetryConfig):
488
- retry_config = (retries, ["429", "500", "502", "503", "504"])
489
-
490
- http_res = self.do_request(
491
- hook_ctx=HookContext(
492
- base_url=base_url or "",
493
- operation_id="generic_price_usd",
494
- oauth2_scopes=[],
495
- security_source=self.sdk_configuration.security,
496
- ),
497
- request=req,
498
- error_status_codes=["422", "4XX", "5XX"],
499
- retry_config=retry_config,
500
- )
501
-
502
- response_data: Any = None
503
- if utils.match_response(http_res, "200", "application/json"):
504
- return utils.unmarshal_json(http_res.text, models.PriceResponse)
505
- if utils.match_response(http_res, "422", "application/json"):
506
- response_data = utils.unmarshal_json(
507
- http_res.text, errors.HTTPValidationErrorData
508
- )
509
- raise errors.HTTPValidationError(data=response_data)
510
- if utils.match_response(http_res, "4XX", "*"):
511
- http_res_text = utils.stream_to_text(http_res)
512
- raise errors.APIError(
513
- "API error occurred", http_res.status_code, http_res_text, http_res
514
- )
515
- if utils.match_response(http_res, "5XX", "*"):
516
- http_res_text = utils.stream_to_text(http_res)
517
- raise errors.APIError(
518
- "API error occurred", http_res.status_code, http_res_text, http_res
519
- )
520
-
521
- content_type = http_res.headers.get("Content-Type")
522
- http_res_text = utils.stream_to_text(http_res)
523
- raise errors.APIError(
524
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
525
- http_res.status_code,
526
- http_res_text,
527
- http_res,
528
- )
529
-
530
- async def price_usd_async(
531
- self,
532
- *,
533
- chain: models.GenericPriceUsdChain = models.GenericPriceUsdChain.ARBITRUM_MAINNET,
534
- token: models.GenericPriceUsdToken = models.GenericPriceUsdToken.WBTC,
535
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
536
- server_url: Optional[str] = None,
537
- timeout_ms: Optional[int] = None,
538
- http_headers: Optional[Mapping[str, str]] = None,
539
- ) -> models.PriceResponse:
540
- r"""Token price
541
-
542
- Retrieves the price of the specified token relative to USD using Chainlink's on-
543
- chain price feeds.
544
-
545
- Chainlink is a decentralized oracle that aggregates price data from off-chain
546
- sources. This ensures the price is tamper-resistant but the price might be stale
547
- with the update frequency of the oracle.
548
-
549
- :param chain: The chain to use.
550
- :param token: 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.
551
- :param retries: Override the default retry configuration for this method
552
- :param server_url: Override the default server URL for this method
553
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
554
- :param http_headers: Additional headers to set or replace on requests.
555
- """
556
- base_url = None
557
- url_variables = None
558
- if timeout_ms is None:
559
- timeout_ms = self.sdk_configuration.timeout_ms
560
-
561
- if server_url is not None:
562
- base_url = server_url
563
- else:
564
- base_url = self._get_url(base_url, url_variables)
565
-
566
- request = models.GenericPriceUsdRequest(
567
- chain=chain,
568
- token=token,
569
- )
570
-
571
- req = self._build_request_async(
572
- method="GET",
573
- path="/v0/generic/price/usd/get",
574
- base_url=base_url,
575
- url_variables=url_variables,
576
- request=request,
577
- request_body_required=False,
578
- request_has_path_params=False,
579
- request_has_query_params=True,
580
- user_agent_header="user-agent",
581
- accept_header_value="application/json",
582
- http_headers=http_headers,
583
- security=self.sdk_configuration.security,
584
- timeout_ms=timeout_ms,
585
- )
586
-
587
- if retries == UNSET:
588
- if self.sdk_configuration.retry_config is not UNSET:
589
- retries = self.sdk_configuration.retry_config
590
-
591
- retry_config = None
592
- if isinstance(retries, utils.RetryConfig):
593
- retry_config = (retries, ["429", "500", "502", "503", "504"])
594
-
595
- http_res = await self.do_request_async(
596
- hook_ctx=HookContext(
597
- base_url=base_url or "",
598
- operation_id="generic_price_usd",
599
- oauth2_scopes=[],
600
- security_source=self.sdk_configuration.security,
601
- ),
602
- request=req,
603
- error_status_codes=["422", "4XX", "5XX"],
604
- retry_config=retry_config,
605
- )
606
-
607
- response_data: Any = None
608
- if utils.match_response(http_res, "200", "application/json"):
609
- return utils.unmarshal_json(http_res.text, models.PriceResponse)
610
- if utils.match_response(http_res, "422", "application/json"):
611
- response_data = utils.unmarshal_json(
612
- http_res.text, errors.HTTPValidationErrorData
613
- )
614
- raise errors.HTTPValidationError(data=response_data)
615
- if utils.match_response(http_res, "4XX", "*"):
616
- http_res_text = await utils.stream_to_text_async(http_res)
617
- raise errors.APIError(
618
- "API error occurred", http_res.status_code, http_res_text, http_res
619
- )
620
- if utils.match_response(http_res, "5XX", "*"):
621
- http_res_text = await utils.stream_to_text_async(http_res)
622
- raise errors.APIError(
623
- "API error occurred", http_res.status_code, http_res_text, http_res
624
- )
625
-
626
- content_type = http_res.headers.get("Content-Type")
627
- http_res_text = await utils.stream_to_text_async(http_res)
628
- raise errors.APIError(
629
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
630
- http_res.status_code,
631
- http_res_text,
632
- http_res,
633
- )
634
-
635
425
  def supported_tokens(
636
426
  self,
637
427
  *,
@@ -661,643 +451,13 @@ class Universal(BaseSDK):
661
451
  else:
662
452
  base_url = self._get_url(base_url, url_variables)
663
453
 
664
- request = models.GenericSupportedTokensRequest(
665
- chain=chain,
666
- )
667
-
668
- req = self._build_request(
669
- method="GET",
670
- path="/v0/generic/supported_tokens/get",
671
- base_url=base_url,
672
- url_variables=url_variables,
673
- request=request,
674
- request_body_required=False,
675
- request_has_path_params=False,
676
- request_has_query_params=True,
677
- user_agent_header="user-agent",
678
- accept_header_value="application/json",
679
- http_headers=http_headers,
680
- security=self.sdk_configuration.security,
681
- timeout_ms=timeout_ms,
682
- )
683
-
684
- if retries == UNSET:
685
- if self.sdk_configuration.retry_config is not UNSET:
686
- retries = self.sdk_configuration.retry_config
687
-
688
- retry_config = None
689
- if isinstance(retries, utils.RetryConfig):
690
- retry_config = (retries, ["429", "500", "502", "503", "504"])
691
-
692
- http_res = self.do_request(
693
- hook_ctx=HookContext(
694
- base_url=base_url or "",
695
- operation_id="generic_supported_tokens",
696
- oauth2_scopes=[],
697
- security_source=self.sdk_configuration.security,
698
- ),
699
- request=req,
700
- error_status_codes=["422", "4XX", "5XX"],
701
- retry_config=retry_config,
702
- )
703
-
704
- response_data: Any = None
705
- if utils.match_response(http_res, "200", "application/json"):
706
- return utils.unmarshal_json(http_res.text, models.TokenInfo)
707
- if utils.match_response(http_res, "422", "application/json"):
708
- response_data = utils.unmarshal_json(
709
- http_res.text, errors.HTTPValidationErrorData
710
- )
711
- raise errors.HTTPValidationError(data=response_data)
712
- if utils.match_response(http_res, "4XX", "*"):
713
- http_res_text = utils.stream_to_text(http_res)
714
- raise errors.APIError(
715
- "API error occurred", http_res.status_code, http_res_text, http_res
716
- )
717
- if utils.match_response(http_res, "5XX", "*"):
718
- http_res_text = utils.stream_to_text(http_res)
719
- raise errors.APIError(
720
- "API error occurred", http_res.status_code, http_res_text, http_res
721
- )
722
-
723
- content_type = http_res.headers.get("Content-Type")
724
- http_res_text = utils.stream_to_text(http_res)
725
- raise errors.APIError(
726
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
727
- http_res.status_code,
728
- http_res_text,
729
- http_res,
730
- )
731
-
732
- async def supported_tokens_async(
733
- self,
734
- *,
735
- chain: models.GenericSupportedTokensChain = models.GenericSupportedTokensChain.ARBITRUM_MAINNET,
736
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
737
- server_url: Optional[str] = None,
738
- timeout_ms: Optional[int] = None,
739
- http_headers: Optional[Mapping[str, str]] = None,
740
- ) -> models.TokenInfo:
741
- r"""List supported tokens
742
-
743
- Get the list of supported tokens on a chain by the Compass API.
744
-
745
- :param chain: The chain to use.
746
- :param retries: Override the default retry configuration for this method
747
- :param server_url: Override the default server URL for this method
748
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
749
- :param http_headers: Additional headers to set or replace on requests.
750
- """
751
- base_url = None
752
- url_variables = None
753
- if timeout_ms is None:
754
- timeout_ms = self.sdk_configuration.timeout_ms
755
-
756
- if server_url is not None:
757
- base_url = server_url
758
- else:
759
- base_url = self._get_url(base_url, url_variables)
760
-
761
- request = models.GenericSupportedTokensRequest(
762
- chain=chain,
763
- )
764
-
765
- req = self._build_request_async(
766
- method="GET",
767
- path="/v0/generic/supported_tokens/get",
768
- base_url=base_url,
769
- url_variables=url_variables,
770
- request=request,
771
- request_body_required=False,
772
- request_has_path_params=False,
773
- request_has_query_params=True,
774
- user_agent_header="user-agent",
775
- accept_header_value="application/json",
776
- http_headers=http_headers,
777
- security=self.sdk_configuration.security,
778
- timeout_ms=timeout_ms,
779
- )
780
-
781
- if retries == UNSET:
782
- if self.sdk_configuration.retry_config is not UNSET:
783
- retries = self.sdk_configuration.retry_config
784
-
785
- retry_config = None
786
- if isinstance(retries, utils.RetryConfig):
787
- retry_config = (retries, ["429", "500", "502", "503", "504"])
788
-
789
- http_res = await self.do_request_async(
790
- hook_ctx=HookContext(
791
- base_url=base_url or "",
792
- operation_id="generic_supported_tokens",
793
- oauth2_scopes=[],
794
- security_source=self.sdk_configuration.security,
795
- ),
796
- request=req,
797
- error_status_codes=["422", "4XX", "5XX"],
798
- retry_config=retry_config,
799
- )
800
-
801
- response_data: Any = None
802
- if utils.match_response(http_res, "200", "application/json"):
803
- return utils.unmarshal_json(http_res.text, models.TokenInfo)
804
- if utils.match_response(http_res, "422", "application/json"):
805
- response_data = utils.unmarshal_json(
806
- http_res.text, errors.HTTPValidationErrorData
807
- )
808
- raise errors.HTTPValidationError(data=response_data)
809
- if utils.match_response(http_res, "4XX", "*"):
810
- http_res_text = await utils.stream_to_text_async(http_res)
811
- raise errors.APIError(
812
- "API error occurred", http_res.status_code, http_res_text, http_res
813
- )
814
- if utils.match_response(http_res, "5XX", "*"):
815
- http_res_text = await utils.stream_to_text_async(http_res)
816
- raise errors.APIError(
817
- "API error occurred", http_res.status_code, http_res_text, http_res
818
- )
819
-
820
- content_type = http_res.headers.get("Content-Type")
821
- http_res_text = await utils.stream_to_text_async(http_res)
822
- raise errors.APIError(
823
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
824
- http_res.status_code,
825
- http_res_text,
826
- http_res,
827
- )
828
-
829
- def balance(
830
- self,
831
- *,
832
- chain: models.GenericBalanceChain = models.GenericBalanceChain.ARBITRUM_MAINNET,
833
- token: models.GenericBalanceToken = models.GenericBalanceToken.USDC,
834
- user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
835
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
836
- server_url: Optional[str] = None,
837
- timeout_ms: Optional[int] = None,
838
- http_headers: Optional[Mapping[str, str]] = None,
839
- ) -> models.BalanceInfoResponse:
840
- r"""User Token Balance
841
-
842
- Returns the balance of a specific ERC20 token for a given user address.
843
-
844
- :param chain: The chain to use.
845
- :param token: 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.
846
- :param user:
847
- :param retries: Override the default retry configuration for this method
848
- :param server_url: Override the default server URL for this method
849
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
850
- :param http_headers: Additional headers to set or replace on requests.
851
- """
852
- base_url = None
853
- url_variables = None
854
- if timeout_ms is None:
855
- timeout_ms = self.sdk_configuration.timeout_ms
856
-
857
- if server_url is not None:
858
- base_url = server_url
859
- else:
860
- base_url = self._get_url(base_url, url_variables)
861
-
862
- request = models.GenericBalanceRequest(
863
- chain=chain,
864
- user=user,
865
- token=token,
866
- )
867
-
868
- req = self._build_request(
869
- method="GET",
870
- path="/v0/generic/balance/get",
871
- base_url=base_url,
872
- url_variables=url_variables,
873
- request=request,
874
- request_body_required=False,
875
- request_has_path_params=False,
876
- request_has_query_params=True,
877
- user_agent_header="user-agent",
878
- accept_header_value="application/json",
879
- http_headers=http_headers,
880
- security=self.sdk_configuration.security,
881
- timeout_ms=timeout_ms,
882
- )
883
-
884
- if retries == UNSET:
885
- if self.sdk_configuration.retry_config is not UNSET:
886
- retries = self.sdk_configuration.retry_config
887
-
888
- retry_config = None
889
- if isinstance(retries, utils.RetryConfig):
890
- retry_config = (retries, ["429", "500", "502", "503", "504"])
891
-
892
- http_res = self.do_request(
893
- hook_ctx=HookContext(
894
- base_url=base_url or "",
895
- operation_id="generic_balance",
896
- oauth2_scopes=[],
897
- security_source=self.sdk_configuration.security,
898
- ),
899
- request=req,
900
- error_status_codes=["422", "4XX", "5XX"],
901
- retry_config=retry_config,
902
- )
903
-
904
- response_data: Any = None
905
- if utils.match_response(http_res, "200", "application/json"):
906
- return utils.unmarshal_json(http_res.text, models.BalanceInfoResponse)
907
- if utils.match_response(http_res, "422", "application/json"):
908
- response_data = utils.unmarshal_json(
909
- http_res.text, errors.HTTPValidationErrorData
910
- )
911
- raise errors.HTTPValidationError(data=response_data)
912
- if utils.match_response(http_res, "4XX", "*"):
913
- http_res_text = utils.stream_to_text(http_res)
914
- raise errors.APIError(
915
- "API error occurred", http_res.status_code, http_res_text, http_res
916
- )
917
- if utils.match_response(http_res, "5XX", "*"):
918
- http_res_text = utils.stream_to_text(http_res)
919
- raise errors.APIError(
920
- "API error occurred", http_res.status_code, http_res_text, http_res
921
- )
922
-
923
- content_type = http_res.headers.get("Content-Type")
924
- http_res_text = utils.stream_to_text(http_res)
925
- raise errors.APIError(
926
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
927
- http_res.status_code,
928
- http_res_text,
929
- http_res,
930
- )
931
-
932
- async def balance_async(
933
- self,
934
- *,
935
- chain: models.GenericBalanceChain = models.GenericBalanceChain.ARBITRUM_MAINNET,
936
- token: models.GenericBalanceToken = models.GenericBalanceToken.USDC,
937
- user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
938
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
939
- server_url: Optional[str] = None,
940
- timeout_ms: Optional[int] = None,
941
- http_headers: Optional[Mapping[str, str]] = None,
942
- ) -> models.BalanceInfoResponse:
943
- r"""User Token Balance
944
-
945
- Returns the balance of a specific ERC20 token for a given user address.
946
-
947
- :param chain: The chain to use.
948
- :param token: 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.
949
- :param user:
950
- :param retries: Override the default retry configuration for this method
951
- :param server_url: Override the default server URL for this method
952
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
953
- :param http_headers: Additional headers to set or replace on requests.
954
- """
955
- base_url = None
956
- url_variables = None
957
- if timeout_ms is None:
958
- timeout_ms = self.sdk_configuration.timeout_ms
959
-
960
- if server_url is not None:
961
- base_url = server_url
962
- else:
963
- base_url = self._get_url(base_url, url_variables)
964
-
965
- request = models.GenericBalanceRequest(
966
- chain=chain,
967
- user=user,
968
- token=token,
969
- )
970
-
971
- req = self._build_request_async(
972
- method="GET",
973
- path="/v0/generic/balance/get",
974
- base_url=base_url,
975
- url_variables=url_variables,
976
- request=request,
977
- request_body_required=False,
978
- request_has_path_params=False,
979
- request_has_query_params=True,
980
- user_agent_header="user-agent",
981
- accept_header_value="application/json",
982
- http_headers=http_headers,
983
- security=self.sdk_configuration.security,
984
- timeout_ms=timeout_ms,
985
- )
986
-
987
- if retries == UNSET:
988
- if self.sdk_configuration.retry_config is not UNSET:
989
- retries = self.sdk_configuration.retry_config
990
-
991
- retry_config = None
992
- if isinstance(retries, utils.RetryConfig):
993
- retry_config = (retries, ["429", "500", "502", "503", "504"])
994
-
995
- http_res = await self.do_request_async(
996
- hook_ctx=HookContext(
997
- base_url=base_url or "",
998
- operation_id="generic_balance",
999
- oauth2_scopes=[],
1000
- security_source=self.sdk_configuration.security,
1001
- ),
1002
- request=req,
1003
- error_status_codes=["422", "4XX", "5XX"],
1004
- retry_config=retry_config,
1005
- )
1006
-
1007
- response_data: Any = None
1008
- if utils.match_response(http_res, "200", "application/json"):
1009
- return utils.unmarshal_json(http_res.text, models.BalanceInfoResponse)
1010
- if utils.match_response(http_res, "422", "application/json"):
1011
- response_data = utils.unmarshal_json(
1012
- http_res.text, errors.HTTPValidationErrorData
1013
- )
1014
- raise errors.HTTPValidationError(data=response_data)
1015
- if utils.match_response(http_res, "4XX", "*"):
1016
- http_res_text = await utils.stream_to_text_async(http_res)
1017
- raise errors.APIError(
1018
- "API error occurred", http_res.status_code, http_res_text, http_res
1019
- )
1020
- if utils.match_response(http_res, "5XX", "*"):
1021
- http_res_text = await utils.stream_to_text_async(http_res)
1022
- raise errors.APIError(
1023
- "API error occurred", http_res.status_code, http_res_text, http_res
1024
- )
1025
-
1026
- content_type = http_res.headers.get("Content-Type")
1027
- http_res_text = await utils.stream_to_text_async(http_res)
1028
- raise errors.APIError(
1029
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1030
- http_res.status_code,
1031
- http_res_text,
1032
- http_res,
1033
- )
1034
-
1035
- def allowance(
1036
- self,
1037
- *,
1038
- chain: models.GenericAllowanceChain = models.GenericAllowanceChain.ARBITRUM_MAINNET,
1039
- token: models.GenericAllowanceToken = models.GenericAllowanceToken.USDC,
1040
- contract_name: models.GenericAllowanceContractName = models.GenericAllowanceContractName.AAVE_V3_POOL,
1041
- user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
1042
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
1043
- server_url: Optional[str] = None,
1044
- timeout_ms: Optional[int] = None,
1045
- http_headers: Optional[Mapping[str, str]] = None,
1046
- ) -> models.AllowanceInfoResponse:
1047
- r"""Get allowance - Protocol
1048
-
1049
- In decentralized finance (DeFi) protocols such as Uniswap or AAVE, users must set
1050
- a token allowance to authorize the protocol to spend a specified amount of their
1051
- tokens on their behalf.
1052
-
1053
- This is a crucial step before engaging in any transactions or operations within
1054
- these protocols, ensuring that the protocol has the necessary permissions to manage
1055
- the user's tokens securely and efficiently.
1056
-
1057
- :param chain: The chain to use.
1058
- :param token: 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.
1059
- :param contract_name:
1060
- :param user:
1061
- :param retries: Override the default retry configuration for this method
1062
- :param server_url: Override the default server URL for this method
1063
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1064
- :param http_headers: Additional headers to set or replace on requests.
1065
- """
1066
- base_url = None
1067
- url_variables = None
1068
- if timeout_ms is None:
1069
- timeout_ms = self.sdk_configuration.timeout_ms
1070
-
1071
- if server_url is not None:
1072
- base_url = server_url
1073
- else:
1074
- base_url = self._get_url(base_url, url_variables)
1075
-
1076
- request = models.GenericAllowanceRequest(
1077
- chain=chain,
1078
- user=user,
1079
- token=token,
1080
- contract_name=contract_name,
1081
- )
1082
-
1083
- req = self._build_request(
1084
- method="GET",
1085
- path="/v0/generic/allowance/get",
1086
- base_url=base_url,
1087
- url_variables=url_variables,
1088
- request=request,
1089
- request_body_required=False,
1090
- request_has_path_params=False,
1091
- request_has_query_params=True,
1092
- user_agent_header="user-agent",
1093
- accept_header_value="application/json",
1094
- http_headers=http_headers,
1095
- security=self.sdk_configuration.security,
1096
- timeout_ms=timeout_ms,
1097
- )
1098
-
1099
- if retries == UNSET:
1100
- if self.sdk_configuration.retry_config is not UNSET:
1101
- retries = self.sdk_configuration.retry_config
1102
-
1103
- retry_config = None
1104
- if isinstance(retries, utils.RetryConfig):
1105
- retry_config = (retries, ["429", "500", "502", "503", "504"])
1106
-
1107
- http_res = self.do_request(
1108
- hook_ctx=HookContext(
1109
- base_url=base_url or "",
1110
- operation_id="generic_allowance",
1111
- oauth2_scopes=[],
1112
- security_source=self.sdk_configuration.security,
1113
- ),
1114
- request=req,
1115
- error_status_codes=["422", "4XX", "5XX"],
1116
- retry_config=retry_config,
1117
- )
1118
-
1119
- response_data: Any = None
1120
- if utils.match_response(http_res, "200", "application/json"):
1121
- return utils.unmarshal_json(http_res.text, models.AllowanceInfoResponse)
1122
- if utils.match_response(http_res, "422", "application/json"):
1123
- response_data = utils.unmarshal_json(
1124
- http_res.text, errors.HTTPValidationErrorData
1125
- )
1126
- raise errors.HTTPValidationError(data=response_data)
1127
- if utils.match_response(http_res, "4XX", "*"):
1128
- http_res_text = utils.stream_to_text(http_res)
1129
- raise errors.APIError(
1130
- "API error occurred", http_res.status_code, http_res_text, http_res
1131
- )
1132
- if utils.match_response(http_res, "5XX", "*"):
1133
- http_res_text = utils.stream_to_text(http_res)
1134
- raise errors.APIError(
1135
- "API error occurred", http_res.status_code, http_res_text, http_res
1136
- )
1137
-
1138
- content_type = http_res.headers.get("Content-Type")
1139
- http_res_text = utils.stream_to_text(http_res)
1140
- raise errors.APIError(
1141
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1142
- http_res.status_code,
1143
- http_res_text,
1144
- http_res,
1145
- )
1146
-
1147
- async def allowance_async(
1148
- self,
1149
- *,
1150
- chain: models.GenericAllowanceChain = models.GenericAllowanceChain.ARBITRUM_MAINNET,
1151
- token: models.GenericAllowanceToken = models.GenericAllowanceToken.USDC,
1152
- contract_name: models.GenericAllowanceContractName = models.GenericAllowanceContractName.AAVE_V3_POOL,
1153
- user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
1154
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
1155
- server_url: Optional[str] = None,
1156
- timeout_ms: Optional[int] = None,
1157
- http_headers: Optional[Mapping[str, str]] = None,
1158
- ) -> models.AllowanceInfoResponse:
1159
- r"""Get allowance - Protocol
1160
-
1161
- In decentralized finance (DeFi) protocols such as Uniswap or AAVE, users must set
1162
- a token allowance to authorize the protocol to spend a specified amount of their
1163
- tokens on their behalf.
1164
-
1165
- This is a crucial step before engaging in any transactions or operations within
1166
- these protocols, ensuring that the protocol has the necessary permissions to manage
1167
- the user's tokens securely and efficiently.
1168
-
1169
- :param chain: The chain to use.
1170
- :param token: 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.
1171
- :param contract_name:
1172
- :param user:
1173
- :param retries: Override the default retry configuration for this method
1174
- :param server_url: Override the default server URL for this method
1175
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1176
- :param http_headers: Additional headers to set or replace on requests.
1177
- """
1178
- base_url = None
1179
- url_variables = None
1180
- if timeout_ms is None:
1181
- timeout_ms = self.sdk_configuration.timeout_ms
1182
-
1183
- if server_url is not None:
1184
- base_url = server_url
1185
- else:
1186
- base_url = self._get_url(base_url, url_variables)
1187
-
1188
- request = models.GenericAllowanceRequest(
1189
- chain=chain,
1190
- user=user,
1191
- token=token,
1192
- contract_name=contract_name,
1193
- )
1194
-
1195
- req = self._build_request_async(
1196
- method="GET",
1197
- path="/v0/generic/allowance/get",
1198
- base_url=base_url,
1199
- url_variables=url_variables,
1200
- request=request,
1201
- request_body_required=False,
1202
- request_has_path_params=False,
1203
- request_has_query_params=True,
1204
- user_agent_header="user-agent",
1205
- accept_header_value="application/json",
1206
- http_headers=http_headers,
1207
- security=self.sdk_configuration.security,
1208
- timeout_ms=timeout_ms,
1209
- )
1210
-
1211
- if retries == UNSET:
1212
- if self.sdk_configuration.retry_config is not UNSET:
1213
- retries = self.sdk_configuration.retry_config
1214
-
1215
- retry_config = None
1216
- if isinstance(retries, utils.RetryConfig):
1217
- retry_config = (retries, ["429", "500", "502", "503", "504"])
1218
-
1219
- http_res = await self.do_request_async(
1220
- hook_ctx=HookContext(
1221
- base_url=base_url or "",
1222
- operation_id="generic_allowance",
1223
- oauth2_scopes=[],
1224
- security_source=self.sdk_configuration.security,
1225
- ),
1226
- request=req,
1227
- error_status_codes=["422", "4XX", "5XX"],
1228
- retry_config=retry_config,
1229
- )
1230
-
1231
- response_data: Any = None
1232
- if utils.match_response(http_res, "200", "application/json"):
1233
- return utils.unmarshal_json(http_res.text, models.AllowanceInfoResponse)
1234
- if utils.match_response(http_res, "422", "application/json"):
1235
- response_data = utils.unmarshal_json(
1236
- http_res.text, errors.HTTPValidationErrorData
1237
- )
1238
- raise errors.HTTPValidationError(data=response_data)
1239
- if utils.match_response(http_res, "4XX", "*"):
1240
- http_res_text = await utils.stream_to_text_async(http_res)
1241
- raise errors.APIError(
1242
- "API error occurred", http_res.status_code, http_res_text, http_res
1243
- )
1244
- if utils.match_response(http_res, "5XX", "*"):
1245
- http_res_text = await utils.stream_to_text_async(http_res)
1246
- raise errors.APIError(
1247
- "API error occurred", http_res.status_code, http_res_text, http_res
1248
- )
1249
-
1250
- content_type = http_res.headers.get("Content-Type")
1251
- http_res_text = await utils.stream_to_text_async(http_res)
1252
- raise errors.APIError(
1253
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1254
- http_res.status_code,
1255
- http_res_text,
1256
- http_res,
1257
- )
1258
-
1259
- def ens(
1260
- self,
1261
- *,
1262
- chain: models.GenericEnsChain = models.GenericEnsChain.ETHEREUM_MAINNET,
1263
- ens_name: Optional[str] = "vitalik.eth",
1264
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
1265
- server_url: Optional[str] = None,
1266
- timeout_ms: Optional[int] = None,
1267
- http_headers: Optional[Mapping[str, str]] = None,
1268
- ) -> models.EnsNameInfoResponse:
1269
- r"""Resolve ENS
1270
-
1271
- An ENS name is a string ending in `.eth`.
1272
-
1273
- E.g. `vitalik.eth`. This endpoint can be used to
1274
- query the actual ethereum wallet address behind the ENS name.
1275
-
1276
- :param chain: The chain to use.
1277
- :param ens_name:
1278
- :param retries: Override the default retry configuration for this method
1279
- :param server_url: Override the default server URL for this method
1280
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1281
- :param http_headers: Additional headers to set or replace on requests.
1282
- """
1283
- base_url = None
1284
- url_variables = None
1285
- if timeout_ms is None:
1286
- timeout_ms = self.sdk_configuration.timeout_ms
1287
-
1288
- if server_url is not None:
1289
- base_url = server_url
1290
- else:
1291
- base_url = self._get_url(base_url, url_variables)
1292
-
1293
- request = models.GenericEnsRequest(
454
+ request = models.GenericSupportedTokensRequest(
1294
455
  chain=chain,
1295
- ens_name=ens_name,
1296
456
  )
1297
457
 
1298
458
  req = self._build_request(
1299
459
  method="GET",
1300
- path="/v0/generic/ens/get",
460
+ path="/v0/generic/supported_tokens/get",
1301
461
  base_url=base_url,
1302
462
  url_variables=url_variables,
1303
463
  request=request,
@@ -1322,7 +482,7 @@ class Universal(BaseSDK):
1322
482
  http_res = self.do_request(
1323
483
  hook_ctx=HookContext(
1324
484
  base_url=base_url or "",
1325
- operation_id="generic_ens",
485
+ operation_id="generic_supported_tokens",
1326
486
  oauth2_scopes=[],
1327
487
  security_source=self.sdk_configuration.security,
1328
488
  ),
@@ -1333,7 +493,7 @@ class Universal(BaseSDK):
1333
493
 
1334
494
  response_data: Any = None
1335
495
  if utils.match_response(http_res, "200", "application/json"):
1336
- return utils.unmarshal_json(http_res.text, models.EnsNameInfoResponse)
496
+ return utils.unmarshal_json(http_res.text, models.TokenInfo)
1337
497
  if utils.match_response(http_res, "422", "application/json"):
1338
498
  response_data = utils.unmarshal_json(
1339
499
  http_res.text, errors.HTTPValidationErrorData
@@ -1359,25 +519,20 @@ class Universal(BaseSDK):
1359
519
  http_res,
1360
520
  )
1361
521
 
1362
- async def ens_async(
522
+ async def supported_tokens_async(
1363
523
  self,
1364
524
  *,
1365
- chain: models.GenericEnsChain = models.GenericEnsChain.ETHEREUM_MAINNET,
1366
- ens_name: Optional[str] = "vitalik.eth",
525
+ chain: models.GenericSupportedTokensChain = models.GenericSupportedTokensChain.ARBITRUM_MAINNET,
1367
526
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1368
527
  server_url: Optional[str] = None,
1369
528
  timeout_ms: Optional[int] = None,
1370
529
  http_headers: Optional[Mapping[str, str]] = None,
1371
- ) -> models.EnsNameInfoResponse:
1372
- r"""Resolve ENS
1373
-
1374
- An ENS name is a string ending in `.eth`.
530
+ ) -> models.TokenInfo:
531
+ r"""List supported tokens
1375
532
 
1376
- E.g. `vitalik.eth`. This endpoint can be used to
1377
- query the actual ethereum wallet address behind the ENS name.
533
+ Get the list of supported tokens on a chain by the Compass API.
1378
534
 
1379
535
  :param chain: The chain to use.
1380
- :param ens_name:
1381
536
  :param retries: Override the default retry configuration for this method
1382
537
  :param server_url: Override the default server URL for this method
1383
538
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1393,14 +548,13 @@ class Universal(BaseSDK):
1393
548
  else:
1394
549
  base_url = self._get_url(base_url, url_variables)
1395
550
 
1396
- request = models.GenericEnsRequest(
551
+ request = models.GenericSupportedTokensRequest(
1397
552
  chain=chain,
1398
- ens_name=ens_name,
1399
553
  )
1400
554
 
1401
555
  req = self._build_request_async(
1402
556
  method="GET",
1403
- path="/v0/generic/ens/get",
557
+ path="/v0/generic/supported_tokens/get",
1404
558
  base_url=base_url,
1405
559
  url_variables=url_variables,
1406
560
  request=request,
@@ -1425,7 +579,7 @@ class Universal(BaseSDK):
1425
579
  http_res = await self.do_request_async(
1426
580
  hook_ctx=HookContext(
1427
581
  base_url=base_url or "",
1428
- operation_id="generic_ens",
582
+ operation_id="generic_supported_tokens",
1429
583
  oauth2_scopes=[],
1430
584
  security_source=self.sdk_configuration.security,
1431
585
  ),
@@ -1436,7 +590,7 @@ class Universal(BaseSDK):
1436
590
 
1437
591
  response_data: Any = None
1438
592
  if utils.match_response(http_res, "200", "application/json"):
1439
- return utils.unmarshal_json(http_res.text, models.EnsNameInfoResponse)
593
+ return utils.unmarshal_json(http_res.text, models.TokenInfo)
1440
594
  if utils.match_response(http_res, "422", "application/json"):
1441
595
  response_data = utils.unmarshal_json(
1442
596
  http_res.text, errors.HTTPValidationErrorData
@@ -1462,27 +616,32 @@ class Universal(BaseSDK):
1462
616
  http_res,
1463
617
  )
1464
618
 
1465
- def wrap_eth(
619
+ def allowance(
1466
620
  self,
1467
621
  *,
1468
- amount: Union[
1469
- models.WrapEthRequestAmount, models.WrapEthRequestAmountTypedDict
1470
- ],
1471
- chain: models.Chain,
1472
- sender: str,
622
+ chain: models.GenericAllowanceChain = models.GenericAllowanceChain.ARBITRUM_MAINNET,
623
+ token: models.GenericAllowanceToken = models.GenericAllowanceToken.USDC,
624
+ contract_name: models.GenericAllowanceContractName = models.GenericAllowanceContractName.AAVE_V3_POOL,
625
+ user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
1473
626
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1474
627
  server_url: Optional[str] = None,
1475
628
  timeout_ms: Optional[int] = None,
1476
629
  http_headers: Optional[Mapping[str, str]] = None,
1477
- ) -> models.UnsignedTransaction:
1478
- r"""Wrap ETH
630
+ ) -> models.AllowanceInfoResponse:
631
+ r"""Get allowance - Protocol
1479
632
 
1480
- Wrapping ETH creates an ERC-20 compliant form of ETH that is typically needed for
1481
- it to be traded on DeFi protocols.
633
+ In decentralized finance (DeFi) protocols such as Uniswap or AAVE, users must set
634
+ a token allowance to authorize the protocol to spend a specified amount of their
635
+ tokens on their behalf.
636
+
637
+ This is a crucial step before engaging in any transactions or operations within
638
+ these protocols, ensuring that the protocol has the necessary permissions to manage
639
+ the user's tokens securely and efficiently.
1482
640
 
1483
- :param amount: The amount of ETH to wrap.
1484
641
  :param chain: The chain to use.
1485
- :param sender: The address of the transaction sender.
642
+ :param token: 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.
643
+ :param contract_name:
644
+ :param user:
1486
645
  :param retries: Override the default retry configuration for this method
1487
646
  :param server_url: Override the default server URL for this method
1488
647
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1498,28 +657,26 @@ class Universal(BaseSDK):
1498
657
  else:
1499
658
  base_url = self._get_url(base_url, url_variables)
1500
659
 
1501
- request = models.WrapEthRequest(
1502
- amount=amount,
660
+ request = models.GenericAllowanceRequest(
1503
661
  chain=chain,
1504
- sender=sender,
662
+ user=user,
663
+ token=token,
664
+ contract_name=contract_name,
1505
665
  )
1506
666
 
1507
667
  req = self._build_request(
1508
- method="POST",
1509
- path="/v0/generic/wrap_eth",
668
+ method="GET",
669
+ path="/v0/generic/allowance/get",
1510
670
  base_url=base_url,
1511
671
  url_variables=url_variables,
1512
672
  request=request,
1513
- request_body_required=True,
673
+ request_body_required=False,
1514
674
  request_has_path_params=False,
1515
675
  request_has_query_params=True,
1516
676
  user_agent_header="user-agent",
1517
677
  accept_header_value="application/json",
1518
678
  http_headers=http_headers,
1519
679
  security=self.sdk_configuration.security,
1520
- get_serialized_body=lambda: utils.serialize_request_body(
1521
- request, False, False, "json", models.WrapEthRequest
1522
- ),
1523
680
  timeout_ms=timeout_ms,
1524
681
  )
1525
682
 
@@ -1534,7 +691,7 @@ class Universal(BaseSDK):
1534
691
  http_res = self.do_request(
1535
692
  hook_ctx=HookContext(
1536
693
  base_url=base_url or "",
1537
- operation_id="generic_wrap_eth",
694
+ operation_id="generic_allowance",
1538
695
  oauth2_scopes=[],
1539
696
  security_source=self.sdk_configuration.security,
1540
697
  ),
@@ -1545,7 +702,7 @@ class Universal(BaseSDK):
1545
702
 
1546
703
  response_data: Any = None
1547
704
  if utils.match_response(http_res, "200", "application/json"):
1548
- return utils.unmarshal_json(http_res.text, models.UnsignedTransaction)
705
+ return utils.unmarshal_json(http_res.text, models.AllowanceInfoResponse)
1549
706
  if utils.match_response(http_res, "422", "application/json"):
1550
707
  response_data = utils.unmarshal_json(
1551
708
  http_res.text, errors.HTTPValidationErrorData
@@ -1571,27 +728,32 @@ class Universal(BaseSDK):
1571
728
  http_res,
1572
729
  )
1573
730
 
1574
- async def wrap_eth_async(
731
+ async def allowance_async(
1575
732
  self,
1576
733
  *,
1577
- amount: Union[
1578
- models.WrapEthRequestAmount, models.WrapEthRequestAmountTypedDict
1579
- ],
1580
- chain: models.Chain,
1581
- sender: str,
734
+ chain: models.GenericAllowanceChain = models.GenericAllowanceChain.ARBITRUM_MAINNET,
735
+ token: models.GenericAllowanceToken = models.GenericAllowanceToken.USDC,
736
+ contract_name: models.GenericAllowanceContractName = models.GenericAllowanceContractName.AAVE_V3_POOL,
737
+ user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
1582
738
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1583
739
  server_url: Optional[str] = None,
1584
740
  timeout_ms: Optional[int] = None,
1585
741
  http_headers: Optional[Mapping[str, str]] = None,
1586
- ) -> models.UnsignedTransaction:
1587
- r"""Wrap ETH
742
+ ) -> models.AllowanceInfoResponse:
743
+ r"""Get allowance - Protocol
1588
744
 
1589
- Wrapping ETH creates an ERC-20 compliant form of ETH that is typically needed for
1590
- it to be traded on DeFi protocols.
745
+ In decentralized finance (DeFi) protocols such as Uniswap or AAVE, users must set
746
+ a token allowance to authorize the protocol to spend a specified amount of their
747
+ tokens on their behalf.
748
+
749
+ This is a crucial step before engaging in any transactions or operations within
750
+ these protocols, ensuring that the protocol has the necessary permissions to manage
751
+ the user's tokens securely and efficiently.
1591
752
 
1592
- :param amount: The amount of ETH to wrap.
1593
753
  :param chain: The chain to use.
1594
- :param sender: The address of the transaction sender.
754
+ :param token: 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.
755
+ :param contract_name:
756
+ :param user:
1595
757
  :param retries: Override the default retry configuration for this method
1596
758
  :param server_url: Override the default server URL for this method
1597
759
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1607,28 +769,26 @@ class Universal(BaseSDK):
1607
769
  else:
1608
770
  base_url = self._get_url(base_url, url_variables)
1609
771
 
1610
- request = models.WrapEthRequest(
1611
- amount=amount,
772
+ request = models.GenericAllowanceRequest(
1612
773
  chain=chain,
1613
- sender=sender,
774
+ user=user,
775
+ token=token,
776
+ contract_name=contract_name,
1614
777
  )
1615
778
 
1616
779
  req = self._build_request_async(
1617
- method="POST",
1618
- path="/v0/generic/wrap_eth",
780
+ method="GET",
781
+ path="/v0/generic/allowance/get",
1619
782
  base_url=base_url,
1620
783
  url_variables=url_variables,
1621
784
  request=request,
1622
- request_body_required=True,
785
+ request_body_required=False,
1623
786
  request_has_path_params=False,
1624
787
  request_has_query_params=True,
1625
788
  user_agent_header="user-agent",
1626
789
  accept_header_value="application/json",
1627
790
  http_headers=http_headers,
1628
791
  security=self.sdk_configuration.security,
1629
- get_serialized_body=lambda: utils.serialize_request_body(
1630
- request, False, False, "json", models.WrapEthRequest
1631
- ),
1632
792
  timeout_ms=timeout_ms,
1633
793
  )
1634
794
 
@@ -1643,7 +803,7 @@ class Universal(BaseSDK):
1643
803
  http_res = await self.do_request_async(
1644
804
  hook_ctx=HookContext(
1645
805
  base_url=base_url or "",
1646
- operation_id="generic_wrap_eth",
806
+ operation_id="generic_allowance",
1647
807
  oauth2_scopes=[],
1648
808
  security_source=self.sdk_configuration.security,
1649
809
  ),
@@ -1654,7 +814,7 @@ class Universal(BaseSDK):
1654
814
 
1655
815
  response_data: Any = None
1656
816
  if utils.match_response(http_res, "200", "application/json"):
1657
- return utils.unmarshal_json(http_res.text, models.UnsignedTransaction)
817
+ return utils.unmarshal_json(http_res.text, models.AllowanceInfoResponse)
1658
818
  if utils.match_response(http_res, "422", "application/json"):
1659
819
  response_data = utils.unmarshal_json(
1660
820
  http_res.text, errors.HTTPValidationErrorData
@@ -1680,27 +840,25 @@ class Universal(BaseSDK):
1680
840
  http_res,
1681
841
  )
1682
842
 
1683
- def unwrap_weth(
843
+ def ens(
1684
844
  self,
1685
845
  *,
1686
- amount: Union[
1687
- models.UnwrapWethRequestAmount, models.UnwrapWethRequestAmountTypedDict
1688
- ],
1689
- chain: models.Chain,
1690
- sender: str,
846
+ chain: models.GenericEnsChain = models.GenericEnsChain.ETHEREUM_MAINNET,
847
+ ens_name: Optional[str] = "vitalik.eth",
1691
848
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1692
849
  server_url: Optional[str] = None,
1693
850
  timeout_ms: Optional[int] = None,
1694
851
  http_headers: Optional[Mapping[str, str]] = None,
1695
- ) -> models.UnsignedTransaction:
1696
- r"""Unwrap WETH
852
+ ) -> models.EnsNameInfoResponse:
853
+ r"""Resolve ENS
1697
854
 
1698
- Unwrapping WETH converts the ERC-20 compliant form of ETH back to native ETH that
1699
- can be used for gas and other native purposes.
855
+ An ENS name is a string ending in `.eth`.
856
+
857
+ E.g. `vitalik.eth`. This endpoint can be used to
858
+ query the actual ethereum wallet address behind the ENS name.
1700
859
 
1701
- :param amount: The amount of WETH to unwrap.
1702
860
  :param chain: The chain to use.
1703
- :param sender: The address of the transaction sender.
861
+ :param ens_name:
1704
862
  :param retries: Override the default retry configuration for this method
1705
863
  :param server_url: Override the default server URL for this method
1706
864
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1716,28 +874,24 @@ class Universal(BaseSDK):
1716
874
  else:
1717
875
  base_url = self._get_url(base_url, url_variables)
1718
876
 
1719
- request = models.UnwrapWethRequest(
1720
- amount=amount,
877
+ request = models.GenericEnsRequest(
1721
878
  chain=chain,
1722
- sender=sender,
879
+ ens_name=ens_name,
1723
880
  )
1724
881
 
1725
882
  req = self._build_request(
1726
- method="POST",
1727
- path="/v0/generic/unwrap_weth",
883
+ method="GET",
884
+ path="/v0/generic/ens/get",
1728
885
  base_url=base_url,
1729
886
  url_variables=url_variables,
1730
887
  request=request,
1731
- request_body_required=True,
888
+ request_body_required=False,
1732
889
  request_has_path_params=False,
1733
890
  request_has_query_params=True,
1734
891
  user_agent_header="user-agent",
1735
892
  accept_header_value="application/json",
1736
893
  http_headers=http_headers,
1737
894
  security=self.sdk_configuration.security,
1738
- get_serialized_body=lambda: utils.serialize_request_body(
1739
- request, False, False, "json", models.UnwrapWethRequest
1740
- ),
1741
895
  timeout_ms=timeout_ms,
1742
896
  )
1743
897
 
@@ -1752,7 +906,7 @@ class Universal(BaseSDK):
1752
906
  http_res = self.do_request(
1753
907
  hook_ctx=HookContext(
1754
908
  base_url=base_url or "",
1755
- operation_id="generic_unwrap_weth",
909
+ operation_id="generic_ens",
1756
910
  oauth2_scopes=[],
1757
911
  security_source=self.sdk_configuration.security,
1758
912
  ),
@@ -1763,7 +917,7 @@ class Universal(BaseSDK):
1763
917
 
1764
918
  response_data: Any = None
1765
919
  if utils.match_response(http_res, "200", "application/json"):
1766
- return utils.unmarshal_json(http_res.text, models.UnsignedTransaction)
920
+ return utils.unmarshal_json(http_res.text, models.EnsNameInfoResponse)
1767
921
  if utils.match_response(http_res, "422", "application/json"):
1768
922
  response_data = utils.unmarshal_json(
1769
923
  http_res.text, errors.HTTPValidationErrorData
@@ -1789,27 +943,25 @@ class Universal(BaseSDK):
1789
943
  http_res,
1790
944
  )
1791
945
 
1792
- async def unwrap_weth_async(
946
+ async def ens_async(
1793
947
  self,
1794
948
  *,
1795
- amount: Union[
1796
- models.UnwrapWethRequestAmount, models.UnwrapWethRequestAmountTypedDict
1797
- ],
1798
- chain: models.Chain,
1799
- sender: str,
949
+ chain: models.GenericEnsChain = models.GenericEnsChain.ETHEREUM_MAINNET,
950
+ ens_name: Optional[str] = "vitalik.eth",
1800
951
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1801
952
  server_url: Optional[str] = None,
1802
953
  timeout_ms: Optional[int] = None,
1803
954
  http_headers: Optional[Mapping[str, str]] = None,
1804
- ) -> models.UnsignedTransaction:
1805
- r"""Unwrap WETH
955
+ ) -> models.EnsNameInfoResponse:
956
+ r"""Resolve ENS
1806
957
 
1807
- Unwrapping WETH converts the ERC-20 compliant form of ETH back to native ETH that
1808
- can be used for gas and other native purposes.
958
+ An ENS name is a string ending in `.eth`.
959
+
960
+ E.g. `vitalik.eth`. This endpoint can be used to
961
+ query the actual ethereum wallet address behind the ENS name.
1809
962
 
1810
- :param amount: The amount of WETH to unwrap.
1811
963
  :param chain: The chain to use.
1812
- :param sender: The address of the transaction sender.
964
+ :param ens_name:
1813
965
  :param retries: Override the default retry configuration for this method
1814
966
  :param server_url: Override the default server URL for this method
1815
967
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1825,28 +977,24 @@ class Universal(BaseSDK):
1825
977
  else:
1826
978
  base_url = self._get_url(base_url, url_variables)
1827
979
 
1828
- request = models.UnwrapWethRequest(
1829
- amount=amount,
980
+ request = models.GenericEnsRequest(
1830
981
  chain=chain,
1831
- sender=sender,
982
+ ens_name=ens_name,
1832
983
  )
1833
984
 
1834
985
  req = self._build_request_async(
1835
- method="POST",
1836
- path="/v0/generic/unwrap_weth",
986
+ method="GET",
987
+ path="/v0/generic/ens/get",
1837
988
  base_url=base_url,
1838
989
  url_variables=url_variables,
1839
990
  request=request,
1840
- request_body_required=True,
991
+ request_body_required=False,
1841
992
  request_has_path_params=False,
1842
993
  request_has_query_params=True,
1843
994
  user_agent_header="user-agent",
1844
995
  accept_header_value="application/json",
1845
996
  http_headers=http_headers,
1846
997
  security=self.sdk_configuration.security,
1847
- get_serialized_body=lambda: utils.serialize_request_body(
1848
- request, False, False, "json", models.UnwrapWethRequest
1849
- ),
1850
998
  timeout_ms=timeout_ms,
1851
999
  )
1852
1000
 
@@ -1861,7 +1009,7 @@ class Universal(BaseSDK):
1861
1009
  http_res = await self.do_request_async(
1862
1010
  hook_ctx=HookContext(
1863
1011
  base_url=base_url or "",
1864
- operation_id="generic_unwrap_weth",
1012
+ operation_id="generic_ens",
1865
1013
  oauth2_scopes=[],
1866
1014
  security_source=self.sdk_configuration.security,
1867
1015
  ),
@@ -1872,7 +1020,7 @@ class Universal(BaseSDK):
1872
1020
 
1873
1021
  response_data: Any = None
1874
1022
  if utils.match_response(http_res, "200", "application/json"):
1875
- return utils.unmarshal_json(http_res.text, models.UnsignedTransaction)
1023
+ return utils.unmarshal_json(http_res.text, models.EnsNameInfoResponse)
1876
1024
  if utils.match_response(http_res, "422", "application/json"):
1877
1025
  response_data = utils.unmarshal_json(
1878
1026
  http_res.text, errors.HTTPValidationErrorData
@@ -1898,15 +1046,12 @@ class Universal(BaseSDK):
1898
1046
  http_res,
1899
1047
  )
1900
1048
 
1901
- def transfer_erc20(
1049
+ def wrap_eth(
1902
1050
  self,
1903
1051
  *,
1904
1052
  amount: Union[
1905
- models.TransferErc20RequestAmount,
1906
- models.TransferErc20RequestAmountTypedDict,
1053
+ models.WrapEthRequestAmount, models.WrapEthRequestAmountTypedDict
1907
1054
  ],
1908
- token: models.TokenEnum,
1909
- to: str,
1910
1055
  chain: models.Chain,
1911
1056
  sender: str,
1912
1057
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
@@ -1914,13 +1059,12 @@ class Universal(BaseSDK):
1914
1059
  timeout_ms: Optional[int] = None,
1915
1060
  http_headers: Optional[Mapping[str, str]] = None,
1916
1061
  ) -> models.UnsignedTransaction:
1917
- r"""Transfer Token
1062
+ r"""Wrap ETH
1918
1063
 
1919
- Sends ERC20 tokens from the sender's address to the specified recipient.
1064
+ Wrapping ETH creates an ERC-20 compliant form of ETH that is typically needed for
1065
+ it to be traded on DeFi protocols.
1920
1066
 
1921
- :param amount: Amount of token to transfer
1922
- :param token: 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.
1923
- :param to: The recipient of the tokens.
1067
+ :param amount: The amount of ETH to wrap.
1924
1068
  :param chain: The chain to use.
1925
1069
  :param sender: The address of the transaction sender.
1926
1070
  :param retries: Override the default retry configuration for this method
@@ -1938,17 +1082,15 @@ class Universal(BaseSDK):
1938
1082
  else:
1939
1083
  base_url = self._get_url(base_url, url_variables)
1940
1084
 
1941
- request = models.TransferErc20Request(
1085
+ request = models.WrapEthRequest(
1942
1086
  amount=amount,
1943
- token=token,
1944
- to=to,
1945
1087
  chain=chain,
1946
1088
  sender=sender,
1947
1089
  )
1948
1090
 
1949
1091
  req = self._build_request(
1950
1092
  method="POST",
1951
- path="/v0/generic/transfer/erc20",
1093
+ path="/v0/generic/wrap_eth",
1952
1094
  base_url=base_url,
1953
1095
  url_variables=url_variables,
1954
1096
  request=request,
@@ -1960,7 +1102,7 @@ class Universal(BaseSDK):
1960
1102
  http_headers=http_headers,
1961
1103
  security=self.sdk_configuration.security,
1962
1104
  get_serialized_body=lambda: utils.serialize_request_body(
1963
- request, False, False, "json", models.TransferErc20Request
1105
+ request, False, False, "json", models.WrapEthRequest
1964
1106
  ),
1965
1107
  timeout_ms=timeout_ms,
1966
1108
  )
@@ -1976,7 +1118,7 @@ class Universal(BaseSDK):
1976
1118
  http_res = self.do_request(
1977
1119
  hook_ctx=HookContext(
1978
1120
  base_url=base_url or "",
1979
- operation_id="generic_transfer_erc20",
1121
+ operation_id="generic_wrap_eth",
1980
1122
  oauth2_scopes=[],
1981
1123
  security_source=self.sdk_configuration.security,
1982
1124
  ),
@@ -2013,15 +1155,12 @@ class Universal(BaseSDK):
2013
1155
  http_res,
2014
1156
  )
2015
1157
 
2016
- async def transfer_erc20_async(
1158
+ async def wrap_eth_async(
2017
1159
  self,
2018
1160
  *,
2019
1161
  amount: Union[
2020
- models.TransferErc20RequestAmount,
2021
- models.TransferErc20RequestAmountTypedDict,
1162
+ models.WrapEthRequestAmount, models.WrapEthRequestAmountTypedDict
2022
1163
  ],
2023
- token: models.TokenEnum,
2024
- to: str,
2025
1164
  chain: models.Chain,
2026
1165
  sender: str,
2027
1166
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
@@ -2029,13 +1168,12 @@ class Universal(BaseSDK):
2029
1168
  timeout_ms: Optional[int] = None,
2030
1169
  http_headers: Optional[Mapping[str, str]] = None,
2031
1170
  ) -> models.UnsignedTransaction:
2032
- r"""Transfer Token
1171
+ r"""Wrap ETH
2033
1172
 
2034
- Sends ERC20 tokens from the sender's address to the specified recipient.
1173
+ Wrapping ETH creates an ERC-20 compliant form of ETH that is typically needed for
1174
+ it to be traded on DeFi protocols.
2035
1175
 
2036
- :param amount: Amount of token to transfer
2037
- :param token: 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.
2038
- :param to: The recipient of the tokens.
1176
+ :param amount: The amount of ETH to wrap.
2039
1177
  :param chain: The chain to use.
2040
1178
  :param sender: The address of the transaction sender.
2041
1179
  :param retries: Override the default retry configuration for this method
@@ -2053,17 +1191,15 @@ class Universal(BaseSDK):
2053
1191
  else:
2054
1192
  base_url = self._get_url(base_url, url_variables)
2055
1193
 
2056
- request = models.TransferErc20Request(
1194
+ request = models.WrapEthRequest(
2057
1195
  amount=amount,
2058
- token=token,
2059
- to=to,
2060
1196
  chain=chain,
2061
1197
  sender=sender,
2062
1198
  )
2063
1199
 
2064
1200
  req = self._build_request_async(
2065
1201
  method="POST",
2066
- path="/v0/generic/transfer/erc20",
1202
+ path="/v0/generic/wrap_eth",
2067
1203
  base_url=base_url,
2068
1204
  url_variables=url_variables,
2069
1205
  request=request,
@@ -2075,7 +1211,7 @@ class Universal(BaseSDK):
2075
1211
  http_headers=http_headers,
2076
1212
  security=self.sdk_configuration.security,
2077
1213
  get_serialized_body=lambda: utils.serialize_request_body(
2078
- request, False, False, "json", models.TransferErc20Request
1214
+ request, False, False, "json", models.WrapEthRequest
2079
1215
  ),
2080
1216
  timeout_ms=timeout_ms,
2081
1217
  )
@@ -2091,7 +1227,7 @@ class Universal(BaseSDK):
2091
1227
  http_res = await self.do_request_async(
2092
1228
  hook_ctx=HookContext(
2093
1229
  base_url=base_url or "",
2094
- operation_id="generic_transfer_erc20",
1230
+ operation_id="generic_wrap_eth",
2095
1231
  oauth2_scopes=[],
2096
1232
  security_source=self.sdk_configuration.security,
2097
1233
  ),
@@ -2128,13 +1264,12 @@ class Universal(BaseSDK):
2128
1264
  http_res,
2129
1265
  )
2130
1266
 
2131
- def transfer_native_token(
1267
+ def unwrap_weth(
2132
1268
  self,
2133
1269
  *,
2134
1270
  amount: Union[
2135
- models.TransferEthRequestAmount, models.TransferEthRequestAmountTypedDict
1271
+ models.UnwrapWethRequestAmount, models.UnwrapWethRequestAmountTypedDict
2136
1272
  ],
2137
- to: str,
2138
1273
  chain: models.Chain,
2139
1274
  sender: str,
2140
1275
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
@@ -2142,12 +1277,12 @@ class Universal(BaseSDK):
2142
1277
  timeout_ms: Optional[int] = None,
2143
1278
  http_headers: Optional[Mapping[str, str]] = None,
2144
1279
  ) -> models.UnsignedTransaction:
2145
- r"""Transfer ETH
1280
+ r"""Unwrap WETH
2146
1281
 
2147
- Sends native ETH from the sender's address to the specified recipient.
1282
+ Unwrapping WETH converts the ERC-20 compliant form of ETH back to native ETH that
1283
+ can be used for gas and other native purposes.
2148
1284
 
2149
- :param amount: Amount of ETH to transfer
2150
- :param to: The recipient of the ETH.
1285
+ :param amount: The amount of WETH to unwrap.
2151
1286
  :param chain: The chain to use.
2152
1287
  :param sender: The address of the transaction sender.
2153
1288
  :param retries: Override the default retry configuration for this method
@@ -2165,16 +1300,15 @@ class Universal(BaseSDK):
2165
1300
  else:
2166
1301
  base_url = self._get_url(base_url, url_variables)
2167
1302
 
2168
- request = models.TransferEthRequest(
1303
+ request = models.UnwrapWethRequest(
2169
1304
  amount=amount,
2170
- to=to,
2171
1305
  chain=chain,
2172
1306
  sender=sender,
2173
1307
  )
2174
1308
 
2175
1309
  req = self._build_request(
2176
1310
  method="POST",
2177
- path="/v0/generic/transfer/native_token",
1311
+ path="/v0/generic/unwrap_weth",
2178
1312
  base_url=base_url,
2179
1313
  url_variables=url_variables,
2180
1314
  request=request,
@@ -2186,7 +1320,7 @@ class Universal(BaseSDK):
2186
1320
  http_headers=http_headers,
2187
1321
  security=self.sdk_configuration.security,
2188
1322
  get_serialized_body=lambda: utils.serialize_request_body(
2189
- request, False, False, "json", models.TransferEthRequest
1323
+ request, False, False, "json", models.UnwrapWethRequest
2190
1324
  ),
2191
1325
  timeout_ms=timeout_ms,
2192
1326
  )
@@ -2202,7 +1336,7 @@ class Universal(BaseSDK):
2202
1336
  http_res = self.do_request(
2203
1337
  hook_ctx=HookContext(
2204
1338
  base_url=base_url or "",
2205
- operation_id="generic_transfer_native_token",
1339
+ operation_id="generic_unwrap_weth",
2206
1340
  oauth2_scopes=[],
2207
1341
  security_source=self.sdk_configuration.security,
2208
1342
  ),
@@ -2239,13 +1373,12 @@ class Universal(BaseSDK):
2239
1373
  http_res,
2240
1374
  )
2241
1375
 
2242
- async def transfer_native_token_async(
1376
+ async def unwrap_weth_async(
2243
1377
  self,
2244
1378
  *,
2245
1379
  amount: Union[
2246
- models.TransferEthRequestAmount, models.TransferEthRequestAmountTypedDict
1380
+ models.UnwrapWethRequestAmount, models.UnwrapWethRequestAmountTypedDict
2247
1381
  ],
2248
- to: str,
2249
1382
  chain: models.Chain,
2250
1383
  sender: str,
2251
1384
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
@@ -2253,12 +1386,12 @@ class Universal(BaseSDK):
2253
1386
  timeout_ms: Optional[int] = None,
2254
1387
  http_headers: Optional[Mapping[str, str]] = None,
2255
1388
  ) -> models.UnsignedTransaction:
2256
- r"""Transfer ETH
1389
+ r"""Unwrap WETH
2257
1390
 
2258
- Sends native ETH from the sender's address to the specified recipient.
1391
+ Unwrapping WETH converts the ERC-20 compliant form of ETH back to native ETH that
1392
+ can be used for gas and other native purposes.
2259
1393
 
2260
- :param amount: Amount of ETH to transfer
2261
- :param to: The recipient of the ETH.
1394
+ :param amount: The amount of WETH to unwrap.
2262
1395
  :param chain: The chain to use.
2263
1396
  :param sender: The address of the transaction sender.
2264
1397
  :param retries: Override the default retry configuration for this method
@@ -2276,16 +1409,15 @@ class Universal(BaseSDK):
2276
1409
  else:
2277
1410
  base_url = self._get_url(base_url, url_variables)
2278
1411
 
2279
- request = models.TransferEthRequest(
1412
+ request = models.UnwrapWethRequest(
2280
1413
  amount=amount,
2281
- to=to,
2282
1414
  chain=chain,
2283
1415
  sender=sender,
2284
1416
  )
2285
1417
 
2286
1418
  req = self._build_request_async(
2287
1419
  method="POST",
2288
- path="/v0/generic/transfer/native_token",
1420
+ path="/v0/generic/unwrap_weth",
2289
1421
  base_url=base_url,
2290
1422
  url_variables=url_variables,
2291
1423
  request=request,
@@ -2297,7 +1429,7 @@ class Universal(BaseSDK):
2297
1429
  http_headers=http_headers,
2298
1430
  security=self.sdk_configuration.security,
2299
1431
  get_serialized_body=lambda: utils.serialize_request_body(
2300
- request, False, False, "json", models.TransferEthRequest
1432
+ request, False, False, "json", models.UnwrapWethRequest
2301
1433
  ),
2302
1434
  timeout_ms=timeout_ms,
2303
1435
  )
@@ -2313,7 +1445,7 @@ class Universal(BaseSDK):
2313
1445
  http_res = await self.do_request_async(
2314
1446
  hook_ctx=HookContext(
2315
1447
  base_url=base_url or "",
2316
- operation_id="generic_transfer_native_token",
1448
+ operation_id="generic_unwrap_weth",
2317
1449
  oauth2_scopes=[],
2318
1450
  security_source=self.sdk_configuration.security,
2319
1451
  ),
@@ -2354,7 +1486,7 @@ class Universal(BaseSDK):
2354
1486
  self,
2355
1487
  *,
2356
1488
  token: models.TokenEnum,
2357
- contract_name: models.ContractName,
1489
+ contract_name: models.IncreaseAllowanceRequestContractName,
2358
1490
  amount: Union[
2359
1491
  models.IncreaseAllowanceRequestAmount,
2360
1492
  models.IncreaseAllowanceRequestAmountTypedDict,
@@ -2475,7 +1607,7 @@ class Universal(BaseSDK):
2475
1607
  self,
2476
1608
  *,
2477
1609
  token: models.TokenEnum,
2478
- contract_name: models.ContractName,
1610
+ contract_name: models.IncreaseAllowanceRequestContractName,
2479
1611
  amount: Union[
2480
1612
  models.IncreaseAllowanceRequestAmount,
2481
1613
  models.IncreaseAllowanceRequestAmountTypedDict,