compass_api_sdk 1.1.1__py3-none-any.whl → 2.0.21rc1__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.
Files changed (248) hide show
  1. compass_api_sdk/_hooks/sdkhooks.py +4 -4
  2. compass_api_sdk/_hooks/types.py +1 -2
  3. compass_api_sdk/_version.py +3 -3
  4. compass_api_sdk/aave_v3.py +386 -114
  5. compass_api_sdk/aerodrome_slipstream.py +104 -54
  6. compass_api_sdk/basesdk.py +6 -0
  7. compass_api_sdk/bridge.py +536 -0
  8. compass_api_sdk/earn.py +1780 -0
  9. compass_api_sdk/erc_4626_vaults.py +28 -10
  10. compass_api_sdk/errors/__init__.py +8 -0
  11. compass_api_sdk/errors/apierror.py +1 -1
  12. compass_api_sdk/errors/compassapierror.py +1 -1
  13. compass_api_sdk/errors/httpvalidationerror.py +1 -1
  14. compass_api_sdk/errors/mintpreparenotfoundresponse_error.py +49 -0
  15. compass_api_sdk/errors/no_response_error.py +1 -1
  16. compass_api_sdk/errors/responsevalidationerror.py +1 -1
  17. compass_api_sdk/ethena.py +36 -10
  18. compass_api_sdk/gas_sponsorship.py +446 -0
  19. compass_api_sdk/httpclient.py +0 -1
  20. compass_api_sdk/models/__init__.py +764 -392
  21. compass_api_sdk/models/aaveborrowparams.py +4 -13
  22. compass_api_sdk/models/aaveborrowrequest.py +10 -14
  23. compass_api_sdk/models/aavehistoricaltransactionsresponse.py +3 -3
  24. compass_api_sdk/models/aavelooprequest.py +32 -28
  25. compass_api_sdk/models/aaveposition.py +49 -0
  26. compass_api_sdk/models/aaverepayparams.py +4 -13
  27. compass_api_sdk/models/aaverepayrequest.py +10 -14
  28. compass_api_sdk/models/aavesetuseremodeparams.py +28 -0
  29. compass_api_sdk/models/aavesetuseremoderequest.py +48 -0
  30. compass_api_sdk/models/aavesupplyparams.py +4 -13
  31. compass_api_sdk/models/aavesupplyrequest.py +10 -14
  32. compass_api_sdk/models/aavevenue.py +27 -0
  33. compass_api_sdk/models/aavewithdrawparams.py +4 -13
  34. compass_api_sdk/models/aavewithdrawrequest.py +10 -14
  35. compass_api_sdk/models/aerodromeenrichedposition.py +109 -0
  36. compass_api_sdk/models/aerodromelppositionsresponse.py +10 -7
  37. compass_api_sdk/models/aerodromeslipstreambuyexactlyparams.py +8 -25
  38. compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +14 -26
  39. compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +6 -1
  40. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionparams.py +8 -25
  41. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +14 -26
  42. compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +8 -25
  43. compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py +8 -25
  44. compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +13 -25
  45. compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +6 -1
  46. compass_api_sdk/models/approvetransferrequest.py +32 -0
  47. compass_api_sdk/models/approvetransferresponse.py +52 -0
  48. compass_api_sdk/models/batchedsafeoperationsresponse_input.py +52 -0
  49. compass_api_sdk/models/batchedsafeoperationsresponse_output.py +52 -0
  50. compass_api_sdk/models/batcheduseroperationsrequest.py +15 -4
  51. compass_api_sdk/models/chainmarketinfo.py +29 -0
  52. compass_api_sdk/models/{compass_api_backend_models_generic_read_response_portfolio_tokenbalance.py → compass_api_backend_v1_models_generic_read_response_portfolio_tokenbalance.py} +6 -15
  53. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_apydata.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_apydata.py} +2 -2
  54. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_asset.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_asset.py} +2 -2
  55. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_marketstate.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_marketstate.py} +4 -2
  56. compass_api_sdk/models/compass_api_backend_v1_models_morpho_read_response_check_user_position_vaultposition.py +30 -0
  57. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_vaultstate.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_vaultstate.py} +2 -2
  58. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_apydata.py → compass_api_backend_v1_models_morpho_read_response_get_market_apydata.py} +2 -2
  59. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_asset.py → compass_api_backend_v1_models_morpho_read_response_get_market_asset.py} +5 -5
  60. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_marketstate.py → compass_api_backend_v1_models_morpho_read_response_get_market_marketstate.py} +4 -2
  61. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_markets_asset.py → compass_api_backend_v1_models_morpho_read_response_get_markets_asset.py} +2 -2
  62. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_markets_marketstate.py → compass_api_backend_v1_models_morpho_read_response_get_markets_marketstate.py} +2 -2
  63. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vaults_asset.py → compass_api_backend_v1_models_morpho_read_response_get_vaults_asset.py} +2 -2
  64. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vaults_vaultstate.py → compass_api_backend_v1_models_morpho_read_response_get_vaults_vaultstate.py} +4 -2
  65. compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_market_userposition.py → compass_api_backend_v1_models_pendle_read_response_market_userposition.py} +2 -2
  66. compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_positions_tokenbalance.py → compass_api_backend_v1_models_pendle_read_response_positions_tokenbalance.py} +2 -2
  67. compass_api_sdk/models/{compass_api_backend_models_vaults_read_response_vault_userposition.py → compass_api_backend_v1_models_vaults_read_response_vault_userposition.py} +2 -2
  68. compass_api_sdk/models/compass_api_backend_v1_models_wildcat_read_response_market_userposition.py +22 -0
  69. compass_api_sdk/models/compass_api_backend_v2_models_earn_read_response_positions_vaultposition.py +49 -0
  70. compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_2_typed_data_eip712domain.py +36 -0
  71. compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_2_typed_data_eip712types.py +36 -0
  72. compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_typed_data_eip712domain.py +37 -0
  73. compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_typed_data_eip712types.py +32 -0
  74. compass_api_sdk/models/compass_api_backend_v2_models_safe_transact_response_batched_safe_operations_eip712domain.py +29 -0
  75. compass_api_sdk/models/compass_api_backend_v2_models_safe_transact_response_batched_safe_operations_eip712types.py +34 -0
  76. compass_api_sdk/models/createaccountrequest.py +40 -0
  77. compass_api_sdk/models/createaccountresponse.py +56 -0
  78. compass_api_sdk/models/depositforburnrequest.py +77 -0
  79. compass_api_sdk/models/depositforburnresponse.py +100 -0
  80. compass_api_sdk/models/earnmanageparams.py +74 -0
  81. compass_api_sdk/models/earnmanagerequest.py +130 -0
  82. compass_api_sdk/models/earnmanageresponse.py +52 -0
  83. compass_api_sdk/models/earnpositionsresponse.py +39 -0
  84. compass_api_sdk/models/earnswapparams.py +74 -0
  85. compass_api_sdk/models/earnswaprequest.py +90 -0
  86. compass_api_sdk/models/earnswapresponse.py +55 -0
  87. compass_api_sdk/models/earntransferrequest.py +104 -0
  88. compass_api_sdk/models/earntransferresponse.py +71 -0
  89. compass_api_sdk/models/eip712domainfield.py +20 -0
  90. compass_api_sdk/models/eip712field.py +20 -0
  91. compass_api_sdk/models/ethenadepositrequest.py +6 -1
  92. compass_api_sdk/models/ethenagetvaultresponse.py +5 -5
  93. compass_api_sdk/models/ethenarequesttowithdrawrequest.py +6 -1
  94. compass_api_sdk/models/ethenaunstakerequest.py +6 -1
  95. compass_api_sdk/models/fee.py +42 -0
  96. compass_api_sdk/models/listaavemarketsresponse.py +21 -0
  97. compass_api_sdk/models/marketposition.py +5 -5
  98. compass_api_sdk/models/maxsupplyapyinfo.py +34 -0
  99. compass_api_sdk/models/mintpreparecompletedresponse.py +46 -0
  100. compass_api_sdk/models/mintpreparependingresponse.py +65 -0
  101. compass_api_sdk/models/mintpreparereadyresponse.py +43 -0
  102. compass_api_sdk/models/mintpreparerequest.py +25 -0
  103. compass_api_sdk/models/morphoborrowrequest.py +6 -1
  104. compass_api_sdk/models/morphocheckuserpositionresponse.py +9 -3
  105. compass_api_sdk/models/morphodepositrequest.py +6 -1
  106. compass_api_sdk/models/morphogetmarketresponse.py +72 -31
  107. compass_api_sdk/models/morphomarket.py +26 -20
  108. compass_api_sdk/models/morphorepayrequest.py +11 -1
  109. compass_api_sdk/models/morphosupplycollateralrequest.py +11 -1
  110. compass_api_sdk/models/morphovault.py +10 -10
  111. compass_api_sdk/models/morphowithdrawcollateralrequest.py +6 -1
  112. compass_api_sdk/models/morphowithdrawrequest.py +6 -1
  113. compass_api_sdk/models/multicallexecuterequest.py +7 -2
  114. compass_api_sdk/models/odosswapparams.py +9 -30
  115. compass_api_sdk/models/odosswaprequest.py +15 -33
  116. compass_api_sdk/models/oneinchswapparams.py +59 -0
  117. compass_api_sdk/models/openposition.py +7 -7
  118. compass_api_sdk/models/operationtype.py +11 -0
  119. compass_api_sdk/models/pendlegetmarketresponse.py +5 -5
  120. compass_api_sdk/models/pendlemanageliquidityparams.py +2 -15
  121. compass_api_sdk/models/pendlemanageliquidityrequest.py +8 -16
  122. compass_api_sdk/models/pendleredeemyieldrequest.py +6 -1
  123. compass_api_sdk/models/pendletradeptparams.py +2 -15
  124. compass_api_sdk/models/pendletradeptrequest.py +8 -16
  125. compass_api_sdk/models/pendletradeytparams.py +2 -15
  126. compass_api_sdk/models/pendletradeytrequest.py +8 -16
  127. compass_api_sdk/models/permit2typeddata_input.py +46 -0
  128. compass_api_sdk/models/permit2typeddata_output.py +46 -0
  129. compass_api_sdk/models/permitfield.py +20 -0
  130. compass_api_sdk/models/permitmessage.py +39 -0
  131. compass_api_sdk/models/permittransferfrommessage.py +29 -0
  132. compass_api_sdk/models/permittypeddataresponse_input.py +50 -0
  133. compass_api_sdk/models/permittypeddataresponse_output.py +50 -0
  134. compass_api_sdk/models/portfolio.py +5 -5
  135. compass_api_sdk/models/reserve.py +6 -15
  136. compass_api_sdk/models/safetransactionparams.py +78 -0
  137. compass_api_sdk/models/safetransactionresponse.py +28 -0
  138. compass_api_sdk/models/safetxfield.py +20 -0
  139. compass_api_sdk/models/safetxmessage.py +66 -0
  140. compass_api_sdk/models/setallowanceparams.py +3 -16
  141. compass_api_sdk/models/setallowancerequest.py +9 -17
  142. compass_api_sdk/models/skybuyrequest.py +6 -1
  143. compass_api_sdk/models/skydepositrequest.py +7 -2
  144. compass_api_sdk/models/skysellrequest.py +7 -2
  145. compass_api_sdk/models/skywithdrawrequest.py +7 -2
  146. compass_api_sdk/models/sponsorgasrequest.py +71 -0
  147. compass_api_sdk/models/sponsorgasresponse.py +14 -0
  148. compass_api_sdk/models/tokenbalanceresponse.py +5 -15
  149. compass_api_sdk/models/tokenconfig.py +30 -0
  150. compass_api_sdk/models/tokenlistresponse.py +21 -0
  151. compass_api_sdk/models/tokenmarketdata.py +27 -0
  152. compass_api_sdk/models/tokenpermissions.py +20 -0
  153. compass_api_sdk/models/tokentransferparams.py +2 -15
  154. compass_api_sdk/models/tokentransferrequest.py +8 -16
  155. compass_api_sdk/models/uniswapbuyexactlyparams.py +8 -33
  156. compass_api_sdk/models/uniswapbuyexactlyrequest.py +14 -34
  157. compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +6 -1
  158. compass_api_sdk/models/uniswapmintliquidityprovisionparams.py +8 -25
  159. compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +14 -26
  160. compass_api_sdk/models/uniswappoolpriceresponse.py +8 -25
  161. compass_api_sdk/models/uniswapsellexactlyparams.py +4 -29
  162. compass_api_sdk/models/uniswapsellexactlyrequest.py +10 -30
  163. compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +6 -1
  164. compass_api_sdk/models/unsignedmulticalltransaction.py +34 -3
  165. compass_api_sdk/models/unsignedtransaction.py +34 -3
  166. compass_api_sdk/models/unwrapwethrequest.py +6 -1
  167. compass_api_sdk/models/useroperation.py +33 -24
  168. compass_api_sdk/models/v1_aave_aave_supported_tokensop.py +1 -1
  169. compass_api_sdk/models/v1_aave_avg_rateop.py +15 -93
  170. compass_api_sdk/models/v1_aave_historical_transactionsop.py +15 -15
  171. compass_api_sdk/models/v1_aave_liquidity_changeop.py +8 -86
  172. compass_api_sdk/models/v1_aave_rateop.py +8 -86
  173. compass_api_sdk/models/v1_aave_reserve_overviewop.py +8 -86
  174. compass_api_sdk/models/v1_aave_std_rateop.py +15 -93
  175. compass_api_sdk/models/v1_aave_token_priceop.py +8 -86
  176. compass_api_sdk/models/v1_aave_user_position_per_tokenop.py +14 -92
  177. compass_api_sdk/models/v1_aave_user_position_summaryop.py +8 -8
  178. compass_api_sdk/models/v1_aerodrome_slipstream_liquidity_provision_positionsop.py +48 -3
  179. compass_api_sdk/models/v1_aerodrome_slipstream_pool_priceop.py +12 -168
  180. compass_api_sdk/models/v1_ethena_vaultop.py +1 -1
  181. compass_api_sdk/models/v1_generic_allowanceop.py +12 -26
  182. compass_api_sdk/models/v1_generic_ensop.py +2 -2
  183. compass_api_sdk/models/v1_generic_portfolioop.py +2 -2
  184. compass_api_sdk/models/v1_morpho_market_positionop.py +3 -3
  185. compass_api_sdk/models/v1_morpho_marketop.py +2 -2
  186. compass_api_sdk/models/v1_morpho_marketsop.py +10 -30
  187. compass_api_sdk/models/v1_morpho_user_positionop.py +2 -2
  188. compass_api_sdk/models/v1_morpho_vaultop.py +8 -8
  189. compass_api_sdk/models/v1_morpho_vaultsop.py +6 -16
  190. compass_api_sdk/models/v1_pendle_marketop.py +8 -8
  191. compass_api_sdk/models/v1_pendle_marketsop.py +1 -1
  192. compass_api_sdk/models/v1_pendle_positionsop.py +2 -2
  193. compass_api_sdk/models/v1_sky_positionop.py +5 -6
  194. compass_api_sdk/models/v1_token_balanceop.py +12 -25
  195. compass_api_sdk/models/{v1_generic_supported_tokensop.py → v1_token_listop.py} +6 -6
  196. compass_api_sdk/models/v1_token_priceop.py +8 -9
  197. compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +6 -6
  198. compass_api_sdk/models/v1_uniswap_liquidity_provision_in_rangeop.py +2 -2
  199. compass_api_sdk/models/v1_uniswap_liquidity_provision_positionsop.py +2 -2
  200. compass_api_sdk/models/v1_uniswap_pool_priceop.py +12 -168
  201. compass_api_sdk/models/v1_uniswap_quote_buy_exactlyop.py +20 -176
  202. compass_api_sdk/models/v1_uniswap_quote_sell_exactlyop.py +20 -176
  203. compass_api_sdk/models/v1_vaults_vaultop.py +8 -8
  204. compass_api_sdk/models/v1_wildcat_marketop.py +82 -0
  205. compass_api_sdk/models/v2_cctp_mintop.py +47 -0
  206. compass_api_sdk/models/v2_earn_aave_marketsop.py +57 -0
  207. compass_api_sdk/models/v2_earn_positionsop.py +56 -0
  208. compass_api_sdk/models/v2_earn_vaultsop.py +105 -0
  209. compass_api_sdk/models/v2bundlerequest.py +33 -0
  210. compass_api_sdk/models/v2bundleresponse.py +67 -0
  211. compass_api_sdk/models/v2useroperation.py +37 -0
  212. compass_api_sdk/models/vault.py +14 -14
  213. compass_api_sdk/models/vaultdepositrequest.py +6 -1
  214. compass_api_sdk/models/vaultgetvaultresponse.py +5 -5
  215. compass_api_sdk/models/vaultinfo.py +129 -0
  216. compass_api_sdk/models/vaultsresponse.py +30 -0
  217. compass_api_sdk/models/vaultvenue.py +27 -0
  218. compass_api_sdk/models/vaultwithdrawrequest.py +6 -1
  219. compass_api_sdk/models/wildcatgetmarketresponse.py +151 -0
  220. compass_api_sdk/models/{redeemunderlying.py → withdraw.py} +2 -2
  221. compass_api_sdk/models/wrapethrequest.py +6 -1
  222. compass_api_sdk/morpho.py +126 -78
  223. compass_api_sdk/pendle.py +68 -44
  224. compass_api_sdk/sdk.py +18 -11
  225. compass_api_sdk/sky.py +62 -38
  226. compass_api_sdk/smart_account.py +10 -2
  227. compass_api_sdk/swap.py +22 -22
  228. compass_api_sdk/{token_sdk.py → token.py} +511 -103
  229. compass_api_sdk/transaction_bundler.py +46 -16
  230. compass_api_sdk/uniswap_v3.py +152 -114
  231. compass_api_sdk/universal.py +44 -606
  232. compass_api_sdk/utils/annotations.py +32 -8
  233. compass_api_sdk/utils/forms.py +21 -10
  234. compass_api_sdk/utils/queryparams.py +14 -2
  235. compass_api_sdk/utils/retries.py +69 -5
  236. compass_api_sdk/utils/unmarshal_json_response.py +15 -1
  237. compass_api_sdk/wildcat.py +208 -0
  238. compass_api_sdk-2.0.21rc1.dist-info/METADATA +623 -0
  239. compass_api_sdk-2.0.21rc1.dist-info/RECORD +346 -0
  240. {compass_api_sdk-1.1.1.dist-info → compass_api_sdk-2.0.21rc1.dist-info}/WHEEL +1 -1
  241. compass_api_sdk/models/aerodromeposition.py +0 -70
  242. compass_api_sdk/models/token_enum.py +0 -81
  243. compass_api_sdk/models/tokenaddressresponse.py +0 -15
  244. compass_api_sdk/models/tokeninfo.py +0 -17
  245. compass_api_sdk/models/v1_token_addressop.py +0 -109
  246. compass_api_sdk/models/vaultposition.py +0 -24
  247. compass_api_sdk-1.1.1.dist-info/METADATA +0 -592
  248. compass_api_sdk-1.1.1.dist-info/RECORD +0 -275
