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,24 +1,15 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .token_enum import TokenEnum
|
|
5
4
|
from compass_api_sdk.types import BaseModel
|
|
6
5
|
from typing_extensions import TypedDict
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
class UniswapPoolPriceResponseTypedDict(TypedDict):
|
|
10
|
-
token_in:
|
|
11
|
-
r"""
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
endpoints' documentation where per chain tokens are presented.
|
|
15
|
-
"""
|
|
16
|
-
token_out: TokenEnum
|
|
17
|
-
r"""A class representing the token.
|
|
18
|
-
|
|
19
|
-
This class is used to represent the token in the system. Notice individual
|
|
20
|
-
endpoints' documentation where per chain tokens are presented.
|
|
21
|
-
"""
|
|
9
|
+
token_in: str
|
|
10
|
+
r"""The first token in the pool"""
|
|
11
|
+
token_out: str
|
|
12
|
+
r"""The second token in the pool"""
|
|
22
13
|
price: str
|
|
23
14
|
r"""The price of the pool. This is expressed as an instantanteous amount of how many token0 you need to buy 1 token1. In any swap this will not change during the trade; use the quote endpoint to get a better idea of how much you will pay!"""
|
|
24
15
|
tick: int
|
|
@@ -26,19 +17,11 @@ class UniswapPoolPriceResponseTypedDict(TypedDict):
|
|
|
26
17
|
|
|
27
18
|
|
|
28
19
|
class UniswapPoolPriceResponse(BaseModel):
|
|
29
|
-
token_in:
|
|
30
|
-
r"""
|
|
20
|
+
token_in: str
|
|
21
|
+
r"""The first token in the pool"""
|
|
31
22
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"""
|
|
35
|
-
|
|
36
|
-
token_out: TokenEnum
|
|
37
|
-
r"""A class representing the token.
|
|
38
|
-
|
|
39
|
-
This class is used to represent the token in the system. Notice individual
|
|
40
|
-
endpoints' documentation where per chain tokens are presented.
|
|
41
|
-
"""
|
|
23
|
+
token_out: str
|
|
24
|
+
r"""The second token in the pool"""
|
|
42
25
|
|
|
43
26
|
price: str
|
|
44
27
|
r"""The price of the pool. This is expressed as an instantanteous amount of how many token0 you need to buy 1 token1. In any swap this will not change during the trade; use the quote endpoint to get a better idea of how much you will pay!"""
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from compass_api_sdk.types import
|
|
5
|
-
|
|
4
|
+
from compass_api_sdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from pydantic import model_serializer
|
|
12
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
13
|
|
|
7
14
|
|
|
8
15
|
class UniswapPositionsSolidityResponseTypedDict(TypedDict):
|
|
@@ -18,6 +25,7 @@ class UniswapPositionsSolidityResponseTypedDict(TypedDict):
|
|
|
18
25
|
fee_growth_inside1_last_x128: int
|
|
19
26
|
tokens_owed0: int
|
|
20
27
|
tokens_owed1: int
|
|
28
|
+
lp_token_address: NotRequired[Nullable[str]]
|
|
21
29
|
|
|
22
30
|
|
|
23
31
|
class UniswapPositionsSolidityResponse(BaseModel):
|
|
@@ -44,3 +52,35 @@ class UniswapPositionsSolidityResponse(BaseModel):
|
|
|
44
52
|
tokens_owed0: int
|
|
45
53
|
|
|
46
54
|
tokens_owed1: int
|
|
55
|
+
|
|
56
|
+
lp_token_address: OptionalNullable[str] = UNSET
|
|
57
|
+
|
|
58
|
+
@model_serializer(mode="wrap")
|
|
59
|
+
def serialize_model(self, handler):
|
|
60
|
+
optional_fields = ["lp_token_address"]
|
|
61
|
+
nullable_fields = ["lp_token_address"]
|
|
62
|
+
null_default_fields = []
|
|
63
|
+
|
|
64
|
+
serialized = handler(self)
|
|
65
|
+
|
|
66
|
+
m = {}
|
|
67
|
+
|
|
68
|
+
for n, f in type(self).model_fields.items():
|
|
69
|
+
k = f.alias or n
|
|
70
|
+
val = serialized.get(k)
|
|
71
|
+
serialized.pop(k, None)
|
|
72
|
+
|
|
73
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
74
|
+
is_set = (
|
|
75
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
76
|
+
or k in null_default_fields
|
|
77
|
+
) # pylint: disable=no-member
|
|
78
|
+
|
|
79
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
80
|
+
m[k] = val
|
|
81
|
+
elif val != UNSET_SENTINEL and (
|
|
82
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
83
|
+
):
|
|
84
|
+
m[k] = val
|
|
85
|
+
|
|
86
|
+
return m
|
|
@@ -2,72 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .feeenum import FeeEnum
|
|
5
|
-
from .token_enum import TokenEnum
|
|
6
5
|
from compass_api_sdk.types import BaseModel
|
|
7
6
|
from compass_api_sdk.utils import validate_const
|
|
8
7
|
import pydantic
|
|
9
8
|
from pydantic.functional_validators import AfterValidator
|
|
10
9
|
from typing import Literal, Optional, Union
|
|
11
|
-
from typing_extensions import Annotated,
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
"
|
|
13
|
+
UniswapSellExactlyParamsAmountInTypedDict = TypeAliasType(
|
|
14
|
+
"UniswapSellExactlyParamsAmountInTypedDict", Union[float, str]
|
|
16
15
|
)
|
|
17
|
-
r"""The amount of the
|
|
16
|
+
r"""The amount of the `token_in` to sell"""
|
|
18
17
|
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
"
|
|
19
|
+
UniswapSellExactlyParamsAmountIn = TypeAliasType(
|
|
20
|
+
"UniswapSellExactlyParamsAmountIn", Union[float, str]
|
|
22
21
|
)
|
|
23
|
-
r"""The amount of the
|
|
22
|
+
r"""The amount of the `token_in` to sell"""
|
|
24
23
|
|
|
25
24
|
|
|
26
25
|
class UniswapSellExactlyParamsTypedDict(TypedDict):
|
|
27
26
|
r"""Parameters model for selling exactly an amount of tokens."""
|
|
28
27
|
|
|
29
|
-
token_in:
|
|
30
|
-
r"""
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
endpoints' documentation where per chain tokens are presented.
|
|
34
|
-
"""
|
|
35
|
-
token_out: TokenEnum
|
|
36
|
-
r"""A class representing the token.
|
|
37
|
-
|
|
38
|
-
This class is used to represent the token in the system. Notice individual
|
|
39
|
-
endpoints' documentation where per chain tokens are presented.
|
|
40
|
-
"""
|
|
28
|
+
token_in: str
|
|
29
|
+
r"""The symbol or address of the token to sell.."""
|
|
30
|
+
token_out: str
|
|
31
|
+
r"""The symbol or address of the token to buy.."""
|
|
41
32
|
fee: FeeEnum
|
|
42
33
|
r"""The transaction fee of a Uniswap pool in bips.
|
|
43
34
|
|
|
44
35
|
Uniswap supports 4 different fee levels.
|
|
45
36
|
"""
|
|
46
|
-
|
|
47
|
-
r"""The amount of the
|
|
37
|
+
amount_in: UniswapSellExactlyParamsAmountInTypedDict
|
|
38
|
+
r"""The amount of the `token_in` to sell"""
|
|
48
39
|
max_slippage_percent: float
|
|
49
40
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
|
|
50
41
|
action_type: Literal["UNISWAP_SELL_EXACTLY"]
|
|
51
|
-
wrap_eth: NotRequired[bool]
|
|
52
|
-
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
53
42
|
|
|
54
43
|
|
|
55
44
|
class UniswapSellExactlyParams(BaseModel):
|
|
56
45
|
r"""Parameters model for selling exactly an amount of tokens."""
|
|
57
46
|
|
|
58
|
-
token_in:
|
|
59
|
-
r"""
|
|
47
|
+
token_in: str
|
|
48
|
+
r"""The symbol or address of the token to sell.."""
|
|
60
49
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"""
|
|
64
|
-
|
|
65
|
-
token_out: TokenEnum
|
|
66
|
-
r"""A class representing the token.
|
|
67
|
-
|
|
68
|
-
This class is used to represent the token in the system. Notice individual
|
|
69
|
-
endpoints' documentation where per chain tokens are presented.
|
|
70
|
-
"""
|
|
50
|
+
token_out: str
|
|
51
|
+
r"""The symbol or address of the token to buy.."""
|
|
71
52
|
|
|
72
53
|
fee: FeeEnum
|
|
73
54
|
r"""The transaction fee of a Uniswap pool in bips.
|
|
@@ -75,8 +56,8 @@ class UniswapSellExactlyParams(BaseModel):
|
|
|
75
56
|
Uniswap supports 4 different fee levels.
|
|
76
57
|
"""
|
|
77
58
|
|
|
78
|
-
|
|
79
|
-
r"""The amount of the
|
|
59
|
+
amount_in: UniswapSellExactlyParamsAmountIn
|
|
60
|
+
r"""The amount of the `token_in` to sell"""
|
|
80
61
|
|
|
81
62
|
max_slippage_percent: float
|
|
82
63
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
|
|
@@ -88,6 +69,3 @@ class UniswapSellExactlyParams(BaseModel):
|
|
|
88
69
|
],
|
|
89
70
|
pydantic.Field(alias="action_type"),
|
|
90
71
|
] = "UNISWAP_SELL_EXACTLY"
|
|
91
|
-
|
|
92
|
-
wrap_eth: Optional[bool] = False
|
|
93
|
-
r"""Whether to wrap ETH to WETH, only use when swapping WETH into something"""
|
|
@@ -1,78 +1,66 @@
|
|
|
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 .feeenum import FeeEnum
|
|
6
|
-
from .token_enum import TokenEnum
|
|
7
5
|
from compass_api_sdk.types import BaseModel
|
|
8
6
|
from compass_api_sdk.utils import validate_const
|
|
7
|
+
from enum import Enum
|
|
9
8
|
import pydantic
|
|
10
9
|
from pydantic.functional_validators import AfterValidator
|
|
11
10
|
from typing import Literal, Optional, Union
|
|
12
11
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
13
12
|
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
"
|
|
14
|
+
UniswapSellExactlyRequestAmountInTypedDict = TypeAliasType(
|
|
15
|
+
"UniswapSellExactlyRequestAmountInTypedDict", Union[float, str]
|
|
17
16
|
)
|
|
18
|
-
r"""The amount of the
|
|
17
|
+
r"""The amount of the `token_in` to sell"""
|
|
19
18
|
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
"
|
|
20
|
+
UniswapSellExactlyRequestAmountIn = TypeAliasType(
|
|
21
|
+
"UniswapSellExactlyRequestAmountIn", Union[float, str]
|
|
23
22
|
)
|
|
24
|
-
r"""The amount of the
|
|
23
|
+
r"""The amount of the `token_in` to sell"""
|
|
25
24
|
|
|
26
25
|
|
|
27
|
-
class
|
|
28
|
-
|
|
26
|
+
class UniswapSellExactlyRequestChain(str, Enum):
|
|
27
|
+
ARBITRUM = "arbitrum"
|
|
28
|
+
BASE = "base"
|
|
29
|
+
ETHEREUM = "ethereum"
|
|
29
30
|
|
|
30
|
-
token_in: TokenEnum
|
|
31
|
-
r"""A class representing the token.
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"""
|
|
36
|
-
token_out: TokenEnum
|
|
37
|
-
r"""A class representing the token.
|
|
32
|
+
class UniswapSellExactlyRequestTypedDict(TypedDict):
|
|
33
|
+
r"""Request model for selling exactly an amount of tokens."""
|
|
38
34
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
token_in: str
|
|
36
|
+
r"""The symbol or address of the token to sell.."""
|
|
37
|
+
token_out: str
|
|
38
|
+
r"""The symbol or address of the token to buy.."""
|
|
42
39
|
fee: FeeEnum
|
|
43
40
|
r"""The transaction fee of a Uniswap pool in bips.
|
|
44
41
|
|
|
45
42
|
Uniswap supports 4 different fee levels.
|
|
46
43
|
"""
|
|
47
|
-
|
|
48
|
-
r"""The amount of the
|
|
44
|
+
amount_in: UniswapSellExactlyRequestAmountInTypedDict
|
|
45
|
+
r"""The amount of the `token_in` to sell"""
|
|
49
46
|
max_slippage_percent: float
|
|
50
47
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
|
|
51
|
-
chain:
|
|
52
|
-
r"""The chain to use."""
|
|
48
|
+
chain: UniswapSellExactlyRequestChain
|
|
53
49
|
sender: str
|
|
54
50
|
r"""The address of the transaction sender."""
|
|
55
51
|
action_type: Literal["UNISWAP_SELL_EXACTLY"]
|
|
56
|
-
|
|
57
|
-
r"""
|
|
52
|
+
estimate_gas: NotRequired[bool]
|
|
53
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
58
54
|
|
|
59
55
|
|
|
60
56
|
class UniswapSellExactlyRequest(BaseModel):
|
|
61
57
|
r"""Request model for selling exactly an amount of tokens."""
|
|
62
58
|
|
|
63
|
-
token_in:
|
|
64
|
-
r"""
|
|
65
|
-
|
|
66
|
-
This class is used to represent the token in the system. Notice individual
|
|
67
|
-
endpoints' documentation where per chain tokens are presented.
|
|
68
|
-
"""
|
|
59
|
+
token_in: str
|
|
60
|
+
r"""The symbol or address of the token to sell.."""
|
|
69
61
|
|
|
70
|
-
token_out:
|
|
71
|
-
r"""
|
|
72
|
-
|
|
73
|
-
This class is used to represent the token in the system. Notice individual
|
|
74
|
-
endpoints' documentation where per chain tokens are presented.
|
|
75
|
-
"""
|
|
62
|
+
token_out: str
|
|
63
|
+
r"""The symbol or address of the token to buy.."""
|
|
76
64
|
|
|
77
65
|
fee: FeeEnum
|
|
78
66
|
r"""The transaction fee of a Uniswap pool in bips.
|
|
@@ -80,14 +68,13 @@ class UniswapSellExactlyRequest(BaseModel):
|
|
|
80
68
|
Uniswap supports 4 different fee levels.
|
|
81
69
|
"""
|
|
82
70
|
|
|
83
|
-
|
|
84
|
-
r"""The amount of the
|
|
71
|
+
amount_in: UniswapSellExactlyRequestAmountIn
|
|
72
|
+
r"""The amount of the `token_in` to sell"""
|
|
85
73
|
|
|
86
74
|
max_slippage_percent: float
|
|
87
75
|
r"""The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed."""
|
|
88
76
|
|
|
89
|
-
chain:
|
|
90
|
-
r"""The chain to use."""
|
|
77
|
+
chain: UniswapSellExactlyRequestChain
|
|
91
78
|
|
|
92
79
|
sender: str
|
|
93
80
|
r"""The address of the transaction sender."""
|
|
@@ -100,5 +87,5 @@ class UniswapSellExactlyRequest(BaseModel):
|
|
|
100
87
|
pydantic.Field(alias="action_type"),
|
|
101
88
|
] = "UNISWAP_SELL_EXACTLY"
|
|
102
89
|
|
|
103
|
-
|
|
104
|
-
r"""
|
|
90
|
+
estimate_gas: Optional[bool] = None
|
|
91
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .unsignedtransaction import UnsignedTransaction, UnsignedTransactionTypedDict
|
|
5
|
+
from .useroperationresponse import UserOperationResponse, UserOperationResponseTypedDict
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
|
+
from typing import Union
|
|
8
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
UniswapSellExactlyTransactionResponseTransactionTypedDict = TypeAliasType(
|
|
12
|
+
"UniswapSellExactlyTransactionResponseTransactionTypedDict",
|
|
13
|
+
Union[UserOperationResponseTypedDict, UnsignedTransactionTypedDict],
|
|
14
|
+
)
|
|
15
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
UniswapSellExactlyTransactionResponseTransaction = TypeAliasType(
|
|
19
|
+
"UniswapSellExactlyTransactionResponseTransaction",
|
|
20
|
+
Union[UserOperationResponse, UnsignedTransaction],
|
|
21
|
+
)
|
|
22
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class UniswapSellExactlyTransactionResponseTypedDict(TypedDict):
|
|
26
|
+
transaction: UniswapSellExactlyTransactionResponseTransactionTypedDict
|
|
27
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
28
|
+
amount_out_quote: str
|
|
29
|
+
r"""The estimated amount out for the transaction. The actual output amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class UniswapSellExactlyTransactionResponse(BaseModel):
|
|
33
|
+
transaction: UniswapSellExactlyTransactionResponseTransaction
|
|
34
|
+
r"""The unsigned transaction data. User must sign and broadcast to network."""
|
|
35
|
+
|
|
36
|
+
amount_out_quote: str
|
|
37
|
+
r"""The estimated amount out for the transaction. The actual output amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote."""
|
|
@@ -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
|
UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict = (
|
|
@@ -25,6 +25,12 @@ UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawal = TypeAliasType(
|
|
|
25
25
|
r"""How much liquidity to take out in percentage."""
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
class UniswapWithdrawLiquidityProvisionRequestChain(str, Enum):
|
|
29
|
+
ARBITRUM = "arbitrum"
|
|
30
|
+
BASE = "base"
|
|
31
|
+
ETHEREUM = "ethereum"
|
|
32
|
+
|
|
33
|
+
|
|
28
34
|
class UniswapWithdrawLiquidityProvisionRequestTypedDict(TypedDict):
|
|
29
35
|
token_id: int
|
|
30
36
|
r"""Token ID of the NFT representing the liquidity provisioned position."""
|
|
@@ -32,11 +38,12 @@ class UniswapWithdrawLiquidityProvisionRequestTypedDict(TypedDict):
|
|
|
32
38
|
UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict
|
|
33
39
|
)
|
|
34
40
|
r"""How much liquidity to take out in percentage."""
|
|
35
|
-
chain:
|
|
36
|
-
r"""The chain to use."""
|
|
41
|
+
chain: UniswapWithdrawLiquidityProvisionRequestChain
|
|
37
42
|
sender: str
|
|
38
43
|
r"""The address of the transaction sender."""
|
|
39
44
|
action_type: Literal["UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"]
|
|
45
|
+
estimate_gas: NotRequired[bool]
|
|
46
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
40
47
|
|
|
41
48
|
|
|
42
49
|
class UniswapWithdrawLiquidityProvisionRequest(BaseModel):
|
|
@@ -48,8 +55,7 @@ class UniswapWithdrawLiquidityProvisionRequest(BaseModel):
|
|
|
48
55
|
)
|
|
49
56
|
r"""How much liquidity to take out in percentage."""
|
|
50
57
|
|
|
51
|
-
chain:
|
|
52
|
-
r"""The chain to use."""
|
|
58
|
+
chain: UniswapWithdrawLiquidityProvisionRequestChain
|
|
53
59
|
|
|
54
60
|
sender: str
|
|
55
61
|
r"""The address of the transaction sender."""
|
|
@@ -61,3 +67,6 @@ class UniswapWithdrawLiquidityProvisionRequest(BaseModel):
|
|
|
61
67
|
],
|
|
62
68
|
pydantic.Field(alias="action_type"),
|
|
63
69
|
] = "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"
|
|
70
|
+
|
|
71
|
+
estimate_gas: Optional[bool] = None
|
|
72
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -2,37 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .signedauthorization import SignedAuthorization, SignedAuthorizationTypedDict
|
|
5
|
-
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
6
6
|
import pydantic
|
|
7
|
+
from pydantic import model_serializer
|
|
7
8
|
from typing import List, Optional
|
|
8
9
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class UnsignedMulticallTransactionTypedDict(TypedDict):
|
|
12
|
-
chain_id:
|
|
13
|
+
chain_id: str
|
|
13
14
|
r"""The chain id of the transaction"""
|
|
14
15
|
data: str
|
|
15
16
|
r"""The data of the transaction"""
|
|
16
17
|
from_: str
|
|
17
18
|
r"""The sender of the transaction"""
|
|
18
|
-
gas:
|
|
19
|
+
gas: Nullable[str]
|
|
19
20
|
r"""The gas of the transaction"""
|
|
20
21
|
to: str
|
|
21
22
|
r"""The recipient of the transaction"""
|
|
22
|
-
value:
|
|
23
|
+
value: str
|
|
23
24
|
r"""The value of the transaction"""
|
|
24
|
-
nonce:
|
|
25
|
+
nonce: str
|
|
25
26
|
r"""The nonce of the address"""
|
|
26
|
-
max_fee_per_gas:
|
|
27
|
+
max_fee_per_gas: str
|
|
27
28
|
r"""The max fee per gas of the transaction"""
|
|
28
|
-
max_priority_fee_per_gas:
|
|
29
|
+
max_priority_fee_per_gas: str
|
|
29
30
|
r"""The max priority fee per gas of the transaction"""
|
|
30
31
|
authorization_list: NotRequired[List[SignedAuthorizationTypedDict]]
|
|
31
32
|
r"""EIP-7702 authorization"""
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
class UnsignedMulticallTransaction(BaseModel):
|
|
35
|
-
chain_id: Annotated[
|
|
36
|
+
chain_id: Annotated[str, pydantic.Field(alias="chainId")]
|
|
36
37
|
r"""The chain id of the transaction"""
|
|
37
38
|
|
|
38
39
|
data: str
|
|
@@ -41,23 +42,23 @@ class UnsignedMulticallTransaction(BaseModel):
|
|
|
41
42
|
from_: Annotated[str, pydantic.Field(alias="from")]
|
|
42
43
|
r"""The sender of the transaction"""
|
|
43
44
|
|
|
44
|
-
gas:
|
|
45
|
+
gas: Nullable[str]
|
|
45
46
|
r"""The gas of the transaction"""
|
|
46
47
|
|
|
47
48
|
to: str
|
|
48
49
|
r"""The recipient of the transaction"""
|
|
49
50
|
|
|
50
|
-
value:
|
|
51
|
+
value: str
|
|
51
52
|
r"""The value of the transaction"""
|
|
52
53
|
|
|
53
|
-
nonce:
|
|
54
|
+
nonce: str
|
|
54
55
|
r"""The nonce of the address"""
|
|
55
56
|
|
|
56
|
-
max_fee_per_gas: Annotated[
|
|
57
|
+
max_fee_per_gas: Annotated[str, pydantic.Field(alias="maxFeePerGas")]
|
|
57
58
|
r"""The max fee per gas of the transaction"""
|
|
58
59
|
|
|
59
60
|
max_priority_fee_per_gas: Annotated[
|
|
60
|
-
|
|
61
|
+
str, pydantic.Field(alias="maxPriorityFeePerGas")
|
|
61
62
|
]
|
|
62
63
|
r"""The max priority fee per gas of the transaction"""
|
|
63
64
|
|
|
@@ -65,3 +66,33 @@ class UnsignedMulticallTransaction(BaseModel):
|
|
|
65
66
|
Optional[List[SignedAuthorization]], pydantic.Field(alias="authorizationList")
|
|
66
67
|
] = None
|
|
67
68
|
r"""EIP-7702 authorization"""
|
|
69
|
+
|
|
70
|
+
@model_serializer(mode="wrap")
|
|
71
|
+
def serialize_model(self, handler):
|
|
72
|
+
optional_fields = ["authorizationList"]
|
|
73
|
+
nullable_fields = ["gas"]
|
|
74
|
+
null_default_fields = []
|
|
75
|
+
|
|
76
|
+
serialized = handler(self)
|
|
77
|
+
|
|
78
|
+
m = {}
|
|
79
|
+
|
|
80
|
+
for n, f in type(self).model_fields.items():
|
|
81
|
+
k = f.alias or n
|
|
82
|
+
val = serialized.get(k)
|
|
83
|
+
serialized.pop(k, None)
|
|
84
|
+
|
|
85
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
86
|
+
is_set = (
|
|
87
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
88
|
+
or k in null_default_fields
|
|
89
|
+
) # pylint: disable=no-member
|
|
90
|
+
|
|
91
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
92
|
+
m[k] = val
|
|
93
|
+
elif val != UNSET_SENTINEL and (
|
|
94
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
95
|
+
):
|
|
96
|
+
m[k] = val
|
|
97
|
+
|
|
98
|
+
return m
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from compass_api_sdk.types import BaseModel
|
|
4
|
+
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
5
5
|
import pydantic
|
|
6
|
+
from pydantic import model_serializer
|
|
6
7
|
from typing_extensions import Annotated, TypedDict
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class UnsignedTransactionTypedDict(TypedDict):
|
|
10
|
-
chain_id:
|
|
11
|
+
chain_id: str
|
|
11
12
|
r"""The chain id of the transaction"""
|
|
12
13
|
data: str
|
|
13
14
|
r"""The data of the transaction"""
|
|
14
15
|
from_: str
|
|
15
16
|
r"""The sender of the transaction"""
|
|
16
|
-
gas:
|
|
17
|
+
gas: Nullable[str]
|
|
17
18
|
r"""The gas of the transaction"""
|
|
18
19
|
to: str
|
|
19
20
|
r"""The recipient of the transaction"""
|
|
20
|
-
value:
|
|
21
|
+
value: str
|
|
21
22
|
r"""The value of the transaction"""
|
|
22
|
-
nonce:
|
|
23
|
+
nonce: str
|
|
23
24
|
r"""The nonce of the address"""
|
|
24
|
-
max_fee_per_gas:
|
|
25
|
+
max_fee_per_gas: str
|
|
25
26
|
r"""The max fee per gas of the transaction"""
|
|
26
|
-
max_priority_fee_per_gas:
|
|
27
|
+
max_priority_fee_per_gas: str
|
|
27
28
|
r"""The max priority fee per gas of the transaction"""
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
class UnsignedTransaction(BaseModel):
|
|
31
|
-
chain_id: Annotated[
|
|
32
|
+
chain_id: Annotated[str, pydantic.Field(alias="chainId")]
|
|
32
33
|
r"""The chain id of the transaction"""
|
|
33
34
|
|
|
34
35
|
data: str
|
|
@@ -37,22 +38,52 @@ class UnsignedTransaction(BaseModel):
|
|
|
37
38
|
from_: Annotated[str, pydantic.Field(alias="from")]
|
|
38
39
|
r"""The sender of the transaction"""
|
|
39
40
|
|
|
40
|
-
gas:
|
|
41
|
+
gas: Nullable[str]
|
|
41
42
|
r"""The gas of the transaction"""
|
|
42
43
|
|
|
43
44
|
to: str
|
|
44
45
|
r"""The recipient of the transaction"""
|
|
45
46
|
|
|
46
|
-
value:
|
|
47
|
+
value: str
|
|
47
48
|
r"""The value of the transaction"""
|
|
48
49
|
|
|
49
|
-
nonce:
|
|
50
|
+
nonce: str
|
|
50
51
|
r"""The nonce of the address"""
|
|
51
52
|
|
|
52
|
-
max_fee_per_gas: Annotated[
|
|
53
|
+
max_fee_per_gas: Annotated[str, pydantic.Field(alias="maxFeePerGas")]
|
|
53
54
|
r"""The max fee per gas of the transaction"""
|
|
54
55
|
|
|
55
56
|
max_priority_fee_per_gas: Annotated[
|
|
56
|
-
|
|
57
|
+
str, pydantic.Field(alias="maxPriorityFeePerGas")
|
|
57
58
|
]
|
|
58
59
|
r"""The max priority fee per gas of the transaction"""
|
|
60
|
+
|
|
61
|
+
@model_serializer(mode="wrap")
|
|
62
|
+
def serialize_model(self, handler):
|
|
63
|
+
optional_fields = []
|
|
64
|
+
nullable_fields = ["gas"]
|
|
65
|
+
null_default_fields = []
|
|
66
|
+
|
|
67
|
+
serialized = handler(self)
|
|
68
|
+
|
|
69
|
+
m = {}
|
|
70
|
+
|
|
71
|
+
for n, f in type(self).model_fields.items():
|
|
72
|
+
k = f.alias or n
|
|
73
|
+
val = serialized.get(k)
|
|
74
|
+
serialized.pop(k, None)
|
|
75
|
+
|
|
76
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
77
|
+
is_set = (
|
|
78
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
79
|
+
or k in null_default_fields
|
|
80
|
+
) # pylint: disable=no-member
|
|
81
|
+
|
|
82
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
83
|
+
m[k] = val
|
|
84
|
+
elif val != UNSET_SENTINEL and (
|
|
85
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
86
|
+
):
|
|
87
|
+
m[k] = val
|
|
88
|
+
|
|
89
|
+
return m
|