compass_api_sdk 1.1.1__py3-none-any.whl → 2.2.1rc3__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 +386 -114
- compass_api_sdk/aerodrome_slipstream.py +104 -54
- compass_api_sdk/basesdk.py +6 -0
- compass_api_sdk/bridge.py +536 -0
- compass_api_sdk/earn.py +2026 -0
- compass_api_sdk/erc_4626_vaults.py +28 -10
- compass_api_sdk/errors/__init__.py +8 -0
- compass_api_sdk/errors/apierror.py +1 -1
- compass_api_sdk/errors/compassapierror.py +1 -1
- compass_api_sdk/errors/httpvalidationerror.py +1 -1
- compass_api_sdk/errors/mintpreparenotfoundresponse_error.py +49 -0
- compass_api_sdk/errors/no_response_error.py +1 -1
- compass_api_sdk/errors/responsevalidationerror.py +1 -1
- compass_api_sdk/ethena.py +36 -10
- compass_api_sdk/gas_sponsorship.py +458 -0
- compass_api_sdk/httpclient.py +0 -1
- compass_api_sdk/models/__init__.py +820 -392
- compass_api_sdk/models/aaveborrowparams.py +4 -13
- compass_api_sdk/models/aaveborrowrequest.py +10 -14
- compass_api_sdk/models/aavehistoricaltransactionsresponse.py +3 -3
- compass_api_sdk/models/aavelooprequest.py +32 -28
- compass_api_sdk/models/aaveposition.py +104 -0
- compass_api_sdk/models/aaverepayparams.py +4 -13
- compass_api_sdk/models/aaverepayrequest.py +10 -14
- 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 +10 -14
- compass_api_sdk/models/aavevenue.py +27 -0
- compass_api_sdk/models/aavewithdrawparams.py +4 -13
- compass_api_sdk/models/aavewithdrawrequest.py +10 -14
- 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 +14 -26
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionparams.py +8 -25
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +14 -26
- compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +8 -25
- compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py +8 -25
- compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +13 -25
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/approvetransferrequest.py +32 -0
- compass_api_sdk/models/approvetransferresponse.py +52 -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 +15 -4
- 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_market_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_models_morpho_read_response_get_vaults_vaultstate.py → compass_api_backend_v1_models_morpho_read_response_get_vaults_vaultstate.py} +4 -2
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_market_userposition.py → compass_api_backend_v1_models_pendle_read_response_market_userposition.py} +2 -2
- 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_models_vaults_read_response_vault_userposition.py → compass_api_backend_v1_models_vaults_read_response_vault_userposition.py} +2 -2
- 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 +103 -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/createaccountrequest.py +40 -0
- compass_api_sdk/models/createaccountresponse.py +56 -0
- compass_api_sdk/models/depositevent.py +61 -0
- compass_api_sdk/models/depositforburnrequest.py +77 -0
- compass_api_sdk/models/depositforburnresponse.py +100 -0
- compass_api_sdk/models/earnmanageparams.py +76 -0
- compass_api_sdk/models/earnmanagerequest.py +132 -0
- compass_api_sdk/models/earnmanageresponse.py +52 -0
- compass_api_sdk/models/earnpositionsresponse.py +48 -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/ethenadepositrequest.py +6 -1
- compass_api_sdk/models/ethenagetvaultresponse.py +5 -5
- compass_api_sdk/models/ethenarequesttowithdrawrequest.py +6 -1
- compass_api_sdk/models/ethenaunstakerequest.py +6 -1
- compass_api_sdk/models/fee.py +43 -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 +6 -1
- compass_api_sdk/models/morphocheckuserpositionresponse.py +9 -3
- compass_api_sdk/models/morphodepositrequest.py +6 -1
- compass_api_sdk/models/morphogetmarketresponse.py +72 -31
- compass_api_sdk/models/morphomarket.py +26 -20
- compass_api_sdk/models/morphorepayrequest.py +11 -1
- compass_api_sdk/models/morphosupplycollateralrequest.py +11 -1
- compass_api_sdk/models/morphovault.py +10 -10
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +6 -1
- compass_api_sdk/models/morphowithdrawrequest.py +6 -1
- compass_api_sdk/models/multicallexecuterequest.py +7 -2
- compass_api_sdk/models/odosswapparams.py +9 -30
- compass_api_sdk/models/odosswaprequest.py +15 -33
- 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/pendledepositevent.py +49 -0
- compass_api_sdk/models/pendlegetmarketresponse.py +5 -5
- compass_api_sdk/models/pendlemanageliquidityparams.py +2 -15
- compass_api_sdk/models/pendlemanageliquidityrequest.py +8 -16
- compass_api_sdk/models/pendlemarketinfo.py +138 -0
- compass_api_sdk/models/pendlemarketsresponse.py +30 -0
- compass_api_sdk/models/pendleptposition.py +111 -0
- compass_api_sdk/models/pendleptvenue.py +78 -0
- compass_api_sdk/models/pendleredeemyieldrequest.py +6 -1
- compass_api_sdk/models/pendletradeptparams.py +2 -15
- compass_api_sdk/models/pendletradeptrequest.py +8 -16
- compass_api_sdk/models/pendletradeytparams.py +2 -15
- compass_api_sdk/models/pendletradeytrequest.py +8 -16
- compass_api_sdk/models/pendlewithdrawalevent.py +54 -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/positionpnl.py +52 -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 +3 -16
- compass_api_sdk/models/setallowancerequest.py +9 -17
- compass_api_sdk/models/skybuyrequest.py +6 -1
- compass_api_sdk/models/skydepositrequest.py +7 -2
- compass_api_sdk/models/skysellrequest.py +7 -2
- compass_api_sdk/models/skywithdrawrequest.py +7 -2
- compass_api_sdk/models/sponsorgasrequest.py +71 -0
- compass_api_sdk/models/sponsorgasresponse.py +14 -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 +2 -15
- compass_api_sdk/models/tokentransferrequest.py +8 -16
- compass_api_sdk/models/uniswapbuyexactlyparams.py +8 -33
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +14 -34
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/uniswapmintliquidityprovisionparams.py +8 -25
- compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +14 -26
- compass_api_sdk/models/uniswappoolpriceresponse.py +8 -25
- compass_api_sdk/models/uniswapsellexactlyparams.py +4 -29
- compass_api_sdk/models/uniswapsellexactlyrequest.py +10 -30
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/unsignedmulticalltransaction.py +34 -3
- compass_api_sdk/models/unsignedtransaction.py +34 -3
- compass_api_sdk/models/unwrapwethrequest.py +6 -1
- compass_api_sdk/models/useroperation.py +33 -24
- compass_api_sdk/models/v1_aave_aave_supported_tokensop.py +1 -1
- compass_api_sdk/models/v1_aave_avg_rateop.py +15 -93
- compass_api_sdk/models/v1_aave_historical_transactionsop.py +15 -15
- compass_api_sdk/models/v1_aave_liquidity_changeop.py +8 -86
- compass_api_sdk/models/v1_aave_rateop.py +8 -86
- compass_api_sdk/models/v1_aave_reserve_overviewop.py +8 -86
- compass_api_sdk/models/v1_aave_std_rateop.py +15 -93
- compass_api_sdk/models/v1_aave_token_priceop.py +8 -86
- compass_api_sdk/models/v1_aave_user_position_per_tokenop.py +14 -92
- compass_api_sdk/models/v1_aave_user_position_summaryop.py +8 -8
- compass_api_sdk/models/v1_aerodrome_slipstream_liquidity_provision_positionsop.py +48 -3
- compass_api_sdk/models/v1_aerodrome_slipstream_pool_priceop.py +12 -168
- compass_api_sdk/models/v1_ethena_vaultop.py +1 -1
- compass_api_sdk/models/v1_generic_allowanceop.py +12 -26
- compass_api_sdk/models/v1_generic_ensop.py +2 -2
- compass_api_sdk/models/v1_generic_portfolioop.py +2 -2
- compass_api_sdk/models/v1_morpho_market_positionop.py +3 -3
- compass_api_sdk/models/v1_morpho_marketop.py +2 -2
- compass_api_sdk/models/v1_morpho_marketsop.py +10 -30
- compass_api_sdk/models/v1_morpho_user_positionop.py +2 -2
- compass_api_sdk/models/v1_morpho_vaultop.py +8 -8
- compass_api_sdk/models/v1_morpho_vaultsop.py +6 -16
- compass_api_sdk/models/v1_pendle_marketop.py +8 -8
- compass_api_sdk/models/v1_pendle_marketsop.py +1 -1
- compass_api_sdk/models/v1_pendle_positionsop.py +2 -2
- compass_api_sdk/models/v1_sky_positionop.py +5 -6
- compass_api_sdk/models/v1_token_balanceop.py +12 -25
- compass_api_sdk/models/{v1_generic_supported_tokensop.py → v1_token_listop.py} +6 -6
- compass_api_sdk/models/v1_token_priceop.py +8 -9
- compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +6 -6
- compass_api_sdk/models/v1_uniswap_liquidity_provision_in_rangeop.py +2 -2
- compass_api_sdk/models/v1_uniswap_liquidity_provision_positionsop.py +2 -2
- compass_api_sdk/models/v1_uniswap_pool_priceop.py +12 -168
- compass_api_sdk/models/v1_uniswap_quote_buy_exactlyop.py +20 -176
- compass_api_sdk/models/v1_uniswap_quote_sell_exactlyop.py +20 -176
- compass_api_sdk/models/v1_vaults_vaultop.py +8 -8
- 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_pendle_marketsop.py +105 -0
- compass_api_sdk/models/v2_earn_positionsop.py +31 -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/vaultdepositrequest.py +6 -1
- compass_api_sdk/models/vaultgetvaultresponse.py +5 -5
- 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/vaultwithdrawrequest.py +6 -1
- compass_api_sdk/models/wildcatgetmarketresponse.py +151 -0
- compass_api_sdk/models/{redeemunderlying.py → withdraw.py} +2 -2
- compass_api_sdk/models/withdrawalevent.py +61 -0
- compass_api_sdk/models/wrapethrequest.py +6 -1
- compass_api_sdk/morpho.py +126 -78
- compass_api_sdk/pendle.py +68 -44
- compass_api_sdk/sdk.py +18 -11
- compass_api_sdk/sky.py +62 -38
- compass_api_sdk/smart_account.py +10 -2
- compass_api_sdk/swap.py +22 -22
- compass_api_sdk/{token_sdk.py → token.py} +511 -103
- compass_api_sdk/transaction_bundler.py +46 -16
- compass_api_sdk/types/basemodel.py +41 -3
- compass_api_sdk/uniswap_v3.py +152 -114
- compass_api_sdk/universal.py +44 -606
- compass_api_sdk/utils/__init__.py +0 -3
- compass_api_sdk/utils/annotations.py +32 -8
- compass_api_sdk/utils/enums.py +60 -0
- compass_api_sdk/utils/forms.py +21 -10
- compass_api_sdk/utils/queryparams.py +14 -2
- compass_api_sdk/utils/requestbodies.py +3 -3
- compass_api_sdk/utils/retries.py +69 -5
- compass_api_sdk/utils/serializers.py +0 -20
- compass_api_sdk/utils/unmarshal_json_response.py +15 -1
- compass_api_sdk/wildcat.py +208 -0
- compass_api_sdk-2.2.1rc3.dist-info/METADATA +624 -0
- compass_api_sdk-2.2.1rc3.dist-info/RECORD +356 -0
- {compass_api_sdk-1.1.1.dist-info → compass_api_sdk-2.2.1rc3.dist-info}/WHEEL +1 -1
- compass_api_sdk/models/aerodromeposition.py +0 -70
- compass_api_sdk/models/token_enum.py +0 -81
- compass_api_sdk/models/tokenaddressresponse.py +0 -15
- compass_api_sdk/models/tokeninfo.py +0 -17
- compass_api_sdk/models/v1_token_addressop.py +0 -109
- compass_api_sdk/models/vaultposition.py +0 -24
- compass_api_sdk-1.1.1.dist-info/METADATA +0 -592
- compass_api_sdk-1.1.1.dist-info/RECORD +0 -275
|
@@ -0,0 +1,52 @@
|
|
|
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 typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PositionPnLTypedDict(TypedDict):
|
|
9
|
+
r"""Simplified PnL metrics for API response.
|
|
10
|
+
|
|
11
|
+
Historical events (deposits/withdrawals) are now at the position level, not inside
|
|
12
|
+
PnL.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
total_deposited: str
|
|
16
|
+
r"""Total assets deposited over all time"""
|
|
17
|
+
current_value: str
|
|
18
|
+
r"""Current position value in underlying"""
|
|
19
|
+
unrealized_pnl: str
|
|
20
|
+
r"""current_value - cost_basis_remaining"""
|
|
21
|
+
realized_pnl: str
|
|
22
|
+
r"""Sum of profits/losses from all withdrawals"""
|
|
23
|
+
total_pnl: str
|
|
24
|
+
r"""unrealized_pnl + realized_pnl"""
|
|
25
|
+
total_pnl_percent: str
|
|
26
|
+
r"""(total_pnl / total_deposited) * 100"""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class PositionPnL(BaseModel):
|
|
30
|
+
r"""Simplified PnL metrics for API response.
|
|
31
|
+
|
|
32
|
+
Historical events (deposits/withdrawals) are now at the position level, not inside
|
|
33
|
+
PnL.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
total_deposited: str
|
|
37
|
+
r"""Total assets deposited over all time"""
|
|
38
|
+
|
|
39
|
+
current_value: str
|
|
40
|
+
r"""Current position value in underlying"""
|
|
41
|
+
|
|
42
|
+
unrealized_pnl: str
|
|
43
|
+
r"""current_value - cost_basis_remaining"""
|
|
44
|
+
|
|
45
|
+
realized_pnl: str
|
|
46
|
+
r"""Sum of profits/losses from all withdrawals"""
|
|
47
|
+
|
|
48
|
+
total_pnl: str
|
|
49
|
+
r"""unrealized_pnl + realized_pnl"""
|
|
50
|
+
|
|
51
|
+
total_pnl_percent: str
|
|
52
|
+
r"""(total_pnl / total_deposited) * 100"""
|
|
@@ -1,7 +1,6 @@
|
|
|
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 (
|
|
6
5
|
BaseModel,
|
|
7
6
|
Nullable,
|
|
@@ -15,14 +14,10 @@ from typing_extensions import Annotated, NotRequired, TypedDict
|
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
class ReserveTypedDict(TypedDict):
|
|
18
|
-
symbol:
|
|
19
|
-
r"""
|
|
20
|
-
|
|
21
|
-
This class is used to represent the token in the system. Notice individual
|
|
22
|
-
endpoints' documentation where per chain tokens are presented.
|
|
23
|
-
"""
|
|
17
|
+
symbol: str
|
|
18
|
+
r"""Symbol of token."""
|
|
24
19
|
name: str
|
|
25
|
-
r"""Name of
|
|
20
|
+
r"""Name of token"""
|
|
26
21
|
underlying_asset: str
|
|
27
22
|
r"""Checksum address of Token."""
|
|
28
23
|
decimals: NotRequired[Nullable[int]]
|
|
@@ -30,15 +25,11 @@ class ReserveTypedDict(TypedDict):
|
|
|
30
25
|
|
|
31
26
|
|
|
32
27
|
class Reserve(BaseModel):
|
|
33
|
-
symbol:
|
|
34
|
-
r"""
|
|
35
|
-
|
|
36
|
-
This class is used to represent the token in the system. Notice individual
|
|
37
|
-
endpoints' documentation where per chain tokens are presented.
|
|
38
|
-
"""
|
|
28
|
+
symbol: str
|
|
29
|
+
r"""Symbol of token."""
|
|
39
30
|
|
|
40
31
|
name: str
|
|
41
|
-
r"""Name of
|
|
32
|
+
r"""Name of token"""
|
|
42
33
|
|
|
43
34
|
underlying_asset: Annotated[str, pydantic.Field(alias="underlyingAsset")]
|
|
44
35
|
r"""Checksum address of Token."""
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
import pydantic
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class SafeTransactionParamsTypedDict(TypedDict):
|
|
10
|
+
r"""Parameters for proposing a transaction to a Safe multi-sig wallet.
|
|
11
|
+
|
|
12
|
+
This model is used when the Safe has threshold > 1 or when the user wants to propose
|
|
13
|
+
a transaction for other owners to sign via the Safe Transaction Service.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
to: str
|
|
17
|
+
r"""Destination address (MultiSend contract for bundled txs)"""
|
|
18
|
+
value: int
|
|
19
|
+
r"""ETH value to send"""
|
|
20
|
+
data: str
|
|
21
|
+
r"""Encoded transaction data"""
|
|
22
|
+
operation: int
|
|
23
|
+
r"""0 = Call, 1 = DelegateCall"""
|
|
24
|
+
safe_tx_gas: int
|
|
25
|
+
r"""Gas for the Safe transaction execution"""
|
|
26
|
+
base_gas: int
|
|
27
|
+
r"""Base gas for the transaction"""
|
|
28
|
+
gas_price: int
|
|
29
|
+
r"""Gas price for refund calculation"""
|
|
30
|
+
gas_token: str
|
|
31
|
+
r"""Token address for gas refund (0x0 for ETH)"""
|
|
32
|
+
refund_receiver: str
|
|
33
|
+
r"""Address to receive gas refund"""
|
|
34
|
+
nonce: int
|
|
35
|
+
r"""Safe transaction nonce"""
|
|
36
|
+
safe_tx_hash: str
|
|
37
|
+
r"""EIP-712 hash of the Safe transaction (sign this with your wallet)"""
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class SafeTransactionParams(BaseModel):
|
|
41
|
+
r"""Parameters for proposing a transaction to a Safe multi-sig wallet.
|
|
42
|
+
|
|
43
|
+
This model is used when the Safe has threshold > 1 or when the user wants to propose
|
|
44
|
+
a transaction for other owners to sign via the Safe Transaction Service.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
to: str
|
|
48
|
+
r"""Destination address (MultiSend contract for bundled txs)"""
|
|
49
|
+
|
|
50
|
+
value: int
|
|
51
|
+
r"""ETH value to send"""
|
|
52
|
+
|
|
53
|
+
data: str
|
|
54
|
+
r"""Encoded transaction data"""
|
|
55
|
+
|
|
56
|
+
operation: int
|
|
57
|
+
r"""0 = Call, 1 = DelegateCall"""
|
|
58
|
+
|
|
59
|
+
safe_tx_gas: Annotated[int, pydantic.Field(alias="safeTxGas")]
|
|
60
|
+
r"""Gas for the Safe transaction execution"""
|
|
61
|
+
|
|
62
|
+
base_gas: Annotated[int, pydantic.Field(alias="baseGas")]
|
|
63
|
+
r"""Base gas for the transaction"""
|
|
64
|
+
|
|
65
|
+
gas_price: Annotated[int, pydantic.Field(alias="gasPrice")]
|
|
66
|
+
r"""Gas price for refund calculation"""
|
|
67
|
+
|
|
68
|
+
gas_token: Annotated[str, pydantic.Field(alias="gasToken")]
|
|
69
|
+
r"""Token address for gas refund (0x0 for ETH)"""
|
|
70
|
+
|
|
71
|
+
refund_receiver: Annotated[str, pydantic.Field(alias="refundReceiver")]
|
|
72
|
+
r"""Address to receive gas refund"""
|
|
73
|
+
|
|
74
|
+
nonce: int
|
|
75
|
+
r"""Safe transaction nonce"""
|
|
76
|
+
|
|
77
|
+
safe_tx_hash: Annotated[str, pydantic.Field(alias="safeTxHash")]
|
|
78
|
+
r"""EIP-712 hash of the Safe transaction (sign this with your wallet)"""
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .safetransactionparams import SafeTransactionParams, SafeTransactionParamsTypedDict
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class SafeTransactionResponseTypedDict(TypedDict):
|
|
10
|
+
r"""Response containing Safe transaction parameters for multi-sig proposal."""
|
|
11
|
+
|
|
12
|
+
transaction: SafeTransactionParamsTypedDict
|
|
13
|
+
r"""Parameters for proposing a transaction to a Safe multi-sig wallet.
|
|
14
|
+
|
|
15
|
+
This model is used when the Safe has threshold > 1 or when the user wants to propose
|
|
16
|
+
a transaction for other owners to sign via the Safe Transaction Service.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class SafeTransactionResponse(BaseModel):
|
|
21
|
+
r"""Response containing Safe transaction parameters for multi-sig proposal."""
|
|
22
|
+
|
|
23
|
+
transaction: SafeTransactionParams
|
|
24
|
+
r"""Parameters for proposing a transaction to a Safe multi-sig wallet.
|
|
25
|
+
|
|
26
|
+
This model is used when the Safe has threshold > 1 or when the user wants to propose
|
|
27
|
+
a transaction for other owners to sign via the Safe Transaction Service.
|
|
28
|
+
"""
|
|
@@ -0,0 +1,20 @@
|
|
|
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 typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SafeTxFieldTypedDict(TypedDict):
|
|
9
|
+
r"""A field in the SafeTx type definition."""
|
|
10
|
+
|
|
11
|
+
name: str
|
|
12
|
+
type: str
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class SafeTxField(BaseModel):
|
|
16
|
+
r"""A field in the SafeTx type definition."""
|
|
17
|
+
|
|
18
|
+
name: str
|
|
19
|
+
|
|
20
|
+
type: str
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .operationtype import OperationType
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
import pydantic
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SafeTxMessageTypedDict(TypedDict):
|
|
11
|
+
r"""The message data for the transaction."""
|
|
12
|
+
|
|
13
|
+
to: str
|
|
14
|
+
r"""Destination address"""
|
|
15
|
+
value: str
|
|
16
|
+
r"""Value in wei as a string"""
|
|
17
|
+
data: str
|
|
18
|
+
r"""Transaction data as hex string"""
|
|
19
|
+
operation: OperationType
|
|
20
|
+
r"""Safe operation types."""
|
|
21
|
+
safe_tx_gas: str
|
|
22
|
+
r"""Gas for the transaction"""
|
|
23
|
+
base_gas: str
|
|
24
|
+
r"""Base gas costs"""
|
|
25
|
+
gas_price: str
|
|
26
|
+
r"""Gas price"""
|
|
27
|
+
gas_token: str
|
|
28
|
+
r"""Token address for gas payment"""
|
|
29
|
+
refund_receiver: str
|
|
30
|
+
r"""Address to receive gas refund"""
|
|
31
|
+
nonce: str
|
|
32
|
+
r"""Transaction nonce"""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class SafeTxMessage(BaseModel):
|
|
36
|
+
r"""The message data for the transaction."""
|
|
37
|
+
|
|
38
|
+
to: str
|
|
39
|
+
r"""Destination address"""
|
|
40
|
+
|
|
41
|
+
value: str
|
|
42
|
+
r"""Value in wei as a string"""
|
|
43
|
+
|
|
44
|
+
data: str
|
|
45
|
+
r"""Transaction data as hex string"""
|
|
46
|
+
|
|
47
|
+
operation: OperationType
|
|
48
|
+
r"""Safe operation types."""
|
|
49
|
+
|
|
50
|
+
safe_tx_gas: Annotated[str, pydantic.Field(alias="safeTxGas")]
|
|
51
|
+
r"""Gas for the transaction"""
|
|
52
|
+
|
|
53
|
+
base_gas: Annotated[str, pydantic.Field(alias="baseGas")]
|
|
54
|
+
r"""Base gas costs"""
|
|
55
|
+
|
|
56
|
+
gas_price: Annotated[str, pydantic.Field(alias="gasPrice")]
|
|
57
|
+
r"""Gas price"""
|
|
58
|
+
|
|
59
|
+
gas_token: Annotated[str, pydantic.Field(alias="gasToken")]
|
|
60
|
+
r"""Token address for gas payment"""
|
|
61
|
+
|
|
62
|
+
refund_receiver: Annotated[str, pydantic.Field(alias="refundReceiver")]
|
|
63
|
+
r"""Address to receive gas refund"""
|
|
64
|
+
|
|
65
|
+
nonce: str
|
|
66
|
+
r"""Transaction nonce"""
|
|
@@ -1,7 +1,6 @@
|
|
|
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 compass_api_sdk.utils import validate_const
|
|
7
6
|
from enum import Enum
|
|
@@ -11,18 +10,6 @@ from typing import Literal, Optional, Union
|
|
|
11
10
|
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
SetAllowanceParamsTokenTypedDict = TypeAliasType(
|
|
15
|
-
"SetAllowanceParamsTokenTypedDict", Union[TokenEnum, str]
|
|
16
|
-
)
|
|
17
|
-
r"""The symbol or address of the token for which the allowance is set.."""
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
SetAllowanceParamsToken = TypeAliasType(
|
|
21
|
-
"SetAllowanceParamsToken", Union[TokenEnum, str]
|
|
22
|
-
)
|
|
23
|
-
r"""The symbol or address of the token for which the allowance is set.."""
|
|
24
|
-
|
|
25
|
-
|
|
26
13
|
class SetAllowanceParamsContractEnum(str, Enum):
|
|
27
14
|
AAVE_V3_POOL = "AaveV3Pool"
|
|
28
15
|
AERODROME_BASIC_ROUTER = "AerodromeBasicRouter"
|
|
@@ -32,7 +19,7 @@ class SetAllowanceParamsContractEnum(str, Enum):
|
|
|
32
19
|
)
|
|
33
20
|
UNISWAP_V3_ROUTER = "UniswapV3Router"
|
|
34
21
|
UNISWAP_V3_NFT_POSITION_MANAGER = "UniswapV3NFTPositionManager"
|
|
35
|
-
|
|
22
|
+
MORPHO_MARKET = "MorphoMarket"
|
|
36
23
|
SKY_DAI_USDS_CONVERTER = "SkyDaiUsdsConverter"
|
|
37
24
|
SKY_USDC_USDS_CONVERTER = "SkyUsdcUsdsConverter"
|
|
38
25
|
SKY_USDS_VAULT = "SkyUsdsVault"
|
|
@@ -67,7 +54,7 @@ r"""The amount to set the allowance to."""
|
|
|
67
54
|
class SetAllowanceParamsTypedDict(TypedDict):
|
|
68
55
|
r"""Parameters model for setting the token allowance for a given contract."""
|
|
69
56
|
|
|
70
|
-
token:
|
|
57
|
+
token: str
|
|
71
58
|
r"""The symbol or address of the token for which the allowance is set.."""
|
|
72
59
|
contract: SetAllowanceParamsContractUnionTypedDict
|
|
73
60
|
r"""The name or address of the contract to set spending allowance for."""
|
|
@@ -79,7 +66,7 @@ class SetAllowanceParamsTypedDict(TypedDict):
|
|
|
79
66
|
class SetAllowanceParams(BaseModel):
|
|
80
67
|
r"""Parameters model for setting the token allowance for a given contract."""
|
|
81
68
|
|
|
82
|
-
token:
|
|
69
|
+
token: str
|
|
83
70
|
r"""The symbol or address of the token for which the allowance is set.."""
|
|
84
71
|
|
|
85
72
|
contract: SetAllowanceParamsContractUnion
|
|
@@ -1,26 +1,13 @@
|
|
|
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 compass_api_sdk.utils import validate_const
|
|
7
6
|
from enum import Enum
|
|
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, TypeAliasType, TypedDict
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
SetAllowanceRequestTokenTypedDict = TypeAliasType(
|
|
15
|
-
"SetAllowanceRequestTokenTypedDict", Union[TokenEnum, str]
|
|
16
|
-
)
|
|
17
|
-
r"""The symbol or address of the token for which the allowance is set.."""
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
SetAllowanceRequestToken = TypeAliasType(
|
|
21
|
-
"SetAllowanceRequestToken", Union[TokenEnum, str]
|
|
22
|
-
)
|
|
23
|
-
r"""The symbol or address of the token for which the allowance is set.."""
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
24
11
|
|
|
25
12
|
|
|
26
13
|
class SetAllowanceRequestContractEnum(str, Enum):
|
|
@@ -32,7 +19,7 @@ class SetAllowanceRequestContractEnum(str, Enum):
|
|
|
32
19
|
)
|
|
33
20
|
UNISWAP_V3_ROUTER = "UniswapV3Router"
|
|
34
21
|
UNISWAP_V3_NFT_POSITION_MANAGER = "UniswapV3NFTPositionManager"
|
|
35
|
-
|
|
22
|
+
MORPHO_MARKET = "MorphoMarket"
|
|
36
23
|
SKY_DAI_USDS_CONVERTER = "SkyDaiUsdsConverter"
|
|
37
24
|
SKY_USDC_USDS_CONVERTER = "SkyUsdcUsdsConverter"
|
|
38
25
|
SKY_USDS_VAULT = "SkyUsdsVault"
|
|
@@ -75,7 +62,7 @@ class SetAllowanceRequestChain(str, Enum):
|
|
|
75
62
|
class SetAllowanceRequestTypedDict(TypedDict):
|
|
76
63
|
r"""Request model for increasing token allowance for a contract."""
|
|
77
64
|
|
|
78
|
-
token:
|
|
65
|
+
token: str
|
|
79
66
|
r"""The symbol or address of the token for which the allowance is set.."""
|
|
80
67
|
contract: SetAllowanceRequestContractUnionTypedDict
|
|
81
68
|
r"""The name or address of the contract to set spending allowance for."""
|
|
@@ -85,12 +72,14 @@ class SetAllowanceRequestTypedDict(TypedDict):
|
|
|
85
72
|
sender: str
|
|
86
73
|
r"""The address of the transaction sender."""
|
|
87
74
|
action_type: Literal["SET_ALLOWANCE"]
|
|
75
|
+
estimate_gas: NotRequired[bool]
|
|
76
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
88
77
|
|
|
89
78
|
|
|
90
79
|
class SetAllowanceRequest(BaseModel):
|
|
91
80
|
r"""Request model for increasing token allowance for a contract."""
|
|
92
81
|
|
|
93
|
-
token:
|
|
82
|
+
token: str
|
|
94
83
|
r"""The symbol or address of the token for which the allowance is set.."""
|
|
95
84
|
|
|
96
85
|
contract: SetAllowanceRequestContractUnion
|
|
@@ -111,3 +100,6 @@ class SetAllowanceRequest(BaseModel):
|
|
|
111
100
|
],
|
|
112
101
|
pydantic.Field(alias="action_type"),
|
|
113
102
|
] = "SET_ALLOWANCE"
|
|
103
|
+
|
|
104
|
+
estimate_gas: Optional[bool] = None
|
|
105
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -7,7 +7,7 @@ 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
|
class SkyBuyRequestTokenIn(str, Enum):
|
|
@@ -40,6 +40,8 @@ class SkyBuyRequestTypedDict(TypedDict):
|
|
|
40
40
|
sender: str
|
|
41
41
|
r"""The address of the transaction sender."""
|
|
42
42
|
action_type: Literal["SKY_BUY"]
|
|
43
|
+
estimate_gas: NotRequired[bool]
|
|
44
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
43
45
|
|
|
44
46
|
|
|
45
47
|
class SkyBuyRequest(BaseModel):
|
|
@@ -60,3 +62,6 @@ class SkyBuyRequest(BaseModel):
|
|
|
60
62
|
],
|
|
61
63
|
pydantic.Field(alias="action_type"),
|
|
62
64
|
] = "SKY_BUY"
|
|
65
|
+
|
|
66
|
+
estimate_gas: Optional[bool] = None
|
|
67
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -40,6 +40,8 @@ class SkyDepositRequestTypedDict(TypedDict):
|
|
|
40
40
|
receiver: NotRequired[Nullable[str]]
|
|
41
41
|
r"""The address which will receive the sUSDS. Defaults to the sender."""
|
|
42
42
|
chain: NotRequired[SkyDepositRequestChain]
|
|
43
|
+
estimate_gas: NotRequired[bool]
|
|
44
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
43
45
|
|
|
44
46
|
|
|
45
47
|
class SkyDepositRequest(BaseModel):
|
|
@@ -60,11 +62,14 @@ class SkyDepositRequest(BaseModel):
|
|
|
60
62
|
receiver: OptionalNullable[str] = UNSET
|
|
61
63
|
r"""The address which will receive the sUSDS. Defaults to the sender."""
|
|
62
64
|
|
|
63
|
-
chain: Optional[SkyDepositRequestChain] =
|
|
65
|
+
chain: Optional[SkyDepositRequestChain] = None
|
|
66
|
+
|
|
67
|
+
estimate_gas: Optional[bool] = None
|
|
68
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
64
69
|
|
|
65
70
|
@model_serializer(mode="wrap")
|
|
66
71
|
def serialize_model(self, handler):
|
|
67
|
-
optional_fields = ["action_type", "receiver", "chain"]
|
|
72
|
+
optional_fields = ["action_type", "receiver", "chain", "estimate_gas"]
|
|
68
73
|
nullable_fields = ["receiver"]
|
|
69
74
|
null_default_fields = []
|
|
70
75
|
|
|
@@ -36,10 +36,12 @@ class SkySellRequestTypedDict(TypedDict):
|
|
|
36
36
|
r"""The token you would like to swap 1:1 with USDS. Choose from DAI or USDC."""
|
|
37
37
|
amount: SkySellRequestAmountTypedDict
|
|
38
38
|
r"""The amount of USDS you would like to sell 1:1 for 'token_out'."""
|
|
39
|
+
chain: SkySellRequestChain
|
|
39
40
|
sender: str
|
|
40
41
|
r"""The address of the transaction sender."""
|
|
41
42
|
action_type: Literal["SKY_SELL"]
|
|
42
|
-
|
|
43
|
+
estimate_gas: NotRequired[bool]
|
|
44
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
43
45
|
|
|
44
46
|
|
|
45
47
|
class SkySellRequest(BaseModel):
|
|
@@ -49,6 +51,8 @@ class SkySellRequest(BaseModel):
|
|
|
49
51
|
amount: SkySellRequestAmount
|
|
50
52
|
r"""The amount of USDS you would like to sell 1:1 for 'token_out'."""
|
|
51
53
|
|
|
54
|
+
chain: SkySellRequestChain
|
|
55
|
+
|
|
52
56
|
sender: str
|
|
53
57
|
r"""The address of the transaction sender."""
|
|
54
58
|
|
|
@@ -59,4 +63,5 @@ class SkySellRequest(BaseModel):
|
|
|
59
63
|
pydantic.Field(alias="action_type"),
|
|
60
64
|
] = "SKY_SELL"
|
|
61
65
|
|
|
62
|
-
|
|
66
|
+
estimate_gas: Optional[bool] = None
|
|
67
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -30,6 +30,8 @@ class SkyWithdrawRequestTypedDict(TypedDict):
|
|
|
30
30
|
receiver: NotRequired[Nullable[str]]
|
|
31
31
|
r"""The address which will receive the withdrawn USDS. Defaults to the sender."""
|
|
32
32
|
chain: NotRequired[SkyWithdrawRequestChain]
|
|
33
|
+
estimate_gas: NotRequired[bool]
|
|
34
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
class SkyWithdrawRequest(BaseModel):
|
|
@@ -50,11 +52,14 @@ class SkyWithdrawRequest(BaseModel):
|
|
|
50
52
|
receiver: OptionalNullable[str] = UNSET
|
|
51
53
|
r"""The address which will receive the withdrawn USDS. Defaults to the sender."""
|
|
52
54
|
|
|
53
|
-
chain: Optional[SkyWithdrawRequestChain] =
|
|
55
|
+
chain: Optional[SkyWithdrawRequestChain] = None
|
|
56
|
+
|
|
57
|
+
estimate_gas: Optional[bool] = None
|
|
58
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
54
59
|
|
|
55
60
|
@model_serializer(mode="wrap")
|
|
56
61
|
def serialize_model(self, handler):
|
|
57
|
-
optional_fields = ["action_type", "receiver", "chain"]
|
|
62
|
+
optional_fields = ["action_type", "receiver", "chain", "estimate_gas"]
|
|
58
63
|
nullable_fields = ["receiver"]
|
|
59
64
|
null_default_fields = []
|
|
60
65
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .batchedsafeoperationsresponse_input import (
|
|
5
|
+
BatchedSafeOperationsResponseInput,
|
|
6
|
+
BatchedSafeOperationsResponseInputTypedDict,
|
|
7
|
+
)
|
|
8
|
+
from .chain import Chain
|
|
9
|
+
from .permit2typeddata_input import (
|
|
10
|
+
Permit2TypedDataInput,
|
|
11
|
+
Permit2TypedDataInputTypedDict,
|
|
12
|
+
)
|
|
13
|
+
from .permittypeddataresponse_input import (
|
|
14
|
+
PermitTypedDataResponseInput,
|
|
15
|
+
PermitTypedDataResponseInputTypedDict,
|
|
16
|
+
)
|
|
17
|
+
from compass_api_sdk.types import BaseModel
|
|
18
|
+
from typing import Union
|
|
19
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
SponsorGasRequestEip712TypedDict = TypeAliasType(
|
|
23
|
+
"SponsorGasRequestEip712TypedDict",
|
|
24
|
+
Union[
|
|
25
|
+
BatchedSafeOperationsResponseInputTypedDict,
|
|
26
|
+
PermitTypedDataResponseInputTypedDict,
|
|
27
|
+
Permit2TypedDataInputTypedDict,
|
|
28
|
+
],
|
|
29
|
+
)
|
|
30
|
+
r"""The EIP-712 typed data that was signed."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
SponsorGasRequestEip712 = TypeAliasType(
|
|
34
|
+
"SponsorGasRequestEip712",
|
|
35
|
+
Union[
|
|
36
|
+
BatchedSafeOperationsResponseInput,
|
|
37
|
+
PermitTypedDataResponseInput,
|
|
38
|
+
Permit2TypedDataInput,
|
|
39
|
+
],
|
|
40
|
+
)
|
|
41
|
+
r"""The EIP-712 typed data that was signed."""
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class SponsorGasRequestTypedDict(TypedDict):
|
|
45
|
+
owner: str
|
|
46
|
+
r"""The wallet address that owns the Earn Account."""
|
|
47
|
+
chain: Chain
|
|
48
|
+
r"""The chain to use."""
|
|
49
|
+
eip_712: SponsorGasRequestEip712TypedDict
|
|
50
|
+
r"""The EIP-712 typed data that was signed."""
|
|
51
|
+
signature: str
|
|
52
|
+
r"""The EIP-712 signed typed data signature."""
|
|
53
|
+
sender: str
|
|
54
|
+
r"""The address of the wallet which will send the transaction."""
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class SponsorGasRequest(BaseModel):
|
|
58
|
+
owner: str
|
|
59
|
+
r"""The wallet address that owns the Earn Account."""
|
|
60
|
+
|
|
61
|
+
chain: Chain
|
|
62
|
+
r"""The chain to use."""
|
|
63
|
+
|
|
64
|
+
eip_712: SponsorGasRequestEip712
|
|
65
|
+
r"""The EIP-712 typed data that was signed."""
|
|
66
|
+
|
|
67
|
+
signature: str
|
|
68
|
+
r"""The EIP-712 signed typed data signature."""
|
|
69
|
+
|
|
70
|
+
sender: str
|
|
71
|
+
r"""The address of the wallet which will send the transaction."""
|
|
@@ -0,0 +1,14 @@
|
|
|
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 compass_api_sdk.types import BaseModel
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class SponsorGasResponseTypedDict(TypedDict):
|
|
10
|
+
transaction: UnsignedTransactionTypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class SponsorGasResponse(BaseModel):
|
|
14
|
+
transaction: UnsignedTransaction
|
|
@@ -1,18 +1,8 @@
|
|
|
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
|
-
from
|
|
7
|
-
from typing_extensions import TypeAliasType, TypedDict
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
TokenSymbolTypedDict = TypeAliasType("TokenSymbolTypedDict", Union[TokenEnum, str])
|
|
11
|
-
r"""Symbol of the token."""
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
TokenSymbol = TypeAliasType("TokenSymbol", Union[TokenEnum, str])
|
|
15
|
-
r"""Symbol of the token."""
|
|
5
|
+
from typing_extensions import TypedDict
|
|
16
6
|
|
|
17
7
|
|
|
18
8
|
class TokenBalanceResponseTypedDict(TypedDict):
|
|
@@ -22,8 +12,8 @@ class TokenBalanceResponseTypedDict(TypedDict):
|
|
|
22
12
|
r"""Amount of tokens a particular address holds"""
|
|
23
13
|
decimals: int
|
|
24
14
|
r"""Number of decimals of the token"""
|
|
25
|
-
token_symbol:
|
|
26
|
-
r"""Symbol of the token
|
|
15
|
+
token_symbol: str
|
|
16
|
+
r"""Symbol of the token"""
|
|
27
17
|
token_address: str
|
|
28
18
|
r"""Address of the token"""
|
|
29
19
|
|
|
@@ -37,8 +27,8 @@ class TokenBalanceResponse(BaseModel):
|
|
|
37
27
|
decimals: int
|
|
38
28
|
r"""Number of decimals of the token"""
|
|
39
29
|
|
|
40
|
-
token_symbol:
|
|
41
|
-
r"""Symbol of the token
|
|
30
|
+
token_symbol: str
|
|
31
|
+
r"""Symbol of the token"""
|
|
42
32
|
|
|
43
33
|
token_address: str
|
|
44
34
|
r"""Address of the token"""
|