@@ -14,160 +14,6 @@ class V1UniswapQuoteBuyExactlyChain(str, Enum):
14
14
  ETHEREUM = "ethereum"
15
15
 
16
16
 
17
- class V1UniswapQuoteBuyExactlyTokenInToken(str, Enum):
18
- r"""A class representing the token.
19
-
20
- This class is used to represent the token in the system. Notice individual
21
- endpoints' documentation where per chain tokens are presented.
22
- """
23
-
24
- ONE_INCH = "1INCH"
25
- AAVE = "AAVE"
26
- AERO = "AERO"
27
- ARB = "ARB"
28
- BAL = "BAL"
29
- BNKR = "BNKR"
30
- CB_BTC = "cbBTC"
31
- CB_ETH = "cbETH"
32
- CLANKER = "CLANKER"
33
- COPI = "COPI"
34
- CRV = "CRV"
35
- CRV_USD = "crvUSD"
36
- CYBER = "CYBER"
37
- DAI = "DAI"
38
- DOGINME = "DOGINME"
39
- E_BTC = "eBTC"
40
- ENS = "ENS"
41
- ETH = "ETH"
42
- ETHFI = "ETHFI"
43
- ET_HX = "ETHx"
44
- EURC = "EURC"
45
- EUR = "EUR"
46
- EURS = "EURS"
47
- E_US_DE = "eUSDe"
48
- EZ_ETH = "ezETH"
49
- FBTC = "FBTC"
50
- FRAX = "FRAX"
51
- FXS = "FXS"
52
- GHO = "GHO"
53
- KNC = "KNC"
54
- LBTC = "LBTC"
55
- LDO = "LDO"
56
- LINK = "LINK"
57
- LS_ETH = "LsETH"
58
- LUSD = "LUSD"
59
- MAI = "MAI"
60
- MKR = "MKR"
61
- OS_ETH = "osETH"
62
- PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
63
- PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
64
- PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
65
- PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
66
- PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
67
- PYUSD = "PYUSD"
68
- R_ETH = "rETH"
69
- RLUSD = "RLUSD"
70
- RPL = "RPL"
71
- RS_ETH = "rsETH"
72
- S_DAI = "sDAI"
73
- SNX = "SNX"
74
- STG = "STG"
75
- S_US_DE = "sUSDe"
76
- T_BTC = "tBTC"
77
- UNI = "UNI"
78
- US_DB_C = "USDbC"
79
- USD_CE = "USDCe"
80
- USDC = "USDC"
81
- US_DE = "USDe"
82
- USDS = "USDS"
83
- US_DTB = "USDtb"
84
- USDT = "USDT"
85
- VIRTUAL = "VIRTUAL"
86
- WBTC = "WBTC"
87
- WE_ETH = "weETH"
88
- WELL = "WELL"
89
- WETH = "WETH"
90
- WRS_ETH = "wrsETH"
91
- WST_ETH = "wstETH"
92
-
93
-
94
- class V1UniswapQuoteBuyExactlyTokenOutToken(str, Enum):
95
- r"""A class representing the token.
96
-
97
- This class is used to represent the token in the system. Notice individual
98
- endpoints' documentation where per chain tokens are presented.
99
- """
100
-
101
- ONE_INCH = "1INCH"
102
- AAVE = "AAVE"
103
- AERO = "AERO"
104
- ARB = "ARB"
105
- BAL = "BAL"
106
- BNKR = "BNKR"
107
- CB_BTC = "cbBTC"
108
- CB_ETH = "cbETH"
109
- CLANKER = "CLANKER"
110
- COPI = "COPI"
111
- CRV = "CRV"
112
- CRV_USD = "crvUSD"
113
- CYBER = "CYBER"
114
- DAI = "DAI"
115
- DOGINME = "DOGINME"
116
- E_BTC = "eBTC"
117
- ENS = "ENS"
118
- ETH = "ETH"
119
- ETHFI = "ETHFI"
120
- ET_HX = "ETHx"
121
- EURC = "EURC"
122
- EUR = "EUR"
123
- EURS = "EURS"
124
- E_US_DE = "eUSDe"
125
- EZ_ETH = "ezETH"
126
- FBTC = "FBTC"
127
- FRAX = "FRAX"
128
- FXS = "FXS"
129
- GHO = "GHO"
130
- KNC = "KNC"
131
- LBTC = "LBTC"
132
- LDO = "LDO"
133
- LINK = "LINK"
134
- LS_ETH = "LsETH"
135
- LUSD = "LUSD"
136
- MAI = "MAI"
137
- MKR = "MKR"
138
- OS_ETH = "osETH"
139
- PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
140
- PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
141
- PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
142
- PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
143
- PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
144
- PYUSD = "PYUSD"
145
- R_ETH = "rETH"
146
- RLUSD = "RLUSD"
147
- RPL = "RPL"
148
- RS_ETH = "rsETH"
149
- S_DAI = "sDAI"
150
- SNX = "SNX"
151
- STG = "STG"
152
- S_US_DE = "sUSDe"
153
- T_BTC = "tBTC"
154
- UNI = "UNI"
155
- US_DB_C = "USDbC"
156
- USD_CE = "USDCe"
157
- USDC = "USDC"
158
- US_DE = "USDe"
159
- USDS = "USDS"
160
- US_DTB = "USDtb"
161
- USDT = "USDT"
162
- VIRTUAL = "VIRTUAL"
163
- WBTC = "WBTC"
164
- WE_ETH = "weETH"
165
- WELL = "WELL"
166
- WETH = "WETH"
167
- WRS_ETH = "wrsETH"
168
- WST_ETH = "wstETH"
169
-
170
-
171
17
  class V1UniswapQuoteBuyExactlyFeeEnum(str, Enum):
