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
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .aavevenue import AaveVenue, AaveVenueTypedDict
|
|
5
|
+
from .vaultvenue import VaultVenue, VaultVenueTypedDict
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
|
+
from compass_api_sdk.utils import validate_const
|
|
8
|
+
from enum import Enum
|
|
9
|
+
import pydantic
|
|
10
|
+
from pydantic import Field
|
|
11
|
+
from pydantic.functional_validators import AfterValidator
|
|
12
|
+
from typing import Any, Literal, Optional, Union
|
|
13
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
EarnManageParamsVenueTypedDict = TypeAliasType(
|
|
17
|
+
"EarnManageParamsVenueTypedDict", Union[VaultVenueTypedDict, AaveVenueTypedDict]
|
|
18
|
+
)
|
|
19
|
+
r"""The earn venue."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
EarnManageParamsVenue = Annotated[
|
|
23
|
+
Union[AaveVenue, VaultVenue], Field(discriminator="TYPE")
|
|
24
|
+
]
|
|
25
|
+
r"""The earn venue."""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class EarnManageParamsAction(str, Enum):
|
|
29
|
+
r"""Whether you are depositing into or withdrawing from the given Earn `venue`."""
|
|
30
|
+
|
|
31
|
+
DEPOSIT = "DEPOSIT"
|
|
32
|
+
WITHDRAW = "WITHDRAW"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class EarnManageParamsTypedDict(TypedDict):
|
|
36
|
+
r"""Parameters for earn manage operations (deposit/withdraw to vault/Aave).
|
|
37
|
+
|
|
38
|
+
Used by multicall/bundle endpoint to specify manage actions. EarnManageRequest
|
|
39
|
+
inherits from this class.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
venue: EarnManageParamsVenueTypedDict
|
|
43
|
+
r"""The earn venue."""
|
|
44
|
+
action: EarnManageParamsAction
|
|
45
|
+
r"""Whether you are depositing into or withdrawing from the given Earn `venue`."""
|
|
46
|
+
amount: Any
|
|
47
|
+
r"""Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset. Provide as a decimal in token units (not wei); must be > 0."""
|
|
48
|
+
action_type: Literal["V2_MANAGE"]
|
|
49
|
+
r"""Action type identifier for manage operations."""
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class EarnManageParams(BaseModel):
|
|
53
|
+
r"""Parameters for earn manage operations (deposit/withdraw to vault/Aave).
|
|
54
|
+
|
|
55
|
+
Used by multicall/bundle endpoint to specify manage actions. EarnManageRequest
|
|
56
|
+
inherits from this class.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
venue: EarnManageParamsVenue
|
|
60
|
+
r"""The earn venue."""
|
|
61
|
+
|
|
62
|
+
action: EarnManageParamsAction
|
|
63
|
+
r"""Whether you are depositing into or withdrawing from the given Earn `venue`."""
|
|
64
|
+
|
|
65
|
+
amount: Any
|
|
66
|
+
r"""Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset. Provide as a decimal in token units (not wei); must be > 0."""
|
|
67
|
+
|
|
68
|
+
ACTION_TYPE: Annotated[
|
|
69
|
+
Annotated[
|
|
70
|
+
Optional[Literal["V2_MANAGE"]], AfterValidator(validate_const("V2_MANAGE"))
|
|
71
|
+
],
|
|
72
|
+
pydantic.Field(alias="action_type"),
|
|
73
|
+
] = "V2_MANAGE"
|
|
74
|
+
r"""Action type identifier for manage operations."""
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .aavevenue import AaveVenue, AaveVenueTypedDict
|
|
5
|
+
from .chain import Chain
|
|
6
|
+
from .fee import Fee, FeeTypedDict
|
|
7
|
+
from .vaultvenue import VaultVenue, VaultVenueTypedDict
|
|
8
|
+
from compass_api_sdk.types import (
|
|
9
|
+
BaseModel,
|
|
10
|
+
Nullable,
|
|
11
|
+
OptionalNullable,
|
|
12
|
+
UNSET,
|
|
13
|
+
UNSET_SENTINEL,
|
|
14
|
+
)
|
|
15
|
+
from compass_api_sdk.utils import validate_const
|
|
16
|
+
from enum import Enum
|
|
17
|
+
import pydantic
|
|
18
|
+
from pydantic import Field, model_serializer
|
|
19
|
+
from pydantic.functional_validators import AfterValidator
|
|
20
|
+
from typing import Any, Literal, Optional, Union
|
|
21
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
EarnManageRequestVenueTypedDict = TypeAliasType(
|
|
25
|
+
"EarnManageRequestVenueTypedDict", Union[VaultVenueTypedDict, AaveVenueTypedDict]
|
|
26
|
+
)
|
|
27
|
+
r"""The earn venue."""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
EarnManageRequestVenue = Annotated[
|
|
31
|
+
Union[AaveVenue, VaultVenue], Field(discriminator="TYPE")
|
|
32
|
+
]
|
|
33
|
+
r"""The earn venue."""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class EarnManageRequestAction(str, Enum):
|
|
37
|
+
r"""Whether you are depositing into or withdrawing from the given Earn `venue`."""
|
|
38
|
+
|
|
39
|
+
DEPOSIT = "DEPOSIT"
|
|
40
|
+
WITHDRAW = "WITHDRAW"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class EarnManageRequestTypedDict(TypedDict):
|
|
44
|
+
r"""Request model for the unified manage endpoint.
|
|
45
|
+
|
|
46
|
+
Inherits from EarnManageParams and adds context fields (owner, chain, etc).
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
venue: EarnManageRequestVenueTypedDict
|
|
50
|
+
r"""The earn venue."""
|
|
51
|
+
action: EarnManageRequestAction
|
|
52
|
+
r"""Whether you are depositing into or withdrawing from the given Earn `venue`."""
|
|
53
|
+
amount: Any
|
|
54
|
+
r"""Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset. Provide as a decimal in token units (not wei); must be > 0."""
|
|
55
|
+
owner: str
|
|
56
|
+
r"""The primary wallet address that owns and controls the Earn Account."""
|
|
57
|
+
chain: Chain
|
|
58
|
+
r"""The chain to use."""
|
|
59
|
+
action_type: Literal["V2_MANAGE"]
|
|
60
|
+
r"""Action type identifier for manage operations."""
|
|
61
|
+
gas_sponsorship: NotRequired[bool]
|
|
62
|
+
r"""Optionally request gas sponsorship. If set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`)."""
|
|
63
|
+
fee: NotRequired[Nullable[FeeTypedDict]]
|
|
64
|
+
r"""Optional fee configuration. If provided, a fee will be applied to the transaction amount and sent to the specified recipient address. The fee can be specified as a percentage of the transaction amount or as a fixed token amount."""
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class EarnManageRequest(BaseModel):
|
|
68
|
+
r"""Request model for the unified manage endpoint.
|
|
69
|
+
|
|
70
|
+
Inherits from EarnManageParams and adds context fields (owner, chain, etc).
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
venue: EarnManageRequestVenue
|
|
74
|
+
r"""The earn venue."""
|
|
75
|
+
|
|
76
|
+
action: EarnManageRequestAction
|
|
77
|
+
r"""Whether you are depositing into or withdrawing from the given Earn `venue`."""
|
|
78
|
+
|
|
79
|
+
amount: Any
|
|
80
|
+
r"""Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset. Provide as a decimal in token units (not wei); must be > 0."""
|
|
81
|
+
|
|
82
|
+
owner: str
|
|
83
|
+
r"""The primary wallet address that owns and controls the Earn Account."""
|
|
84
|
+
|
|
85
|
+
chain: Chain
|
|
86
|
+
r"""The chain to use."""
|
|
87
|
+
|
|
88
|
+
ACTION_TYPE: Annotated[
|
|
89
|
+
Annotated[
|
|
90
|
+
Optional[Literal["V2_MANAGE"]], AfterValidator(validate_const("V2_MANAGE"))
|
|
91
|
+
],
|
|
92
|
+
pydantic.Field(alias="action_type"),
|
|
93
|
+
] = "V2_MANAGE"
|
|
94
|
+
r"""Action type identifier for manage operations."""
|
|
95
|
+
|
|
96
|
+
gas_sponsorship: Optional[bool] = None
|
|
97
|
+
r"""Optionally request gas sponsorship. If set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`)."""
|
|
98
|
+
|
|
99
|
+
fee: OptionalNullable[Fee] = UNSET
|
|
100
|
+
r"""Optional fee configuration. If provided, a fee will be applied to the transaction amount and sent to the specified recipient address. The fee can be specified as a percentage of the transaction amount or as a fixed token amount."""
|
|
101
|
+
|
|
102
|
+
@model_serializer(mode="wrap")
|
|
103
|
+
def serialize_model(self, handler):
|
|
104
|
+
optional_fields = ["action_type", "gas_sponsorship", "fee"]
|
|
105
|
+
nullable_fields = ["fee"]
|
|
106
|
+
null_default_fields = []
|
|
107
|
+
|
|
108
|
+
serialized = handler(self)
|
|
109
|
+
|
|
110
|
+
m = {}
|
|
111
|
+
|
|
112
|
+
for n, f in type(self).model_fields.items():
|
|
113
|
+
k = f.alias or n
|
|
114
|
+
val = serialized.get(k)
|
|
115
|
+
serialized.pop(k, None)
|
|
116
|
+
|
|
117
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
118
|
+
is_set = (
|
|
119
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
120
|
+
or k in null_default_fields
|
|
121
|
+
) # pylint: disable=no-member
|
|
122
|
+
|
|
123
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
124
|
+
m[k] = val
|
|
125
|
+
elif val != UNSET_SENTINEL and (
|
|
126
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
127
|
+
):
|
|
128
|
+
m[k] = val
|
|
129
|
+
|
|
130
|
+
return m
|
|
@@ -1,38 +1,30 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .batchedsafeoperationsresponse_output import (
|
|
5
|
+
BatchedSafeOperationsResponseOutput,
|
|
6
|
+
BatchedSafeOperationsResponseOutputTypedDict,
|
|
7
|
+
)
|
|
8
|
+
from .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
|
|
4
9
|
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
5
|
-
import pydantic
|
|
6
10
|
from pydantic import model_serializer
|
|
7
|
-
from typing_extensions import
|
|
11
|
+
from typing_extensions import TypedDict
|
|
8
12
|
|
|
9
13
|
|
|
10
|
-
class
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
name: str
|
|
14
|
-
decimals: int
|
|
15
|
-
price_usd: str
|
|
16
|
-
logo_uri: Nullable[str]
|
|
14
|
+
class EarnManageResponseTypedDict(TypedDict):
|
|
15
|
+
transaction: Nullable[UnsignedTransactionTypedDict]
|
|
16
|
+
eip_712: Nullable[BatchedSafeOperationsResponseOutputTypedDict]
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class
|
|
20
|
-
|
|
19
|
+
class EarnManageResponse(BaseModel):
|
|
20
|
+
transaction: Nullable[UnsignedTransaction]
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
name: str
|
|
25
|
-
|
|
26
|
-
decimals: int
|
|
27
|
-
|
|
28
|
-
price_usd: Annotated[str, pydantic.Field(alias="priceUsd")]
|
|
29
|
-
|
|
30
|
-
logo_uri: Annotated[Nullable[str], pydantic.Field(alias="logoURI")]
|
|
22
|
+
eip_712: Nullable[BatchedSafeOperationsResponseOutput]
|
|
31
23
|
|
|
32
24
|
@model_serializer(mode="wrap")
|
|
33
25
|
def serialize_model(self, handler):
|
|
34
26
|
optional_fields = []
|
|
35
|
-
nullable_fields = ["
|
|
27
|
+
nullable_fields = ["transaction", "eip_712"]
|
|
36
28
|
null_default_fields = []
|
|
37
29
|
|
|
38
30
|
serialized = handler(self)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .aaveposition import AavePosition, AavePositionTypedDict
|
|
5
|
+
from .compass_api_backend_v2_models_earn_read_response_positions_vaultposition import (
|
|
6
|
+
CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition,
|
|
7
|
+
CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPositionTypedDict,
|
|
8
|
+
)
|
|
9
|
+
from compass_api_sdk.types import BaseModel
|
|
10
|
+
from pydantic import Field
|
|
11
|
+
from typing import List, Union
|
|
12
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
UserPositionTypedDict = TypeAliasType(
|
|
16
|
+
"UserPositionTypedDict",
|
|
17
|
+
Union[
|
|
18
|
+
CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPositionTypedDict,
|
|
19
|
+
AavePositionTypedDict,
|
|
20
|
+
],
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
UserPosition = Annotated[
|
|
25
|
+
Union[
|
|
26
|
+
AavePosition, CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition
|
|
27
|
+
],
|
|
28
|
+
Field(discriminator="TYPE"),
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class EarnPositionsResponseTypedDict(TypedDict):
|
|
33
|
+
user_positions: List[UserPositionTypedDict]
|
|
34
|
+
r"""A list of the user's earn positions."""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class EarnPositionsResponse(BaseModel):
|
|
38
|
+
user_positions: List[UserPosition]
|
|
39
|
+
r"""A list of the user's earn positions."""
|
|
@@ -0,0 +1,74 @@
|
|
|
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, Union
|
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
EarnSwapParamsAmountInTypedDict = TypeAliasType(
|
|
13
|
+
"EarnSwapParamsAmountInTypedDict", Union[float, str]
|
|
14
|
+
)
|
|
15
|
+
r"""Human-readable amount of `token_in` to swap (token units, not wei)."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
EarnSwapParamsAmountIn = TypeAliasType("EarnSwapParamsAmountIn", Union[float, str])
|
|
19
|
+
r"""Human-readable amount of `token_in` to swap (token units, not wei)."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
EarnSwapParamsSlippageTypedDict = TypeAliasType(
|
|
23
|
+
"EarnSwapParamsSlippageTypedDict", Union[float, str]
|
|
24
|
+
)
|
|
25
|
+
r"""Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%)."""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
EarnSwapParamsSlippage = TypeAliasType("EarnSwapParamsSlippage", Union[float, str])
|
|
29
|
+
r"""Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%)."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class EarnSwapParamsTypedDict(TypedDict):
|
|
33
|
+
r"""Parameters for swap operations (without context like owner/chain).
|
|
34
|
+
|
|
35
|
+
Used by multicall/bundle endpoint to specify swap actions.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
token_in: str
|
|
39
|
+
r"""Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address."""
|
|
40
|
+
token_out: str
|
|
41
|
+
r"""Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address."""
|
|
42
|
+
amount_in: EarnSwapParamsAmountInTypedDict
|
|
43
|
+
r"""Human-readable amount of `token_in` to swap (token units, not wei)."""
|
|
44
|
+
action_type: Literal["V2_SWAP"]
|
|
45
|
+
r"""Action type identifier for swap operations."""
|
|
46
|
+
slippage: NotRequired[EarnSwapParamsSlippageTypedDict]
|
|
47
|
+
r"""Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%)."""
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class EarnSwapParams(BaseModel):
|
|
51
|
+
r"""Parameters for swap operations (without context like owner/chain).
|
|
52
|
+
|
|
53
|
+
Used by multicall/bundle endpoint to specify swap actions.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
token_in: str
|
|
57
|
+
r"""Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address."""
|
|
58
|
+
|
|
59
|
+
token_out: str
|
|
60
|
+
r"""Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address."""
|
|
61
|
+
|
|
62
|
+
amount_in: EarnSwapParamsAmountIn
|
|
63
|
+
r"""Human-readable amount of `token_in` to swap (token units, not wei)."""
|
|
64
|
+
|
|
65
|
+
ACTION_TYPE: Annotated[
|
|
66
|
+
Annotated[
|
|
67
|
+
Optional[Literal["V2_SWAP"]], AfterValidator(validate_const("V2_SWAP"))
|
|
68
|
+
],
|
|
69
|
+
pydantic.Field(alias="action_type"),
|
|
70
|
+
] = "V2_SWAP"
|
|
71
|
+
r"""Action type identifier for swap operations."""
|
|
72
|
+
|
|
73
|
+
slippage: Optional[EarnSwapParamsSlippage] = None
|
|
74
|
+
r"""Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%)."""
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
EarnSwapRequestAmountInTypedDict = TypeAliasType(
|
|
14
|
+
"EarnSwapRequestAmountInTypedDict", Union[float, str]
|
|
15
|
+
)
|
|
16
|
+
r"""Human-readable amount of `token_in` to swap (token units, not wei)."""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
EarnSwapRequestAmountIn = TypeAliasType("EarnSwapRequestAmountIn", Union[float, str])
|
|
20
|
+
r"""Human-readable amount of `token_in` to swap (token units, not wei)."""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
EarnSwapRequestSlippageTypedDict = TypeAliasType(
|
|
24
|
+
"EarnSwapRequestSlippageTypedDict", Union[float, str]
|
|
25
|
+
)
|
|
26
|
+
r"""Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%)."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
EarnSwapRequestSlippage = TypeAliasType("EarnSwapRequestSlippage", Union[float, str])
|
|
30
|
+
r"""Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%)."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class EarnSwapRequestTypedDict(TypedDict):
|
|
34
|
+
r"""Request model for swap endpoint.
|
|
35
|
+
|
|
36
|
+
Inherits swap params and adds context fields (owner, chain, gas_sponsorship).
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
token_in: str
|
|
40
|
+
r"""Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address."""
|
|
41
|
+
token_out: str
|
|
42
|
+
r"""Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address."""
|
|
43
|
+
amount_in: EarnSwapRequestAmountInTypedDict
|
|
44
|
+
r"""Human-readable amount of `token_in` to swap (token units, not wei)."""
|
|
45
|
+
owner: str
|
|
46
|
+
r"""The owner's wallet address."""
|
|
47
|
+
chain: Chain
|
|
48
|
+
r"""The chain to use."""
|
|
49
|
+
action_type: Literal["V2_SWAP"]
|
|
50
|
+
r"""Action type identifier for swap operations."""
|
|
51
|
+
slippage: NotRequired[EarnSwapRequestSlippageTypedDict]
|
|
52
|
+
r"""Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%)."""
|
|
53
|
+
gas_sponsorship: NotRequired[bool]
|
|
54
|
+
r"""Optionally request gas sponsorship. If `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`)."""
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class EarnSwapRequest(BaseModel):
|
|
58
|
+
r"""Request model for swap endpoint.
|
|
59
|
+
|
|
60
|
+
Inherits swap params and adds context fields (owner, chain, gas_sponsorship).
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
token_in: str
|
|
64
|
+
r"""Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address."""
|
|
65
|
+
|
|
66
|
+
token_out: str
|
|
67
|
+
r"""Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address."""
|
|
68
|
+
|
|
69
|
+
amount_in: EarnSwapRequestAmountIn
|
|
70
|
+
r"""Human-readable amount of `token_in` to swap (token units, not wei)."""
|
|
71
|
+
|
|
72
|
+
owner: str
|
|
73
|
+
r"""The owner's wallet address."""
|
|
74
|
+
|
|
75
|
+
chain: Chain
|
|
76
|
+
r"""The chain to use."""
|
|
77
|
+
|
|
78
|
+
ACTION_TYPE: Annotated[
|
|
79
|
+
Annotated[
|
|
80
|
+
Optional[Literal["V2_SWAP"]], AfterValidator(validate_const("V2_SWAP"))
|
|
81
|
+
],
|
|
82
|
+
pydantic.Field(alias="action_type"),
|
|
83
|
+
] = "V2_SWAP"
|
|
84
|
+
r"""Action type identifier for swap operations."""
|
|
85
|
+
|
|
86
|
+
slippage: Optional[EarnSwapRequestSlippage] = None
|
|
87
|
+
r"""Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%)."""
|
|
88
|
+
|
|
89
|
+
gas_sponsorship: Optional[bool] = None
|
|
90
|
+
r"""Optionally request gas sponsorship. If `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`)."""
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .batchedsafeoperationsresponse_output import (
|
|
5
|
+
BatchedSafeOperationsResponseOutput,
|
|
6
|
+
BatchedSafeOperationsResponseOutputTypedDict,
|
|
7
|
+
)
|
|
8
|
+
from .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
|
|
9
|
+
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
10
|
+
from pydantic import model_serializer
|
|
11
|
+
from typing_extensions import TypedDict
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class EarnSwapResponseTypedDict(TypedDict):
|
|
15
|
+
transaction: Nullable[UnsignedTransactionTypedDict]
|
|
16
|
+
eip_712: Nullable[BatchedSafeOperationsResponseOutputTypedDict]
|
|
17
|
+
estimated_amount_out: str
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class EarnSwapResponse(BaseModel):
|
|
21
|
+
transaction: Nullable[UnsignedTransaction]
|
|
22
|
+
|
|
23
|
+
eip_712: Nullable[BatchedSafeOperationsResponseOutput]
|
|
24
|
+
|
|
25
|
+
estimated_amount_out: str
|
|
26
|
+
|
|
27
|
+
@model_serializer(mode="wrap")
|
|
28
|
+
def serialize_model(self, handler):
|
|
29
|
+
optional_fields = []
|
|
30
|
+
nullable_fields = ["transaction", "eip_712"]
|
|
31
|
+
null_default_fields = []
|
|
32
|
+
|
|
33
|
+
serialized = handler(self)
|
|
34
|
+
|
|
35
|
+
m = {}
|
|
36
|
+
|
|
37
|
+
for n, f in type(self).model_fields.items():
|
|
38
|
+
k = f.alias or n
|
|
39
|
+
val = serialized.get(k)
|
|
40
|
+
serialized.pop(k, None)
|
|
41
|
+
|
|
42
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
43
|
+
is_set = (
|
|
44
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
45
|
+
or k in null_default_fields
|
|
46
|
+
) # pylint: disable=no-member
|
|
47
|
+
|
|
48
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
49
|
+
m[k] = val
|
|
50
|
+
elif val != UNSET_SENTINEL and (
|
|
51
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
52
|
+
):
|
|
53
|
+
m[k] = val
|
|
54
|
+
|
|
55
|
+
return m
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from compass_api_sdk.types import (
|
|
6
|
+
BaseModel,
|
|
7
|
+
Nullable,
|
|
8
|
+
OptionalNullable,
|
|
9
|
+
UNSET,
|
|
10
|
+
UNSET_SENTINEL,
|
|
11
|
+
)
|
|
12
|
+
from 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
|
+
EarnTransferRequestAmountTypedDict = TypeAliasType(
|
|
19
|
+
"EarnTransferRequestAmountTypedDict", Union[float, str]
|
|
20
|
+
)
|
|
21
|
+
r"""The amount of 'token' to transfer."""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
EarnTransferRequestAmount = TypeAliasType(
|
|
25
|
+
"EarnTransferRequestAmount", Union[float, str]
|
|
26
|
+
)
|
|
27
|
+
r"""The amount of 'token' to transfer."""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class EarnTransferRequestAction(str, Enum):
|
|
31
|
+
r"""Whether you are depositing to or withdrawing from your earn account."""
|
|
32
|
+
|
|
33
|
+
DEPOSIT = "DEPOSIT"
|
|
34
|
+
WITHDRAW = "WITHDRAW"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class EarnTransferRequestTypedDict(TypedDict):
|
|
38
|
+
owner: str
|
|
39
|
+
r"""The owner's wallet address."""
|
|
40
|
+
chain: Chain
|
|
41
|
+
r"""The chain to use."""
|
|
42
|
+
token: str
|
|
43
|
+
r"""The token you would like to transfer."""
|
|
44
|
+
amount: EarnTransferRequestAmountTypedDict
|
|
45
|
+
r"""The amount of 'token' to transfer."""
|
|
46
|
+
action: EarnTransferRequestAction
|
|
47
|
+
r"""Whether you are depositing to or withdrawing from your earn account."""
|
|
48
|
+
gas_sponsorship: NotRequired[bool]
|
|
49
|
+
r"""Optionally request gas sponsorship. If set to `true`, EIP-712 signature data will be returned that must be signed by the `owner` and submitted to the `/gas_sponsorship/prepare` endpoint."""
|
|
50
|
+
spender: NotRequired[Nullable[str]]
|
|
51
|
+
r"""The address of the wallet which will send the transaction. This only needs to be set when `action` is 'DEPOSIT' and `gas_sponsorship` is `true`."""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class EarnTransferRequest(BaseModel):
|
|
55
|
+
owner: str
|
|
56
|
+
r"""The owner's wallet address."""
|
|
57
|
+
|
|
58
|
+
chain: Chain
|
|
59
|
+
r"""The chain to use."""
|
|
60
|
+
|
|
61
|
+
token: str
|
|
62
|
+
r"""The token you would like to transfer."""
|
|
63
|
+
|
|
64
|
+
amount: EarnTransferRequestAmount
|
|
65
|
+
r"""The amount of 'token' to transfer."""
|
|
66
|
+
|
|
67
|
+
action: EarnTransferRequestAction
|
|
68
|
+
r"""Whether you are depositing to or withdrawing from your earn account."""
|
|
69
|
+
|
|
70
|
+
gas_sponsorship: Optional[bool] = None
|
|
71
|
+
r"""Optionally request gas sponsorship. If set to `true`, EIP-712 signature data will be returned that must be signed by the `owner` and submitted to the `/gas_sponsorship/prepare` endpoint."""
|
|
72
|
+
|
|
73
|
+
spender: OptionalNullable[str] = UNSET
|
|
74
|
+
r"""The address of the wallet which will send the transaction. This only needs to be set when `action` is 'DEPOSIT' and `gas_sponsorship` is `true`."""
|
|
75
|
+
|
|
76
|
+
@model_serializer(mode="wrap")
|
|
77
|
+
def serialize_model(self, handler):
|
|
78
|
+
optional_fields = ["gas_sponsorship", "spender"]
|
|
79
|
+
nullable_fields = ["spender"]
|
|
80
|
+
null_default_fields = []
|
|
81
|
+
|
|
82
|
+
serialized = handler(self)
|
|
83
|
+
|
|
84
|
+
m = {}
|
|
85
|
+
|
|
86
|
+
for n, f in type(self).model_fields.items():
|
|
87
|
+
k = f.alias or n
|
|
88
|
+
val = serialized.get(k)
|
|
89
|
+
serialized.pop(k, None)
|
|
90
|
+
|
|
91
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
92
|
+
is_set = (
|
|
93
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
94
|
+
or k in null_default_fields
|
|
95
|
+
) # pylint: disable=no-member
|
|
96
|
+
|
|
97
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
98
|
+
m[k] = val
|
|
99
|
+
elif val != UNSET_SENTINEL and (
|
|
100
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
101
|
+
):
|
|
102
|
+
m[k] = val
|
|
103
|
+
|
|
104
|
+
return m
|