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
|
@@ -1,13 +1,13 @@
|
|
|
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 compass_api_sdk.types import BaseModel
|
|
6
5
|
from compass_api_sdk.utils import validate_const
|
|
6
|
+
from enum import Enum
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional, Union
|
|
10
|
-
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
UnwrapWethRequestAmountTypedDict = TypeAliasType(
|
|
@@ -20,16 +20,23 @@ UnwrapWethRequestAmount = TypeAliasType("UnwrapWethRequestAmount", Union[float,
|
|
|
20
20
|
r"""The amount of WETH to unwrap."""
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
class UnwrapWethRequestChain(str, Enum):
|
|
24
|
+
ARBITRUM = "arbitrum"
|
|
25
|
+
BASE = "base"
|
|
26
|
+
ETHEREUM = "ethereum"
|
|
27
|
+
|
|
28
|
+
|
|
23
29
|
class UnwrapWethRequestTypedDict(TypedDict):
|
|
24
30
|
r"""Request model for unwrapping WETH back to native ETH."""
|
|
25
31
|
|
|
26
32
|
amount: UnwrapWethRequestAmountTypedDict
|
|
27
33
|
r"""The amount of WETH to unwrap."""
|
|
28
|
-
chain:
|
|
29
|
-
r"""The chain to use."""
|
|
34
|
+
chain: UnwrapWethRequestChain
|
|
30
35
|
sender: str
|
|
31
36
|
r"""The address of the transaction sender."""
|
|
32
37
|
action_type: Literal["UNWRAP_WETH"]
|
|
38
|
+
estimate_gas: NotRequired[bool]
|
|
39
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
33
40
|
|
|
34
41
|
|
|
35
42
|
class UnwrapWethRequest(BaseModel):
|
|
@@ -38,8 +45,7 @@ class UnwrapWethRequest(BaseModel):
|
|
|
38
45
|
amount: UnwrapWethRequestAmount
|
|
39
46
|
r"""The amount of WETH to unwrap."""
|
|
40
47
|
|
|
41
|
-
chain:
|
|
42
|
-
r"""The chain to use."""
|
|
48
|
+
chain: UnwrapWethRequestChain
|
|
43
49
|
|
|
44
50
|
sender: str
|
|
45
51
|
r"""The address of the transaction sender."""
|
|
@@ -51,3 +57,6 @@ class UnwrapWethRequest(BaseModel):
|
|
|
51
57
|
],
|
|
52
58
|
pydantic.Field(alias="action_type"),
|
|
53
59
|
] = "UNWRAP_WETH"
|
|
60
|
+
|
|
61
|
+
estimate_gas: Optional[bool] = None
|
|
62
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .aaveborrowparams import AaveBorrowParams, AaveBorrowParamsTypedDict
|
|
5
5
|
from .aaverepayparams import AaveRepayParams, AaveRepayParamsTypedDict
|
|
6
|
+
from .aavesetuseremodeparams import (
|
|
7
|
+
AaveSetUserEModeParams,
|
|
8
|
+
AaveSetUserEModeParamsTypedDict,
|
|
9
|
+
)
|
|
6
10
|
from .aavesupplyparams import AaveSupplyParams, AaveSupplyParamsTypedDict
|
|
7
11
|
from .aavewithdrawparams import AaveWithdrawParams, AaveWithdrawParamsTypedDict
|
|
8
12
|
from .aerodromeslipstreambuyexactlyparams import (
|
|
@@ -25,6 +29,12 @@ from .aerodromeslipstreamwithdrawliquidityprovisionparams import (
|
|
|
25
29
|
AerodromeSlipstreamWithdrawLiquidityProvisionParams,
|
|
26
30
|
AerodromeSlipstreamWithdrawLiquidityProvisionParamsTypedDict,
|
|
27
31
|
)
|
|
32
|
+
from .ethenadepositparams import EthenaDepositParams, EthenaDepositParamsTypedDict
|
|
33
|
+
from .ethenarequesttowithdrawparams import (
|
|
34
|
+
EthenaRequestToWithdrawParams,
|
|
35
|
+
EthenaRequestToWithdrawParamsTypedDict,
|
|
36
|
+
)
|
|
37
|
+
from .ethenaunstakeparams import EthenaUnstakeParams, EthenaUnstakeParamsTypedDict
|
|
28
38
|
from .morphoborrowparams import MorphoBorrowParams, MorphoBorrowParamsTypedDict
|
|
29
39
|
from .morphodepositparams import MorphoDepositParams, MorphoDepositParamsTypedDict
|
|
30
40
|
from .morphorepayparams import MorphoRepayParams, MorphoRepayParamsTypedDict
|
|
@@ -37,32 +47,24 @@ from .morphowithdrawcollateralparams import (
|
|
|
37
47
|
MorphoWithdrawCollateralParamsTypedDict,
|
|
38
48
|
)
|
|
39
49
|
from .morphowithdrawparams import MorphoWithdrawParams, MorphoWithdrawParamsTypedDict
|
|
40
|
-
from .
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
from .odosswapparams import OdosSwapParams, OdosSwapParamsTypedDict
|
|
51
|
+
from .oneinchswapparams import OneInchSwapParams, OneInchSwapParamsTypedDict
|
|
52
|
+
from .pendlemanageliquidityparams import (
|
|
53
|
+
PendleManageLiquidityParams,
|
|
54
|
+
PendleManageLiquidityParamsTypedDict,
|
|
43
55
|
)
|
|
44
|
-
from .pendlebuyptparams import PendleBuyPtParams, PendleBuyPtParamsTypedDict
|
|
45
|
-
from .pendlebuyytparams import PendleBuyYtParams, PendleBuyYtParamsTypedDict
|
|
46
56
|
from .pendleredeemyieldparams import (
|
|
47
57
|
PendleRedeemYieldParams,
|
|
48
58
|
PendleRedeemYieldParamsTypedDict,
|
|
49
59
|
)
|
|
50
|
-
from .
|
|
51
|
-
|
|
52
|
-
PendleRemoveLiquidityParamsTypedDict,
|
|
53
|
-
)
|
|
54
|
-
from .pendlesellptparams import PendleSellPtParams, PendleSellPtParamsTypedDict
|
|
55
|
-
from .pendlesellytparams import PendleSellYtParams, PendleSellYtParamsTypedDict
|
|
60
|
+
from .pendletradeptparams import PendleTradePtParams, PendleTradePtParamsTypedDict
|
|
61
|
+
from .pendletradeytparams import PendleTradeYtParams, PendleTradeYtParamsTypedDict
|
|
56
62
|
from .setallowanceparams import SetAllowanceParams, SetAllowanceParamsTypedDict
|
|
57
63
|
from .skybuyparams import SkyBuyParams, SkyBuyParamsTypedDict
|
|
58
64
|
from .skydepositparams import SkyDepositParams, SkyDepositParamsTypedDict
|
|
59
65
|
from .skysellparams import SkySellParams, SkySellParamsTypedDict
|
|
60
66
|
from .skywithdrawparams import SkyWithdrawParams, SkyWithdrawParamsTypedDict
|
|
61
|
-
from .
|
|
62
|
-
TokenTransferErc20Params,
|
|
63
|
-
TokenTransferErc20ParamsTypedDict,
|
|
64
|
-
)
|
|
65
|
-
from .tokentransferrequest import TokenTransferRequest, TokenTransferRequestTypedDict
|
|
67
|
+
from .tokentransferparams import TokenTransferParams, TokenTransferParamsTypedDict
|
|
66
68
|
from .uniswapbuyexactlyparams import (
|
|
67
69
|
UniswapBuyExactlyParams,
|
|
68
70
|
UniswapBuyExactlyParamsTypedDict,
|
|
@@ -84,6 +86,8 @@ from .uniswapwithdrawliquidityprovisionparams import (
|
|
|
84
86
|
UniswapWithdrawLiquidityProvisionParamsTypedDict,
|
|
85
87
|
)
|
|
86
88
|
from .unwrapwethparams import UnwrapWethParams, UnwrapWethParamsTypedDict
|
|
89
|
+
from .vaultdepositparams import VaultDepositParams, VaultDepositParamsTypedDict
|
|
90
|
+
from .vaultwithdrawparams import VaultWithdrawParams, VaultWithdrawParamsTypedDict
|
|
87
91
|
from .wrapethparams import WrapEthParams, WrapEthParamsTypedDict
|
|
88
92
|
from compass_api_sdk.types import BaseModel
|
|
89
93
|
from compass_api_sdk.utils import get_discriminator
|
|
@@ -92,53 +96,58 @@ from typing import Union
|
|
|
92
96
|
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
93
97
|
|
|
94
98
|
|
|
95
|
-
|
|
96
|
-
"
|
|
99
|
+
UserOperationBodyTypedDict = TypeAliasType(
|
|
100
|
+
"UserOperationBodyTypedDict",
|
|
97
101
|
Union[
|
|
98
|
-
WrapEthParamsTypedDict,
|
|
99
102
|
PendleRedeemYieldParamsTypedDict,
|
|
103
|
+
WrapEthParamsTypedDict,
|
|
104
|
+
AaveSetUserEModeParamsTypedDict,
|
|
100
105
|
UnwrapWethParamsTypedDict,
|
|
106
|
+
EthenaUnstakeParamsTypedDict,
|
|
107
|
+
EthenaRequestToWithdrawParamsTypedDict,
|
|
101
108
|
SkySellParamsTypedDict,
|
|
102
|
-
SkyBuyParamsTypedDict,
|
|
103
|
-
UniswapWithdrawLiquidityProvisionParamsTypedDict,
|
|
104
109
|
SkyDepositParamsTypedDict,
|
|
105
|
-
|
|
110
|
+
SkyBuyParamsTypedDict,
|
|
106
111
|
AerodromeSlipstreamWithdrawLiquidityProvisionParamsTypedDict,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
EthenaDepositParamsTypedDict,
|
|
113
|
+
SkyWithdrawParamsTypedDict,
|
|
114
|
+
UniswapWithdrawLiquidityProvisionParamsTypedDict,
|
|
115
|
+
TokenTransferParamsTypedDict,
|
|
116
|
+
VaultWithdrawParamsTypedDict,
|
|
110
117
|
AaveWithdrawParamsTypedDict,
|
|
118
|
+
AaveSupplyParamsTypedDict,
|
|
111
119
|
MorphoWithdrawParamsTypedDict,
|
|
120
|
+
MorphoDepositParamsTypedDict,
|
|
112
121
|
SetAllowanceParamsTypedDict,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
PendleBuyYtParamsTypedDict,
|
|
116
|
-
AaveSupplyParamsTypedDict,
|
|
117
|
-
PendleRemoveLiquidityParamsTypedDict,
|
|
118
|
-
PendleSellPtParamsTypedDict,
|
|
122
|
+
VaultDepositParamsTypedDict,
|
|
123
|
+
AaveRepayParamsTypedDict,
|
|
119
124
|
MorphoBorrowParamsTypedDict,
|
|
120
|
-
MorphoSupplyCollateralParamsTypedDict,
|
|
121
|
-
MorphoRepayParamsTypedDict,
|
|
122
125
|
AaveBorrowParamsTypedDict,
|
|
126
|
+
OneInchSwapParamsTypedDict,
|
|
127
|
+
OdosSwapParamsTypedDict,
|
|
123
128
|
MorphoWithdrawCollateralParamsTypedDict,
|
|
124
|
-
|
|
125
|
-
|
|
129
|
+
MorphoSupplyCollateralParamsTypedDict,
|
|
130
|
+
MorphoRepayParamsTypedDict,
|
|
126
131
|
AerodromeSlipstreamSellExactlyParamsTypedDict,
|
|
127
|
-
|
|
132
|
+
AerodromeSlipstreamBuyExactlyParamsTypedDict,
|
|
128
133
|
UniswapIncreaseLiquidityProvisionParamsTypedDict,
|
|
129
|
-
AerodromeSlipstreamIncreaseLiquidityProvisionParamsTypedDict,
|
|
130
134
|
UniswapBuyExactlyParamsTypedDict,
|
|
131
135
|
UniswapSellExactlyParamsTypedDict,
|
|
132
|
-
|
|
136
|
+
AerodromeSlipstreamIncreaseLiquidityProvisionParamsTypedDict,
|
|
137
|
+
PendleTradeYtParamsTypedDict,
|
|
138
|
+
PendleTradePtParamsTypedDict,
|
|
139
|
+
PendleManageLiquidityParamsTypedDict,
|
|
133
140
|
UniswapMintLiquidityProvisionParamsTypedDict,
|
|
141
|
+
AerodromeSlipstreamMintLiquidityProvisionParamsTypedDict,
|
|
134
142
|
],
|
|
135
143
|
)
|
|
136
144
|
|
|
137
145
|
|
|
138
|
-
|
|
146
|
+
UserOperationBody = Annotated[
|
|
139
147
|
Union[
|
|
140
148
|
Annotated[AaveBorrowParams, Tag("AAVE_BORROW")],
|
|
141
149
|
Annotated[AaveRepayParams, Tag("AAVE_REPAY")],
|
|
150
|
+
Annotated[AaveSetUserEModeParams, Tag("AAVE_SET_USER_EMODE")],
|
|
142
151
|
Annotated[AaveSupplyParams, Tag("AAVE_SUPPLY")],
|
|
143
152
|
Annotated[AaveWithdrawParams, Tag("AAVE_WITHDRAW")],
|
|
144
153
|
Annotated[
|
|
@@ -160,26 +169,27 @@ Body = Annotated[
|
|
|
160
169
|
AerodromeSlipstreamWithdrawLiquidityProvisionParams,
|
|
161
170
|
Tag("AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"),
|
|
162
171
|
],
|
|
172
|
+
Annotated[EthenaDepositParams, Tag("ETHENA_DEPOSIT")],
|
|
173
|
+
Annotated[EthenaRequestToWithdrawParams, Tag("ETHENA_REQUEST_WITHDRAW")],
|
|
174
|
+
Annotated[EthenaUnstakeParams, Tag("ETHENA_UNSTAKE")],
|
|
163
175
|
Annotated[MorphoBorrowParams, Tag("MORPHO_BORROW")],
|
|
164
176
|
Annotated[MorphoDepositParams, Tag("MORPHO_DEPOSIT")],
|
|
165
177
|
Annotated[MorphoRepayParams, Tag("MORPHO_REPAY")],
|
|
166
178
|
Annotated[MorphoSupplyCollateralParams, Tag("MORPHO_SUPPLY_COLLATERAL")],
|
|
167
179
|
Annotated[MorphoWithdrawParams, Tag("MORPHO_WITHDRAW")],
|
|
168
180
|
Annotated[MorphoWithdrawCollateralParams, Tag("MORPHO_WITHDRAW_COLLATERAL")],
|
|
169
|
-
Annotated[
|
|
170
|
-
Annotated[
|
|
171
|
-
Annotated[
|
|
181
|
+
Annotated[OdosSwapParams, Tag("ODOS_SWAP")],
|
|
182
|
+
Annotated[OneInchSwapParams, Tag("ONE_INCH_SWAP")],
|
|
183
|
+
Annotated[PendleManageLiquidityParams, Tag("PENDLE_MANAGE_LIQUIDITY")],
|
|
172
184
|
Annotated[PendleRedeemYieldParams, Tag("PENDLE_REDEEM_YIELD")],
|
|
173
|
-
Annotated[
|
|
174
|
-
Annotated[
|
|
175
|
-
Annotated[PendleSellYtParams, Tag("PENDLE_SELL_YT")],
|
|
185
|
+
Annotated[PendleTradePtParams, Tag("PENDLE_TRADE_PT")],
|
|
186
|
+
Annotated[PendleTradeYtParams, Tag("PENDLE_TRADE_YT")],
|
|
176
187
|
Annotated[SetAllowanceParams, Tag("SET_ALLOWANCE")],
|
|
177
188
|
Annotated[SkyBuyParams, Tag("SKY_BUY")],
|
|
178
189
|
Annotated[SkyDepositParams, Tag("SKY_DEPOSIT")],
|
|
179
190
|
Annotated[SkySellParams, Tag("SKY_SELL")],
|
|
180
191
|
Annotated[SkyWithdrawParams, Tag("SKY_WITHDRAW")],
|
|
181
|
-
Annotated[
|
|
182
|
-
Annotated[TokenTransferErc20Params, Tag("TOKEN_TRANSFER_ERC20")],
|
|
192
|
+
Annotated[TokenTransferParams, Tag("TOKEN_TRANSFER")],
|
|
183
193
|
Annotated[
|
|
184
194
|
UniswapIncreaseLiquidityProvisionParams, Tag("UNISWAP_ADD_LIQUIDITY")
|
|
185
195
|
],
|
|
@@ -193,6 +203,8 @@ Body = Annotated[
|
|
|
193
203
|
Tag("UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"),
|
|
194
204
|
],
|
|
195
205
|
Annotated[UnwrapWethParams, Tag("UNWRAP_WETH")],
|
|
206
|
+
Annotated[VaultDepositParams, Tag("VAULT_DEPOSIT")],
|
|
207
|
+
Annotated[VaultWithdrawParams, Tag("VAULT_WITHDRAW")],
|
|
196
208
|
Annotated[WrapEthParams, Tag("WRAP_ETH")],
|
|
197
209
|
],
|
|
198
210
|
Discriminator(lambda m: get_discriminator(m, "action_type", "action_type")),
|
|
@@ -200,8 +212,8 @@ Body = Annotated[
|
|
|
200
212
|
|
|
201
213
|
|
|
202
214
|
class UserOperationTypedDict(TypedDict):
|
|
203
|
-
body:
|
|
215
|
+
body: UserOperationBodyTypedDict
|
|
204
216
|
|
|
205
217
|
|
|
206
218
|
class UserOperation(BaseModel):
|
|
207
|
-
body:
|
|
219
|
+
body: UserOperationBody
|
|
@@ -10,7 +10,7 @@ class UserOperationResponseTypedDict(TypedDict):
|
|
|
10
10
|
r"""The target contract address for the operation"""
|
|
11
11
|
data: str
|
|
12
12
|
r"""The calldata for the operation"""
|
|
13
|
-
value:
|
|
13
|
+
value: str
|
|
14
14
|
r"""The ETH value to send with the operation"""
|
|
15
15
|
|
|
16
16
|
|
|
@@ -21,5 +21,5 @@ class UserOperationResponse(BaseModel):
|
|
|
21
21
|
data: str
|
|
22
22
|
r"""The calldata for the operation"""
|
|
23
23
|
|
|
24
|
-
value:
|
|
24
|
+
value: str
|
|
25
25
|
r"""The ETH value to send with the operation"""
|
|
@@ -8,7 +8,7 @@ from typing_extensions import Annotated, TypedDict
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class UserStateTypedDict(TypedDict):
|
|
11
|
-
vaults_pnl_usd: str
|
|
11
|
+
vaults_pnl_usd: Nullable[str]
|
|
12
12
|
vaults_assets_usd: str
|
|
13
13
|
markets_pnl_usd: Nullable[str]
|
|
14
14
|
markets_borrow_assets_usd: str
|
|
@@ -17,7 +17,7 @@ class UserStateTypedDict(TypedDict):
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class UserState(BaseModel):
|
|
20
|
-
vaults_pnl_usd: Annotated[str, pydantic.Field(alias="vaultsPnlUsd")]
|
|
20
|
+
vaults_pnl_usd: Annotated[Nullable[str], pydantic.Field(alias="vaultsPnlUsd")]
|
|
21
21
|
|
|
22
22
|
vaults_assets_usd: Annotated[str, pydantic.Field(alias="vaultsAssetsUsd")]
|
|
23
23
|
|
|
@@ -36,7 +36,7 @@ class UserState(BaseModel):
|
|
|
36
36
|
@model_serializer(mode="wrap")
|
|
37
37
|
def serialize_model(self, handler):
|
|
38
38
|
optional_fields = []
|
|
39
|
-
nullable_fields = ["marketsPnlUsd"]
|
|
39
|
+
nullable_fields = ["vaultsPnlUsd", "marketsPnlUsd"]
|
|
40
40
|
null_default_fields = []
|
|
41
41
|
|
|
42
42
|
serialized = handler(self)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
12
|
+
from enum import Enum
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class V1AaveAaveSupportedTokensChain(str, Enum):
|
|
18
|
+
ARBITRUM = "arbitrum"
|
|
19
|
+
BASE = "base"
|
|
20
|
+
ETHEREUM = "ethereum"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class V1AaveAaveSupportedTokensRequestTypedDict(TypedDict):
|
|
24
|
+
chain: V1AaveAaveSupportedTokensChain
|
|
25
|
+
block: NotRequired[Nullable[int]]
|
|
26
|
+
r"""Optional block number (defaults to latest)."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class V1AaveAaveSupportedTokensRequest(BaseModel):
|
|
30
|
+
chain: Annotated[
|
|
31
|
+
V1AaveAaveSupportedTokensChain,
|
|
32
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
block: Annotated[
|
|
36
|
+
OptionalNullable[int],
|
|
37
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
38
|
+
] = UNSET
|
|
39
|
+
r"""Optional block number (defaults to latest)."""
|
|
40
|
+
|
|
41
|
+
@model_serializer(mode="wrap")
|
|
42
|
+
def serialize_model(self, handler):
|
|
43
|
+
optional_fields = ["block"]
|
|
44
|
+
nullable_fields = ["block"]
|
|
45
|
+
null_default_fields = []
|
|
46
|
+
|
|
47
|
+
serialized = handler(self)
|
|
48
|
+
|
|
49
|
+
m = {}
|
|
50
|
+
|
|
51
|
+
for n, f in type(self).model_fields.items():
|
|
52
|
+
k = f.alias or n
|
|
53
|
+
val = serialized.get(k)
|
|
54
|
+
serialized.pop(k, None)
|
|
55
|
+
|
|
56
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
57
|
+
is_set = (
|
|
58
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
59
|
+
or k in null_default_fields
|
|
60
|
+
) # pylint: disable=no-member
|
|
61
|
+
|
|
62
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
63
|
+
m[k] = val
|
|
64
|
+
elif val != UNSET_SENTINEL and (
|
|
65
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
66
|
+
):
|
|
67
|
+
m[k] = val
|
|
68
|
+
|
|
69
|
+
return m
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
12
|
+
from enum import Enum
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class V1AaveAvgRateChain(str, Enum):
|
|
18
|
+
ARBITRUM = "arbitrum"
|
|
19
|
+
BASE = "base"
|
|
20
|
+
ETHEREUM = "ethereum"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class V1AaveAvgRateRequestTypedDict(TypedDict):
|
|
24
|
+
chain: V1AaveAvgRateChain
|
|
25
|
+
token: str
|
|
26
|
+
r"""The symbol or address of the token.."""
|
|
27
|
+
days: int
|
|
28
|
+
r"""The number of days for which the average shall be calculated."""
|
|
29
|
+
block: NotRequired[Nullable[int]]
|
|
30
|
+
r"""Optional block number (defaults to latest)."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class V1AaveAvgRateRequest(BaseModel):
|
|
34
|
+
chain: Annotated[
|
|
35
|
+
V1AaveAvgRateChain,
|
|
36
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
token: Annotated[
|
|
40
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
41
|
+
]
|
|
42
|
+
r"""The symbol or address of the token.."""
|
|
43
|
+
|
|
44
|
+
days: Annotated[
|
|
45
|
+
int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
46
|
+
]
|
|
47
|
+
r"""The number of days for which the average shall be calculated."""
|
|
48
|
+
|
|
49
|
+
block: Annotated[
|
|
50
|
+
OptionalNullable[int],
|
|
51
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
52
|
+
] = UNSET
|
|
53
|
+
r"""Optional block number (defaults to latest)."""
|
|
54
|
+
|
|
55
|
+
@model_serializer(mode="wrap")
|
|
56
|
+
def serialize_model(self, handler):
|
|
57
|
+
optional_fields = ["block"]
|
|
58
|
+
nullable_fields = ["block"]
|
|
59
|
+
null_default_fields = []
|
|
60
|
+
|
|
61
|
+
serialized = handler(self)
|
|
62
|
+
|
|
63
|
+
m = {}
|
|
64
|
+
|
|
65
|
+
for n, f in type(self).model_fields.items():
|
|
66
|
+
k = f.alias or n
|
|
67
|
+
val = serialized.get(k)
|
|
68
|
+
serialized.pop(k, None)
|
|
69
|
+
|
|
70
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
71
|
+
is_set = (
|
|
72
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
73
|
+
or k in null_default_fields
|
|
74
|
+
) # pylint: disable=no-member
|
|
75
|
+
|
|
76
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
77
|
+
m[k] = val
|
|
78
|
+
elif val != UNSET_SENTINEL and (
|
|
79
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
80
|
+
):
|
|
81
|
+
m[k] = val
|
|
82
|
+
|
|
83
|
+
return m
|
compass_api_sdk/models/{aave_historical_transactionsop.py → v1_aave_historical_transactionsop.py}
RENAMED
|
@@ -8,45 +8,41 @@ from typing import Optional
|
|
|
8
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
12
|
-
|
|
11
|
+
class V1AaveHistoricalTransactionsChain(str, Enum):
|
|
12
|
+
ARBITRUM = "arbitrum"
|
|
13
|
+
BASE = "base"
|
|
14
|
+
ETHEREUM = "ethereum"
|
|
13
15
|
|
|
14
|
-
BASE_MAINNET = "base:mainnet"
|
|
15
|
-
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
16
|
-
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
class V1AaveHistoricalTransactionsRequestTypedDict(TypedDict):
|
|
18
|
+
chain: V1AaveHistoricalTransactionsChain
|
|
19
|
+
user_address: str
|
|
20
|
+
r"""The address of the user to get historical transactions for."""
|
|
20
21
|
offset: NotRequired[int]
|
|
21
22
|
r"""The offset of the first item to return."""
|
|
22
23
|
limit: NotRequired[int]
|
|
23
24
|
r"""The number of items to return."""
|
|
24
|
-
chain: AaveHistoricalTransactionsChain
|
|
25
|
-
r"""The chain to use."""
|
|
26
|
-
user_address: str
|
|
27
|
-
r"""The address of the user to get historical transactions for."""
|
|
28
25
|
|
|
29
26
|
|
|
30
|
-
class
|
|
27
|
+
class V1AaveHistoricalTransactionsRequest(BaseModel):
|
|
28
|
+
chain: Annotated[
|
|
29
|
+
V1AaveHistoricalTransactionsChain,
|
|
30
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
user_address: Annotated[
|
|
34
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
35
|
+
]
|
|
36
|
+
r"""The address of the user to get historical transactions for."""
|
|
37
|
+
|
|
31
38
|
offset: Annotated[
|
|
32
39
|
Optional[int],
|
|
33
40
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
34
|
-
] =
|
|
41
|
+
] = None
|
|
35
42
|
r"""The offset of the first item to return."""
|
|
36
43
|
|
|
37
44
|
limit: Annotated[
|
|
38
45
|
Optional[int],
|
|
39
46
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
40
|
-
] =
|
|
47
|
+
] = None
|
|
41
48
|
r"""The number of items to return."""
|
|
42
|
-
|
|
43
|
-
chain: Annotated[
|
|
44
|
-
AaveHistoricalTransactionsChain,
|
|
45
|
-
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
46
|
-
] = AaveHistoricalTransactionsChain.BASE_MAINNET
|
|
47
|
-
r"""The chain to use."""
|
|
48
|
-
|
|
49
|
-
user_address: Annotated[
|
|
50
|
-
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
51
|
-
] = "0x3254f3b1918637ba924e3F18968Cb74219974b63"
|
|
52
|
-
r"""The address of the user to get historical transactions for."""
|
|
@@ -0,0 +1,45 @@
|
|
|
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 FieldMetadata, QueryParamMetadata
|
|
6
|
+
from enum import Enum
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class V1AaveLiquidityChangeChain(str, Enum):
|
|
11
|
+
ARBITRUM = "arbitrum"
|
|
12
|
+
BASE = "base"
|
|
13
|
+
ETHEREUM = "ethereum"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class V1AaveLiquidityChangeRequestTypedDict(TypedDict):
|
|
17
|
+
chain: V1AaveLiquidityChangeChain
|
|
18
|
+
token: str
|
|
19
|
+
r"""The symbol or address of the asset to get liquidity change for.."""
|
|
20
|
+
start_block: int
|
|
21
|
+
r"""The start block to calculate liquidity change from."""
|
|
22
|
+
end_block: int
|
|
23
|
+
r"""The end block to calculate liquidity change to."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class V1AaveLiquidityChangeRequest(BaseModel):
|
|
27
|
+
chain: Annotated[
|
|
28
|
+
V1AaveLiquidityChangeChain,
|
|
29
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
token: Annotated[
|
|
33
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
34
|
+
]
|
|
35
|
+
r"""The symbol or address of the asset to get liquidity change for.."""
|
|
36
|
+
|
|
37
|
+
start_block: Annotated[
|
|
38
|
+
int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
39
|
+
]
|
|
40
|
+
r"""The start block to calculate liquidity change from."""
|
|
41
|
+
|
|
42
|
+
end_block: Annotated[
|
|
43
|
+
int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
44
|
+
]
|
|
45
|
+
r"""The end block to calculate liquidity change to."""
|
|
@@ -14,29 +14,30 @@ from pydantic import model_serializer
|
|
|
14
14
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
class
|
|
18
|
-
|
|
17
|
+
class V1AaveRateChain(str, Enum):
|
|
18
|
+
ARBITRUM = "arbitrum"
|
|
19
|
+
BASE = "base"
|
|
20
|
+
ETHEREUM = "ethereum"
|
|
19
21
|
|
|
20
|
-
BASE_MAINNET = "base:mainnet"
|
|
21
|
-
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
22
|
-
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
r"""The
|
|
23
|
+
class V1AaveRateRequestTypedDict(TypedDict):
|
|
24
|
+
chain: V1AaveRateChain
|
|
25
|
+
token: str
|
|
26
|
+
r"""The symbol or address of the token to fetch the user's position on.."""
|
|
28
27
|
block: NotRequired[Nullable[int]]
|
|
29
28
|
r"""Optional block number (defaults to latest)."""
|
|
30
|
-
market_address: str
|
|
31
|
-
r"""The market address of the desired position."""
|
|
32
29
|
|
|
33
30
|
|
|
34
|
-
class
|
|
31
|
+
class V1AaveRateRequest(BaseModel):
|
|
35
32
|
chain: Annotated[
|
|
36
|
-
|
|
33
|
+
V1AaveRateChain,
|
|
37
34
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
38
|
-
]
|
|
39
|
-
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
token: Annotated[
|
|
38
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
39
|
+
]
|
|
40
|
+
r"""The symbol or address of the token to fetch the user's position on.."""
|
|
40
41
|
|
|
41
42
|
block: Annotated[
|
|
42
43
|
OptionalNullable[int],
|
|
@@ -44,11 +45,6 @@ class PendleMarketRequest(BaseModel):
|
|
|
44
45
|
] = UNSET
|
|
45
46
|
r"""Optional block number (defaults to latest)."""
|
|
46
47
|
|
|
47
|
-
market_address: Annotated[
|
|
48
|
-
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
49
|
-
] = "0x46d62a8dede1bf2d0de04f2ed863245cbba5e538"
|
|
50
|
-
r"""The market address of the desired position."""
|
|
51
|
-
|
|
52
48
|
@model_serializer(mode="wrap")
|
|
53
49
|
def serialize_model(self, handler):
|
|
54
50
|
optional_fields = ["block"]
|