172
18
  r"""The transaction fee of a Uniswap pool in bips.
173
19
 
@@ -193,43 +39,41 @@ r"""The amount of the token to swap to"""
193
39
 
194
40
 
195
41
  class V1UniswapQuoteBuyExactlyRequestTypedDict(TypedDict):
196
- amount_out: V1UniswapQuoteBuyExactlyAmountOutTypedDict
197
- r"""The amount of the token to swap to"""
198
42
  chain: V1UniswapQuoteBuyExactlyChain
199
- token_in: V1UniswapQuoteBuyExactlyTokenInToken
200
- r"""The symbol of the token to swap from."""
201
- token_out: V1UniswapQuoteBuyExactlyTokenOutToken
202
- r"""The symbol of the token to swap to."""
43
+ token_in: str
44
+ r"""The symbol or address of the token to swap from."""
45
+ token_out: str
46
+ r"""The symbol or address of the token to swap to."""
203
47
  fee: V1UniswapQuoteBuyExactlyFeeEnum
204
48
  r"""The fee to pay for the swap"""
49
+ amount_out: V1UniswapQuoteBuyExactlyAmountOutTypedDict
50
+ r"""The amount of the token to swap to"""
205
51
 
206
52
 
207
53
  class V1UniswapQuoteBuyExactlyRequest(BaseModel):
208
- amount_out: Annotated[
209
- V1UniswapQuoteBuyExactlyAmountOut,
210
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
211
- ]
212
- r"""The amount of the token to swap to"""
213
-
214
54
  chain: Annotated[
215
55
  V1UniswapQuoteBuyExactlyChain,
216
56
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
217
- ] = V1UniswapQuoteBuyExactlyChain.ARBITRUM
57
+ ]
218
58
 
219
59
  token_in: Annotated[
220
- V1UniswapQuoteBuyExactlyTokenInToken,
221
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
222
- ] = V1UniswapQuoteBuyExactlyTokenInToken.USDC
223
- r"""The symbol of the token to swap from."""
60
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
61
+ ]
62
+ r"""The symbol or address of the token to swap from."""
224
63
 
225
64
  token_out: Annotated[
226
- V1UniswapQuoteBuyExactlyTokenOutToken,
227
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
228
- ] = V1UniswapQuoteBuyExactlyTokenOutToken.USDT
229
- r"""The symbol of the token to swap to."""
65
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
66
+ ]
67
+ r"""The symbol or address of the token to swap to."""
230
68
 
231
69
  fee: Annotated[
232
70
  V1UniswapQuoteBuyExactlyFeeEnum,
233
71
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
234
- ] = V1UniswapQuoteBuyExactlyFeeEnum.ZERO_DOT_01
72
+ ]
235
73
  r"""The fee to pay for the swap"""
74
+
75
+ amount_out: Annotated[
76
+ V1UniswapQuoteBuyExactlyAmountOut,
77
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
78
+ ]
79
+ r"""The amount of the token to swap to"""
@@ -14,160 +14,6 @@ class V1UniswapQuoteSellExactlyChain(str, Enum):
14
14
  ETHEREUM = "ethereum"
15
15
 
16
16
 
17
- class V1UniswapQuoteSellExactlyTokenInToken(str, Enum):
18
- r"""A class representing the token.
19
-
20
- This class is used to represent the token in the system. Notice individual
21
- endpoints' documentation where per chain tokens are presented.
22
- """
23
-
24
- ONE_INCH = "1INCH"
25
- AAVE = "AAVE"
26
- AERO = "AERO"
27
- ARB = "ARB"
28
- BAL = "BAL"
29
- BNKR = "BNKR"
30
- CB_BTC = "cbBTC"
31
- CB_ETH = "cbETH"
32
- CLANKER = "CLANKER"
33
- COPI = "COPI"
34
- CRV = "CRV"
35
- CRV_USD = "crvUSD"
36
- CYBER = "CYBER"
37
- DAI = "DAI"
38
- DOGINME = "DOGINME"
39
- E_BTC = "eBTC"
40
- ENS = "ENS"
41
- ETH = "ETH"
42
- ETHFI = "ETHFI"
43
- ET_HX = "ETHx"
44
- EURC = "EURC"
45
- EUR = "EUR"
46
- EURS = "EURS"
47
- E_US_DE = "eUSDe"
48
- EZ_ETH = "ezETH"
49
- FBTC = "FBTC"
50
- FRAX = "FRAX"
51
- FXS = "FXS"
52
- GHO = "GHO"
53
- KNC = "KNC"
54
- LBTC = "LBTC"
55
- LDO = "LDO"
56
- LINK = "LINK"
57
- LS_ETH = "LsETH"
58
- LUSD = "LUSD"
59
- MAI = "MAI"
60
- MKR = "MKR"
61
- OS_ETH = "osETH"
62
- PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
63
- PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
64
- PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
65
- PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
66
- PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
67
- PYUSD = "PYUSD"
68
- R_ETH = "rETH"
69
- RLUSD = "RLUSD"
70
- RPL = "RPL"
71
- RS_ETH = "rsETH"
72
- S_DAI = "sDAI"
73
- SNX = "SNX"
74
- STG = "STG"
75
- S_US_DE = "sUSDe"
76
- T_BTC = "tBTC"
77
- UNI = "UNI"
78
- US_DB_C = "USDbC"
79
- USD_CE = "USDCe"
80
- USDC = "USDC"
81
- US_DE = "USDe"
82
- USDS = "USDS"
83
- US_DTB = "USDtb"
84
- USDT = "USDT"
85
- VIRTUAL = "VIRTUAL"
86
- WBTC = "WBTC"
87
- WE_ETH = "weETH"
88
- WELL = "WELL"
89
- WETH = "WETH"
90
- WRS_ETH = "wrsETH"
91
- WST_ETH = "wstETH"
92
-
93
-
94
- class V1UniswapQuoteSellExactlyTokenOutToken(str, Enum):
95
- r"""A class representing the token.
96
-
97
- This class is used to represent the token in the system. Notice individual
98
- endpoints' documentation where per chain tokens are presented.
99
- """
100
-
101
- ONE_INCH = "1INCH"
102
- AAVE = "AAVE"
103
- AERO = "AERO"
104
- ARB = "ARB"
105
- BAL = "BAL"
106
- BNKR = "BNKR"
107
- CB_BTC = "cbBTC"
108
- CB_ETH = "cbETH"
109
- CLANKER = "CLANKER"
110
- COPI = "COPI"
111
- CRV = "CRV"
112
- CRV_USD = "crvUSD"
113
- CYBER = "CYBER"
114
- DAI = "DAI"
115
- DOGINME = "DOGINME"
116
- E_BTC = "eBTC"
117
- ENS = "ENS"
118
- ETH = "ETH"
119
- ETHFI = "ETHFI"
120
- ET_HX = "ETHx"
121
- EURC = "EURC"
122
- EUR = "EUR"
123
- EURS = "EURS"
124
- E_US_DE = "eUSDe"
125
- EZ_ETH = "ezETH"
126
- FBTC = "FBTC"
127
- FRAX = "FRAX"
128
- FXS = "FXS"
129
- GHO = "GHO"
130
- KNC = "KNC"
131
- LBTC = "LBTC"
132
- LDO = "LDO"
133
- LINK = "LINK"
134
- LS_ETH = "LsETH"
135
- LUSD = "LUSD"
136
- MAI = "MAI"
137
- MKR = "MKR"
138
- OS_ETH = "osETH"
139
- PT_E_USDE_14_AUG2025 = "PT-eUSDE-14AUG2025"
140
- PT_E_USDE_29_MAY2025 = "PT-eUSDE-29MAY2025"
141
- PT_S_USDE_25_SEP2025 = "PT-sUSDE-25SEP2025"
142
- PT_S_USDE_31_JUL2025 = "PT-sUSDE-31JUL2025"
143
- PT_US_DE_31_JUL2025 = "PT-USDe-31JUL2025"
144
- PYUSD = "PYUSD"
145
- R_ETH = "rETH"
146
- RLUSD = "RLUSD"
147
- RPL = "RPL"
148
- RS_ETH = "rsETH"
149
- S_DAI = "sDAI"
150
- SNX = "SNX"
151
- STG = "STG"
152
- S_US_DE = "sUSDe"
153
- T_BTC = "tBTC"
154
- UNI = "UNI"
155
- US_DB_C = "USDbC"
156
- USD_CE = "USDCe"
157
- USDC = "USDC"
158
- US_DE = "USDe"
159
- USDS = "USDS"
160
- US_DTB = "USDtb"
161
- USDT = "USDT"
162
- VIRTUAL = "VIRTUAL"
163
- WBTC = "WBTC"
164
- WE_ETH = "weETH"
165
- WELL = "WELL"
166
- WETH = "WETH"
167
- WRS_ETH = "wrsETH"
168
- WST_ETH = "wstETH"
169
-
170
-
171
17
  class V1UniswapQuoteSellExactlyFeeEnum(str, Enum):
172
18
  r"""The transaction fee of a Uniswap pool in bips.
