compass_api_sdk 0.9.35__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.
- compass_api_sdk/_hooks/sdkhooks.py +4 -4
- compass_api_sdk/_hooks/types.py +1 -2
- compass_api_sdk/_version.py +3 -3
- compass_api_sdk/aave_v3.py +971 -728
- compass_api_sdk/aerodrome_slipstream.py +367 -390
- compass_api_sdk/basesdk.py +21 -5
- compass_api_sdk/bridge.py +536 -0
- compass_api_sdk/earn.py +1780 -0
- compass_api_sdk/erc_4626_vaults.py +127 -154
- compass_api_sdk/errors/__init__.py +38 -4
- compass_api_sdk/errors/apierror.py +32 -14
- compass_api_sdk/errors/compassapierror.py +30 -0
- compass_api_sdk/errors/httpvalidationerror.py +15 -8
- compass_api_sdk/errors/mintpreparenotfoundresponse_error.py +49 -0
- compass_api_sdk/errors/no_response_error.py +17 -0
- compass_api_sdk/errors/responsevalidationerror.py +27 -0
- compass_api_sdk/{token_sdk.py → ethena.py} +318 -293
- compass_api_sdk/gas_sponsorship.py +446 -0
- compass_api_sdk/httpclient.py +0 -1
- compass_api_sdk/models/__init__.py +1701 -945
- compass_api_sdk/models/aaveborrowparams.py +4 -13
- compass_api_sdk/models/aaveborrowrequest.py +19 -19
- compass_api_sdk/models/aavehistoricaltransactionsresponse.py +8 -8
- compass_api_sdk/models/aavelooprequest.py +88 -36
- compass_api_sdk/models/aaveposition.py +49 -0
- compass_api_sdk/models/aaverepayparams.py +4 -13
- compass_api_sdk/models/aaverepayrequest.py +19 -19
- compass_api_sdk/models/aavereserveoverviewresponse.py +34 -3
- compass_api_sdk/models/aavesetuseremodeparams.py +28 -0
- compass_api_sdk/models/aavesetuseremoderequest.py +48 -0
- compass_api_sdk/models/aavesupplyparams.py +4 -13
- compass_api_sdk/models/aavesupplyrequest.py +19 -19
- compass_api_sdk/models/aavesupportedtokenmetadata.py +30 -0
- compass_api_sdk/models/aavesupportedtokensresponse.py +20 -0
- compass_api_sdk/models/aavevenue.py +27 -0
- compass_api_sdk/models/aavewithdrawparams.py +4 -13
- compass_api_sdk/models/aavewithdrawrequest.py +19 -19
- compass_api_sdk/models/aerodromeenrichedposition.py +109 -0
- compass_api_sdk/models/aerodromelppositionsresponse.py +10 -7
- compass_api_sdk/models/aerodromeslipstreambuyexactlyparams.py +8 -25
- compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +21 -31
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +13 -6
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionparams.py +8 -25
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +21 -31
- compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +8 -25
- compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py +8 -25
- compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +20 -30
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +13 -6
- compass_api_sdk/models/approvetransferrequest.py +32 -0
- compass_api_sdk/models/{curator.py → approvetransferresponse.py} +12 -13
- compass_api_sdk/models/apy.py +3 -0
- compass_api_sdk/models/batchedsafeoperationsresponse_input.py +52 -0
- compass_api_sdk/models/batchedsafeoperationsresponse_output.py +52 -0
- compass_api_sdk/models/batcheduseroperationsrequest.py +24 -9
- compass_api_sdk/models/bundlertransactionresponse.py +17 -0
- compass_api_sdk/models/chain.py +3 -3
- compass_api_sdk/models/chainmarketinfo.py +29 -0
- 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
- 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
- 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
- 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
- compass_api_sdk/models/compass_api_backend_v1_models_morpho_read_response_check_user_position_vaultposition.py +30 -0
- 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
- 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
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vault_asset.py → compass_api_backend_v1_models_morpho_read_response_get_market_asset.py} +5 -5
- 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
- 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
- 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
- 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
- compass_api_sdk/models/compass_api_backend_v1_models_morpho_read_response_get_vaults_vaultstate.py +73 -0
- compass_api_sdk/models/compass_api_backend_v1_models_pendle_read_response_market_userposition.py +82 -0
- 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
- compass_api_sdk/models/compass_api_backend_v1_models_vaults_read_response_vault_userposition.py +20 -0
- compass_api_sdk/models/compass_api_backend_v1_models_wildcat_read_response_market_userposition.py +22 -0
- compass_api_sdk/models/compass_api_backend_v2_models_earn_read_response_positions_vaultposition.py +49 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_2_typed_data_eip712domain.py +36 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_2_typed_data_eip712types.py +36 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_typed_data_eip712domain.py +37 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_typed_data_eip712types.py +32 -0
- compass_api_sdk/models/compass_api_backend_v2_models_safe_transact_response_batched_safe_operations_eip712domain.py +29 -0
- compass_api_sdk/models/compass_api_backend_v2_models_safe_transact_response_batched_safe_operations_eip712types.py +34 -0
- compass_api_sdk/models/cooldownposition.py +35 -0
- compass_api_sdk/models/createaccountrequest.py +40 -0
- compass_api_sdk/models/createaccountresponse.py +56 -0
- compass_api_sdk/models/depositforburnrequest.py +77 -0
- compass_api_sdk/models/depositforburnresponse.py +100 -0
- compass_api_sdk/models/details.py +44 -7
- compass_api_sdk/models/earnmanageparams.py +74 -0
- compass_api_sdk/models/earnmanagerequest.py +130 -0
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_asset.py → earnmanageresponse.py} +13 -21
- compass_api_sdk/models/earnpositionsresponse.py +39 -0
- compass_api_sdk/models/earnswapparams.py +74 -0
- compass_api_sdk/models/earnswaprequest.py +90 -0
- compass_api_sdk/models/earnswapresponse.py +55 -0
- compass_api_sdk/models/earntransferrequest.py +104 -0
- compass_api_sdk/models/earntransferresponse.py +71 -0
- compass_api_sdk/models/eip712domainfield.py +20 -0
- compass_api_sdk/models/eip712field.py +20 -0
- compass_api_sdk/models/ethenadepositparams.py +82 -0
- compass_api_sdk/models/ethenadepositrequest.py +100 -0
- compass_api_sdk/models/ethenagetvaultresponse.py +109 -0
- compass_api_sdk/models/ethenarequesttowithdrawparams.py +28 -0
- compass_api_sdk/models/ethenarequesttowithdrawrequest.py +46 -0
- compass_api_sdk/models/ethenarequesttowithdrawtransactionresponse.py +37 -0
- compass_api_sdk/models/ethenaunstakeparams.py +65 -0
- compass_api_sdk/models/ethenaunstakerequest.py +83 -0
- compass_api_sdk/models/fee.py +42 -0
- compass_api_sdk/models/listaavemarketsresponse.py +21 -0
- compass_api_sdk/models/marketposition.py +5 -5
- compass_api_sdk/models/maxsupplyapyinfo.py +34 -0
- compass_api_sdk/models/mintpreparecompletedresponse.py +46 -0
- compass_api_sdk/models/mintpreparependingresponse.py +65 -0
- compass_api_sdk/models/mintpreparereadyresponse.py +43 -0
- compass_api_sdk/models/mintpreparerequest.py +25 -0
- compass_api_sdk/models/morphoborrowrequest.py +9 -3
- compass_api_sdk/models/morphocheckuserpositionresponse.py +9 -3
- compass_api_sdk/models/morphodepositrequest.py +9 -3
- compass_api_sdk/models/morphogetmarketresponse.py +72 -31
- compass_api_sdk/models/morphomarket.py +26 -20
- compass_api_sdk/models/morphorepayrequest.py +14 -3
- compass_api_sdk/models/morphosupplycollateralrequest.py +14 -3
- compass_api_sdk/models/morphovault.py +10 -10
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +9 -3
- compass_api_sdk/models/morphowithdrawrequest.py +9 -3
- compass_api_sdk/models/movement10percent.py +65 -10
- compass_api_sdk/models/multicallauthorizationrequest.py +9 -9
- compass_api_sdk/models/multicallexecuterequest.py +59 -11
- compass_api_sdk/models/odosswapparams.py +52 -0
- compass_api_sdk/models/odosswaprequest.py +72 -0
- compass_api_sdk/models/odostransactionresponse.py +37 -0
- compass_api_sdk/models/oneinchswapparams.py +59 -0
- compass_api_sdk/models/openposition.py +7 -7
- compass_api_sdk/models/operationtype.py +11 -0
- compass_api_sdk/models/pendlegetmarketresponse.py +52 -2
- compass_api_sdk/models/pendlemanageliquidityparams.py +68 -0
- compass_api_sdk/models/pendlemanageliquidityrequest.py +87 -0
- compass_api_sdk/models/pendleredeemyieldrequest.py +15 -6
- compass_api_sdk/models/pendletradeptparams.py +68 -0
- compass_api_sdk/models/pendletradeptrequest.py +87 -0
- compass_api_sdk/models/pendletradeytparams.py +68 -0
- compass_api_sdk/models/pendletradeytrequest.py +87 -0
- compass_api_sdk/models/pendletxresponse.py +36 -0
- compass_api_sdk/models/permit2typeddata_input.py +46 -0
- compass_api_sdk/models/permit2typeddata_output.py +46 -0
- compass_api_sdk/models/permitfield.py +20 -0
- compass_api_sdk/models/permitmessage.py +39 -0
- compass_api_sdk/models/permittransferfrommessage.py +29 -0
- compass_api_sdk/models/permittypeddataresponse_input.py +50 -0
- compass_api_sdk/models/permittypeddataresponse_output.py +50 -0
- compass_api_sdk/models/portfolio.py +5 -5
- compass_api_sdk/models/protocol.py +13 -0
- compass_api_sdk/models/reserve.py +6 -15
- compass_api_sdk/models/safetransactionparams.py +78 -0
- compass_api_sdk/models/safetransactionresponse.py +28 -0
- compass_api_sdk/models/safetxfield.py +20 -0
- compass_api_sdk/models/safetxmessage.py +66 -0
- compass_api_sdk/models/setallowanceparams.py +5 -16
- compass_api_sdk/models/setallowancerequest.py +19 -22
- compass_api_sdk/models/skybuyrequest.py +12 -9
- compass_api_sdk/models/skydepositrequest.py +13 -9
- compass_api_sdk/models/skysellrequest.py +12 -9
- compass_api_sdk/models/skywithdrawrequest.py +13 -9
- compass_api_sdk/models/sponsorgasrequest.py +71 -0
- compass_api_sdk/models/sponsorgasresponse.py +14 -0
- compass_api_sdk/models/supportedchaininfo.py +19 -0
- compass_api_sdk/models/tokenbalanceresponse.py +5 -15
- compass_api_sdk/models/tokenconfig.py +30 -0
- compass_api_sdk/models/tokenlistresponse.py +21 -0
- compass_api_sdk/models/tokenmarketdata.py +27 -0
- compass_api_sdk/models/tokenpermissions.py +20 -0
- compass_api_sdk/models/tokentransferparams.py +54 -0
- compass_api_sdk/models/tokentransferrequest.py +23 -27
- compass_api_sdk/models/transactionresponse.py +31 -0
- compass_api_sdk/models/{compass_api_backend_models_vaults_read_response_vault_asset.py → underlyingtoken.py} +2 -2
- compass_api_sdk/models/uniswapbuyexactlyparams.py +19 -41
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +31 -44
- compass_api_sdk/models/uniswapbuyexactlytransactionresponse.py +37 -0
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +15 -6
- compass_api_sdk/models/uniswapmintliquidityprovisionparams.py +8 -25
- compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +23 -31
- compass_api_sdk/models/uniswappoolpriceresponse.py +8 -25
- compass_api_sdk/models/uniswappositionssolidityresponse.py +42 -2
- compass_api_sdk/models/uniswapsellexactlyparams.py +19 -41
- compass_api_sdk/models/uniswapsellexactlyrequest.py +31 -44
- compass_api_sdk/models/uniswapsellexactlytransactionresponse.py +37 -0
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +15 -6
- compass_api_sdk/models/unsignedmulticalltransaction.py +44 -13
- compass_api_sdk/models/unsignedtransaction.py +44 -13
- compass_api_sdk/models/unwrapwethrequest.py +15 -6
- compass_api_sdk/models/useroperation.py +61 -49
- compass_api_sdk/models/useroperationresponse.py +2 -2
- compass_api_sdk/models/userstate.py +3 -3
- compass_api_sdk/models/v1_aave_aave_supported_tokensop.py +69 -0
- compass_api_sdk/models/v1_aave_avg_rateop.py +83 -0
- compass_api_sdk/models/{aave_historical_transactionsop.py → v1_aave_historical_transactionsop.py} +21 -25
- compass_api_sdk/models/v1_aave_liquidity_changeop.py +45 -0
- compass_api_sdk/models/{pendle_marketop.py → v1_aave_rateop.py} +16 -20
- compass_api_sdk/models/v1_aave_reserve_overviewop.py +76 -0
- compass_api_sdk/models/v1_aave_std_rateop.py +83 -0
- compass_api_sdk/models/v1_aave_token_priceop.py +76 -0
- compass_api_sdk/models/v1_aave_user_position_per_tokenop.py +83 -0
- compass_api_sdk/models/{aave_user_position_summaryop.py → v1_aave_user_position_summaryop.py} +16 -20
- compass_api_sdk/models/v1_aerodrome_slipstream_liquidity_provision_positionsop.py +76 -0
- compass_api_sdk/models/v1_aerodrome_slipstream_pool_priceop.py +45 -0
- compass_api_sdk/models/v1_ethena_vaultop.py +75 -0
- compass_api_sdk/models/{generic_allowanceop.py → v1_generic_allowanceop.py} +28 -41
- compass_api_sdk/models/{generic_ensop.py → v1_generic_ensop.py} +8 -14
- compass_api_sdk/models/{generic_portfolioop.py → v1_generic_portfolioop.py} +10 -14
- compass_api_sdk/models/v1_generic_supported_chainsop.py +57 -0
- compass_api_sdk/models/{morpho_market_positionop.py → v1_morpho_market_positionop.py} +11 -10
- compass_api_sdk/models/{morpho_marketop.py → v1_morpho_marketop.py} +10 -9
- compass_api_sdk/models/{morpho_marketsop.py → v1_morpho_marketsop.py} +13 -12
- compass_api_sdk/models/{morpho_user_positionop.py → v1_morpho_user_positionop.py} +10 -9
- compass_api_sdk/models/{vaults_vaultop.py → v1_morpho_vaultop.py} +16 -20
- compass_api_sdk/models/{morpho_vaultsop.py → v1_morpho_vaultsop.py} +11 -10
- compass_api_sdk/models/{pendle_positionop.py → v1_pendle_marketop.py} +24 -27
- compass_api_sdk/models/v1_pendle_marketsop.py +24 -0
- compass_api_sdk/models/{pendle_positionsop.py → v1_pendle_positionsop.py} +10 -14
- compass_api_sdk/models/v1_sky_positionop.py +29 -0
- compass_api_sdk/models/v1_token_balanceop.py +38 -0
- compass_api_sdk/models/v1_token_listop.py +24 -0
- compass_api_sdk/models/v1_token_priceop.py +76 -0
- compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +27 -0
- compass_api_sdk/models/{uniswap_liquidity_provision_in_rangeop.py → v1_uniswap_liquidity_provision_in_rangeop.py} +10 -14
- compass_api_sdk/models/{uniswap_liquidity_provision_positionsop.py → v1_uniswap_liquidity_provision_positionsop.py} +10 -14
- compass_api_sdk/models/v1_uniswap_pool_priceop.py +58 -0
- compass_api_sdk/models/v1_uniswap_quote_buy_exactlyop.py +79 -0
- compass_api_sdk/models/v1_uniswap_quote_sell_exactlyop.py +79 -0
- compass_api_sdk/models/v1_vaults_vaultop.py +84 -0
- compass_api_sdk/models/v1_wildcat_marketop.py +82 -0
- compass_api_sdk/models/v2_cctp_mintop.py +47 -0
- compass_api_sdk/models/v2_earn_aave_marketsop.py +57 -0
- compass_api_sdk/models/v2_earn_positionsop.py +56 -0
- compass_api_sdk/models/v2_earn_vaultsop.py +105 -0
- compass_api_sdk/models/v2bundlerequest.py +33 -0
- compass_api_sdk/models/v2bundleresponse.py +67 -0
- compass_api_sdk/models/v2useroperation.py +37 -0
- compass_api_sdk/models/vault.py +14 -14
- compass_api_sdk/models/vaultdepositparams.py +85 -0
- compass_api_sdk/models/vaultdepositrequest.py +15 -6
- compass_api_sdk/models/vaultgetvaultresponse.py +21 -11
- compass_api_sdk/models/vaultinfo.py +129 -0
- compass_api_sdk/models/vaultsresponse.py +30 -0
- compass_api_sdk/models/vaultvenue.py +27 -0
- compass_api_sdk/models/vaultwithdrawparams.py +75 -0
- compass_api_sdk/models/vaultwithdrawrequest.py +15 -6
- compass_api_sdk/models/wildcatgetmarketresponse.py +151 -0
- compass_api_sdk/models/{redeemunderlying.py → withdraw.py} +2 -2
- compass_api_sdk/models/wrapethrequest.py +15 -6
- compass_api_sdk/morpho.py +481 -816
- compass_api_sdk/pendle.py +495 -1384
- compass_api_sdk/sdk.py +39 -13
- compass_api_sdk/sky.py +275 -240
- compass_api_sdk/smart_account.py +37 -50
- compass_api_sdk/swap.py +248 -0
- compass_api_sdk/token.py +1192 -0
- compass_api_sdk/transaction_bundler.py +151 -184
- compass_api_sdk/uniswap_v3.py +531 -620
- compass_api_sdk/universal.py +181 -932
- compass_api_sdk/utils/__init__.py +18 -5
- compass_api_sdk/utils/annotations.py +32 -8
- compass_api_sdk/utils/eventstreaming.py +10 -0
- compass_api_sdk/utils/forms.py +21 -10
- compass_api_sdk/utils/queryparams.py +14 -2
- compass_api_sdk/utils/retries.py +69 -5
- compass_api_sdk/utils/serializers.py +3 -2
- compass_api_sdk/utils/unmarshal_json_response.py +38 -0
- compass_api_sdk/wildcat.py +208 -0
- compass_api_sdk-2.0.21rc1.dist-info/METADATA +623 -0
- compass_api_sdk-2.0.21rc1.dist-info/RECORD +346 -0
- {compass_api_sdk-0.9.35.dist-info → compass_api_sdk-2.0.21rc1.dist-info}/WHEEL +1 -1
- compass_api_sdk/models/aave_avg_rateop.py +0 -141
- compass_api_sdk/models/aave_liquidity_changeop.py +0 -103
- compass_api_sdk/models/aave_rateop.py +0 -134
- compass_api_sdk/models/aave_reserve_overviewop.py +0 -134
- compass_api_sdk/models/aave_std_rateop.py +0 -141
- compass_api_sdk/models/aave_token_priceop.py +0 -134
- compass_api_sdk/models/aave_user_position_per_tokenop.py +0 -141
- compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +0 -37
- compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +0 -159
- compass_api_sdk/models/aerodromeposition.py +0 -70
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_vaultstate.py +0 -53
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_vaultstate.py +0 -32
- compass_api_sdk/models/generic_supported_tokensop.py +0 -28
- compass_api_sdk/models/generic_visualize_portfolioop.py +0 -37
- compass_api_sdk/models/image.py +0 -15
- compass_api_sdk/models/liquidity.py +0 -16
- compass_api_sdk/models/metadata.py +0 -50
- compass_api_sdk/models/morpho_vault_positionop.py +0 -37
- compass_api_sdk/models/morpho_vaultop.py +0 -30
- compass_api_sdk/models/morphocheckvaultpositionresponse.py +0 -20
- compass_api_sdk/models/morphogetvaultresponse.py +0 -86
- compass_api_sdk/models/pendle_marketsop.py +0 -28
- compass_api_sdk/models/pendleaddliquidityparams.py +0 -50
- compass_api_sdk/models/pendleaddliquidityrequest.py +0 -61
- compass_api_sdk/models/pendlebuyptparams.py +0 -48
- compass_api_sdk/models/pendlebuyptrequest.py +0 -59
- compass_api_sdk/models/pendlebuyytparams.py +0 -48
- compass_api_sdk/models/pendlebuyytrequest.py +0 -59
- compass_api_sdk/models/pendlegetuserpositionresponse.py +0 -56
- compass_api_sdk/models/pendleremoveliquidityparams.py +0 -50
- compass_api_sdk/models/pendleremoveliquidityrequest.py +0 -61
- compass_api_sdk/models/pendlesellptparams.py +0 -48
- compass_api_sdk/models/pendlesellptrequest.py +0 -61
- compass_api_sdk/models/pendlesellytparams.py +0 -48
- compass_api_sdk/models/pendlesellytrequest.py +0 -61
- compass_api_sdk/models/sky_positionop.py +0 -31
- compass_api_sdk/models/token_addressop.py +0 -89
- compass_api_sdk/models/token_balanceop.py +0 -55
- compass_api_sdk/models/token_enum.py +0 -57
- compass_api_sdk/models/token_priceop.py +0 -89
- compass_api_sdk/models/tokenaddressresponse.py +0 -15
- compass_api_sdk/models/tokeninfo.py +0 -17
- compass_api_sdk/models/tokentransfererc20params.py +0 -63
- compass_api_sdk/models/txresponse.py +0 -27
- compass_api_sdk/models/uniswap_pool_priceop.py +0 -170
- compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +0 -191
- compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +0 -191
- compass_api_sdk/models/userposition.py +0 -16
- compass_api_sdk/models/vaultposition.py +0 -24
- compass_api_sdk-0.9.35.dist-info/METADATA +0 -558
- compass_api_sdk-0.9.35.dist-info/RECORD +0 -260
|
@@ -4,15 +4,16 @@ from .basesdk import BaseSDK
|
|
|
4
4
|
from compass_api_sdk import errors, models, utils
|
|
5
5
|
from compass_api_sdk._hooks import HookContext
|
|
6
6
|
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
7
|
+
from compass_api_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
7
8
|
from typing import Any, Mapping, Optional, Union
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class ERC4626Vaults(BaseSDK):
|
|
11
|
-
def
|
|
12
|
+
def vaults_vault(
|
|
12
13
|
self,
|
|
13
14
|
*,
|
|
14
|
-
chain: models.
|
|
15
|
-
vault_address: str
|
|
15
|
+
chain: models.V1VaultsVaultChain,
|
|
16
|
+
vault_address: str,
|
|
16
17
|
block: OptionalNullable[int] = UNSET,
|
|
17
18
|
user_address: OptionalNullable[str] = UNSET,
|
|
18
19
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -22,9 +23,11 @@ class ERC4626Vaults(BaseSDK):
|
|
|
22
23
|
) -> models.VaultGetVaultResponse:
|
|
23
24
|
r"""Get Vault & User Position
|
|
24
25
|
|
|
25
|
-
Get Vault & User Position.
|
|
26
|
+
Get Vault data & User Position.
|
|
27
|
+
|
|
28
|
+
The user position is only included if 'user_address' parameter is included.
|
|
26
29
|
|
|
27
|
-
:param chain:
|
|
30
|
+
:param chain:
|
|
28
31
|
:param vault_address: The vault address of the desired vault position.
|
|
29
32
|
:param block: Optional block number (defaults to latest).
|
|
30
33
|
:param user_address: The user address of the desired vault position. Only include if you would like the user position included in the response. Defaults to `None`.
|
|
@@ -43,7 +46,7 @@ class ERC4626Vaults(BaseSDK):
|
|
|
43
46
|
else:
|
|
44
47
|
base_url = self._get_url(base_url, url_variables)
|
|
45
48
|
|
|
46
|
-
request = models.
|
|
49
|
+
request = models.V1VaultsVaultRequest(
|
|
47
50
|
chain=chain,
|
|
48
51
|
block=block,
|
|
49
52
|
vault_address=vault_address,
|
|
@@ -52,7 +55,7 @@ class ERC4626Vaults(BaseSDK):
|
|
|
52
55
|
|
|
53
56
|
req = self._build_request(
|
|
54
57
|
method="GET",
|
|
55
|
-
path="/
|
|
58
|
+
path="/v1/vaults/vault",
|
|
56
59
|
base_url=base_url,
|
|
57
60
|
url_variables=url_variables,
|
|
58
61
|
request=request,
|
|
@@ -63,6 +66,7 @@ class ERC4626Vaults(BaseSDK):
|
|
|
63
66
|
accept_header_value="application/json",
|
|
64
67
|
http_headers=http_headers,
|
|
65
68
|
security=self.sdk_configuration.security,
|
|
69
|
+
allow_empty_value=None,
|
|
66
70
|
timeout_ms=timeout_ms,
|
|
67
71
|
)
|
|
68
72
|
|
|
@@ -78,8 +82,8 @@ class ERC4626Vaults(BaseSDK):
|
|
|
78
82
|
hook_ctx=HookContext(
|
|
79
83
|
config=self.sdk_configuration,
|
|
80
84
|
base_url=base_url or "",
|
|
81
|
-
operation_id="
|
|
82
|
-
oauth2_scopes=
|
|
85
|
+
operation_id="v1_vaults_vault",
|
|
86
|
+
oauth2_scopes=None,
|
|
83
87
|
security_source=self.sdk_configuration.security,
|
|
84
88
|
),
|
|
85
89
|
request=req,
|
|
@@ -89,37 +93,26 @@ class ERC4626Vaults(BaseSDK):
|
|
|
89
93
|
|
|
90
94
|
response_data: Any = None
|
|
91
95
|
if utils.match_response(http_res, "200", "application/json"):
|
|
92
|
-
return
|
|
96
|
+
return unmarshal_json_response(models.VaultGetVaultResponse, http_res)
|
|
93
97
|
if utils.match_response(http_res, "422", "application/json"):
|
|
94
|
-
response_data =
|
|
95
|
-
|
|
98
|
+
response_data = unmarshal_json_response(
|
|
99
|
+
errors.HTTPValidationErrorData, http_res
|
|
96
100
|
)
|
|
97
|
-
raise errors.HTTPValidationError(
|
|
101
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
98
102
|
if utils.match_response(http_res, "4XX", "*"):
|
|
99
103
|
http_res_text = utils.stream_to_text(http_res)
|
|
100
|
-
raise errors.APIError(
|
|
101
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
102
|
-
)
|
|
104
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
103
105
|
if utils.match_response(http_res, "5XX", "*"):
|
|
104
106
|
http_res_text = utils.stream_to_text(http_res)
|
|
105
|
-
raise errors.APIError(
|
|
106
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
107
|
-
)
|
|
107
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
111
|
-
raise errors.APIError(
|
|
112
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
113
|
-
http_res.status_code,
|
|
114
|
-
http_res_text,
|
|
115
|
-
http_res,
|
|
116
|
-
)
|
|
109
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
117
110
|
|
|
118
|
-
async def
|
|
111
|
+
async def vaults_vault_async(
|
|
119
112
|
self,
|
|
120
113
|
*,
|
|
121
|
-
chain: models.
|
|
122
|
-
vault_address: str
|
|
114
|
+
chain: models.V1VaultsVaultChain,
|
|
115
|
+
vault_address: str,
|
|
123
116
|
block: OptionalNullable[int] = UNSET,
|
|
124
117
|
user_address: OptionalNullable[str] = UNSET,
|
|
125
118
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -129,9 +122,11 @@ class ERC4626Vaults(BaseSDK):
|
|
|
129
122
|
) -> models.VaultGetVaultResponse:
|
|
130
123
|
r"""Get Vault & User Position
|
|
131
124
|
|
|
132
|
-
Get Vault & User Position.
|
|
125
|
+
Get Vault data & User Position.
|
|
126
|
+
|
|
127
|
+
The user position is only included if 'user_address' parameter is included.
|
|
133
128
|
|
|
134
|
-
:param chain:
|
|
129
|
+
:param chain:
|
|
135
130
|
:param vault_address: The vault address of the desired vault position.
|
|
136
131
|
:param block: Optional block number (defaults to latest).
|
|
137
132
|
:param user_address: The user address of the desired vault position. Only include if you would like the user position included in the response. Defaults to `None`.
|
|
@@ -150,7 +145,7 @@ class ERC4626Vaults(BaseSDK):
|
|
|
150
145
|
else:
|
|
151
146
|
base_url = self._get_url(base_url, url_variables)
|
|
152
147
|
|
|
153
|
-
request = models.
|
|
148
|
+
request = models.V1VaultsVaultRequest(
|
|
154
149
|
chain=chain,
|
|
155
150
|
block=block,
|
|
156
151
|
vault_address=vault_address,
|
|
@@ -159,7 +154,7 @@ class ERC4626Vaults(BaseSDK):
|
|
|
159
154
|
|
|
160
155
|
req = self._build_request_async(
|
|
161
156
|
method="GET",
|
|
162
|
-
path="/
|
|
157
|
+
path="/v1/vaults/vault",
|
|
163
158
|
base_url=base_url,
|
|
164
159
|
url_variables=url_variables,
|
|
165
160
|
request=request,
|
|
@@ -170,6 +165,7 @@ class ERC4626Vaults(BaseSDK):
|
|
|
170
165
|
accept_header_value="application/json",
|
|
171
166
|
http_headers=http_headers,
|
|
172
167
|
security=self.sdk_configuration.security,
|
|
168
|
+
allow_empty_value=None,
|
|
173
169
|
timeout_ms=timeout_ms,
|
|
174
170
|
)
|
|
175
171
|
|
|
@@ -185,8 +181,8 @@ class ERC4626Vaults(BaseSDK):
|
|
|
185
181
|
hook_ctx=HookContext(
|
|
186
182
|
config=self.sdk_configuration,
|
|
187
183
|
base_url=base_url or "",
|
|
188
|
-
operation_id="
|
|
189
|
-
oauth2_scopes=
|
|
184
|
+
operation_id="v1_vaults_vault",
|
|
185
|
+
oauth2_scopes=None,
|
|
190
186
|
security_source=self.sdk_configuration.security,
|
|
191
187
|
),
|
|
192
188
|
request=req,
|
|
@@ -196,58 +192,57 @@ class ERC4626Vaults(BaseSDK):
|
|
|
196
192
|
|
|
197
193
|
response_data: Any = None
|
|
198
194
|
if utils.match_response(http_res, "200", "application/json"):
|
|
199
|
-
return
|
|
195
|
+
return unmarshal_json_response(models.VaultGetVaultResponse, http_res)
|
|
200
196
|
if utils.match_response(http_res, "422", "application/json"):
|
|
201
|
-
response_data =
|
|
202
|
-
|
|
197
|
+
response_data = unmarshal_json_response(
|
|
198
|
+
errors.HTTPValidationErrorData, http_res
|
|
203
199
|
)
|
|
204
|
-
raise errors.HTTPValidationError(
|
|
200
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
205
201
|
if utils.match_response(http_res, "4XX", "*"):
|
|
206
202
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
207
|
-
raise errors.APIError(
|
|
208
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
209
|
-
)
|
|
203
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
210
204
|
if utils.match_response(http_res, "5XX", "*"):
|
|
211
205
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
212
|
-
raise errors.APIError(
|
|
213
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
214
|
-
)
|
|
206
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
215
207
|
|
|
216
|
-
|
|
217
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
218
|
-
raise errors.APIError(
|
|
219
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
220
|
-
http_res.status_code,
|
|
221
|
-
http_res_text,
|
|
222
|
-
http_res,
|
|
223
|
-
)
|
|
208
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
224
209
|
|
|
225
|
-
def
|
|
210
|
+
def vaults_deposit(
|
|
226
211
|
self,
|
|
227
212
|
*,
|
|
228
213
|
vault_address: str,
|
|
229
214
|
amount: Union[
|
|
230
215
|
models.VaultDepositRequestAmount, models.VaultDepositRequestAmountTypedDict
|
|
231
216
|
],
|
|
232
|
-
chain: models.
|
|
217
|
+
chain: models.VaultDepositRequestChain,
|
|
233
218
|
sender: str,
|
|
234
219
|
receiver: OptionalNullable[str] = UNSET,
|
|
220
|
+
estimate_gas: Optional[bool] = None,
|
|
235
221
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
236
222
|
server_url: Optional[str] = None,
|
|
237
223
|
timeout_ms: Optional[int] = None,
|
|
238
224
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
239
|
-
) -> models.
|
|
225
|
+
) -> models.TransactionResponse:
|
|
240
226
|
r"""Deposit to Vault
|
|
241
227
|
|
|
242
228
|
Deposit tokens into a Vault (ERC-4626 Standard) to earn passive yield.
|
|
243
229
|
|
|
244
230
|
Each vault accepts one unique token that can be deposited.
|
|
231
|
+
<Info>
|
|
232
|
+
**Required Allowances**
|
|
233
|
+
|
|
234
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
235
|
+
|
|
236
|
+
- `<vault_address>`
|
|
237
|
+
</Info>
|
|
238
|
+
|
|
245
239
|
|
|
246
240
|
:param vault_address: The vault address you are depositing to.
|
|
247
241
|
:param amount: The amount of tokens to deposit into the vault.
|
|
248
|
-
:param chain:
|
|
242
|
+
:param chain:
|
|
249
243
|
:param sender: The address of the transaction sender.
|
|
250
244
|
:param receiver: The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender.
|
|
245
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
251
246
|
:param retries: Override the default retry configuration for this method
|
|
252
247
|
:param server_url: Override the default server URL for this method
|
|
253
248
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -269,11 +264,12 @@ class ERC4626Vaults(BaseSDK):
|
|
|
269
264
|
receiver=receiver,
|
|
270
265
|
chain=chain,
|
|
271
266
|
sender=sender,
|
|
267
|
+
estimate_gas=estimate_gas,
|
|
272
268
|
)
|
|
273
269
|
|
|
274
270
|
req = self._build_request(
|
|
275
271
|
method="POST",
|
|
276
|
-
path="/
|
|
272
|
+
path="/v1/vaults/deposit",
|
|
277
273
|
base_url=base_url,
|
|
278
274
|
url_variables=url_variables,
|
|
279
275
|
request=request,
|
|
@@ -287,6 +283,7 @@ class ERC4626Vaults(BaseSDK):
|
|
|
287
283
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
288
284
|
request, False, False, "json", models.VaultDepositRequest
|
|
289
285
|
),
|
|
286
|
+
allow_empty_value=None,
|
|
290
287
|
timeout_ms=timeout_ms,
|
|
291
288
|
)
|
|
292
289
|
|
|
@@ -302,8 +299,8 @@ class ERC4626Vaults(BaseSDK):
|
|
|
302
299
|
hook_ctx=HookContext(
|
|
303
300
|
config=self.sdk_configuration,
|
|
304
301
|
base_url=base_url or "",
|
|
305
|
-
operation_id="
|
|
306
|
-
oauth2_scopes=
|
|
302
|
+
operation_id="v1_vaults_deposit",
|
|
303
|
+
oauth2_scopes=None,
|
|
307
304
|
security_source=self.sdk_configuration.security,
|
|
308
305
|
),
|
|
309
306
|
request=req,
|
|
@@ -313,58 +310,57 @@ class ERC4626Vaults(BaseSDK):
|
|
|
313
310
|
|
|
314
311
|
response_data: Any = None
|
|
315
312
|
if utils.match_response(http_res, "200", "application/json"):
|
|
316
|
-
return
|
|
313
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
317
314
|
if utils.match_response(http_res, "422", "application/json"):
|
|
318
|
-
response_data =
|
|
319
|
-
|
|
315
|
+
response_data = unmarshal_json_response(
|
|
316
|
+
errors.HTTPValidationErrorData, http_res
|
|
320
317
|
)
|
|
321
|
-
raise errors.HTTPValidationError(
|
|
318
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
322
319
|
if utils.match_response(http_res, "4XX", "*"):
|
|
323
320
|
http_res_text = utils.stream_to_text(http_res)
|
|
324
|
-
raise errors.APIError(
|
|
325
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
326
|
-
)
|
|
321
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
327
322
|
if utils.match_response(http_res, "5XX", "*"):
|
|
328
323
|
http_res_text = utils.stream_to_text(http_res)
|
|
329
|
-
raise errors.APIError(
|
|
330
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
331
|
-
)
|
|
324
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
332
325
|
|
|
333
|
-
|
|
334
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
335
|
-
raise errors.APIError(
|
|
336
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
337
|
-
http_res.status_code,
|
|
338
|
-
http_res_text,
|
|
339
|
-
http_res,
|
|
340
|
-
)
|
|
326
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
341
327
|
|
|
342
|
-
async def
|
|
328
|
+
async def vaults_deposit_async(
|
|
343
329
|
self,
|
|
344
330
|
*,
|
|
345
331
|
vault_address: str,
|
|
346
332
|
amount: Union[
|
|
347
333
|
models.VaultDepositRequestAmount, models.VaultDepositRequestAmountTypedDict
|
|
348
334
|
],
|
|
349
|
-
chain: models.
|
|
335
|
+
chain: models.VaultDepositRequestChain,
|
|
350
336
|
sender: str,
|
|
351
337
|
receiver: OptionalNullable[str] = UNSET,
|
|
338
|
+
estimate_gas: Optional[bool] = None,
|
|
352
339
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
353
340
|
server_url: Optional[str] = None,
|
|
354
341
|
timeout_ms: Optional[int] = None,
|
|
355
342
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
356
|
-
) -> models.
|
|
343
|
+
) -> models.TransactionResponse:
|
|
357
344
|
r"""Deposit to Vault
|
|
358
345
|
|
|
359
346
|
Deposit tokens into a Vault (ERC-4626 Standard) to earn passive yield.
|
|
360
347
|
|
|
361
348
|
Each vault accepts one unique token that can be deposited.
|
|
349
|
+
<Info>
|
|
350
|
+
**Required Allowances**
|
|
351
|
+
|
|
352
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
353
|
+
|
|
354
|
+
- `<vault_address>`
|
|
355
|
+
</Info>
|
|
356
|
+
|
|
362
357
|
|
|
363
358
|
:param vault_address: The vault address you are depositing to.
|
|
364
359
|
:param amount: The amount of tokens to deposit into the vault.
|
|
365
|
-
:param chain:
|
|
360
|
+
:param chain:
|
|
366
361
|
:param sender: The address of the transaction sender.
|
|
367
362
|
:param receiver: The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender.
|
|
363
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
368
364
|
:param retries: Override the default retry configuration for this method
|
|
369
365
|
:param server_url: Override the default server URL for this method
|
|
370
366
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -386,11 +382,12 @@ class ERC4626Vaults(BaseSDK):
|
|
|
386
382
|
receiver=receiver,
|
|
387
383
|
chain=chain,
|
|
388
384
|
sender=sender,
|
|
385
|
+
estimate_gas=estimate_gas,
|
|
389
386
|
)
|
|
390
387
|
|
|
391
388
|
req = self._build_request_async(
|
|
392
389
|
method="POST",
|
|
393
|
-
path="/
|
|
390
|
+
path="/v1/vaults/deposit",
|
|
394
391
|
base_url=base_url,
|
|
395
392
|
url_variables=url_variables,
|
|
396
393
|
request=request,
|
|
@@ -404,6 +401,7 @@ class ERC4626Vaults(BaseSDK):
|
|
|
404
401
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
405
402
|
request, False, False, "json", models.VaultDepositRequest
|
|
406
403
|
),
|
|
404
|
+
allow_empty_value=None,
|
|
407
405
|
timeout_ms=timeout_ms,
|
|
408
406
|
)
|
|
409
407
|
|
|
@@ -419,8 +417,8 @@ class ERC4626Vaults(BaseSDK):
|
|
|
419
417
|
hook_ctx=HookContext(
|
|
420
418
|
config=self.sdk_configuration,
|
|
421
419
|
base_url=base_url or "",
|
|
422
|
-
operation_id="
|
|
423
|
-
oauth2_scopes=
|
|
420
|
+
operation_id="v1_vaults_deposit",
|
|
421
|
+
oauth2_scopes=None,
|
|
424
422
|
security_source=self.sdk_configuration.security,
|
|
425
423
|
),
|
|
426
424
|
request=req,
|
|
@@ -430,45 +428,35 @@ class ERC4626Vaults(BaseSDK):
|
|
|
430
428
|
|
|
431
429
|
response_data: Any = None
|
|
432
430
|
if utils.match_response(http_res, "200", "application/json"):
|
|
433
|
-
return
|
|
431
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
434
432
|
if utils.match_response(http_res, "422", "application/json"):
|
|
435
|
-
response_data =
|
|
436
|
-
|
|
433
|
+
response_data = unmarshal_json_response(
|
|
434
|
+
errors.HTTPValidationErrorData, http_res
|
|
437
435
|
)
|
|
438
|
-
raise errors.HTTPValidationError(
|
|
436
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
439
437
|
if utils.match_response(http_res, "4XX", "*"):
|
|
440
438
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
441
|
-
raise errors.APIError(
|
|
442
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
443
|
-
)
|
|
439
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
444
440
|
if utils.match_response(http_res, "5XX", "*"):
|
|
445
441
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
446
|
-
raise errors.APIError(
|
|
447
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
448
|
-
)
|
|
442
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
449
443
|
|
|
450
|
-
|
|
451
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
452
|
-
raise errors.APIError(
|
|
453
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
454
|
-
http_res.status_code,
|
|
455
|
-
http_res_text,
|
|
456
|
-
http_res,
|
|
457
|
-
)
|
|
444
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
458
445
|
|
|
459
|
-
def
|
|
446
|
+
def vaults_withdraw(
|
|
460
447
|
self,
|
|
461
448
|
*,
|
|
462
449
|
vault_address: str,
|
|
463
450
|
amount: Any,
|
|
464
|
-
chain: models.
|
|
451
|
+
chain: models.VaultWithdrawRequestChain,
|
|
465
452
|
sender: str,
|
|
466
453
|
receiver: OptionalNullable[str] = UNSET,
|
|
454
|
+
estimate_gas: Optional[bool] = None,
|
|
467
455
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
468
456
|
server_url: Optional[str] = None,
|
|
469
457
|
timeout_ms: Optional[int] = None,
|
|
470
458
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
471
|
-
) -> models.
|
|
459
|
+
) -> models.TransactionResponse:
|
|
472
460
|
r"""Withdraw from Vault
|
|
473
461
|
|
|
474
462
|
Withdraw deposited tokens from a Vault (ERC-4626 Standard).
|
|
@@ -479,9 +467,10 @@ class ERC4626Vaults(BaseSDK):
|
|
|
479
467
|
|
|
480
468
|
:param vault_address: The vault address you are withdrawing from.
|
|
481
469
|
:param amount: The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn.
|
|
482
|
-
:param chain:
|
|
470
|
+
:param chain:
|
|
483
471
|
:param sender: The address of the transaction sender.
|
|
484
472
|
:param receiver: The address which will receive the tokens withdrawn. Defaults to the sender.
|
|
473
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
485
474
|
:param retries: Override the default retry configuration for this method
|
|
486
475
|
:param server_url: Override the default server URL for this method
|
|
487
476
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -503,11 +492,12 @@ class ERC4626Vaults(BaseSDK):
|
|
|
503
492
|
receiver=receiver,
|
|
504
493
|
chain=chain,
|
|
505
494
|
sender=sender,
|
|
495
|
+
estimate_gas=estimate_gas,
|
|
506
496
|
)
|
|
507
497
|
|
|
508
498
|
req = self._build_request(
|
|
509
499
|
method="POST",
|
|
510
|
-
path="/
|
|
500
|
+
path="/v1/vaults/withdraw",
|
|
511
501
|
base_url=base_url,
|
|
512
502
|
url_variables=url_variables,
|
|
513
503
|
request=request,
|
|
@@ -521,6 +511,7 @@ class ERC4626Vaults(BaseSDK):
|
|
|
521
511
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
522
512
|
request, False, False, "json", models.VaultWithdrawRequest
|
|
523
513
|
),
|
|
514
|
+
allow_empty_value=None,
|
|
524
515
|
timeout_ms=timeout_ms,
|
|
525
516
|
)
|
|
526
517
|
|
|
@@ -536,8 +527,8 @@ class ERC4626Vaults(BaseSDK):
|
|
|
536
527
|
hook_ctx=HookContext(
|
|
537
528
|
config=self.sdk_configuration,
|
|
538
529
|
base_url=base_url or "",
|
|
539
|
-
operation_id="
|
|
540
|
-
oauth2_scopes=
|
|
530
|
+
operation_id="v1_vaults_withdraw",
|
|
531
|
+
oauth2_scopes=None,
|
|
541
532
|
security_source=self.sdk_configuration.security,
|
|
542
533
|
),
|
|
543
534
|
request=req,
|
|
@@ -547,45 +538,35 @@ class ERC4626Vaults(BaseSDK):
|
|
|
547
538
|
|
|
548
539
|
response_data: Any = None
|
|
549
540
|
if utils.match_response(http_res, "200", "application/json"):
|
|
550
|
-
return
|
|
541
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
551
542
|
if utils.match_response(http_res, "422", "application/json"):
|
|
552
|
-
response_data =
|
|
553
|
-
|
|
543
|
+
response_data = unmarshal_json_response(
|
|
544
|
+
errors.HTTPValidationErrorData, http_res
|
|
554
545
|
)
|
|
555
|
-
raise errors.HTTPValidationError(
|
|
546
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
556
547
|
if utils.match_response(http_res, "4XX", "*"):
|
|
557
548
|
http_res_text = utils.stream_to_text(http_res)
|
|
558
|
-
raise errors.APIError(
|
|
559
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
560
|
-
)
|
|
549
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
561
550
|
if utils.match_response(http_res, "5XX", "*"):
|
|
562
551
|
http_res_text = utils.stream_to_text(http_res)
|
|
563
|
-
raise errors.APIError(
|
|
564
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
565
|
-
)
|
|
552
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
566
553
|
|
|
567
|
-
|
|
568
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
569
|
-
raise errors.APIError(
|
|
570
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
571
|
-
http_res.status_code,
|
|
572
|
-
http_res_text,
|
|
573
|
-
http_res,
|
|
574
|
-
)
|
|
554
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
575
555
|
|
|
576
|
-
async def
|
|
556
|
+
async def vaults_withdraw_async(
|
|
577
557
|
self,
|
|
578
558
|
*,
|
|
579
559
|
vault_address: str,
|
|
580
560
|
amount: Any,
|
|
581
|
-
chain: models.
|
|
561
|
+
chain: models.VaultWithdrawRequestChain,
|
|
582
562
|
sender: str,
|
|
583
563
|
receiver: OptionalNullable[str] = UNSET,
|
|
564
|
+
estimate_gas: Optional[bool] = None,
|
|
584
565
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
585
566
|
server_url: Optional[str] = None,
|
|
586
567
|
timeout_ms: Optional[int] = None,
|
|
587
568
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
588
|
-
) -> models.
|
|
569
|
+
) -> models.TransactionResponse:
|
|
589
570
|
r"""Withdraw from Vault
|
|
590
571
|
|
|
591
572
|
Withdraw deposited tokens from a Vault (ERC-4626 Standard).
|
|
@@ -596,9 +577,10 @@ class ERC4626Vaults(BaseSDK):
|
|
|
596
577
|
|
|
597
578
|
:param vault_address: The vault address you are withdrawing from.
|
|
598
579
|
:param amount: The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn.
|
|
599
|
-
:param chain:
|
|
580
|
+
:param chain:
|
|
600
581
|
:param sender: The address of the transaction sender.
|
|
601
582
|
:param receiver: The address which will receive the tokens withdrawn. Defaults to the sender.
|
|
583
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
602
584
|
:param retries: Override the default retry configuration for this method
|
|
603
585
|
:param server_url: Override the default server URL for this method
|
|
604
586
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -620,11 +602,12 @@ class ERC4626Vaults(BaseSDK):
|
|
|
620
602
|
receiver=receiver,
|
|
621
603
|
chain=chain,
|
|
622
604
|
sender=sender,
|
|
605
|
+
estimate_gas=estimate_gas,
|
|
623
606
|
)
|
|
624
607
|
|
|
625
608
|
req = self._build_request_async(
|
|
626
609
|
method="POST",
|
|
627
|
-
path="/
|
|
610
|
+
path="/v1/vaults/withdraw",
|
|
628
611
|
base_url=base_url,
|
|
629
612
|
url_variables=url_variables,
|
|
630
613
|
request=request,
|
|
@@ -638,6 +621,7 @@ class ERC4626Vaults(BaseSDK):
|
|
|
638
621
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
639
622
|
request, False, False, "json", models.VaultWithdrawRequest
|
|
640
623
|
),
|
|
624
|
+
allow_empty_value=None,
|
|
641
625
|
timeout_ms=timeout_ms,
|
|
642
626
|
)
|
|
643
627
|
|
|
@@ -653,8 +637,8 @@ class ERC4626Vaults(BaseSDK):
|
|
|
653
637
|
hook_ctx=HookContext(
|
|
654
638
|
config=self.sdk_configuration,
|
|
655
639
|
base_url=base_url or "",
|
|
656
|
-
operation_id="
|
|
657
|
-
oauth2_scopes=
|
|
640
|
+
operation_id="v1_vaults_withdraw",
|
|
641
|
+
oauth2_scopes=None,
|
|
658
642
|
security_source=self.sdk_configuration.security,
|
|
659
643
|
),
|
|
660
644
|
request=req,
|
|
@@ -664,28 +648,17 @@ class ERC4626Vaults(BaseSDK):
|
|
|
664
648
|
|
|
665
649
|
response_data: Any = None
|
|
666
650
|
if utils.match_response(http_res, "200", "application/json"):
|
|
667
|
-
return
|
|
651
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
668
652
|
if utils.match_response(http_res, "422", "application/json"):
|
|
669
|
-
response_data =
|
|
670
|
-
|
|
653
|
+
response_data = unmarshal_json_response(
|
|
654
|
+
errors.HTTPValidationErrorData, http_res
|
|
671
655
|
)
|
|
672
|
-
raise errors.HTTPValidationError(
|
|
656
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
673
657
|
if utils.match_response(http_res, "4XX", "*"):
|
|
674
658
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
675
|
-
raise errors.APIError(
|
|
676
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
677
|
-
)
|
|
659
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
678
660
|
if utils.match_response(http_res, "5XX", "*"):
|
|
679
661
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
680
|
-
raise errors.APIError(
|
|
681
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
682
|
-
)
|
|
662
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
683
663
|
|
|
684
|
-
|
|
685
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
686
|
-
raise errors.APIError(
|
|
687
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
688
|
-
http_res.status_code,
|
|
689
|
-
http_res_text,
|
|
690
|
-
http_res,
|
|
691
|
-
)
|
|
664
|
+
raise errors.APIError("Unexpected response received", http_res)
|