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,14 +4,15 @@ 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, List, Mapping, Optional, Union
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class TransactionBundler(BaseSDK):
|
|
11
|
-
def
|
|
12
|
+
def transaction_bundler_authorization(
|
|
12
13
|
self,
|
|
13
14
|
*,
|
|
14
|
-
chain: models.
|
|
15
|
+
chain: models.MulticallAuthorizationRequestChain,
|
|
15
16
|
sender: str,
|
|
16
17
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
17
18
|
server_url: Optional[str] = None,
|
|
@@ -27,7 +28,7 @@ class TransactionBundler(BaseSDK):
|
|
|
27
28
|
transaction. The authorization includes a nonce and chain ID to guarantee
|
|
28
29
|
transaction uniqueness and proper network targeting.
|
|
29
30
|
|
|
30
|
-
:param chain:
|
|
31
|
+
:param chain:
|
|
31
32
|
:param sender: The Ethereum address to use for authorization
|
|
32
33
|
:param retries: Override the default retry configuration for this method
|
|
33
34
|
:param server_url: Override the default server URL for this method
|
|
@@ -51,7 +52,7 @@ class TransactionBundler(BaseSDK):
|
|
|
51
52
|
|
|
52
53
|
req = self._build_request(
|
|
53
54
|
method="POST",
|
|
54
|
-
path="/
|
|
55
|
+
path="/v1/transaction_bundler/authorization",
|
|
55
56
|
base_url=base_url,
|
|
56
57
|
url_variables=url_variables,
|
|
57
58
|
request=request,
|
|
@@ -65,6 +66,7 @@ class TransactionBundler(BaseSDK):
|
|
|
65
66
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
66
67
|
request, False, False, "json", models.MulticallAuthorizationRequest
|
|
67
68
|
),
|
|
69
|
+
allow_empty_value=None,
|
|
68
70
|
timeout_ms=timeout_ms,
|
|
69
71
|
)
|
|
70
72
|
|
|
@@ -80,8 +82,8 @@ class TransactionBundler(BaseSDK):
|
|
|
80
82
|
hook_ctx=HookContext(
|
|
81
83
|
config=self.sdk_configuration,
|
|
82
84
|
base_url=base_url or "",
|
|
83
|
-
operation_id="
|
|
84
|
-
oauth2_scopes=
|
|
85
|
+
operation_id="v1_transaction_bundler_authorization",
|
|
86
|
+
oauth2_scopes=None,
|
|
85
87
|
security_source=self.sdk_configuration.security,
|
|
86
88
|
),
|
|
87
89
|
request=req,
|
|
@@ -91,38 +93,27 @@ class TransactionBundler(BaseSDK):
|
|
|
91
93
|
|
|
92
94
|
response_data: Any = None
|
|
93
95
|
if utils.match_response(http_res, "200", "application/json"):
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
+
return unmarshal_json_response(
|
|
97
|
+
models.MulticallAuthorizationResponse, http_res
|
|
96
98
|
)
|
|
97
99
|
if utils.match_response(http_res, "422", "application/json"):
|
|
98
|
-
response_data =
|
|
99
|
-
|
|
100
|
+
response_data = unmarshal_json_response(
|
|
101
|
+
errors.HTTPValidationErrorData, http_res
|
|
100
102
|
)
|
|
101
|
-
raise errors.HTTPValidationError(
|
|
103
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
102
104
|
if utils.match_response(http_res, "4XX", "*"):
|
|
103
105
|
http_res_text = utils.stream_to_text(http_res)
|
|
104
|
-
raise errors.APIError(
|
|
105
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
106
|
-
)
|
|
106
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
107
107
|
if utils.match_response(http_res, "5XX", "*"):
|
|
108
108
|
http_res_text = utils.stream_to_text(http_res)
|
|
109
|
-
raise errors.APIError(
|
|
110
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
111
|
-
)
|
|
109
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
112
110
|
|
|
113
|
-
|
|
114
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
115
|
-
raise errors.APIError(
|
|
116
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
117
|
-
http_res.status_code,
|
|
118
|
-
http_res_text,
|
|
119
|
-
http_res,
|
|
120
|
-
)
|
|
111
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
121
112
|
|
|
122
|
-
async def
|
|
113
|
+
async def transaction_bundler_authorization_async(
|
|
123
114
|
self,
|
|
124
115
|
*,
|
|
125
|
-
chain: models.
|
|
116
|
+
chain: models.MulticallAuthorizationRequestChain,
|
|
126
117
|
sender: str,
|
|
127
118
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
128
119
|
server_url: Optional[str] = None,
|
|
@@ -138,7 +129,7 @@ class TransactionBundler(BaseSDK):
|
|
|
138
129
|
transaction. The authorization includes a nonce and chain ID to guarantee
|
|
139
130
|
transaction uniqueness and proper network targeting.
|
|
140
131
|
|
|
141
|
-
:param chain:
|
|
132
|
+
:param chain:
|
|
142
133
|
:param sender: The Ethereum address to use for authorization
|
|
143
134
|
:param retries: Override the default retry configuration for this method
|
|
144
135
|
:param server_url: Override the default server URL for this method
|
|
@@ -162,7 +153,7 @@ class TransactionBundler(BaseSDK):
|
|
|
162
153
|
|
|
163
154
|
req = self._build_request_async(
|
|
164
155
|
method="POST",
|
|
165
|
-
path="/
|
|
156
|
+
path="/v1/transaction_bundler/authorization",
|
|
166
157
|
base_url=base_url,
|
|
167
158
|
url_variables=url_variables,
|
|
168
159
|
request=request,
|
|
@@ -176,6 +167,7 @@ class TransactionBundler(BaseSDK):
|
|
|
176
167
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
177
168
|
request, False, False, "json", models.MulticallAuthorizationRequest
|
|
178
169
|
),
|
|
170
|
+
allow_empty_value=None,
|
|
179
171
|
timeout_ms=timeout_ms,
|
|
180
172
|
)
|
|
181
173
|
|
|
@@ -191,8 +183,8 @@ class TransactionBundler(BaseSDK):
|
|
|
191
183
|
hook_ctx=HookContext(
|
|
192
184
|
config=self.sdk_configuration,
|
|
193
185
|
base_url=base_url or "",
|
|
194
|
-
operation_id="
|
|
195
|
-
oauth2_scopes=
|
|
186
|
+
operation_id="v1_transaction_bundler_authorization",
|
|
187
|
+
oauth2_scopes=None,
|
|
196
188
|
security_source=self.sdk_configuration.security,
|
|
197
189
|
),
|
|
198
190
|
request=req,
|
|
@@ -202,48 +194,38 @@ class TransactionBundler(BaseSDK):
|
|
|
202
194
|
|
|
203
195
|
response_data: Any = None
|
|
204
196
|
if utils.match_response(http_res, "200", "application/json"):
|
|
205
|
-
return
|
|
206
|
-
|
|
197
|
+
return unmarshal_json_response(
|
|
198
|
+
models.MulticallAuthorizationResponse, http_res
|
|
207
199
|
)
|
|
208
200
|
if utils.match_response(http_res, "422", "application/json"):
|
|
209
|
-
response_data =
|
|
210
|
-
|
|
201
|
+
response_data = unmarshal_json_response(
|
|
202
|
+
errors.HTTPValidationErrorData, http_res
|
|
211
203
|
)
|
|
212
|
-
raise errors.HTTPValidationError(
|
|
204
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
213
205
|
if utils.match_response(http_res, "4XX", "*"):
|
|
214
206
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
215
|
-
raise errors.APIError(
|
|
216
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
217
|
-
)
|
|
207
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
218
208
|
if utils.match_response(http_res, "5XX", "*"):
|
|
219
209
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
220
|
-
raise errors.APIError(
|
|
221
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
222
|
-
)
|
|
210
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
223
211
|
|
|
224
|
-
|
|
225
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
226
|
-
raise errors.APIError(
|
|
227
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
228
|
-
http_res.status_code,
|
|
229
|
-
http_res_text,
|
|
230
|
-
http_res,
|
|
231
|
-
)
|
|
212
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
232
213
|
|
|
233
|
-
def
|
|
214
|
+
def transaction_bundler_execute(
|
|
234
215
|
self,
|
|
235
216
|
*,
|
|
236
|
-
chain: models.
|
|
217
|
+
chain: models.MulticallExecuteRequestChain,
|
|
237
218
|
sender: str,
|
|
238
|
-
signed_authorization: Union[
|
|
239
|
-
models.SignedAuthorization, models.SignedAuthorizationTypedDict
|
|
240
|
-
],
|
|
241
219
|
actions: Union[List[models.UserOperation], List[models.UserOperationTypedDict]],
|
|
220
|
+
estimate_gas: Optional[bool] = None,
|
|
221
|
+
signed_authorization: OptionalNullable[
|
|
222
|
+
Union[models.SignedAuthorization, models.SignedAuthorizationTypedDict]
|
|
223
|
+
] = UNSET,
|
|
242
224
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
243
225
|
server_url: Optional[str] = None,
|
|
244
226
|
timeout_ms: Optional[int] = None,
|
|
245
227
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
246
|
-
) -> models.
|
|
228
|
+
) -> models.BundlerTransactionResponse:
|
|
247
229
|
r"""Construct Bundled Transaction
|
|
248
230
|
|
|
249
231
|
Bundle arbitrary transactions together into a single multicall transaction using
|
|
@@ -254,10 +236,11 @@ class TransactionBundler(BaseSDK):
|
|
|
254
236
|
together. The transaction must be authorized using the /authorization endpoint to
|
|
255
237
|
prevent replay attacks.
|
|
256
238
|
|
|
257
|
-
:param chain:
|
|
239
|
+
:param chain:
|
|
258
240
|
:param sender: The address of the transaction sender.
|
|
259
|
-
:param signed_authorization:
|
|
260
241
|
:param actions: List of possible actions for multicall
|
|
242
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
243
|
+
:param signed_authorization: EIP-7702 authorization
|
|
261
244
|
:param retries: Override the default retry configuration for this method
|
|
262
245
|
:param server_url: Override the default server URL for this method
|
|
263
246
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -276,15 +259,16 @@ class TransactionBundler(BaseSDK):
|
|
|
276
259
|
request = models.MulticallExecuteRequest(
|
|
277
260
|
chain=chain,
|
|
278
261
|
sender=sender,
|
|
262
|
+
estimate_gas=estimate_gas,
|
|
279
263
|
signed_authorization=utils.get_pydantic_model(
|
|
280
|
-
signed_authorization, models.SignedAuthorization
|
|
264
|
+
signed_authorization, OptionalNullable[models.SignedAuthorization]
|
|
281
265
|
),
|
|
282
266
|
actions=utils.get_pydantic_model(actions, List[models.UserOperation]),
|
|
283
267
|
)
|
|
284
268
|
|
|
285
269
|
req = self._build_request(
|
|
286
270
|
method="POST",
|
|
287
|
-
path="/
|
|
271
|
+
path="/v1/transaction_bundler/execute",
|
|
288
272
|
base_url=base_url,
|
|
289
273
|
url_variables=url_variables,
|
|
290
274
|
request=request,
|
|
@@ -298,6 +282,7 @@ class TransactionBundler(BaseSDK):
|
|
|
298
282
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
299
283
|
request, False, False, "json", models.MulticallExecuteRequest
|
|
300
284
|
),
|
|
285
|
+
allow_empty_value=None,
|
|
301
286
|
timeout_ms=timeout_ms,
|
|
302
287
|
)
|
|
303
288
|
|
|
@@ -313,8 +298,8 @@ class TransactionBundler(BaseSDK):
|
|
|
313
298
|
hook_ctx=HookContext(
|
|
314
299
|
config=self.sdk_configuration,
|
|
315
300
|
base_url=base_url or "",
|
|
316
|
-
operation_id="
|
|
317
|
-
oauth2_scopes=
|
|
301
|
+
operation_id="v1_transaction_bundler_execute",
|
|
302
|
+
oauth2_scopes=None,
|
|
318
303
|
security_source=self.sdk_configuration.security,
|
|
319
304
|
),
|
|
320
305
|
request=req,
|
|
@@ -324,48 +309,36 @@ class TransactionBundler(BaseSDK):
|
|
|
324
309
|
|
|
325
310
|
response_data: Any = None
|
|
326
311
|
if utils.match_response(http_res, "200", "application/json"):
|
|
327
|
-
return
|
|
328
|
-
http_res.text, models.UnsignedMulticallTransaction
|
|
329
|
-
)
|
|
312
|
+
return unmarshal_json_response(models.BundlerTransactionResponse, http_res)
|
|
330
313
|
if utils.match_response(http_res, "422", "application/json"):
|
|
331
|
-
response_data =
|
|
332
|
-
|
|
314
|
+
response_data = unmarshal_json_response(
|
|
315
|
+
errors.HTTPValidationErrorData, http_res
|
|
333
316
|
)
|
|
334
|
-
raise errors.HTTPValidationError(
|
|
317
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
335
318
|
if utils.match_response(http_res, "4XX", "*"):
|
|
336
319
|
http_res_text = utils.stream_to_text(http_res)
|
|
337
|
-
raise errors.APIError(
|
|
338
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
339
|
-
)
|
|
320
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
340
321
|
if utils.match_response(http_res, "5XX", "*"):
|
|
341
322
|
http_res_text = utils.stream_to_text(http_res)
|
|
342
|
-
raise errors.APIError(
|
|
343
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
344
|
-
)
|
|
323
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
345
324
|
|
|
346
|
-
|
|
347
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
348
|
-
raise errors.APIError(
|
|
349
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
350
|
-
http_res.status_code,
|
|
351
|
-
http_res_text,
|
|
352
|
-
http_res,
|
|
353
|
-
)
|
|
325
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
354
326
|
|
|
355
|
-
async def
|
|
327
|
+
async def transaction_bundler_execute_async(
|
|
356
328
|
self,
|
|
357
329
|
*,
|
|
358
|
-
chain: models.
|
|
330
|
+
chain: models.MulticallExecuteRequestChain,
|
|
359
331
|
sender: str,
|
|
360
|
-
signed_authorization: Union[
|
|
361
|
-
models.SignedAuthorization, models.SignedAuthorizationTypedDict
|
|
362
|
-
],
|
|
363
332
|
actions: Union[List[models.UserOperation], List[models.UserOperationTypedDict]],
|
|
333
|
+
estimate_gas: Optional[bool] = None,
|
|
334
|
+
signed_authorization: OptionalNullable[
|
|
335
|
+
Union[models.SignedAuthorization, models.SignedAuthorizationTypedDict]
|
|
336
|
+
] = UNSET,
|
|
364
337
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
365
338
|
server_url: Optional[str] = None,
|
|
366
339
|
timeout_ms: Optional[int] = None,
|
|
367
340
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
368
|
-
) -> models.
|
|
341
|
+
) -> models.BundlerTransactionResponse:
|
|
369
342
|
r"""Construct Bundled Transaction
|
|
370
343
|
|
|
371
344
|
Bundle arbitrary transactions together into a single multicall transaction using
|
|
@@ -376,10 +349,11 @@ class TransactionBundler(BaseSDK):
|
|
|
376
349
|
together. The transaction must be authorized using the /authorization endpoint to
|
|
377
350
|
prevent replay attacks.
|
|
378
351
|
|
|
379
|
-
:param chain:
|
|
352
|
+
:param chain:
|
|
380
353
|
:param sender: The address of the transaction sender.
|
|
381
|
-
:param signed_authorization:
|
|
382
354
|
:param actions: List of possible actions for multicall
|
|
355
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
356
|
+
:param signed_authorization: EIP-7702 authorization
|
|
383
357
|
:param retries: Override the default retry configuration for this method
|
|
384
358
|
:param server_url: Override the default server URL for this method
|
|
385
359
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -398,15 +372,16 @@ class TransactionBundler(BaseSDK):
|
|
|
398
372
|
request = models.MulticallExecuteRequest(
|
|
399
373
|
chain=chain,
|
|
400
374
|
sender=sender,
|
|
375
|
+
estimate_gas=estimate_gas,
|
|
401
376
|
signed_authorization=utils.get_pydantic_model(
|
|
402
|
-
signed_authorization, models.SignedAuthorization
|
|
377
|
+
signed_authorization, OptionalNullable[models.SignedAuthorization]
|
|
403
378
|
),
|
|
404
379
|
actions=utils.get_pydantic_model(actions, List[models.UserOperation]),
|
|
405
380
|
)
|
|
406
381
|
|
|
407
382
|
req = self._build_request_async(
|
|
408
383
|
method="POST",
|
|
409
|
-
path="/
|
|
384
|
+
path="/v1/transaction_bundler/execute",
|
|
410
385
|
base_url=base_url,
|
|
411
386
|
url_variables=url_variables,
|
|
412
387
|
request=request,
|
|
@@ -420,6 +395,7 @@ class TransactionBundler(BaseSDK):
|
|
|
420
395
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
421
396
|
request, False, False, "json", models.MulticallExecuteRequest
|
|
422
397
|
),
|
|
398
|
+
allow_empty_value=None,
|
|
423
399
|
timeout_ms=timeout_ms,
|
|
424
400
|
)
|
|
425
401
|
|
|
@@ -435,8 +411,8 @@ class TransactionBundler(BaseSDK):
|
|
|
435
411
|
hook_ctx=HookContext(
|
|
436
412
|
config=self.sdk_configuration,
|
|
437
413
|
base_url=base_url or "",
|
|
438
|
-
operation_id="
|
|
439
|
-
oauth2_scopes=
|
|
414
|
+
operation_id="v1_transaction_bundler_execute",
|
|
415
|
+
oauth2_scopes=None,
|
|
440
416
|
security_source=self.sdk_configuration.security,
|
|
441
417
|
),
|
|
442
418
|
request=req,
|
|
@@ -446,44 +422,28 @@ class TransactionBundler(BaseSDK):
|
|
|
446
422
|
|
|
447
423
|
response_data: Any = None
|
|
448
424
|
if utils.match_response(http_res, "200", "application/json"):
|
|
449
|
-
return
|
|
450
|
-
http_res.text, models.UnsignedMulticallTransaction
|
|
451
|
-
)
|
|
425
|
+
return unmarshal_json_response(models.BundlerTransactionResponse, http_res)
|
|
452
426
|
if utils.match_response(http_res, "422", "application/json"):
|
|
453
|
-
response_data =
|
|
454
|
-
|
|
427
|
+
response_data = unmarshal_json_response(
|
|
428
|
+
errors.HTTPValidationErrorData, http_res
|
|
455
429
|
)
|
|
456
|
-
raise errors.HTTPValidationError(
|
|
430
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
457
431
|
if utils.match_response(http_res, "4XX", "*"):
|
|
458
432
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
459
|
-
raise errors.APIError(
|
|
460
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
461
|
-
)
|
|
433
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
462
434
|
if utils.match_response(http_res, "5XX", "*"):
|
|
463
435
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
464
|
-
raise errors.APIError(
|
|
465
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
466
|
-
)
|
|
436
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
467
437
|
|
|
468
|
-
|
|
469
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
470
|
-
raise errors.APIError(
|
|
471
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
472
|
-
http_res.status_code,
|
|
473
|
-
http_res_text,
|
|
474
|
-
http_res,
|
|
475
|
-
)
|
|
438
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
476
439
|
|
|
477
|
-
def
|
|
440
|
+
def transaction_bundler_aave_loop(
|
|
478
441
|
self,
|
|
479
442
|
*,
|
|
480
|
-
chain: models.
|
|
443
|
+
chain: models.AaveLoopRequestChain,
|
|
481
444
|
sender: str,
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
],
|
|
485
|
-
collateral_token: models.TokenEnum,
|
|
486
|
-
borrow_token: models.TokenEnum,
|
|
445
|
+
collateral_token: str,
|
|
446
|
+
borrow_token: str,
|
|
487
447
|
initial_collateral_amount: Union[
|
|
488
448
|
models.InitialCollateralAmount, models.InitialCollateralAmountTypedDict
|
|
489
449
|
],
|
|
@@ -492,11 +452,18 @@ class TransactionBundler(BaseSDK):
|
|
|
492
452
|
models.MaxSlippagePercent, models.MaxSlippagePercentTypedDict
|
|
493
453
|
],
|
|
494
454
|
loan_to_value: Union[models.LoanToValue, models.LoanToValueTypedDict],
|
|
455
|
+
estimate_gas: Optional[bool] = None,
|
|
456
|
+
signed_authorization: OptionalNullable[
|
|
457
|
+
Union[models.SignedAuthorization, models.SignedAuthorizationTypedDict]
|
|
458
|
+
] = UNSET,
|
|
459
|
+
emode_category: OptionalNullable[int] = UNSET,
|
|
460
|
+
is_account_abstraction: Optional[bool] = None,
|
|
461
|
+
account_owner: OptionalNullable[str] = UNSET,
|
|
495
462
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
496
463
|
server_url: Optional[str] = None,
|
|
497
464
|
timeout_ms: Optional[int] = None,
|
|
498
465
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
499
|
-
) -> models.
|
|
466
|
+
) -> models.ResponseV1TransactionBundlerAaveLoop:
|
|
500
467
|
r"""AAVE Leverage Long/Short
|
|
501
468
|
|
|
502
469
|
Execute an Aave looping strategy that involves repeated supply and borrow
|
|
@@ -511,15 +478,19 @@ class TransactionBundler(BaseSDK):
|
|
|
511
478
|
|
|
512
479
|
The transaction must be authorized using the /authorization endpoint to prevent replay attacks.
|
|
513
480
|
|
|
514
|
-
:param chain:
|
|
481
|
+
:param chain:
|
|
515
482
|
:param sender: The address of the transaction sender.
|
|
516
|
-
:param
|
|
517
|
-
:param
|
|
518
|
-
:param borrow_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.
|
|
483
|
+
:param collateral_token: Symbol or address of token to supply to Aave..
|
|
484
|
+
:param borrow_token: Symbol or address of token to borrow from Aave..
|
|
519
485
|
:param initial_collateral_amount: Amount of collateral token to supply to Aave
|
|
520
486
|
:param multiplier: Leverage multiplier. Total loop collateral will be calculated as `multiplier` x `initial_collateral_amount`
|
|
521
487
|
:param max_slippage_percent: Maximum allowed slippage for token swaps in percentage
|
|
522
488
|
:param loan_to_value: Loan To Value percentage of the loop
|
|
489
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
490
|
+
:param signed_authorization: EIP-7702 authorization. Required when `is_account_abstraction` is False.
|
|
491
|
+
:param emode_category: Aave E-Mode category ID to set before executing the loop. If not provided, E-Mode will not be changed.
|
|
492
|
+
:param is_account_abstraction: Whether to use account abstraction for the transaction.
|
|
493
|
+
:param account_owner: The owner address of the smart account (Safe). Required when `is_account_abstraction` is True. This address will be used as the 'from' address when building the execTransaction call.
|
|
523
494
|
:param retries: Override the default retry configuration for this method
|
|
524
495
|
:param server_url: Override the default server URL for this method
|
|
525
496
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -538,8 +509,9 @@ class TransactionBundler(BaseSDK):
|
|
|
538
509
|
request = models.AaveLoopRequest(
|
|
539
510
|
chain=chain,
|
|
540
511
|
sender=sender,
|
|
512
|
+
estimate_gas=estimate_gas,
|
|
541
513
|
signed_authorization=utils.get_pydantic_model(
|
|
542
|
-
signed_authorization, models.SignedAuthorization
|
|
514
|
+
signed_authorization, OptionalNullable[models.SignedAuthorization]
|
|
543
515
|
),
|
|
544
516
|
collateral_token=collateral_token,
|
|
545
517
|
borrow_token=borrow_token,
|
|
@@ -547,11 +519,14 @@ class TransactionBundler(BaseSDK):
|
|
|
547
519
|
multiplier=multiplier,
|
|
548
520
|
max_slippage_percent=max_slippage_percent,
|
|
549
521
|
loan_to_value=loan_to_value,
|
|
522
|
+
emode_category=emode_category,
|
|
523
|
+
is_account_abstraction=is_account_abstraction,
|
|
524
|
+
account_owner=account_owner,
|
|
550
525
|
)
|
|
551
526
|
|
|
552
527
|
req = self._build_request(
|
|
553
528
|
method="POST",
|
|
554
|
-
path="/
|
|
529
|
+
path="/v1/transaction_bundler/aave/loop",
|
|
555
530
|
base_url=base_url,
|
|
556
531
|
url_variables=url_variables,
|
|
557
532
|
request=request,
|
|
@@ -565,6 +540,7 @@ class TransactionBundler(BaseSDK):
|
|
|
565
540
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
566
541
|
request, False, False, "json", models.AaveLoopRequest
|
|
567
542
|
),
|
|
543
|
+
allow_empty_value=None,
|
|
568
544
|
timeout_ms=timeout_ms,
|
|
569
545
|
)
|
|
570
546
|
|
|
@@ -580,8 +556,8 @@ class TransactionBundler(BaseSDK):
|
|
|
580
556
|
hook_ctx=HookContext(
|
|
581
557
|
config=self.sdk_configuration,
|
|
582
558
|
base_url=base_url or "",
|
|
583
|
-
operation_id="
|
|
584
|
-
oauth2_scopes=
|
|
559
|
+
operation_id="v1_transaction_bundler_aave_loop",
|
|
560
|
+
oauth2_scopes=None,
|
|
585
561
|
security_source=self.sdk_configuration.security,
|
|
586
562
|
),
|
|
587
563
|
request=req,
|
|
@@ -591,44 +567,30 @@ class TransactionBundler(BaseSDK):
|
|
|
591
567
|
|
|
592
568
|
response_data: Any = None
|
|
593
569
|
if utils.match_response(http_res, "200", "application/json"):
|
|
594
|
-
return
|
|
595
|
-
|
|
570
|
+
return unmarshal_json_response(
|
|
571
|
+
models.ResponseV1TransactionBundlerAaveLoop, http_res
|
|
596
572
|
)
|
|
597
573
|
if utils.match_response(http_res, "422", "application/json"):
|
|
598
|
-
response_data =
|
|
599
|
-
|
|
574
|
+
response_data = unmarshal_json_response(
|
|
575
|
+
errors.HTTPValidationErrorData, http_res
|
|
600
576
|
)
|
|
601
|
-
raise errors.HTTPValidationError(
|
|
577
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
602
578
|
if utils.match_response(http_res, "4XX", "*"):
|
|
603
579
|
http_res_text = utils.stream_to_text(http_res)
|
|
604
|
-
raise errors.APIError(
|
|
605
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
606
|
-
)
|
|
580
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
607
581
|
if utils.match_response(http_res, "5XX", "*"):
|
|
608
582
|
http_res_text = utils.stream_to_text(http_res)
|
|
609
|
-
raise errors.APIError(
|
|
610
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
611
|
-
)
|
|
583
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
612
584
|
|
|
613
|
-
|
|
614
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
615
|
-
raise errors.APIError(
|
|
616
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
617
|
-
http_res.status_code,
|
|
618
|
-
http_res_text,
|
|
619
|
-
http_res,
|
|
620
|
-
)
|
|
585
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
621
586
|
|
|
622
|
-
async def
|
|
587
|
+
async def transaction_bundler_aave_loop_async(
|
|
623
588
|
self,
|
|
624
589
|
*,
|
|
625
|
-
chain: models.
|
|
590
|
+
chain: models.AaveLoopRequestChain,
|
|
626
591
|
sender: str,
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
],
|
|
630
|
-
collateral_token: models.TokenEnum,
|
|
631
|
-
borrow_token: models.TokenEnum,
|
|
592
|
+
collateral_token: str,
|
|
593
|
+
borrow_token: str,
|
|
632
594
|
initial_collateral_amount: Union[
|
|
633
595
|
models.InitialCollateralAmount, models.InitialCollateralAmountTypedDict
|
|
634
596
|
],
|
|
@@ -637,11 +599,18 @@ class TransactionBundler(BaseSDK):
|
|
|
637
599
|
models.MaxSlippagePercent, models.MaxSlippagePercentTypedDict
|
|
638
600
|
],
|
|
639
601
|
loan_to_value: Union[models.LoanToValue, models.LoanToValueTypedDict],
|
|
602
|
+
estimate_gas: Optional[bool] = None,
|
|
603
|
+
signed_authorization: OptionalNullable[
|
|
604
|
+
Union[models.SignedAuthorization, models.SignedAuthorizationTypedDict]
|
|
605
|
+
] = UNSET,
|
|
606
|
+
emode_category: OptionalNullable[int] = UNSET,
|
|
607
|
+
is_account_abstraction: Optional[bool] = None,
|
|
608
|
+
account_owner: OptionalNullable[str] = UNSET,
|
|
640
609
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
641
610
|
server_url: Optional[str] = None,
|
|
642
611
|
timeout_ms: Optional[int] = None,
|
|
643
612
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
644
|
-
) -> models.
|
|
613
|
+
) -> models.ResponseV1TransactionBundlerAaveLoop:
|
|
645
614
|
r"""AAVE Leverage Long/Short
|
|
646
615
|
|
|
647
616
|
Execute an Aave looping strategy that involves repeated supply and borrow
|
|
@@ -656,15 +625,19 @@ class TransactionBundler(BaseSDK):
|
|
|
656
625
|
|
|
657
626
|
The transaction must be authorized using the /authorization endpoint to prevent replay attacks.
|
|
658
627
|
|
|
659
|
-
:param chain:
|
|
628
|
+
:param chain:
|
|
660
629
|
:param sender: The address of the transaction sender.
|
|
661
|
-
:param
|
|
662
|
-
:param
|
|
663
|
-
:param borrow_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.
|
|
630
|
+
:param collateral_token: Symbol or address of token to supply to Aave..
|
|
631
|
+
:param borrow_token: Symbol or address of token to borrow from Aave..
|
|
664
632
|
:param initial_collateral_amount: Amount of collateral token to supply to Aave
|
|
665
633
|
:param multiplier: Leverage multiplier. Total loop collateral will be calculated as `multiplier` x `initial_collateral_amount`
|
|
666
634
|
:param max_slippage_percent: Maximum allowed slippage for token swaps in percentage
|
|
667
635
|
:param loan_to_value: Loan To Value percentage of the loop
|
|
636
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
637
|
+
:param signed_authorization: EIP-7702 authorization. Required when `is_account_abstraction` is False.
|
|
638
|
+
:param emode_category: Aave E-Mode category ID to set before executing the loop. If not provided, E-Mode will not be changed.
|
|
639
|
+
:param is_account_abstraction: Whether to use account abstraction for the transaction.
|
|
640
|
+
:param account_owner: The owner address of the smart account (Safe). Required when `is_account_abstraction` is True. This address will be used as the 'from' address when building the execTransaction call.
|
|
668
641
|
:param retries: Override the default retry configuration for this method
|
|
669
642
|
:param server_url: Override the default server URL for this method
|
|
670
643
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -683,8 +656,9 @@ class TransactionBundler(BaseSDK):
|
|
|
683
656
|
request = models.AaveLoopRequest(
|
|
684
657
|
chain=chain,
|
|
685
658
|
sender=sender,
|
|
659
|
+
estimate_gas=estimate_gas,
|
|
686
660
|
signed_authorization=utils.get_pydantic_model(
|
|
687
|
-
signed_authorization, models.SignedAuthorization
|
|
661
|
+
signed_authorization, OptionalNullable[models.SignedAuthorization]
|
|
688
662
|
),
|
|
689
663
|
collateral_token=collateral_token,
|
|
690
664
|
borrow_token=borrow_token,
|
|
@@ -692,11 +666,14 @@ class TransactionBundler(BaseSDK):
|
|
|
692
666
|
multiplier=multiplier,
|
|
693
667
|
max_slippage_percent=max_slippage_percent,
|
|
694
668
|
loan_to_value=loan_to_value,
|
|
669
|
+
emode_category=emode_category,
|
|
670
|
+
is_account_abstraction=is_account_abstraction,
|
|
671
|
+
account_owner=account_owner,
|
|
695
672
|
)
|
|
696
673
|
|
|
697
674
|
req = self._build_request_async(
|
|
698
675
|
method="POST",
|
|
699
|
-
path="/
|
|
676
|
+
path="/v1/transaction_bundler/aave/loop",
|
|
700
677
|
base_url=base_url,
|
|
701
678
|
url_variables=url_variables,
|
|
702
679
|
request=request,
|
|
@@ -710,6 +687,7 @@ class TransactionBundler(BaseSDK):
|
|
|
710
687
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
711
688
|
request, False, False, "json", models.AaveLoopRequest
|
|
712
689
|
),
|
|
690
|
+
allow_empty_value=None,
|
|
713
691
|
timeout_ms=timeout_ms,
|
|
714
692
|
)
|
|
715
693
|
|
|
@@ -725,8 +703,8 @@ class TransactionBundler(BaseSDK):
|
|
|
725
703
|
hook_ctx=HookContext(
|
|
726
704
|
config=self.sdk_configuration,
|
|
727
705
|
base_url=base_url or "",
|
|
728
|
-
operation_id="
|
|
729
|
-
oauth2_scopes=
|
|
706
|
+
operation_id="v1_transaction_bundler_aave_loop",
|
|
707
|
+
oauth2_scopes=None,
|
|
730
708
|
security_source=self.sdk_configuration.security,
|
|
731
709
|
),
|
|
732
710
|
request=req,
|
|
@@ -736,30 +714,19 @@ class TransactionBundler(BaseSDK):
|
|
|
736
714
|
|
|
737
715
|
response_data: Any = None
|
|
738
716
|
if utils.match_response(http_res, "200", "application/json"):
|
|
739
|
-
return
|
|
740
|
-
|
|
717
|
+
return unmarshal_json_response(
|
|
718
|
+
models.ResponseV1TransactionBundlerAaveLoop, http_res
|
|
741
719
|
)
|
|
742
720
|
if utils.match_response(http_res, "422", "application/json"):
|
|
743
|
-
response_data =
|
|
744
|
-
|
|
721
|
+
response_data = unmarshal_json_response(
|
|
722
|
+
errors.HTTPValidationErrorData, http_res
|
|
745
723
|
)
|
|
746
|
-
raise errors.HTTPValidationError(
|
|
724
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
747
725
|
if utils.match_response(http_res, "4XX", "*"):
|
|
748
726
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
749
|
-
raise errors.APIError(
|
|
750
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
751
|
-
)
|
|
727
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
752
728
|
if utils.match_response(http_res, "5XX", "*"):
|
|
753
729
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
754
|
-
raise errors.APIError(
|
|
755
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
756
|
-
)
|
|
730
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
757
731
|
|
|
758
|
-
|
|
759
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
760
|
-
raise errors.APIError(
|
|
761
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
762
|
-
http_res.status_code,
|
|
763
|
-
http_res_text,
|
|
764
|
-
http_res,
|
|
765
|
-
)
|
|
732
|
+
raise errors.APIError("Unexpected response received", http_res)
|