173
19
 
@@ -193,43 +39,41 @@ r"""The amount of the token to swap from"""
193
39
 
194
40
 
195
41
  class V1UniswapQuoteSellExactlyRequestTypedDict(TypedDict):
196
- amount_in: V1UniswapQuoteSellExactlyAmountInTypedDict
197
- r"""The amount of the token to swap from"""
198
42
  chain: V1UniswapQuoteSellExactlyChain
199
- token_in: V1UniswapQuoteSellExactlyTokenInToken
200
- r"""The symbol of the token to swap from."""
201
- token_out: V1UniswapQuoteSellExactlyTokenOutToken
202
- r"""The symbol of the token to swap to."""
43
+ token_in: str
44
+ r"""The symbol or address of the token to swap from."""
45
+ token_out: str
46
+ r"""The symbol or address of the token to swap to."""
203
47
  fee: V1UniswapQuoteSellExactlyFeeEnum
204
48
  r"""The fee to pay for the swap"""
49
+ amount_in: V1UniswapQuoteSellExactlyAmountInTypedDict
50
+ r"""The amount of the token to swap from"""
205
51
 
206
52
 
207
53
  class V1UniswapQuoteSellExactlyRequest(BaseModel):
208
- amount_in: Annotated[
209
- V1UniswapQuoteSellExactlyAmountIn,
210
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
211
- ]
212
- r"""The amount of the token to swap from"""
213
-
214
54
  chain: Annotated[
215
55
  V1UniswapQuoteSellExactlyChain,
216
56
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
217
- ] = V1UniswapQuoteSellExactlyChain.ARBITRUM
57
+ ]
218
58
 
