compass_api_sdk 1.1.1__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 +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 +1780 -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 +446 -0
- compass_api_sdk/httpclient.py +0 -1
- compass_api_sdk/models/__init__.py +764 -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 +49 -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 +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/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/earnmanageparams.py +74 -0
- compass_api_sdk/models/earnmanagerequest.py +130 -0
- compass_api_sdk/models/earnmanageresponse.py +52 -0
- 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/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 +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 +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/pendlegetmarketresponse.py +5 -5
- compass_api_sdk/models/pendlemanageliquidityparams.py +2 -15
- compass_api_sdk/models/pendlemanageliquidityrequest.py +8 -16
- 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/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/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_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/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/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/uniswap_v3.py +152 -114
- compass_api_sdk/universal.py +44 -606
- compass_api_sdk/utils/annotations.py +32 -8
- 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/unmarshal_json_response.py +15 -1
- 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-1.1.1.dist-info → compass_api_sdk-2.0.21rc1.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
|
@@ -13,7 +13,9 @@ from pydantic import model_serializer
|
|
|
13
13
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsVaultStateTypedDict(
|
|
17
|
+
TypedDict
|
|
18
|
+
):
|
|
17
19
|
id: str
|
|
18
20
|
apy: float
|
|
19
21
|
net_apy: float
|
|
@@ -23,7 +25,7 @@ class CompassAPIBackendModelsMorphoReadResponseGetVaultsVaultStateTypedDict(Type
|
|
|
23
25
|
total_assets_usd: NotRequired[Nullable[float]]
|
|
24
26
|
|
|
25
27
|
|
|
26
|
-
class
|
|
28
|
+
class CompassAPIBackendV1ModelsMorphoReadResponseGetVaultsVaultState(BaseModel):
|
|
27
29
|
id: str
|
|
28
30
|
|
|
29
31
|
apy: float
|
|
@@ -12,7 +12,7 @@ from pydantic import model_serializer
|
|
|
12
12
|
from typing_extensions import NotRequired, TypedDict
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class CompassAPIBackendV1ModelsPendleReadResponseMarketUserPositionTypedDict(TypedDict):
|
|
16
16
|
claimable_yield: str
|
|
17
17
|
r"""The amount of yield that can be claimed in the underlying token."""
|
|
18
18
|
sy_balance: str
|
|
@@ -29,7 +29,7 @@ class CompassAPIBackendModelsPendleReadResponseMarketUserPositionTypedDict(Typed
|
|
|
29
29
|
r"""The amount of accounting assets the user currently holds."""
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
class
|
|
32
|
+
class CompassAPIBackendV1ModelsPendleReadResponseMarketUserPosition(BaseModel):
|
|
33
33
|
claimable_yield: str
|
|
34
34
|
r"""The amount of yield that can be claimed in the underlying token."""
|
|
35
35
|
|
|
@@ -5,14 +5,14 @@ from compass_api_sdk.types import BaseModel
|
|
|
5
5
|
from typing_extensions import TypedDict
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class
|
|
8
|
+
class CompassAPIBackendV1ModelsPendleReadResponsePositionsTokenBalanceTypedDict(
|
|
9
9
|
TypedDict
|
|
10
10
|
):
|
|
11
11
|
valuation: float
|
|
12
12
|
balance: str
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class CompassAPIBackendV1ModelsPendleReadResponsePositionsTokenBalance(BaseModel):
|
|
16
16
|
valuation: float
|
|
17
17
|
|
|
18
18
|
balance: str
|
|
@@ -5,14 +5,14 @@ from compass_api_sdk.types import BaseModel
|
|
|
5
5
|
from typing_extensions import TypedDict
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class
|
|
8
|
+
class CompassAPIBackendV1ModelsVaultsReadResponseVaultUserPositionTypedDict(TypedDict):
|
|
9
9
|
amount_of_shares: str
|
|
10
10
|
r"""The number of vault share tokens representing the user’s proportional ownership of the assets in the vault."""
|
|
11
11
|
amount_in_underlying_token: str
|
|
12
12
|
r"""The equivalent value of the user’s vault shares, denominated in the vault’s underlying asset (deposit token)."""
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class CompassAPIBackendV1ModelsVaultsReadResponseVaultUserPosition(BaseModel):
|
|
16
16
|
amount_of_shares: str
|
|
17
17
|
r"""The number of vault share tokens representing the user’s proportional ownership of the assets in the vault."""
|
|
18
18
|
|
compass_api_sdk/models/compass_api_backend_v1_models_wildcat_read_response_market_userposition.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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 CompassAPIBackendV1ModelsWildcatReadResponseMarketUserPositionTypedDict(
|
|
9
|
+
TypedDict
|
|
10
|
+
):
|
|
11
|
+
market_token_balance: str
|
|
12
|
+
r"""The quantity of market share tokens the user holds."""
|
|
13
|
+
underlying_token_balance: str
|
|
14
|
+
r"""The total current value of the user's market tokens, denominated in the underlying asset."""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CompassAPIBackendV1ModelsWildcatReadResponseMarketUserPosition(BaseModel):
|
|
18
|
+
market_token_balance: str
|
|
19
|
+
r"""The quantity of market share tokens the user holds."""
|
|
20
|
+
|
|
21
|
+
underlying_token_balance: str
|
|
22
|
+
r"""The total current value of the user's market tokens, denominated in the underlying asset."""
|
compass_api_sdk/models/compass_api_backend_v2_models_earn_read_response_positions_vaultposition.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import Literal
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPositionTypedDict(
|
|
13
|
+
TypedDict
|
|
14
|
+
):
|
|
15
|
+
id: str
|
|
16
|
+
r"""Base64-encoded position identifier."""
|
|
17
|
+
vault_address: str
|
|
18
|
+
r"""The vault address you are depositing to."""
|
|
19
|
+
amount_in_underlying_token: str
|
|
20
|
+
r"""The user's position value denominated in the underlying token."""
|
|
21
|
+
token_name: str
|
|
22
|
+
r"""Symbol of the underlying token (e.g., USDC)."""
|
|
23
|
+
vault_name: str
|
|
24
|
+
r"""Name of the vault token (share token)."""
|
|
25
|
+
type: Literal["VAULT"]
|
|
26
|
+
r"""The market type discriminator."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition(BaseModel):
|
|
30
|
+
id: str
|
|
31
|
+
r"""Base64-encoded position identifier."""
|
|
32
|
+
|
|
33
|
+
vault_address: str
|
|
34
|
+
r"""The vault address you are depositing to."""
|
|
35
|
+
|
|
36
|
+
amount_in_underlying_token: str
|
|
37
|
+
r"""The user's position value denominated in the underlying token."""
|
|
38
|
+
|
|
39
|
+
token_name: str
|
|
40
|
+
r"""Symbol of the underlying token (e.g., USDC)."""
|
|
41
|
+
|
|
42
|
+
vault_name: str
|
|
43
|
+
r"""Name of the vault token (share token)."""
|
|
44
|
+
|
|
45
|
+
TYPE: Annotated[
|
|
46
|
+
Annotated[Literal["VAULT"], AfterValidator(validate_const("VAULT"))],
|
|
47
|
+
pydantic.Field(alias="type"),
|
|
48
|
+
] = "VAULT"
|
|
49
|
+
r"""The market type discriminator."""
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import Literal, Optional
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712DomainTypedDict(
|
|
13
|
+
TypedDict
|
|
14
|
+
):
|
|
15
|
+
chain_id: int
|
|
16
|
+
r"""EVM chain ID"""
|
|
17
|
+
verifying_contract: str
|
|
18
|
+
r"""Permit2 contract address"""
|
|
19
|
+
name: Literal["Permit2"]
|
|
20
|
+
r"""Must be 'Permit2'"""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain(BaseModel):
|
|
24
|
+
chain_id: Annotated[int, pydantic.Field(alias="chainId")]
|
|
25
|
+
r"""EVM chain ID"""
|
|
26
|
+
|
|
27
|
+
verifying_contract: Annotated[str, pydantic.Field(alias="verifyingContract")]
|
|
28
|
+
r"""Permit2 contract address"""
|
|
29
|
+
|
|
30
|
+
NAME: Annotated[
|
|
31
|
+
Annotated[
|
|
32
|
+
Optional[Literal["Permit2"]], AfterValidator(validate_const("Permit2"))
|
|
33
|
+
],
|
|
34
|
+
pydantic.Field(alias="name"),
|
|
35
|
+
] = "Permit2"
|
|
36
|
+
r"""Must be 'Permit2'"""
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .eip712field import Eip712Field, Eip712FieldTypedDict
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
import pydantic
|
|
7
|
+
from typing import List, Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712TypesTypedDict(
|
|
12
|
+
TypedDict
|
|
13
|
+
):
|
|
14
|
+
eip712_domain: NotRequired[List[Eip712FieldTypedDict]]
|
|
15
|
+
r"""Standard EIP-712 domain type"""
|
|
16
|
+
token_permissions: NotRequired[List[Eip712FieldTypedDict]]
|
|
17
|
+
r"""TokenPermissions struct"""
|
|
18
|
+
permit_transfer_from: NotRequired[List[Eip712FieldTypedDict]]
|
|
19
|
+
r"""Main permit message type"""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types(BaseModel):
|
|
23
|
+
eip712_domain: Annotated[
|
|
24
|
+
Optional[List[Eip712Field]], pydantic.Field(alias="EIP712Domain")
|
|
25
|
+
] = None
|
|
26
|
+
r"""Standard EIP-712 domain type"""
|
|
27
|
+
|
|
28
|
+
token_permissions: Annotated[
|
|
29
|
+
Optional[List[Eip712Field]], pydantic.Field(alias="TokenPermissions")
|
|
30
|
+
] = None
|
|
31
|
+
r"""TokenPermissions struct"""
|
|
32
|
+
|
|
33
|
+
permit_transfer_from: Annotated[
|
|
34
|
+
Optional[List[Eip712Field]], pydantic.Field(alias="PermitTransferFrom")
|
|
35
|
+
] = None
|
|
36
|
+
r"""Main permit message type"""
|
|
@@ -0,0 +1,37 @@
|
|
|
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 CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712DomainTypedDict(
|
|
10
|
+
TypedDict
|
|
11
|
+
):
|
|
12
|
+
r"""The EIP-712 domain separator for ERC-20 Permit."""
|
|
13
|
+
|
|
14
|
+
name: str
|
|
15
|
+
r"""Token name"""
|
|
16
|
+
version: str
|
|
17
|
+
r"""Token version (usually '1' or '2')"""
|
|
18
|
+
chain_id: int
|
|
19
|
+
r"""Chain ID"""
|
|
20
|
+
verifying_contract: str
|
|
21
|
+
r"""Token contract address"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain(BaseModel):
|
|
25
|
+
r"""The EIP-712 domain separator for ERC-20 Permit."""
|
|
26
|
+
|
|
27
|
+
name: str
|
|
28
|
+
r"""Token name"""
|
|
29
|
+
|
|
30
|
+
version: str
|
|
31
|
+
r"""Token version (usually '1' or '2')"""
|
|
32
|
+
|
|
33
|
+
chain_id: Annotated[int, pydantic.Field(alias="chainId")]
|
|
34
|
+
r"""Chain ID"""
|
|
35
|
+
|
|
36
|
+
verifying_contract: Annotated[str, pydantic.Field(alias="verifyingContract")]
|
|
37
|
+
r"""Token contract address"""
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .eip712domainfield import Eip712DomainField, Eip712DomainFieldTypedDict
|
|
5
|
+
from .permitfield import PermitField, PermitFieldTypedDict
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
|
+
import pydantic
|
|
8
|
+
from typing import List
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712TypesTypedDict(
|
|
13
|
+
TypedDict
|
|
14
|
+
):
|
|
15
|
+
r"""The type definitions for EIP-712 structured data (ERC-20 Permit)."""
|
|
16
|
+
|
|
17
|
+
eip712_domain: List[Eip712DomainFieldTypedDict]
|
|
18
|
+
r"""EIP712Domain type definition"""
|
|
19
|
+
permit: List[PermitFieldTypedDict]
|
|
20
|
+
r"""Permit type definition"""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types(BaseModel):
|
|
24
|
+
r"""The type definitions for EIP-712 structured data (ERC-20 Permit)."""
|
|
25
|
+
|
|
26
|
+
eip712_domain: Annotated[
|
|
27
|
+
List[Eip712DomainField], pydantic.Field(alias="EIP712Domain")
|
|
28
|
+
]
|
|
29
|
+
r"""EIP712Domain type definition"""
|
|
30
|
+
|
|
31
|
+
permit: Annotated[List[PermitField], pydantic.Field(alias="Permit")]
|
|
32
|
+
r"""Permit type definition"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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 CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712DomainTypedDict(
|
|
10
|
+
TypedDict
|
|
11
|
+
):
|
|
12
|
+
r"""The EIP-712 domain separator for Safe transactions."""
|
|
13
|
+
|
|
14
|
+
chain_id: int
|
|
15
|
+
r"""Chain ID for the Safe transaction"""
|
|
16
|
+
verifying_contract: str
|
|
17
|
+
r"""Address of the Safe contract"""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain(
|
|
21
|
+
BaseModel
|
|
22
|
+
):
|
|
23
|
+
r"""The EIP-712 domain separator for Safe transactions."""
|
|
24
|
+
|
|
25
|
+
chain_id: Annotated[int, pydantic.Field(alias="chainId")]
|
|
26
|
+
r"""Chain ID for the Safe transaction"""
|
|
27
|
+
|
|
28
|
+
verifying_contract: Annotated[str, pydantic.Field(alias="verifyingContract")]
|
|
29
|
+
r"""Address of the Safe contract"""
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .eip712domainfield import Eip712DomainField, Eip712DomainFieldTypedDict
|
|
5
|
+
from .safetxfield import SafeTxField, SafeTxFieldTypedDict
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
|
+
import pydantic
|
|
8
|
+
from typing import List
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712TypesTypedDict(
|
|
13
|
+
TypedDict
|
|
14
|
+
):
|
|
15
|
+
r"""The type definitions for EIP-712 structured data."""
|
|
16
|
+
|
|
17
|
+
eip712_domain: List[Eip712DomainFieldTypedDict]
|
|
18
|
+
r"""EIP712Domain type definition"""
|
|
19
|
+
safe_tx: List[SafeTxFieldTypedDict]
|
|
20
|
+
r"""SafeTx type definition"""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types(
|
|
24
|
+
BaseModel
|
|
25
|
+
):
|
|
26
|
+
r"""The type definitions for EIP-712 structured data."""
|
|
27
|
+
|
|
28
|
+
eip712_domain: Annotated[
|
|
29
|
+
List[Eip712DomainField], pydantic.Field(alias="EIP712Domain")
|
|
30
|
+
]
|
|
31
|
+
r"""EIP712Domain type definition"""
|
|
32
|
+
|
|
33
|
+
safe_tx: Annotated[List[SafeTxField], pydantic.Field(alias="SafeTx")]
|
|
34
|
+
r"""SafeTx type definition"""
|
|
@@ -0,0 +1,40 @@
|
|
|
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 enum import Enum
|
|
6
|
+
from typing import Optional
|
|
7
|
+
from typing_extensions import NotRequired, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CreateAccountRequestChain(str, Enum):
|
|
11
|
+
ARBITRUM = "arbitrum"
|
|
12
|
+
BASE = "base"
|
|
13
|
+
ETHEREUM = "ethereum"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class CreateAccountRequestTypedDict(TypedDict):
|
|
17
|
+
r"""Request to create a compass account."""
|
|
18
|
+
|
|
19
|
+
chain: CreateAccountRequestChain
|
|
20
|
+
sender: str
|
|
21
|
+
r"""The address of the transaction sender."""
|
|
22
|
+
owner: str
|
|
23
|
+
r"""The address that will own and control the compass account"""
|
|
24
|
+
estimate_gas: NotRequired[bool]
|
|
25
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class CreateAccountRequest(BaseModel):
|
|
29
|
+
r"""Request to create a compass account."""
|
|
30
|
+
|
|
31
|
+
chain: CreateAccountRequestChain
|
|
32
|
+
|
|
33
|
+
sender: str
|
|
34
|
+
r"""The address of the transaction sender."""
|
|
35
|
+
|
|
36
|
+
owner: str
|
|
37
|
+
r"""The address that will own and control the compass account"""
|
|
38
|
+
|
|
39
|
+
estimate_gas: Optional[bool] = None
|
|
40
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -0,0 +1,56 @@
|
|
|
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, Nullable, UNSET_SENTINEL
|
|
6
|
+
from pydantic import model_serializer
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CreateAccountResponseTypedDict(TypedDict):
|
|
11
|
+
r"""Response containing unsigned transaction to create compass Earn account."""
|
|
12
|
+
|
|
13
|
+
transaction: Nullable[UnsignedTransactionTypedDict]
|
|
14
|
+
r"""Transaction to create compass account"""
|
|
15
|
+
earn_account_address: str
|
|
16
|
+
r"""Predicted address of the compass earn account that will be deployed"""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class CreateAccountResponse(BaseModel):
|
|
20
|
+
r"""Response containing unsigned transaction to create compass Earn account."""
|
|
21
|
+
|
|
22
|
+
transaction: Nullable[UnsignedTransaction]
|
|
23
|
+
r"""Transaction to create compass account"""
|
|
24
|
+
|
|
25
|
+
earn_account_address: str
|
|
26
|
+
r"""Predicted address of the compass earn account that will be deployed"""
|
|
27
|
+
|
|
28
|
+
@model_serializer(mode="wrap")
|
|
29
|
+
def serialize_model(self, handler):
|
|
30
|
+
optional_fields = []
|
|
31
|
+
nullable_fields = ["transaction"]
|
|
32
|
+
null_default_fields = []
|
|
33
|
+
|
|
34
|
+
serialized = handler(self)
|
|
35
|
+
|
|
36
|
+
m = {}
|
|
37
|
+
|
|
38
|
+
for n, f in type(self).model_fields.items():
|
|
39
|
+
k = f.alias or n
|
|
40
|
+
val = serialized.get(k)
|
|
41
|
+
serialized.pop(k, None)
|
|
42
|
+
|
|
43
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
44
|
+
is_set = (
|
|
45
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
46
|
+
or k in null_default_fields
|
|
47
|
+
) # pylint: disable=no-member
|
|
48
|
+
|
|
49
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
50
|
+
m[k] = val
|
|
51
|
+
elif val != UNSET_SENTINEL and (
|
|
52
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
53
|
+
):
|
|
54
|
+
m[k] = val
|
|
55
|
+
|
|
56
|
+
return m
|
|
@@ -0,0 +1,77 @@
|
|
|
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 enum import Enum
|
|
6
|
+
from typing import Optional, Union
|
|
7
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DepositForBurnRequestChain(str, Enum):
|
|
11
|
+
r"""The source chain where USDC will be burned."""
|
|
12
|
+
|
|
13
|
+
ETHEREUM = "ethereum"
|
|
14
|
+
ARBITRUM = "arbitrum"
|
|
15
|
+
BASE = "base"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
DepositForBurnRequestAmountTypedDict = TypeAliasType(
|
|
19
|
+
"DepositForBurnRequestAmountTypedDict", Union[float, str]
|
|
20
|
+
)
|
|
21
|
+
r"""The amount of USDC to bridge (in token units, e.g., 100.5 for 100.5 USDC)."""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
DepositForBurnRequestAmount = TypeAliasType(
|
|
25
|
+
"DepositForBurnRequestAmount", Union[float, str]
|
|
26
|
+
)
|
|
27
|
+
r"""The amount of USDC to bridge (in token units, e.g., 100.5 for 100.5 USDC)."""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class DestinationChain(str, Enum):
|
|
31
|
+
r"""The destination chain where USDC will be minted."""
|
|
32
|
+
|
|
33
|
+
ETHEREUM = "ethereum"
|
|
34
|
+
ARBITRUM = "arbitrum"
|
|
35
|
+
BASE = "base"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class DepositForBurnRequestTransferMode(str, Enum):
|
|
39
|
+
r"""Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'."""
|
|
40
|
+
|
|
41
|
+
FAST = "fast"
|
|
42
|
+
STANDARD = "standard"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class DepositForBurnRequestTypedDict(TypedDict):
|
|
46
|
+
owner: str
|
|
47
|
+
r"""The primary wallet address that owns and controls the Product Account."""
|
|
48
|
+
chain: DepositForBurnRequestChain
|
|
49
|
+
r"""The source chain where USDC will be burned."""
|
|
50
|
+
amount: DepositForBurnRequestAmountTypedDict
|
|
51
|
+
r"""The amount of USDC to bridge (in token units, e.g., 100.5 for 100.5 USDC)."""
|
|
52
|
+
destination_chain: DestinationChain
|
|
53
|
+
r"""The destination chain where USDC will be minted."""
|
|
54
|
+
gas_sponsorship: NotRequired[bool]
|
|
55
|
+
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`)."""
|
|
56
|
+
transfer_mode: NotRequired[DepositForBurnRequestTransferMode]
|
|
57
|
+
r"""Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'."""
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class DepositForBurnRequest(BaseModel):
|
|
61
|
+
owner: str
|
|
62
|
+
r"""The primary wallet address that owns and controls the Product Account."""
|
|
63
|
+
|
|
64
|
+
chain: DepositForBurnRequestChain
|
|
65
|
+
r"""The source chain where USDC will be burned."""
|
|
66
|
+
|
|
67
|
+
amount: DepositForBurnRequestAmount
|
|
68
|
+
r"""The amount of USDC to bridge (in token units, e.g., 100.5 for 100.5 USDC)."""
|
|
69
|
+
|
|
70
|
+
destination_chain: DestinationChain
|
|
71
|
+
r"""The destination chain where USDC will be minted."""
|
|
72
|
+
|
|
73
|
+
gas_sponsorship: Optional[bool] = None
|
|
74
|
+
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`)."""
|
|
75
|
+
|
|
76
|
+
transfer_mode: Optional[DepositForBurnRequestTransferMode] = None
|
|
77
|
+
r"""Transfer speed mode. 'fast': ~30 second transfers using confirmed finality (requires a small fee taken from transfer amount). 'standard': ~15-19 minute transfers using full finality (free, no fee). Default is 'standard'."""
|
|
@@ -0,0 +1,100 @@
|
|
|
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 (
|
|
10
|
+
BaseModel,
|
|
11
|
+
Nullable,
|
|
12
|
+
OptionalNullable,
|
|
13
|
+
UNSET,
|
|
14
|
+
UNSET_SENTINEL,
|
|
15
|
+
)
|
|
16
|
+
from enum import Enum
|
|
17
|
+
from pydantic import model_serializer
|
|
18
|
+
from typing_extensions import NotRequired, TypedDict
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class DepositForBurnResponseTransferMode(str, Enum):
|
|
22
|
+
r"""The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min)."""
|
|
23
|
+
|
|
24
|
+
FAST = "fast"
|
|
25
|
+
STANDARD = "standard"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class DepositForBurnResponseTypedDict(TypedDict):
|
|
29
|
+
r"""Response model for CCTP depositForBurn transaction from a smart account.
|
|
30
|
+
|
|
31
|
+
Contains either an unsigned transaction for direct submission or EIP-712 typed data
|
|
32
|
+
for gas-sponsored transactions. Also includes a bridge_id for tracking the cross-
|
|
33
|
+
chain transfer.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
transaction: Nullable[UnsignedTransactionTypedDict]
|
|
37
|
+
eip_712: Nullable[BatchedSafeOperationsResponseOutputTypedDict]
|
|
38
|
+
transfer_mode: DepositForBurnResponseTransferMode
|
|
39
|
+
r"""The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min)."""
|
|
40
|
+
estimated_time_seconds: int
|
|
41
|
+
r"""Estimated time to complete the bridge in seconds."""
|
|
42
|
+
bridge_id: NotRequired[Nullable[str]]
|
|
43
|
+
r"""Unique bridge identifier for tracking this cross-chain transfer. Use this ID when calling /mint/prepare to complete the transfer. Only present when Redis is configured on the server."""
|
|
44
|
+
fee: NotRequired[Nullable[str]]
|
|
45
|
+
r"""Fee amount in USDC charged for this transfer. Only present for fast mode. Standard mode transfers are free (fee is None or 0)."""
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class DepositForBurnResponse(BaseModel):
|
|
49
|
+
r"""Response model for CCTP depositForBurn transaction from a smart account.
|
|
50
|
+
|
|
51
|
+
Contains either an unsigned transaction for direct submission or EIP-712 typed data
|
|
52
|
+
for gas-sponsored transactions. Also includes a bridge_id for tracking the cross-
|
|
53
|
+
chain transfer.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
transaction: Nullable[UnsignedTransaction]
|
|
57
|
+
|
|
58
|
+
eip_712: Nullable[BatchedSafeOperationsResponseOutput]
|
|
59
|
+
|
|
60
|
+
transfer_mode: DepositForBurnResponseTransferMode
|
|
61
|
+
r"""The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min)."""
|
|
62
|
+
|
|
63
|
+
estimated_time_seconds: int
|
|
64
|
+
r"""Estimated time to complete the bridge in seconds."""
|
|
65
|
+
|
|
66
|
+
bridge_id: OptionalNullable[str] = UNSET
|
|
67
|
+
r"""Unique bridge identifier for tracking this cross-chain transfer. Use this ID when calling /mint/prepare to complete the transfer. Only present when Redis is configured on the server."""
|
|
68
|
+
|
|
69
|
+
fee: OptionalNullable[str] = UNSET
|
|
70
|
+
r"""Fee amount in USDC charged for this transfer. Only present for fast mode. Standard mode transfers are free (fee is None or 0)."""
|
|
71
|
+
|
|
72
|
+
@model_serializer(mode="wrap")
|
|
73
|
+
def serialize_model(self, handler):
|
|
74
|
+
optional_fields = ["bridge_id", "fee"]
|
|
75
|
+
nullable_fields = ["bridge_id", "transaction", "eip_712", "fee"]
|
|
76
|
+
null_default_fields = []
|
|
77
|
+
|
|
78
|
+
serialized = handler(self)
|
|
79
|
+
|
|
80
|
+
m = {}
|
|
81
|
+
|
|
82
|
+
for n, f in type(self).model_fields.items():
|
|
83
|
+
k = f.alias or n
|
|
84
|
+
val = serialized.get(k)
|
|
85
|
+
serialized.pop(k, None)
|
|
86
|
+
|
|
87
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
88
|
+
is_set = (
|
|
89
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
90
|
+
or k in null_default_fields
|
|
91
|
+
) # pylint: disable=no-member
|
|
92
|
+
|
|
93
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
94
|
+
m[k] = val
|
|
95
|
+
elif val != UNSET_SENTINEL and (
|
|
96
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
97
|
+
):
|
|
98
|
+
m[k] = val
|
|
99
|
+
|
|
100
|
+
return m
|