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
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .interestratemode import InterestRateMode
|
|
5
|
-
from .token_enum import TokenEnum
|
|
6
5
|
from compass_api_sdk.types import (
|
|
7
6
|
BaseModel,
|
|
8
7
|
Nullable,
|
|
@@ -29,12 +28,8 @@ r"""The amount of the asset to borrow"""
|
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
class AaveBorrowParamsTypedDict(TypedDict):
|
|
32
|
-
token:
|
|
33
|
-
r"""
|
|
34
|
-
|
|
35
|
-
This class is used to represent the token in the system. Notice individual
|
|
36
|
-
endpoints' documentation where per chain tokens are presented.
|
|
37
|
-
"""
|
|
31
|
+
token: str
|
|
32
|
+
r"""The symbol or address of the underlying asset to borrow.."""
|
|
38
33
|
amount: AaveBorrowParamsAmountTypedDict
|
|
39
34
|
r"""The amount of the asset to borrow"""
|
|
40
35
|
interest_rate_mode: InterestRateMode
|
|
@@ -48,12 +43,8 @@ class AaveBorrowParamsTypedDict(TypedDict):
|
|
|
48
43
|
|
|
49
44
|
|
|
50
45
|
class AaveBorrowParams(BaseModel):
|
|
51
|
-
token:
|
|
52
|
-
r"""
|
|
53
|
-
|
|
54
|
-
This class is used to represent the token in the system. Notice individual
|
|
55
|
-
endpoints' documentation where per chain tokens are presented.
|
|
56
|
-
"""
|
|
46
|
+
token: str
|
|
47
|
+
r"""The symbol or address of the underlying asset to borrow.."""
|
|
57
48
|
|
|
58
49
|
amount: AaveBorrowParamsAmount
|
|
59
50
|
r"""The amount of the asset to borrow"""
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .chain import Chain
|
|
5
4
|
from .interestratemode import InterestRateMode
|
|
6
|
-
from .token_enum import TokenEnum
|
|
7
5
|
from compass_api_sdk.types import (
|
|
8
6
|
BaseModel,
|
|
9
7
|
Nullable,
|
|
@@ -12,6 +10,7 @@ from compass_api_sdk.types import (
|
|
|
12
10
|
UNSET_SENTINEL,
|
|
13
11
|
)
|
|
14
12
|
from compass_api_sdk.utils import validate_const
|
|
13
|
+
from enum import Enum
|
|
15
14
|
import pydantic
|
|
16
15
|
from pydantic import model_serializer
|
|
17
16
|
from pydantic.functional_validators import AfterValidator
|
|
@@ -29,13 +28,15 @@ AaveBorrowRequestAmount = TypeAliasType("AaveBorrowRequestAmount", Union[float,
|
|
|
29
28
|
r"""The amount of the asset to borrow"""
|
|
30
29
|
|
|
31
30
|
|
|
32
|
-
class
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
class AaveBorrowRequestChain(str, Enum):
|
|
32
|
+
ARBITRUM = "arbitrum"
|
|
33
|
+
BASE = "base"
|
|
34
|
+
ETHEREUM = "ethereum"
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
|
|
37
|
+
class AaveBorrowRequestTypedDict(TypedDict):
|
|
38
|
+
token: str
|
|
39
|
+
r"""The symbol or address of the underlying asset to borrow.."""
|
|
39
40
|
amount: AaveBorrowRequestAmountTypedDict
|
|
40
41
|
r"""The amount of the asset to borrow"""
|
|
41
42
|
interest_rate_mode: InterestRateMode
|
|
@@ -43,22 +44,19 @@ class AaveBorrowRequestTypedDict(TypedDict):
|
|
|
43
44
|
|
|
44
45
|
A stable (but typically higher rate), or a variable rate.
|
|
45
46
|
"""
|
|
46
|
-
chain:
|
|
47
|
-
r"""The chain to use."""
|
|
47
|
+
chain: AaveBorrowRequestChain
|
|
48
48
|
sender: str
|
|
49
49
|
r"""The address of the transaction sender."""
|
|
50
50
|
action_type: Literal["AAVE_BORROW"]
|
|
51
51
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
52
52
|
r"""The address on behalf of whom the supply is made"""
|
|
53
|
+
estimate_gas: NotRequired[bool]
|
|
54
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
53
55
|
|
|
54
56
|
|
|
55
57
|
class AaveBorrowRequest(BaseModel):
|
|
56
|
-
token:
|
|
57
|
-
r"""
|
|
58
|
-
|
|
59
|
-
This class is used to represent the token in the system. Notice individual
|
|
60
|
-
endpoints' documentation where per chain tokens are presented.
|
|
61
|
-
"""
|
|
58
|
+
token: str
|
|
59
|
+
r"""The symbol or address of the underlying asset to borrow.."""
|
|
62
60
|
|
|
63
61
|
amount: AaveBorrowRequestAmount
|
|
64
62
|
r"""The amount of the asset to borrow"""
|
|
@@ -69,8 +67,7 @@ class AaveBorrowRequest(BaseModel):
|
|
|
69
67
|
A stable (but typically higher rate), or a variable rate.
|
|
70
68
|
"""
|
|
71
69
|
|
|
72
|
-
chain:
|
|
73
|
-
r"""The chain to use."""
|
|
70
|
+
chain: AaveBorrowRequestChain
|
|
74
71
|
|
|
75
72
|
sender: str
|
|
76
73
|
r"""The address of the transaction sender."""
|
|
@@ -86,9 +83,12 @@ class AaveBorrowRequest(BaseModel):
|
|
|
86
83
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
87
84
|
r"""The address on behalf of whom the supply is made"""
|
|
88
85
|
|
|
86
|
+
estimate_gas: Optional[bool] = None
|
|
87
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
88
|
+
|
|
89
89
|
@model_serializer(mode="wrap")
|
|
90
90
|
def serialize_model(self, handler):
|
|
91
|
-
optional_fields = ["action_type", "on_behalf_of"]
|
|
91
|
+
optional_fields = ["action_type", "on_behalf_of", "estimate_gas"]
|
|
92
92
|
nullable_fields = ["on_behalf_of"]
|
|
93
93
|
null_default_fields = []
|
|
94
94
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .borrow import Borrow, BorrowTypedDict
|
|
5
5
|
from .liquidationcall import LiquidationCall, LiquidationCallTypedDict
|
|
6
|
-
from .redeemunderlying import RedeemUnderlying, RedeemUnderlyingTypedDict
|
|
7
6
|
from .repay import Repay, RepayTypedDict
|
|
8
7
|
from .supply import Supply, SupplyTypedDict
|
|
9
8
|
from .swapborrowrate import SwapBorrowRate, SwapBorrowRateTypedDict
|
|
10
9
|
from .usageascollateral import UsageAsCollateral, UsageAsCollateralTypedDict
|
|
10
|
+
from .withdraw import Withdraw, WithdrawTypedDict
|
|
11
11
|
from compass_api_sdk.types import BaseModel
|
|
12
12
|
from compass_api_sdk.utils import get_discriminator
|
|
13
13
|
from pydantic import Discriminator, Tag
|
|
@@ -15,10 +15,10 @@ from typing import List, Union
|
|
|
15
15
|
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
"
|
|
18
|
+
AaveHistoricalTransactionsResponseTransactionTypedDict = TypeAliasType(
|
|
19
|
+
"AaveHistoricalTransactionsResponseTransactionTypedDict",
|
|
20
20
|
Union[
|
|
21
|
-
|
|
21
|
+
WithdrawTypedDict,
|
|
22
22
|
RepayTypedDict,
|
|
23
23
|
SupplyTypedDict,
|
|
24
24
|
UsageAsCollateralTypedDict,
|
|
@@ -29,11 +29,11 @@ TransactionTypedDict = TypeAliasType(
|
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
AaveHistoricalTransactionsResponseTransaction = Annotated[
|
|
33
33
|
Union[
|
|
34
34
|
Annotated[Borrow, Tag("Borrow")],
|
|
35
35
|
Annotated[LiquidationCall, Tag("LiquidationCall")],
|
|
36
|
-
Annotated[
|
|
36
|
+
Annotated[Withdraw, Tag("Withdraw")],
|
|
37
37
|
Annotated[Repay, Tag("Repay")],
|
|
38
38
|
Annotated[Supply, Tag("Supply")],
|
|
39
39
|
Annotated[SwapBorrowRate, Tag("SwapBorrowRate")],
|
|
@@ -50,7 +50,7 @@ class AaveHistoricalTransactionsResponseTypedDict(TypedDict):
|
|
|
50
50
|
r"""Specifies how many transactions to skip before returning results, letting you choose the starting point for the data you want to receive."""
|
|
51
51
|
limit: int
|
|
52
52
|
r"""Sets the maximum number of transactions to include in the response, helping control the size of the returned dataset."""
|
|
53
|
-
transactions: List[
|
|
53
|
+
transactions: List[AaveHistoricalTransactionsResponseTransactionTypedDict]
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
class AaveHistoricalTransactionsResponse(BaseModel):
|
|
@@ -62,4 +62,4 @@ class AaveHistoricalTransactionsResponse(BaseModel):
|
|
|
62
62
|
limit: int
|
|
63
63
|
r"""Sets the maximum number of transactions to include in the response, helping control the size of the returned dataset."""
|
|
64
64
|
|
|
65
|
-
transactions: List[
|
|
65
|
+
transactions: List[AaveHistoricalTransactionsResponseTransaction]
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .chain import Chain
|
|
5
4
|
from .signedauthorization import SignedAuthorization, SignedAuthorizationTypedDict
|
|
6
|
-
from .
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
from compass_api_sdk.types import (
|
|
6
|
+
BaseModel,
|
|
7
|
+
Nullable,
|
|
8
|
+
OptionalNullable,
|
|
9
|
+
UNSET,
|
|
10
|
+
UNSET_SENTINEL,
|
|
11
|
+
)
|
|
12
|
+
from enum import Enum
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from typing import Optional, Union
|
|
15
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class AaveLoopRequestChain(str, Enum):
|
|
19
|
+
ARBITRUM = "arbitrum"
|
|
20
|
+
BASE = "base"
|
|
21
|
+
ETHEREUM = "ethereum"
|
|
10
22
|
|
|
11
23
|
|
|
12
24
|
InitialCollateralAmountTypedDict = TypeAliasType(
|
|
@@ -48,23 +60,13 @@ r"""Loan To Value percentage of the loop"""
|
|
|
48
60
|
class AaveLoopRequestTypedDict(TypedDict):
|
|
49
61
|
r"""Request model for executing an Aave loop strategy."""
|
|
50
62
|
|
|
51
|
-
chain:
|
|
52
|
-
r"""The chain to use."""
|
|
63
|
+
chain: AaveLoopRequestChain
|
|
53
64
|
sender: str
|
|
54
65
|
r"""The address of the transaction sender."""
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
This class is used to represent the token in the system. Notice individual
|
|
60
|
-
endpoints' documentation where per chain tokens are presented.
|
|
61
|
-
"""
|
|
62
|
-
borrow_token: TokenEnum
|
|
63
|
-
r"""A class representing the token.
|
|
64
|
-
|
|
65
|
-
This class is used to represent the token in the system. Notice individual
|
|
66
|
-
endpoints' documentation where per chain tokens are presented.
|
|
67
|
-
"""
|
|
66
|
+
collateral_token: str
|
|
67
|
+
r"""Symbol or address of token to supply to Aave.."""
|
|
68
|
+
borrow_token: str
|
|
69
|
+
r"""Symbol or address of token to borrow from Aave.."""
|
|
68
70
|
initial_collateral_amount: InitialCollateralAmountTypedDict
|
|
69
71
|
r"""Amount of collateral token to supply to Aave"""
|
|
70
72
|
multiplier: MultiplierTypedDict
|
|
@@ -73,32 +75,31 @@ class AaveLoopRequestTypedDict(TypedDict):
|
|
|
73
75
|
r"""Maximum allowed slippage for token swaps in percentage"""
|
|
74
76
|
loan_to_value: LoanToValueTypedDict
|
|
75
77
|
r"""Loan To Value percentage of the loop"""
|
|
78
|
+
estimate_gas: NotRequired[bool]
|
|
79
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
80
|
+
signed_authorization: NotRequired[Nullable[SignedAuthorizationTypedDict]]
|
|
81
|
+
r"""EIP-7702 authorization. Required when `is_account_abstraction` is False."""
|
|
82
|
+
emode_category: NotRequired[Nullable[int]]
|
|
83
|
+
r"""Aave E-Mode category ID to set before executing the loop. If not provided, E-Mode will not be changed."""
|
|
84
|
+
is_account_abstraction: NotRequired[bool]
|
|
85
|
+
r"""Whether to use account abstraction for the transaction."""
|
|
86
|
+
account_owner: NotRequired[Nullable[str]]
|
|
87
|
+
r"""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."""
|
|
76
88
|
|
|
77
89
|
|
|
78
90
|
class AaveLoopRequest(BaseModel):
|
|
79
91
|
r"""Request model for executing an Aave loop strategy."""
|
|
80
92
|
|
|
81
|
-
chain:
|
|
82
|
-
r"""The chain to use."""
|
|
93
|
+
chain: AaveLoopRequestChain
|
|
83
94
|
|
|
84
95
|
sender: str
|
|
85
96
|
r"""The address of the transaction sender."""
|
|
86
97
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
collateral_token: TokenEnum
|
|
90
|
-
r"""A class representing the token.
|
|
91
|
-
|
|
92
|
-
This class is used to represent the token in the system. Notice individual
|
|
93
|
-
endpoints' documentation where per chain tokens are presented.
|
|
94
|
-
"""
|
|
98
|
+
collateral_token: str
|
|
99
|
+
r"""Symbol or address of token to supply to Aave.."""
|
|
95
100
|
|
|
96
|
-
borrow_token:
|
|
97
|
-
r"""
|
|
98
|
-
|
|
99
|
-
This class is used to represent the token in the system. Notice individual
|
|
100
|
-
endpoints' documentation where per chain tokens are presented.
|
|
101
|
-
"""
|
|
101
|
+
borrow_token: str
|
|
102
|
+
r"""Symbol or address of token to borrow from Aave.."""
|
|
102
103
|
|
|
103
104
|
initial_collateral_amount: InitialCollateralAmount
|
|
104
105
|
r"""Amount of collateral token to supply to Aave"""
|
|
@@ -111,3 +112,54 @@ class AaveLoopRequest(BaseModel):
|
|
|
111
112
|
|
|
112
113
|
loan_to_value: LoanToValue
|
|
113
114
|
r"""Loan To Value percentage of the loop"""
|
|
115
|
+
|
|
116
|
+
estimate_gas: Optional[bool] = None
|
|
117
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
118
|
+
|
|
119
|
+
signed_authorization: OptionalNullable[SignedAuthorization] = UNSET
|
|
120
|
+
r"""EIP-7702 authorization. Required when `is_account_abstraction` is False."""
|
|
121
|
+
|
|
122
|
+
emode_category: OptionalNullable[int] = UNSET
|
|
123
|
+
r"""Aave E-Mode category ID to set before executing the loop. If not provided, E-Mode will not be changed."""
|
|
124
|
+
|
|
125
|
+
is_account_abstraction: Optional[bool] = None
|
|
126
|
+
r"""Whether to use account abstraction for the transaction."""
|
|
127
|
+
|
|
128
|
+
account_owner: OptionalNullable[str] = UNSET
|
|
129
|
+
r"""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."""
|
|
130
|
+
|
|
131
|
+
@model_serializer(mode="wrap")
|
|
132
|
+
def serialize_model(self, handler):
|
|
133
|
+
optional_fields = [
|
|
134
|
+
"estimate_gas",
|
|
135
|
+
"signed_authorization",
|
|
136
|
+
"emode_category",
|
|
137
|
+
"is_account_abstraction",
|
|
138
|
+
"account_owner",
|
|
139
|
+
]
|
|
140
|
+
nullable_fields = ["signed_authorization", "emode_category", "account_owner"]
|
|
141
|
+
null_default_fields = []
|
|
142
|
+
|
|
143
|
+
serialized = handler(self)
|
|
144
|
+
|
|
145
|
+
m = {}
|
|
146
|
+
|
|
147
|
+
for n, f in type(self).model_fields.items():
|
|
148
|
+
k = f.alias or n
|
|
149
|
+
val = serialized.get(k)
|
|
150
|
+
serialized.pop(k, None)
|
|
151
|
+
|
|
152
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
153
|
+
is_set = (
|
|
154
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
155
|
+
or k in null_default_fields
|
|
156
|
+
) # pylint: disable=no-member
|
|
157
|
+
|
|
158
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
159
|
+
m[k] = val
|
|
160
|
+
elif val != UNSET_SENTINEL and (
|
|
161
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
162
|
+
):
|
|
163
|
+
m[k] = val
|
|
164
|
+
|
|
165
|
+
return m
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import Literal, Optional
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AavePositionTypedDict(TypedDict):
|
|
13
|
+
id: str
|
|
14
|
+
r"""Base64-encoded position identifier."""
|
|
15
|
+
amount_in_underlying_token: str
|
|
16
|
+
r"""The user's position value denominated in the supplied asset."""
|
|
17
|
+
token_name: str
|
|
18
|
+
r"""Symbol of the Aave reserve asset (e.g., USDC)."""
|
|
19
|
+
type: Literal["AAVE"]
|
|
20
|
+
r"""The market type discriminator."""
|
|
21
|
+
vault_address: Literal["None"]
|
|
22
|
+
vault_name: Literal["None"]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class AavePosition(BaseModel):
|
|
26
|
+
id: str
|
|
27
|
+
r"""Base64-encoded position identifier."""
|
|
28
|
+
|
|
29
|
+
amount_in_underlying_token: str
|
|
30
|
+
r"""The user's position value denominated in the supplied asset."""
|
|
31
|
+
|
|
32
|
+
token_name: str
|
|
33
|
+
r"""Symbol of the Aave reserve asset (e.g., USDC)."""
|
|
34
|
+
|
|
35
|
+
TYPE: Annotated[
|
|
36
|
+
Annotated[Literal["AAVE"], AfterValidator(validate_const("AAVE"))],
|
|
37
|
+
pydantic.Field(alias="type"),
|
|
38
|
+
] = "AAVE"
|
|
39
|
+
r"""The market type discriminator."""
|
|
40
|
+
|
|
41
|
+
VAULT_ADDRESS: Annotated[
|
|
42
|
+
Annotated[Optional[Literal["None"]], AfterValidator(validate_const("None"))],
|
|
43
|
+
pydantic.Field(alias="vault_address"),
|
|
44
|
+
] = "None"
|
|
45
|
+
|
|
46
|
+
VAULT_NAME: Annotated[
|
|
47
|
+
Annotated[Optional[Literal["None"]], AfterValidator(validate_const("None"))],
|
|
48
|
+
pydantic.Field(alias="vault_name"),
|
|
49
|
+
] = "None"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .interestratemode import InterestRateMode
|
|
5
|
-
from .token_enum import TokenEnum
|
|
6
5
|
from compass_api_sdk.types import (
|
|
7
6
|
BaseModel,
|
|
8
7
|
Nullable,
|
|
@@ -29,12 +28,8 @@ r"""The amount of the asset to repay"""
|
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
class AaveRepayParamsTypedDict(TypedDict):
|
|
32
|
-
token:
|
|
33
|
-
r"""
|
|
34
|
-
|
|
35
|
-
This class is used to represent the token in the system. Notice individual
|
|
36
|
-
endpoints' documentation where per chain tokens are presented.
|
|
37
|
-
"""
|
|
31
|
+
token: str
|
|
32
|
+
r"""The symbol of the underlying asset to repay.."""
|
|
38
33
|
amount: AaveRepayParamsAmountTypedDict
|
|
39
34
|
r"""The amount of the asset to repay"""
|
|
40
35
|
interest_rate_mode: InterestRateMode
|
|
@@ -48,12 +43,8 @@ class AaveRepayParamsTypedDict(TypedDict):
|
|
|
48
43
|
|
|
49
44
|
|
|
50
45
|
class AaveRepayParams(BaseModel):
|
|
51
|
-
token:
|
|
52
|
-
r"""
|
|
53
|
-
|
|
54
|
-
This class is used to represent the token in the system. Notice individual
|
|
55
|
-
endpoints' documentation where per chain tokens are presented.
|
|
56
|
-
"""
|
|
46
|
+
token: str
|
|
47
|
+
r"""The symbol of the underlying asset to repay.."""
|
|
57
48
|
|
|
58
49
|
amount: AaveRepayParamsAmount
|
|
59
50
|
r"""The amount of the asset to repay"""
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .chain import Chain
|
|
5
4
|
from .interestratemode import InterestRateMode
|
|
6
|
-
from .token_enum import TokenEnum
|
|
7
5
|
from compass_api_sdk.types import (
|
|
8
6
|
BaseModel,
|
|
9
7
|
Nullable,
|
|
@@ -12,6 +10,7 @@ from compass_api_sdk.types import (
|
|
|
12
10
|
UNSET_SENTINEL,
|
|
13
11
|
)
|
|
14
12
|
from compass_api_sdk.utils import validate_const
|
|
13
|
+
from enum import Enum
|
|
15
14
|
import pydantic
|
|
16
15
|
from pydantic import model_serializer
|
|
17
16
|
from pydantic.functional_validators import AfterValidator
|
|
@@ -29,13 +28,15 @@ AaveRepayRequestAmount = TypeAliasType("AaveRepayRequestAmount", Union[float, st
|
|
|
29
28
|
r"""The amount of the asset to repay"""
|
|
30
29
|
|
|
31
30
|
|
|
32
|
-
class
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
class AaveRepayRequestChain(str, Enum):
|
|
32
|
+
ARBITRUM = "arbitrum"
|
|
33
|
+
BASE = "base"
|
|
34
|
+
ETHEREUM = "ethereum"
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
|
|
37
|
+
class AaveRepayRequestTypedDict(TypedDict):
|
|
38
|
+
token: str
|
|
39
|
+
r"""The symbol of the underlying asset to repay.."""
|
|
39
40
|
amount: AaveRepayRequestAmountTypedDict
|
|
40
41
|
r"""The amount of the asset to repay"""
|
|
41
42
|
interest_rate_mode: InterestRateMode
|
|
@@ -43,22 +44,19 @@ class AaveRepayRequestTypedDict(TypedDict):
|
|
|
43
44
|
|
|
44
45
|
A stable (but typically higher rate), or a variable rate.
|
|
45
46
|
"""
|
|
46
|
-
chain:
|
|
47
|
-
r"""The chain to use."""
|
|
47
|
+
chain: AaveRepayRequestChain
|
|
48
48
|
sender: str
|
|
49
49
|
r"""The address of the transaction sender."""
|
|
50
50
|
action_type: Literal["AAVE_REPAY"]
|
|
51
51
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
52
52
|
r"""The address on behalf of whom the supply is made"""
|
|
53
|
+
estimate_gas: NotRequired[bool]
|
|
54
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
53
55
|
|
|
54
56
|
|
|
55
57
|
class AaveRepayRequest(BaseModel):
|
|
56
|
-
token:
|
|
57
|
-
r"""
|
|
58
|
-
|
|
59
|
-
This class is used to represent the token in the system. Notice individual
|
|
60
|
-
endpoints' documentation where per chain tokens are presented.
|
|
61
|
-
"""
|
|
58
|
+
token: str
|
|
59
|
+
r"""The symbol of the underlying asset to repay.."""
|
|
62
60
|
|
|
63
61
|
amount: AaveRepayRequestAmount
|
|
64
62
|
r"""The amount of the asset to repay"""
|
|
@@ -69,8 +67,7 @@ class AaveRepayRequest(BaseModel):
|
|
|
69
67
|
A stable (but typically higher rate), or a variable rate.
|
|
70
68
|
"""
|
|
71
69
|
|
|
72
|
-
chain:
|
|
73
|
-
r"""The chain to use."""
|
|
70
|
+
chain: AaveRepayRequestChain
|
|
74
71
|
|
|
75
72
|
sender: str
|
|
76
73
|
r"""The address of the transaction sender."""
|
|
@@ -86,9 +83,12 @@ class AaveRepayRequest(BaseModel):
|
|
|
86
83
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
87
84
|
r"""The address on behalf of whom the supply is made"""
|
|
88
85
|
|
|
86
|
+
estimate_gas: Optional[bool] = None
|
|
87
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
88
|
+
|
|
89
89
|
@model_serializer(mode="wrap")
|
|
90
90
|
def serialize_model(self, handler):
|
|
91
|
-
optional_fields = ["action_type", "on_behalf_of"]
|
|
91
|
+
optional_fields = ["action_type", "on_behalf_of", "estimate_gas"]
|
|
92
92
|
nullable_fields = ["on_behalf_of"]
|
|
93
93
|
null_default_fields = []
|
|
94
94
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from compass_api_sdk.types import BaseModel
|
|
4
|
+
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
5
|
+
from pydantic import model_serializer
|
|
5
6
|
from typing_extensions import TypedDict
|
|
6
7
|
|
|
7
8
|
|
|
@@ -10,7 +11,7 @@ class AaveReserveOverviewResponseTypedDict(TypedDict):
|
|
|
10
11
|
r"""Total tokens supplied in an Aave Reserve in USD. E.G. How much WBTC has been supplied on Aave in USD."""
|
|
11
12
|
total_borrowed: float
|
|
12
13
|
r"""Total tokens borrowed in an Aave Reserve converted to USD. E.G. How much WBTC has been supplied on Aave (in USD)."""
|
|
13
|
-
utilization_ratio: float
|
|
14
|
+
utilization_ratio: Nullable[float]
|
|
14
15
|
r"""Total borrowed divided by total supplied in an Aave Reserve. E.G. How much WBTC has been borrowed on Aaave divided by the amount supplied"""
|
|
15
16
|
|
|
16
17
|
|
|
@@ -21,5 +22,35 @@ class AaveReserveOverviewResponse(BaseModel):
|
|
|
21
22
|
total_borrowed: float
|
|
22
23
|
r"""Total tokens borrowed in an Aave Reserve converted to USD. E.G. How much WBTC has been supplied on Aave (in USD)."""
|
|
23
24
|
|
|
24
|
-
utilization_ratio: float
|
|
25
|
+
utilization_ratio: Nullable[float]
|
|
25
26
|
r"""Total borrowed divided by total supplied in an Aave Reserve. E.G. How much WBTC has been borrowed on Aaave divided by the amount supplied"""
|
|
27
|
+
|
|
28
|
+
@model_serializer(mode="wrap")
|
|
29
|
+
def serialize_model(self, handler):
|
|
30
|
+
optional_fields = []
|
|
31
|
+
nullable_fields = ["utilization_ratio"]
|
|
32
|
+
null_default_fields = []
|
|
33
|
+
|
|
34
|
+
serialized = handler(self)
|
|
35
|
+
|
|
36
|
+
m = {}
|
|
37
|
+
|
|
38
|
+
for n, f in type(self).model_fields.items():
|
|
39
|
+
k = f.alias or n
|
|
40
|
+
val = serialized.get(k)
|
|
41
|
+
serialized.pop(k, None)
|
|
42
|
+
|
|
43
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
44
|
+
is_set = (
|
|
45
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
46
|
+
or k in null_default_fields
|
|
47
|
+
) # pylint: disable=no-member
|
|
48
|
+
|
|
49
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
50
|
+
m[k] = val
|
|
51
|
+
elif val != UNSET_SENTINEL and (
|
|
52
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
53
|
+
):
|
|
54
|
+
m[k] = val
|
|
55
|
+
|
|
56
|
+
return m
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import Literal, Optional
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AaveSetUserEModeParamsTypedDict(TypedDict):
|
|
13
|
+
category_id: int
|
|
14
|
+
r"""The eMode category ID to set for the user. 0 = no eMode, 1+ = specific eMode category."""
|
|
15
|
+
action_type: Literal["AAVE_SET_USER_EMODE"]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class AaveSetUserEModeParams(BaseModel):
|
|
19
|
+
category_id: int
|
|
20
|
+
r"""The eMode category ID to set for the user. 0 = no eMode, 1+ = specific eMode category."""
|
|
21
|
+
|
|
22
|
+
ACTION_TYPE: Annotated[
|
|
23
|
+
Annotated[
|
|
24
|
+
Optional[Literal["AAVE_SET_USER_EMODE"]],
|
|
25
|
+
AfterValidator(validate_const("AAVE_SET_USER_EMODE")),
|
|
26
|
+
],
|
|
27
|
+
pydantic.Field(alias="action_type"),
|
|
28
|
+
] = "AAVE_SET_USER_EMODE"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
from enum import Enum
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AaveSetUserEModeRequestChain(str, Enum):
|
|
14
|
+
ARBITRUM = "arbitrum"
|
|
15
|
+
BASE = "base"
|
|
16
|
+
ETHEREUM = "ethereum"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class AaveSetUserEModeRequestTypedDict(TypedDict):
|
|
20
|
+
category_id: int
|
|
21
|
+
r"""The eMode category ID to set for the user. 0 = no eMode, 1+ = specific eMode category."""
|
|
22
|
+
chain: AaveSetUserEModeRequestChain
|
|
23
|
+
sender: str
|
|
24
|
+
r"""The address of the transaction sender."""
|
|
25
|
+
action_type: Literal["AAVE_SET_USER_EMODE"]
|
|
26
|
+
estimate_gas: NotRequired[bool]
|
|
27
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class AaveSetUserEModeRequest(BaseModel):
|
|
31
|
+
category_id: int
|
|
32
|
+
r"""The eMode category ID to set for the user. 0 = no eMode, 1+ = specific eMode category."""
|
|
33
|
+
|
|
34
|
+
chain: AaveSetUserEModeRequestChain
|
|
35
|
+
|
|
36
|
+
sender: str
|
|
37
|
+
r"""The address of the transaction sender."""
|
|
38
|
+
|
|
39
|
+
ACTION_TYPE: Annotated[
|
|
40
|
+
Annotated[
|
|
41
|
+
Optional[Literal["AAVE_SET_USER_EMODE"]],
|
|
42
|
+
AfterValidator(validate_const("AAVE_SET_USER_EMODE")),
|
|
43
|
+
],
|
|
44
|
+
pydantic.Field(alias="action_type"),
|
|
45
|
+
] = "AAVE_SET_USER_EMODE"
|
|
46
|
+
|
|
47
|
+
estimate_gas: Optional[bool] = None
|
|
48
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|