219
59
  token_in: Annotated[
220
- V1UniswapQuoteSellExactlyTokenInToken,
221
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
222
- ] = V1UniswapQuoteSellExactlyTokenInToken.USDC
223
- r"""The symbol of the token to swap from."""
60
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
61
+ ]
62
+ r"""The symbol or address of the token to swap from."""
224
63
 
225
64
  token_out: Annotated[
226
- V1UniswapQuoteSellExactlyTokenOutToken,
227
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
228
- ] = V1UniswapQuoteSellExactlyTokenOutToken.USDT
229
- r"""The symbol of the token to swap to."""
65
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
66
+ ]
67
+ r"""The symbol or address of the token to swap to."""
230
68
 
231
69
  fee: Annotated[
232
70
  V1UniswapQuoteSellExactlyFeeEnum,
233
71
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
234
- ] = V1UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01
72
+ ]
235
73
  r"""The fee to pay for the swap"""
74
+
75
+ amount_in: Annotated[
76
+ V1UniswapQuoteSellExactlyAmountIn,
77
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
78
+ ]
79
+ r"""The amount of the token to swap from"""
@@ -22,10 +22,10 @@ class V1VaultsVaultChain(str, Enum):
22
22
 
23
23
  class V1VaultsVaultRequestTypedDict(TypedDict):
24
24
  chain: V1VaultsVaultChain
25
- block: NotRequired[Nullable[int]]
26
- r"""Optional block number (defaults to latest)."""
27
25
  vault_address: str
28
26
  r"""The vault address of the desired vault position."""
27
+ block: NotRequired[Nullable[int]]
28
+ r"""Optional block number (defaults to latest)."""
29
29
  user_address: NotRequired[Nullable[str]]
30
30
  r"""The user address of the desired vault position. Only include if you would like the user position included in the response. Defaults to `None`."""
31
31
 
@@ -34,7 +34,12 @@ class V1VaultsVaultRequest(BaseModel):
34
34
  chain: Annotated[
35
35
  V1VaultsVaultChain,
36
36
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
37
- ] = V1VaultsVaultChain.ETHEREUM
37
+ ]
38
+
39
+ vault_address: Annotated[
40
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
41
+ ]
42
+ r"""The vault address of the desired vault position."""
38
43
 
39
44
  block: Annotated[
40
45
  OptionalNullable[int],
@@ -42,11 +47,6 @@ class V1VaultsVaultRequest(BaseModel):
42
47
  ] = UNSET
43
48
  r"""Optional block number (defaults to latest)."""
44
49
 
45
- vault_address: Annotated[
46
- str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
47
- ] = "0x182863131F9a4630fF9E27830d945B1413e347E8"
48
- r"""The vault address of the desired vault position."""
49
-
50
50
  user_address: Annotated[
51
51
  OptionalNullable[str],
52
52
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
@@ -0,0 +1,82 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from compass_api_sdk.types import (
5
+ BaseModel,
6
+ Nullable,
7
+ OptionalNullable,
8
+ UNSET,
9
+ UNSET_SENTINEL,
10
+ )
11
+ from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
12
+ from enum import Enum
13
+ from pydantic import model_serializer
14
+ from typing_extensions import Annotated, NotRequired, TypedDict
15
+
16
+
17
+ class V1WildcatMarketChain(str, Enum):
18
+ ETHEREUM = "ethereum"
19
+
20
+
21
+ class V1WildcatMarketRequestTypedDict(TypedDict):
22
+ chain: V1WildcatMarketChain
23
+ market_address: str
24
+ r"""The market address of the desired market data."""
25
+ block: NotRequired[Nullable[int]]
26
+ r"""Optional block number (defaults to latest)."""
27
+ user_address: NotRequired[Nullable[str]]
28
+ r"""The user address of the desired market position. Only include if you would like the user position included in the response. Defaults to `None`."""
29
+
30
+
31
+ class V1WildcatMarketRequest(BaseModel):
32
+ chain: Annotated[
33
+ V1WildcatMarketChain,
34
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
35
+ ]
36
+
37
+ market_address: Annotated[
38
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
39
+ ]
40
+ r"""The market address of the desired market data."""
41
+
42
+ block: Annotated[
43
+ OptionalNullable[int],
44
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
45
+ ] = UNSET
46
+ r"""Optional block number (defaults to latest)."""
47
+
48
+ user_address: Annotated[
49
+ OptionalNullable[str],
50
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
51
+ ] = UNSET
52
+ r"""The user address of the desired market position. Only include if you would like the user position included in the response. Defaults to `None`."""
53
+
54
+ @model_serializer(mode="wrap")
55
+ def serialize_model(self, handler):
56
+ optional_fields = ["block", "user_address"]
57
+ nullable_fields = ["block", "user_address"]
58
+ null_default_fields = []
59
+
60
+ serialized = handler(self)
61
+
62
+ m = {}
63
+
64
+ for n, f in type(self).model_fields.items():
65
+ k = f.alias or n
66
+ val = serialized.get(k)
67
+ serialized.pop(k, None)
68
+
69
+ optional_nullable = k in optional_fields and k in nullable_fields
70
+ is_set = (
71
+ self.__pydantic_fields_set__.intersection({n})
72
+ or k in null_default_fields
73
+ ) # pylint: disable=no-member
74
+
75
+ if val is not None and val != UNSET_SENTINEL:
76
+ m[k] = val
77
+ elif val != UNSET_SENTINEL and (
78
+ not k in optional_fields or (optional_nullable and is_set)
79
+ ):
80
+ m[k] = val
81
+
82
+ return m
@@ -0,0 +1,47 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .mintpreparecompletedresponse import (
5
+ MintPrepareCompletedResponse,
6
+ MintPrepareCompletedResponseTypedDict,
7
+ )
8
+ from .mintpreparependingresponse import (
9
+ MintPreparePendingResponse,
10
+ MintPreparePendingResponseTypedDict,
11
+ )
12
+ from .mintpreparereadyresponse import (
13
+ MintPrepareReadyResponse,
14
+ MintPrepareReadyResponseTypedDict,
15
+ )
16
+ from compass_api_sdk.utils import get_discriminator
17
+ from pydantic import Discriminator, Tag
18
+ from typing import Union
19
+ from typing_extensions import Annotated, TypeAliasType
20
+
21
+
22
+ Response200V2CctpMintTypedDict = TypeAliasType(
23
+ "Response200V2CctpMintTypedDict",
24
+ Union[MintPrepareReadyResponseTypedDict, MintPrepareCompletedResponseTypedDict],
25
+ )
26
+ r"""Attestation ready with mint transaction, or bridge already completed"""
27
+
28
+
29
+ Response200V2CctpMint = Annotated[
30
+ Union[
31
+ Annotated[MintPrepareReadyResponse, Tag("ready")],
32
+ Annotated[MintPrepareCompletedResponse, Tag("completed")],
33
+ ],
34
+ Discriminator(lambda m: get_discriminator(m, "status", "status")),
35
+ ]
36
+ r"""Attestation ready with mint transaction, or bridge already completed"""
37
+
38
+
39
+ V2CctpMintResponseTypedDict = TypeAliasType(
40
+ "V2CctpMintResponseTypedDict",
41
+ Union[MintPreparePendingResponseTypedDict, Response200V2CctpMintTypedDict],
42
+ )
43
+
44
+
45
+ V2CctpMintResponse = TypeAliasType(
46
+ "V2CctpMintResponse", Union[MintPreparePendingResponse, Response200V2CctpMint]
47
+ )
@@ -0,0 +1,57 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .chain import Chain
5
+ from compass_api_sdk.types import (
6
+ BaseModel,
7
+ Nullable,
8
+ OptionalNullable,
9
+ UNSET,
10
+ UNSET_SENTINEL,
11
+ )
12
+ from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
13
+ from pydantic import model_serializer
14
+ from typing_extensions import Annotated, NotRequired, TypedDict
15
+
16
+
17
+ class V2EarnAaveMarketsRequestTypedDict(TypedDict):
18
+ chain: NotRequired[Nullable[Chain]]
19
+ r"""Optional chain filter. If not provided, returns rates for all chains."""
20
+
21
+
22
+ class V2EarnAaveMarketsRequest(BaseModel):
23
+ chain: Annotated[
24
+ OptionalNullable[Chain],
25
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
26
+ ] = UNSET
27
+ r"""Optional chain filter. If not provided, returns rates for all chains."""
28
+
29
+ @model_serializer(mode="wrap")
30
+ def serialize_model(self, handler):
31
+ optional_fields = ["chain"]
32
+ nullable_fields = ["chain"]
33
+ null_default_fields = []
34
+
35
+ serialized = handler(self)
36
+
37
+ m = {}
38
+
39
+ for n, f in type(self).model_fields.items():
40
+ k = f.alias or n
41
+ val = serialized.get(k)
42
+ serialized.pop(k, None)
43
+
44
+ optional_nullable = k in optional_fields and k in nullable_fields
45
+ is_set = (
46
+ self.__pydantic_fields_set__.intersection({n})
47
+ or k in null_default_fields
48
+ ) # pylint: disable=no-member
49
+
50
+ if val is not None and val != UNSET_SENTINEL:
51
+ m[k] = val
52
+ elif val != UNSET_SENTINEL and (
53
+ not k in optional_fields or (optional_nullable and is_set)
54
+ ):
55
+ m[k] = val
56
+
57
+ return m