@sodax/sdk 2.2.0-rc.2 → 2.2.0-rc.4
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.
- package/dist/index.cjs +1783 -230
- package/dist/index.d.cts +374 -7
- package/dist/index.d.ts +374 -7
- package/dist/index.mjs +1781 -234
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SodaxFeature, ISwapsApiV2, Result, SwapsApiConfig, SodaxLogger, GetSwapTokensResponseV2, GetSwapTokensByChainResponseV2, QuoteRequestV2, QuoteQueryV2, QuoteResponseV2, DeadlineQueryV2, DeadlineResponseV2, CreateIntentParamsV2, AllowanceCheckResponseV2, ApproveResponseV2, CreateIntentResponseV2, SubmitIntentRequestV2, SubmitIntentResponseV2, StatusRequestV2, StatusResponseV2, CancelIntentRequestV2, CancelIntentResponseV2, IntentHashRequestV2, IntentHashResponseV2, IntentPacketRequestV2, IntentPacketResponseV2, IntentExtraDataRequestV2, IntentExtraDataResponseV2, IntentStateV2, GetIntentResponseV2, CreateLimitOrderParamsV2, CreateLimitOrderResponseV2, GasEstimateRequestV2, GasEstimateResponseV2, FeeQueryV2, FeeResponseV2, SubmitTxRequestV2, SubmitTxResponseV2, SubmitTxStatusQueryV2, SubmitTxStatusResponseV2, IStellarSponsoringApi, SponsoringApiConfig, StellarSponsorConfig, StellarSponsoredAccountRequest, StellarSponsoredAccountResponse, IBridgeApiV2, BaseApiConfig, GetBridgeTokensResponseV2, GetBridgeTokensByChainResponseV2, CreateBridgeIntentParamsV2, BridgeAllowanceCheckResponseV2, BridgeApproveResponseV2, CreateBridgeIntentResponseV2, BridgeSubmitTxRequestV2, BridgeSubmitTxResponseV2, BridgeSubmitTxStatusQueryV2, BridgeSubmitTxStatusResponseV2, BridgeFeeRequestV2, BridgeFeeResponseV2, BridgeQuoteRequestV2, BridgeableAmountResponseV2, BridgeableCheckResponseV2, BitcoinBoundExtrasV2, PartnerFeeV2, IConfigApiV1, ApiConfig, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, AnalyticsDetailLevel, AnalyticsEventPhase, AnalyticsOption, PartnerFee, RadfiSigner, SodaxConfig, SodaxOptions, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, LeverageYieldConfig, DexConfig, GetSpokeChainConfigType, SodaxDefaultConfig, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, QuoteType, EvmChainKey, DeepPartial, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, HookKind, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, HttpUrl, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, BitcoinRawTransaction, NearChainKey, FillData, NearRawTransaction, INearWalletProvider, SuiTransport, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, SuiTransaction, SuiWaitForTransactionParams, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SubmitTxStatusDataV2, SolverIntentStatusResponse, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault, SponsoringApiErrorCode } from '@sodax/types';
|
|
1
|
+
import { SodaxFeature, ISwapsApiV2, Result, SwapsApiConfig, SodaxLogger, GetSwapTokensResponseV2, GetSwapTokensByChainResponseV2, QuoteRequestV2, QuoteQueryV2, QuoteResponseV2, DeadlineQueryV2, DeadlineResponseV2, CreateIntentParamsV2, AllowanceCheckResponseV2, ApproveResponseV2, CreateIntentResponseV2, SubmitIntentRequestV2, SubmitIntentResponseV2, StatusRequestV2, StatusResponseV2, CancelIntentRequestV2, CancelIntentResponseV2, IntentHashRequestV2, IntentHashResponseV2, IntentPacketRequestV2, IntentPacketResponseV2, IntentExtraDataRequestV2, IntentExtraDataResponseV2, IntentStateV2, GetIntentResponseV2, CreateLimitOrderParamsV2, CreateLimitOrderResponseV2, GasEstimateRequestV2, GasEstimateResponseV2, FeeQueryV2, FeeResponseV2, SubmitTxRequestV2, SubmitTxResponseV2, SubmitTxStatusQueryV2, SubmitTxStatusResponseV2, IStellarSponsoringApi, SponsoringApiConfig, StellarSponsorConfig, StellarSponsoredAccountRequest, StellarSponsoredAccountResponse, IBridgeApiV2, BaseApiConfig, GetBridgeTokensResponseV2, GetBridgeTokensByChainResponseV2, CreateBridgeIntentParamsV2, BridgeAllowanceCheckResponseV2, BridgeApproveResponseV2, CreateBridgeIntentResponseV2, BridgeSubmitTxRequestV2, BridgeSubmitTxResponseV2, BridgeSubmitTxStatusQueryV2, BridgeSubmitTxStatusResponseV2, BridgeFeeRequestV2, BridgeFeeResponseV2, BridgeQuoteRequestV2, BridgeableAmountResponseV2, BridgeableCheckResponseV2, BitcoinBoundExtrasV2, PartnerFeeV2, ILeverageYieldApiV2, GetLeverageVaultsResponseV2, GetLeverageVaultResponseV2, VaultQueryV2, VaultAssetResponseV2, LeverageYieldPositionV2, LeverageYieldAprV2, LeverageYieldEffectiveAprV2, LeverageYieldLsdAprV2, VaultTotalAssetsResponseV2, VaultAssetsQueryV2, PreviewDepositResponseV2, PreviewWithdrawResponseV2, VaultSharesQueryV2, PreviewRedeemResponseV2, VaultOwnerQueryV2, ShareBalanceResponseV2, MaxWithdrawResponseV2, LeverageYieldDepositQuoteRequestV2, LeverageYieldWithdrawQuoteRequestV2, CreateDepositIntentParamsV2, CreateWithdrawIntentParamsV2, LeverageYieldSubmitTxRequestV2, IConfigApiV1, ApiConfig, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, AnalyticsDetailLevel, AnalyticsEventPhase, AnalyticsOption, PartnerFee, RadfiSigner, SodaxConfig, SodaxOptions, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, LeverageYieldConfig, DexConfig, GetSpokeChainConfigType, SodaxDefaultConfig, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, QuoteType, EvmChainKey, DeepPartial, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, HookKind, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, HttpUrl, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, BitcoinRawTransaction, NearChainKey, FillData, NearRawTransaction, INearWalletProvider, SuiTransport, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, SuiTransaction, SuiWaitForTransactionParams, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SubmitTxStatusDataV2, SolverIntentStatusResponse, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault, SponsoringApiErrorCode } from '@sodax/types';
|
|
2
2
|
export * from '@sodax/types';
|
|
3
3
|
export { SodaxFeature } from '@sodax/types';
|
|
4
4
|
import * as v from 'valibot';
|
|
@@ -111,7 +111,7 @@ type SodaxErrorContext = {
|
|
|
111
111
|
srcChainKey?: string;
|
|
112
112
|
dstChainKey?: string;
|
|
113
113
|
relayCode?: RelayCode;
|
|
114
|
-
api?: 'solver' | 'backend' | 'swaps' | 'sponsoring' | 'bridge';
|
|
114
|
+
api?: 'solver' | 'backend' | 'swaps' | 'leverageYield' | 'sponsoring' | 'bridge';
|
|
115
115
|
method?: string;
|
|
116
116
|
status?: number;
|
|
117
117
|
nextAction?: string;
|
|
@@ -7903,6 +7903,300 @@ declare class BridgeApiService implements ResultifiedBridgeApiV2 {
|
|
|
7903
7903
|
getTimeout(): number;
|
|
7904
7904
|
}
|
|
7905
7905
|
|
|
7906
|
+
/**
|
|
7907
|
+
* {@link ILeverageYieldApiV2} with every method's return wrapped in `Result<T>` and an
|
|
7908
|
+
* optional trailing `RequestOverrideConfig`. `LeverageYieldApiService` implements this
|
|
7909
|
+
* (rather than `ILeverageYieldApiV2` directly) because it never throws — it returns
|
|
7910
|
+
* `{ ok: false }` on failure instead of `Promise<T>` rejection. Mirrors
|
|
7911
|
+
* `ResultifiedSwapsApiV2`; keeps the class in lockstep with the canonical interface.
|
|
7912
|
+
*/
|
|
7913
|
+
type ResultifiedLeverageYieldApiV2 = {
|
|
7914
|
+
[K in keyof ILeverageYieldApiV2]: ILeverageYieldApiV2[K] extends (...args: infer A) => Promise<infer R> ? (...args: [...A, config?: RequestOverrideConfig]) => Promise<Result<R>> : never;
|
|
7915
|
+
};
|
|
7916
|
+
/**
|
|
7917
|
+
* HTTP client for the backend **Leverage Yield API v2** (`/leverage-yield/*`).
|
|
7918
|
+
*
|
|
7919
|
+
* The leverage-yield counterpart to {@link import('./SwapsApiService.js').SwapsApiService}:
|
|
7920
|
+
* one method per route of {@link ILeverageYieldApiV2}, each response validated at runtime
|
|
7921
|
+
* with a valibot schema (see `leverageYieldApiSchemas.ts`). A leverage-yield deposit/withdraw
|
|
7922
|
+
* IS an intent-based swap, so the intent-relay/gas/fee/submit-tx methods share the swaps wire
|
|
7923
|
+
* shapes and schemas; the vault registry, vault reads, and separate deposit/withdraw
|
|
7924
|
+
* create-intent (and quote) endpoints are leverage-yield-specific.
|
|
7925
|
+
*
|
|
7926
|
+
* All public methods return `Promise<Result<T>>` — they never throw. On network failure,
|
|
7927
|
+
* timeout, non-2xx HTTP response, or response-shape validation failure, the returned Result
|
|
7928
|
+
* has `ok: false` with a canonical `SodaxError<'EXTERNAL_API_ERROR'>` (`feature: 'backend'`,
|
|
7929
|
+
* `context.api: 'leverageYield'`); the underlying failure is preserved on `error.cause`.
|
|
7930
|
+
*
|
|
7931
|
+
* Per-call request overrides (base URL, timeout, headers, API key) can be passed as the optional
|
|
7932
|
+
* last argument to any method via `RequestOverrideConfig`.
|
|
7933
|
+
*
|
|
7934
|
+
* The Leverage Yield API hangs off the shared gateway root as `/leverage-yield/*` — a sibling of the
|
|
7935
|
+
* data API's `/be` mount, not a child of it, so `resolveLeverageYieldApiConfig` returns a flat
|
|
7936
|
+
* {@link BaseApiConfig} with no `basePath`. There is deliberately no `leverageYieldApiConfig` slice:
|
|
7937
|
+
* retarget it via `baseURL` / `baseApiConfig`, or per call.
|
|
7938
|
+
*
|
|
7939
|
+
* Reachable on the Sodax facade as `sodax.api.leverageYield`.
|
|
7940
|
+
*/
|
|
7941
|
+
/** Construction options for {@link LeverageYieldApiService}. */
|
|
7942
|
+
type LeverageYieldApiServiceOptions = {
|
|
7943
|
+
/**
|
|
7944
|
+
* Whether a legacy `/be` suffix is trimmed off a per-call `baseURL` override. Defaults to `true`, the
|
|
7945
|
+
* migration behaviour. `BackendApiService` passes `false` when the `ApiConfig` states a `basePath`
|
|
7946
|
+
* explicitly: that marks a config written against the current contract, whose base URLs are deliberate
|
|
7947
|
+
* roots, so a trailing `/be` is a real path segment rather than the data API's mount.
|
|
7948
|
+
*/
|
|
7949
|
+
trimLegacyOverrides?: boolean;
|
|
7950
|
+
};
|
|
7951
|
+
declare class LeverageYieldApiService implements ResultifiedLeverageYieldApiV2 {
|
|
7952
|
+
private readonly config;
|
|
7953
|
+
private readonly headers;
|
|
7954
|
+
private readonly logger;
|
|
7955
|
+
/** See {@link LeverageYieldApiServiceOptions.trimLegacyOverrides}. */
|
|
7956
|
+
private readonly trimsLegacyOverrides;
|
|
7957
|
+
constructor(config: BaseApiConfig, logger?: SodaxLogger, options?: LeverageYieldApiServiceOptions);
|
|
7958
|
+
/**
|
|
7959
|
+
* Issues a single HTTP request, validates the JSON body against `schema`, and wraps the
|
|
7960
|
+
* result in `Result<T>`. Mirrors `SwapsApiService.request`; every public method delegates here.
|
|
7961
|
+
*/
|
|
7962
|
+
private request;
|
|
7963
|
+
/**
|
|
7964
|
+
* Drop the SDK-only display field `feeAmount` before an intent reaches the strict wire serializer.
|
|
7965
|
+
* `sodax.leverageYield.createVaultIntent` returns `Intent & FeeAmount`, which is structurally
|
|
7966
|
+
* assignable to the wire `IntentRequestV2` and so gets passed straight into the intent-carrying
|
|
7967
|
+
* endpoints; the lenient JSON serializer would send the extra bigint wholesale. Mirrors
|
|
7968
|
+
* `SwapsApiService.toWireIntent`; a no-op for an already-clean `IntentRequestV2`.
|
|
7969
|
+
*/
|
|
7970
|
+
private static toWireIntent;
|
|
7971
|
+
/** Append `params` to `base` as a query string, returning `base` unchanged when `params` is empty. */
|
|
7972
|
+
private withQuery;
|
|
7973
|
+
/**
|
|
7974
|
+
* Fetch the registry of deployed leverage-yield vaults.
|
|
7975
|
+
*
|
|
7976
|
+
* @returns `Result<GetLeverageVaultsResponseV2>` — array of vault descriptors.
|
|
7977
|
+
*/
|
|
7978
|
+
getVaults(config?: RequestOverrideConfig): Promise<Result<GetLeverageVaultsResponseV2>>;
|
|
7979
|
+
/**
|
|
7980
|
+
* Fetch a single vault descriptor by its lsoda* share-token name (e.g. `lsodaWEETH`).
|
|
7981
|
+
*
|
|
7982
|
+
* @returns `Result<GetLeverageVaultResponseV2>` — the vault descriptor.
|
|
7983
|
+
*/
|
|
7984
|
+
getVault(name: string, config?: RequestOverrideConfig): Promise<Result<GetLeverageVaultResponseV2>>;
|
|
7985
|
+
/**
|
|
7986
|
+
* Get the vault's underlying hub asset (Sodax vault-token wrapper).
|
|
7987
|
+
*
|
|
7988
|
+
* @returns `Result<VaultAssetResponseV2>` — `{ asset }`.
|
|
7989
|
+
*/
|
|
7990
|
+
getAsset(query: VaultQueryV2, config?: RequestOverrideConfig): Promise<Result<VaultAssetResponseV2>>;
|
|
7991
|
+
/**
|
|
7992
|
+
* Get a leveraged-position snapshot for the vault.
|
|
7993
|
+
*
|
|
7994
|
+
* @returns `Result<LeverageYieldPositionV2>` — `{ collateral, debt, ltv, healthFactor, idleAsset }` (decimal strings).
|
|
7995
|
+
*/
|
|
7996
|
+
getPosition(query: VaultQueryV2, config?: RequestOverrideConfig): Promise<Result<LeverageYieldPositionV2>>;
|
|
7997
|
+
/**
|
|
7998
|
+
* Get the AAVE-only steady-state APR for the vault (goes negative when the LSD yield is the alpha).
|
|
7999
|
+
*
|
|
8000
|
+
* @returns `Result<LeverageYieldAprV2>` — RAY-denominated rates as decimal strings.
|
|
8001
|
+
*/
|
|
8002
|
+
getApr(query: VaultQueryV2, config?: RequestOverrideConfig): Promise<Result<LeverageYieldAprV2>>;
|
|
8003
|
+
/**
|
|
8004
|
+
* Get the honest combined AAVE + LSD effective APR for the vault.
|
|
8005
|
+
*
|
|
8006
|
+
* @returns `Result<LeverageYieldEffectiveAprV2>` — includes `effectiveNetAprRay` (the headline number).
|
|
8007
|
+
*/
|
|
8008
|
+
getEffectiveApr(query: VaultQueryV2, config?: RequestOverrideConfig): Promise<Result<LeverageYieldEffectiveAprV2>>;
|
|
8009
|
+
/**
|
|
8010
|
+
* Get the off-chain LSD staking-APR snapshot for the vault's underlying asset.
|
|
8011
|
+
*
|
|
8012
|
+
* @returns `Result<LeverageYieldLsdAprV2>` — `{ aprRay, label, stale }`.
|
|
8013
|
+
*/
|
|
8014
|
+
getLsdApr(query: VaultQueryV2, config?: RequestOverrideConfig): Promise<Result<LeverageYieldLsdAprV2>>;
|
|
8015
|
+
/**
|
|
8016
|
+
* Get the total assets managed by the vault.
|
|
8017
|
+
*
|
|
8018
|
+
* @returns `Result<VaultTotalAssetsResponseV2>` — `{ totalAssets }` (decimal string).
|
|
8019
|
+
*/
|
|
8020
|
+
getTotalAssets(query: VaultQueryV2, config?: RequestOverrideConfig): Promise<Result<VaultTotalAssetsResponseV2>>;
|
|
8021
|
+
/**
|
|
8022
|
+
* Preview the shares minted for depositing `assets` into the vault (ERC-4626 `previewDeposit`).
|
|
8023
|
+
*
|
|
8024
|
+
* @returns `Result<PreviewDepositResponseV2>` — `{ shares }` (decimal string).
|
|
8025
|
+
*/
|
|
8026
|
+
previewDeposit(query: VaultAssetsQueryV2, config?: RequestOverrideConfig): Promise<Result<PreviewDepositResponseV2>>;
|
|
8027
|
+
/**
|
|
8028
|
+
* Preview the shares burned to withdraw `assets` from the vault (ERC-4626 `previewWithdraw`).
|
|
8029
|
+
*
|
|
8030
|
+
* @returns `Result<PreviewWithdrawResponseV2>` — `{ shares }` (decimal string).
|
|
8031
|
+
*/
|
|
8032
|
+
previewWithdraw(query: VaultAssetsQueryV2, config?: RequestOverrideConfig): Promise<Result<PreviewWithdrawResponseV2>>;
|
|
8033
|
+
/**
|
|
8034
|
+
* Preview the assets returned for redeeming `shares` from the vault (ERC-4626 `previewRedeem`).
|
|
8035
|
+
*
|
|
8036
|
+
* @returns `Result<PreviewRedeemResponseV2>` — `{ assets }` (decimal string).
|
|
8037
|
+
*/
|
|
8038
|
+
previewRedeem(query: VaultSharesQueryV2, config?: RequestOverrideConfig): Promise<Result<PreviewRedeemResponseV2>>;
|
|
8039
|
+
/**
|
|
8040
|
+
* Get an owner's vault share (lsoda*) balance.
|
|
8041
|
+
*
|
|
8042
|
+
* @returns `Result<ShareBalanceResponseV2>` — `{ balance }` (decimal string).
|
|
8043
|
+
*/
|
|
8044
|
+
getShareBalance(query: VaultOwnerQueryV2, config?: RequestOverrideConfig): Promise<Result<ShareBalanceResponseV2>>;
|
|
8045
|
+
/**
|
|
8046
|
+
* Get an owner's RAW ERC-4626 `maxWithdraw` — NOT dust-trimmed, unlike the SDK-local
|
|
8047
|
+
* `sodax.leverageYield.getMaxWithdrawForUser`. Apply a margin before using it as a withdraw amount.
|
|
8048
|
+
*
|
|
8049
|
+
* @returns `Result<MaxWithdrawResponseV2>` — `{ maxWithdraw }` (decimal string).
|
|
8050
|
+
*/
|
|
8051
|
+
getMaxWithdraw(query: VaultOwnerQueryV2, config?: RequestOverrideConfig): Promise<Result<MaxWithdrawResponseV2>>;
|
|
8052
|
+
/**
|
|
8053
|
+
* Quote a swap-style deposit: any solver-supported `tokenSrc` → the vault's lsoda* shares.
|
|
8054
|
+
* Pass `query.includeTxData = true` to also build the unsigned create-intent tx (`srcAddress`
|
|
8055
|
+
* required in the body then).
|
|
8056
|
+
*
|
|
8057
|
+
* @returns `Result<QuoteResponseV2>` — `quotedAmount` (shares) and optional `txData`.
|
|
8058
|
+
*/
|
|
8059
|
+
getDepositQuote(body: LeverageYieldDepositQuoteRequestV2, query?: QuoteQueryV2, config?: RequestOverrideConfig): Promise<Result<QuoteResponseV2>>;
|
|
8060
|
+
/**
|
|
8061
|
+
* Quote a swap-style withdraw: the vault's lsoda* shares → any solver-supported `tokenDst`.
|
|
8062
|
+
* Pass `query.includeTxData = true` to also build the unsigned tx (signed on `srcChainKey`;
|
|
8063
|
+
* `srcAddress`/`dstAddress` required in the body then).
|
|
8064
|
+
*
|
|
8065
|
+
* @returns `Result<QuoteResponseV2>` — `quotedAmount` (output token) and optional `txData`.
|
|
8066
|
+
*/
|
|
8067
|
+
getWithdrawQuote(body: LeverageYieldWithdrawQuoteRequestV2, query?: QuoteQueryV2, config?: RequestOverrideConfig): Promise<Result<QuoteResponseV2>>;
|
|
8068
|
+
/**
|
|
8069
|
+
* Compute a deposit/withdraw deadline (hub timestamp + `offsetSeconds`, default 300s).
|
|
8070
|
+
*
|
|
8071
|
+
* @returns `Result<DeadlineResponseV2>` — unix-seconds deadline (decimal string).
|
|
8072
|
+
*/
|
|
8073
|
+
getDeadline(query?: DeadlineQueryV2, config?: RequestOverrideConfig): Promise<Result<DeadlineResponseV2>>;
|
|
8074
|
+
/**
|
|
8075
|
+
* Check whether the deposit input-token allowance is already sufficient for the intent.
|
|
8076
|
+
* (Withdraw needs no spoke allowance — it spends lsoda* from the hub wallet.)
|
|
8077
|
+
*
|
|
8078
|
+
* @returns `Result<AllowanceCheckResponseV2>` — `{ valid }`.
|
|
8079
|
+
*/
|
|
8080
|
+
checkAllowance(body: CreateDepositIntentParamsV2, config?: RequestOverrideConfig): Promise<Result<AllowanceCheckResponseV2>>;
|
|
8081
|
+
/**
|
|
8082
|
+
* Build an unsigned token-approval transaction for the deposit input token.
|
|
8083
|
+
*
|
|
8084
|
+
* @returns `Result<ApproveResponseV2>` — `{ tx }` (chain-specific unsigned tx).
|
|
8085
|
+
*/
|
|
8086
|
+
approve(body: CreateDepositIntentParamsV2, config?: RequestOverrideConfig): Promise<Result<ApproveResponseV2>>;
|
|
8087
|
+
/**
|
|
8088
|
+
* Build an unsigned deposit create-intent transaction (any token → lsoda* shares).
|
|
8089
|
+
*
|
|
8090
|
+
* @returns `Result<CreateIntentResponseV2>` — `{ tx, intent, relayData }`.
|
|
8091
|
+
*/
|
|
8092
|
+
createDepositIntent(body: CreateDepositIntentParamsV2, config?: RequestOverrideConfig): Promise<Result<CreateIntentResponseV2>>;
|
|
8093
|
+
/**
|
|
8094
|
+
* Build an unsigned withdraw create-intent transaction (lsoda* shares → any token). The backend
|
|
8095
|
+
* sets `hubWalletSwap` internally so the swap spends the lsoda* held in the user's hub wallet.
|
|
8096
|
+
*
|
|
8097
|
+
* @returns `Result<CreateIntentResponseV2>` — `{ tx, intent, relayData }`.
|
|
8098
|
+
*/
|
|
8099
|
+
createWithdrawIntent(body: CreateWithdrawIntentParamsV2, config?: RequestOverrideConfig): Promise<Result<CreateIntentResponseV2>>;
|
|
8100
|
+
/**
|
|
8101
|
+
* Submit the broadcast intent tx to the relay.
|
|
8102
|
+
*
|
|
8103
|
+
* @returns `Result<SubmitIntentResponseV2>` — `{ result }` (opaque relay response).
|
|
8104
|
+
*/
|
|
8105
|
+
submitIntent(body: SubmitIntentRequestV2, config?: RequestOverrideConfig): Promise<Result<SubmitIntentResponseV2>>;
|
|
8106
|
+
/**
|
|
8107
|
+
* Poll the solver for intent execution status.
|
|
8108
|
+
*
|
|
8109
|
+
* @returns `Result<StatusResponseV2>` — `{ status, fillTxHash? }`.
|
|
8110
|
+
*/
|
|
8111
|
+
getStatus(body: StatusRequestV2, config?: RequestOverrideConfig): Promise<Result<StatusResponseV2>>;
|
|
8112
|
+
/**
|
|
8113
|
+
* Build an unsigned cancel-intent transaction. The `intent` field carries `bigint` numerics —
|
|
8114
|
+
* {@link toJsonBody} serializes them to decimal strings.
|
|
8115
|
+
*
|
|
8116
|
+
* @returns `Result<CancelIntentResponseV2>` — `{ tx }`.
|
|
8117
|
+
*/
|
|
8118
|
+
cancelIntent(body: CancelIntentRequestV2, config?: RequestOverrideConfig): Promise<Result<CancelIntentResponseV2>>;
|
|
8119
|
+
/**
|
|
8120
|
+
* Compute the keccak256 hash of an Intent struct. The `intent` field carries `bigint` numerics.
|
|
8121
|
+
*
|
|
8122
|
+
* @returns `Result<IntentHashResponseV2>` — `{ hash }`.
|
|
8123
|
+
*/
|
|
8124
|
+
getIntentHash(body: IntentHashRequestV2, config?: RequestOverrideConfig): Promise<Result<IntentHashResponseV2>>;
|
|
8125
|
+
/**
|
|
8126
|
+
* Long-poll the relayer until the fill packet lands on the destination chain.
|
|
8127
|
+
*
|
|
8128
|
+
* @returns `Result<IntentPacketResponseV2>` — delivered packet data.
|
|
8129
|
+
*/
|
|
8130
|
+
getSolvedIntentPacket(body: IntentPacketRequestV2, config?: RequestOverrideConfig): Promise<Result<IntentPacketResponseV2>>;
|
|
8131
|
+
/**
|
|
8132
|
+
* Recover the relay extra data needed by `/leverage-yield/intents/submit`. Provide EITHER
|
|
8133
|
+
* `txHash` OR `intent` (whose `bigint` numerics {@link toJsonBody} serializes).
|
|
8134
|
+
*
|
|
8135
|
+
* @returns `Result<IntentExtraDataResponseV2>` — `{ address, payload }`.
|
|
8136
|
+
*/
|
|
8137
|
+
getIntentSubmitTxExtraData(body: IntentExtraDataRequestV2, config?: RequestOverrideConfig): Promise<Result<IntentExtraDataResponseV2>>;
|
|
8138
|
+
/**
|
|
8139
|
+
* Get the on-chain fill state for an intent by its hub-chain tx hash.
|
|
8140
|
+
*
|
|
8141
|
+
* @returns `Result<IntentStateV2>` — `{ exists, remainingInput, receivedOutput, pendingPayment }`.
|
|
8142
|
+
*/
|
|
8143
|
+
getFilledIntent(txHash: string, config?: RequestOverrideConfig): Promise<Result<IntentStateV2>>;
|
|
8144
|
+
/**
|
|
8145
|
+
* Look up an Intent struct by its hub-chain creation tx hash.
|
|
8146
|
+
*
|
|
8147
|
+
* @returns `Result<GetIntentResponseV2>` — the decoded intent (bigint fields as decimal strings).
|
|
8148
|
+
*/
|
|
8149
|
+
getIntent(txHash: string, config?: RequestOverrideConfig): Promise<Result<GetIntentResponseV2>>;
|
|
8150
|
+
/**
|
|
8151
|
+
* Estimate gas for a raw transaction on a spoke chain.
|
|
8152
|
+
*
|
|
8153
|
+
* @returns `Result<GasEstimateResponseV2>` — `{ gas }` (chain-specific shape).
|
|
8154
|
+
*/
|
|
8155
|
+
estimateGas(body: GasEstimateRequestV2, config?: RequestOverrideConfig): Promise<Result<GasEstimateResponseV2>>;
|
|
8156
|
+
/**
|
|
8157
|
+
* Compute the partner fee for a given input amount.
|
|
8158
|
+
*
|
|
8159
|
+
* @returns `Result<FeeResponseV2>` — `{ fee }` (decimal string).
|
|
8160
|
+
*/
|
|
8161
|
+
getPartnerFee(query: FeeQueryV2, config?: RequestOverrideConfig): Promise<Result<FeeResponseV2>>;
|
|
8162
|
+
/**
|
|
8163
|
+
* Compute the protocol (solver) fee for a given input amount.
|
|
8164
|
+
*
|
|
8165
|
+
* @returns `Result<FeeResponseV2>` — `{ fee }` (decimal string).
|
|
8166
|
+
*/
|
|
8167
|
+
getSolverFee(query: FeeQueryV2, config?: RequestOverrideConfig): Promise<Result<FeeResponseV2>>;
|
|
8168
|
+
/**
|
|
8169
|
+
* Submit a vault-swap transaction to be processed (relay, post-execution, etc.). The `intent`
|
|
8170
|
+
* field carries `bigint` numerics — {@link toJsonBody} serializes them. Idempotent on
|
|
8171
|
+
* `(txHash, srcChainKey)`.
|
|
8172
|
+
*
|
|
8173
|
+
* @returns `Result<SubmitTxResponseV2>` — `{ success, data: { status, message } }`.
|
|
8174
|
+
*/
|
|
8175
|
+
submitTx(body: LeverageYieldSubmitTxRequestV2, config?: RequestOverrideConfig): Promise<Result<SubmitTxResponseV2>>;
|
|
8176
|
+
/**
|
|
8177
|
+
* Get the processing status of a submitted vault-swap transaction by `(txHash, srcChainKey)`.
|
|
8178
|
+
*
|
|
8179
|
+
* @returns `Result<SubmitTxStatusResponseV2>` — `{ success, data }` (processing state).
|
|
8180
|
+
*/
|
|
8181
|
+
getSubmitTxStatus(query: SubmitTxStatusQueryV2, config?: RequestOverrideConfig): Promise<Result<SubmitTxStatusResponseV2>>;
|
|
8182
|
+
/**
|
|
8183
|
+
* Merge additional headers into the service's default header set. Existing keys are
|
|
8184
|
+
* overwritten; keys absent from `headers` are preserved.
|
|
8185
|
+
*/
|
|
8186
|
+
setHeaders(headers: Record<string, string>): void;
|
|
8187
|
+
/** Return the base URL the service is currently pointing at. */
|
|
8188
|
+
getBaseURL(): string;
|
|
8189
|
+
/**
|
|
8190
|
+
* Return the effective per-request timeout (ms).
|
|
8191
|
+
*
|
|
8192
|
+
* Callers bounding a request tighter than this need it as the CEILING, because a
|
|
8193
|
+
* `RequestOverrideConfig.timeout` REPLACES the service value rather than lowering it: an override
|
|
8194
|
+
* derived from a caller budget alone would raise the bound whenever that budget is the larger of the
|
|
8195
|
+
* two. `SubmitTxAttempt.requestTimeout` clamps against both (`min(budget left in the attempt, this)`).
|
|
8196
|
+
*/
|
|
8197
|
+
getTimeout(): number;
|
|
8198
|
+
}
|
|
8199
|
+
|
|
7906
8200
|
/** An `intent-filled` entry in `IntentResponse.events`. Narrow with `isFillEvent`. */
|
|
7907
8201
|
declare const FillEventSchema: v.ObjectSchema<{
|
|
7908
8202
|
readonly eventType: v.LiteralSchema<"intent-filled", undefined>;
|
|
@@ -8111,6 +8405,7 @@ declare class BackendApiService implements IConfigApiV1 {
|
|
|
8111
8405
|
readonly swaps: SwapsApiService;
|
|
8112
8406
|
readonly sponsoring: SponsoringApiService;
|
|
8113
8407
|
readonly bridge: BridgeApiService;
|
|
8408
|
+
readonly leverageYield: LeverageYieldApiService;
|
|
8114
8409
|
private readonly config;
|
|
8115
8410
|
private readonly headers;
|
|
8116
8411
|
private readonly logger;
|
|
@@ -8412,9 +8707,10 @@ declare class BackendApiService implements IConfigApiV1 {
|
|
|
8412
8707
|
* without constructing a new service instance. Existing header keys are
|
|
8413
8708
|
* overwritten; keys absent from `headers` are preserved.
|
|
8414
8709
|
*
|
|
8415
|
-
* Headers also reach `swaps` and `
|
|
8416
|
-
* base-API credentials must not be forwarded to whatever origin it points at. Note
|
|
8417
|
-
* retargeted to another origin via `swapsApiConfig`, in which case a header set
|
|
8710
|
+
* Headers also reach `swaps`, `bridge` and `leverageYield`, but never `sponsoring`: it is configured
|
|
8711
|
+
* independently, so base-API credentials must not be forwarded to whatever origin it points at. Note
|
|
8712
|
+
* `swaps` can also be retargeted to another origin via `swapsApiConfig`, in which case a header set
|
|
8713
|
+
* here follows it.
|
|
8418
8714
|
*
|
|
8419
8715
|
* @param headers - Key-value pairs to add or overwrite in the default headers.
|
|
8420
8716
|
*/
|
|
@@ -8640,6 +8936,7 @@ declare class ConfigService {
|
|
|
8640
8936
|
get leverageYieldPartnerFee(): PartnerFee | undefined;
|
|
8641
8937
|
get swapUseBackendSubmitTx(): boolean;
|
|
8642
8938
|
get bridgeUseBackendSubmitTx(): boolean;
|
|
8939
|
+
get leverageYieldUseBackendSubmitTx(): boolean;
|
|
8643
8940
|
get dex(): DexConfig;
|
|
8644
8941
|
getChainConfig<K extends SpokeChainKey>(key: K): GetSpokeChainConfigType<K>;
|
|
8645
8942
|
get sodaxConfig(): SodaxConfig;
|
|
@@ -8716,6 +9013,13 @@ declare function calculateFeeAmount(inputAmount: bigint, fee: PartnerFee | undef
|
|
|
8716
9013
|
declare function adjustAmountByFee(amount: bigint, fee: PartnerFee | undefined, quoteType: QuoteType): bigint;
|
|
8717
9014
|
declare function BigIntToHex(value: bigint): Hex;
|
|
8718
9015
|
declare function encodeAddress(spokeChainId: SpokeChainKey, address: string): Hex;
|
|
9016
|
+
/**
|
|
9017
|
+
* Encode a chain-native TOKEN IDENTIFIER for hub-side encoding. On BITCOIN/NEAR/INJECTIVE these are
|
|
9018
|
+
* not addresses ('0:0', '897442:43', 'inj', 'factory/…', 'NEAR') — utf-8 identifier semantics, so
|
|
9019
|
+
* they must not hit {@link encodeAddress}'s recipient validators. Every other family's token IS an
|
|
9020
|
+
* address and keeps the validated path.
|
|
9021
|
+
*/
|
|
9022
|
+
declare function encodeTokenIdentifier(spokeChainId: SpokeChainKey, token: string): Hex;
|
|
8719
9023
|
/**
|
|
8720
9024
|
* Decode a hub-style hex address produced by {@link encodeAddress} back to the chain-native string form.
|
|
8721
9025
|
*/
|
|
@@ -8819,6 +9123,7 @@ type Erc20ApproveParams<Raw extends boolean> = {
|
|
|
8819
9123
|
amount: bigint;
|
|
8820
9124
|
from: Address$1;
|
|
8821
9125
|
spender: Address$1;
|
|
9126
|
+
expectedChainId?: number;
|
|
8822
9127
|
} & WalletProviderSlot<EvmChainKey, Raw>;
|
|
8823
9128
|
type Erc20IsAllowanceParams<ChainKey extends EvmChainKey> = {
|
|
8824
9129
|
token: Address$1;
|
|
@@ -9638,6 +9943,9 @@ declare class StacksSpokeService {
|
|
|
9638
9943
|
readContract(sender: string, txParams: StacksTransactionParams): Promise<ClarityValue>;
|
|
9639
9944
|
getSTXBalance(address: string): Promise<bigint>;
|
|
9640
9945
|
readTokenBalance(token: string, address: string): Promise<bigint>;
|
|
9946
|
+
private readonly ftAssetNames;
|
|
9947
|
+
/** Post-conditions need the on-chain `define-fungible-token` names; SIP-10 exposes no read for them. */
|
|
9948
|
+
private getFtAssetNames;
|
|
9641
9949
|
getImplContractAddress(stateContract: string): Promise<string>;
|
|
9642
9950
|
/**
|
|
9643
9951
|
* Deposit tokens to the spoke chain.
|
|
@@ -9647,6 +9955,12 @@ declare class StacksSpokeService {
|
|
|
9647
9955
|
* @returns {Promise<Hash>} A promise that resolves to the transaction hash.
|
|
9648
9956
|
*/
|
|
9649
9957
|
deposit<R extends boolean = false>(params: DepositParams<StacksChainKey, R>): Promise<TxReturnType<StacksChainKey, R>>;
|
|
9958
|
+
/**
|
|
9959
|
+
* Caps for a Deny-mode deposit: asset-manager-state.deposit moves exactly `amount` from the
|
|
9960
|
+
* caller, so cap the sender at `amount` — one cap per FT the token contract defines (sBTC has
|
|
9961
|
+
* two; the unmoved ones pass at 0 trivially), or uSTX for native.
|
|
9962
|
+
*/
|
|
9963
|
+
private depositPostConditions;
|
|
9650
9964
|
/**
|
|
9651
9965
|
* Get the balance of the token deposited in the spoke chain asset manager.
|
|
9652
9966
|
* @param {GetDepositParams<StacksChainKey>} params - The parameters for the deposit, including the user's address, token address, and chain id.
|
|
@@ -10041,6 +10355,19 @@ declare function calcOpReturnOutputVbytes(payloadByteLength: number): number;
|
|
|
10041
10355
|
*/
|
|
10042
10356
|
declare function estimateBitcoinTxSize(inputCount: number, outputCount: number, addressType?: BtcAddressType, opReturnOutputVbytes?: number): number;
|
|
10043
10357
|
declare function encodeBtcPayloadToBytes(payload: BtcPayload): string;
|
|
10358
|
+
/**
|
|
10359
|
+
* Checksum-validate a Bitcoin destination address (every spendable type). Testnet forms are
|
|
10360
|
+
* accepted deliberately: the network is config-driven under the single BITCOIN_MAINNET chain key
|
|
10361
|
+
* (BitcoinSpokeService.getBtcNetwork), and this pure utility cannot see that config.
|
|
10362
|
+
* Decodes via fromBech32/fromBase58Check — payments.p2tr would require initEccLib, which a pure
|
|
10363
|
+
* utility must not depend on. Prefix/version checks keep other bech32 chains (e.g. inj1…) out.
|
|
10364
|
+
*/
|
|
10365
|
+
declare function isValidBitcoinAddress(address: string): boolean;
|
|
10366
|
+
/**
|
|
10367
|
+
* Canonical byte form of a validated Bitcoin address. bech32 is case-insensitive (BIP-173), so the
|
|
10368
|
+
* two cases of one address would otherwise encode to different bytes; Base58Check is case-sensitive.
|
|
10369
|
+
*/
|
|
10370
|
+
declare function canonicalizeBitcoinAddress(address: string): string;
|
|
10044
10371
|
/**
|
|
10045
10372
|
* Normalize a signed PSBT to base64 format.
|
|
10046
10373
|
* Unisat/OKX wallets return hex, Xverse returns base64.
|
|
@@ -12955,6 +13282,8 @@ declare function convertTransactionInstructionToRaw(instruction: TransactionInst
|
|
|
12955
13282
|
|
|
12956
13283
|
declare function isEvmSpokeChainConfig(value: SpokeChainConfig): value is EvmSpokeChainConfig;
|
|
12957
13284
|
declare function isIconAddress(value: unknown): value is IconAddress;
|
|
13285
|
+
declare function isValidNearAccountId(accountId: string): boolean;
|
|
13286
|
+
declare function isValidInjectiveAddress(address: string): boolean;
|
|
12958
13287
|
declare function isResponseAddressType(value: unknown): value is ResponseAddressType;
|
|
12959
13288
|
declare function isResponseSigningType(value: unknown): value is ResponseSigningType;
|
|
12960
13289
|
declare function isJsonRpcPayloadResponse(value: unknown): value is JsonRpcPayloadResponse;
|
|
@@ -18107,6 +18436,7 @@ type LeverageYieldServiceConstructorParams = {
|
|
|
18107
18436
|
hubProvider: HubProvider;
|
|
18108
18437
|
config: ConfigService;
|
|
18109
18438
|
spoke: SpokeService;
|
|
18439
|
+
backendApi: BackendApiService;
|
|
18110
18440
|
};
|
|
18111
18441
|
/**
|
|
18112
18442
|
* Treats leverage-yield ERC-4626 vault shares (lsoda* tokens) as solver-tradeable tokens:
|
|
@@ -18140,7 +18470,14 @@ declare class LeverageYieldService {
|
|
|
18140
18470
|
private readonly hubProvider;
|
|
18141
18471
|
private readonly config;
|
|
18142
18472
|
private readonly spoke;
|
|
18143
|
-
|
|
18473
|
+
private readonly backendApi;
|
|
18474
|
+
/**
|
|
18475
|
+
* Effective backend submit-tx flow (`leverageYield.useBackendSubmitTx`, default off). Read live off
|
|
18476
|
+
* `ConfigService`, like `config.leverageYieldPartnerFee`, so the config object and the behavior can
|
|
18477
|
+
* never disagree.
|
|
18478
|
+
*/
|
|
18479
|
+
get useBackendSubmitTx(): boolean;
|
|
18480
|
+
constructor({ hubProvider, config, spoke, backendApi }: LeverageYieldServiceConstructorParams);
|
|
18144
18481
|
/** Returns the static registry of known leverage-yield vaults. */
|
|
18145
18482
|
listVaults(): readonly LeverageYieldVault[];
|
|
18146
18483
|
/** Looks up a vault by its `name` field. Returns `undefined` when not registered. */
|
|
@@ -18264,6 +18601,36 @@ declare class LeverageYieldService {
|
|
|
18264
18601
|
* `EXECUTION_FAILED`, `EXTERNAL_API_ERROR` or `UNKNOWN`.
|
|
18265
18602
|
*/
|
|
18266
18603
|
vaultSwap<K extends SpokeChainKey>(_params: VaultSwapActionParams<K, false>): Promise<Result<VaultSwapResponse, LeverageYieldSwapError>>;
|
|
18604
|
+
/**
|
|
18605
|
+
* Client-side vault-swap completion (the default path): verify the broadcast intent tx landed,
|
|
18606
|
+
* relay it to the hub (Sonic) — or use it directly when the source IS the hub — then notify the
|
|
18607
|
+
* solver via {@link LeverageYieldService.notifySolver} and build the {@link VaultSwapResponse}.
|
|
18608
|
+
* Extracted from `vaultSwap()` so the opt-in backend 2-step path ({@link LeverageYieldService.submitTx})
|
|
18609
|
+
* can fall back to it on any non-success. Leverage-yield copy of `SwapService.fallbackSwapSteps`.
|
|
18610
|
+
*/
|
|
18611
|
+
private fallbackVaultSwapSteps;
|
|
18612
|
+
/**
|
|
18613
|
+
* Backend 2-step vault-swap path (opt-in via `leverageYield.useBackendSubmitTx`): hand the
|
|
18614
|
+
* broadcast intent tx to the leverage-yield API (`POST /leverage-yield/submit-tx`); the backend
|
|
18615
|
+
* relays + post-executes server-side. Polls `getSubmitTxStatus` until `solved`, then reconstructs
|
|
18616
|
+
* the same {@link VaultSwapResponse} the client-side path returns.
|
|
18617
|
+
*
|
|
18618
|
+
* Never throws — returns `{ ok: false }` on any non-success (submit `!ok`, a 200 the backend did not
|
|
18619
|
+
* accept, terminal `failed` / abandoned, or poll timeout) so `vaultSwap()` falls back to
|
|
18620
|
+
* {@link LeverageYieldService.fallbackVaultSwapSteps}. Falling back is safe: re-relaying / re-posting
|
|
18621
|
+
* an already-processed vault swap is idempotent (the relay dedups the `executed` packet and the solver
|
|
18622
|
+
* re-affirms the intent — no double-fill), and load-bearing rather than belt-and-braces: the backend
|
|
18623
|
+
* keeps processing after this attempt gives up, so the fallback's relay can race the backend's own.
|
|
18624
|
+
*
|
|
18625
|
+
* The attempt itself — POST, budget clamps, status poll — is {@link runBackendSubmitTx}, shared with
|
|
18626
|
+
* swaps and bridge. What is leverage-yield-specific and lives here: the request body (including the
|
|
18627
|
+
* `operation` discriminator), the `solved` terminal status, the mapping to a
|
|
18628
|
+
* {@link VaultSwapResponse}, and the leverage-yield error taxonomy.
|
|
18629
|
+
*
|
|
18630
|
+
* `attempt` bounds this attempt alone — the POST and every status request draw on it, and the
|
|
18631
|
+
* client-side fallback holds a separate fresh `timeout`.
|
|
18632
|
+
*/
|
|
18633
|
+
private submitTx;
|
|
18267
18634
|
/**
|
|
18268
18635
|
* Notifies the solver that the vault intent landed on the hub, triggering it to fill.
|
|
18269
18636
|
* Leverage-yield copy of the swap domain's `postExecution` — emits only
|
|
@@ -19235,4 +19602,4 @@ type DexApproveErrorCode = ApproveErrorCode;
|
|
|
19235
19602
|
type DexApproveError = SodaxError<DexApproveErrorCode>;
|
|
19236
19603
|
declare const isDexApproveError: (e: unknown) => e is SodaxError<ApproveErrorCode>;
|
|
19237
19604
|
|
|
19238
|
-
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type ActivateStellarAccountParams, type ActivateStellarAccountResult, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type AnalyticsActionData, type ApiResponse, type ApprovalTxs, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, type BackendApiServiceOptions, BackendHttpError, type BalanceCollector, type BalanceReadContext, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, type BitcoinBoundExtras, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, BridgeApiService, type BridgeApiServiceOptions, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, type BridgeExtras, type BridgeLookupError, type BridgeLookupErrorCode, type BridgeOrchestrationError, type BridgeOrchestrationErrorCode, type BridgeParams, BridgeService, type BridgeServiceConstructorParams, type BtcPayload, CREATE_INTENT_CODES, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelIntentActionParams, type CancelIntentParams, type CancelUnstakeAction, type CancelUnstakeParams, type ClClaimRewardsParams, type ClDecreaseLiquidityParams, type ClGetPoolDataParams, type ClIncreaseLiquidityParams, type ClLiquidityClaimRewardsAction, type ClLiquidityDecreaseLiquidityAction, type ClLiquidityIncreaseLiquidityAction, type ClLiquidityWithdrawAction, type ClMintPositionEventLog, type ClPositionInfo, ClService, type ClServiceConstructorParams, type ClSupplyAction, type ClSupplyParams, type ClWithdrawParams, type ClaimAction, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, type ConcentratedLiquidityParams, type ConcentratedLiquidityTokenInfo, ConfigService, type ConfigServiceConstructorParams, type ConnMsg, type CreateAssetDepositParams, type CreateAssetWithdrawParams, type CreateBridgeIntentParams, type CreateIntentErrorCode, type CreateIntentParams, type CreateIntentResult, type CreateLimitOrderParams, type CreateSonicSwapIntentParams, type CreateVaultIntentResult, type CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, DETAILED_STATUS_NOT_DELIVERED, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DetailedStatusError, type DetailedStatusErrorCode, type DetailedSwapStatus, type DetailedSwapStatusKey, type DexApproveError, type DexApproveErrorCode, type DexCreateIntentError, type DexCreateIntentErrorCode, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApprovalPlan, type Erc20ApprovalPlanReason, type Erc20ApproveParams, type Erc20GetAllowanceParams, type Erc20IsAllowanceParams, type Erc20PlanApprovalParams, Erc20Service, type Erc20Token, Erc4626Service, type EstimateGasParams, EvmAssetManagerService, type EvmDepositToDataParams, EvmHubProvider, type EvmHubProviderConstructorParams, EvmSolverService, EvmSpokeService, EvmVaultTokenService, type EvmWithdrawAssetDataParams, type ExecuteMsg, type FeatureInvariant, type FeeData, type FeeTokenApproveAction, type FeeTokenApproveParams, type FetchHubAssetBalancesParams, type FillEvent, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, GAS_ESTIMATION_CODES, type GasEstimationErrorCode, type GetBalanceParams, type GetBalancesParams, type GetDepositParams, type GetIntentSubmitTxExtraDataParams, type GetPacketParams, type GetPacketResponse, type GetQuoteParams, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserIntentParams, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HookRequest, HookService, HttpRelayError, type HubAssetBalance, type HubProvider, type IconJsonRpcVersion, IconSpokeService, type IcxCreateRevertMigrationParams, type IcxMigrateAction, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRevertMigrationAction, type IcxRevertMigrationParams, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, type InjectiveBalance, InjectiveSpokeService, type InstantUnstakeAction, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapResult, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentData, IntentDataService, IntentDataType, type IntentDeliveryInfo, IntentFilledEventAbi, type IntentFilledEventLog, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentTxResult, IntentsAbi, type JsonRpcPayloadResponse, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, type LendingPoolServiceConstructorParams, type LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, type LeverageYieldQuoteParams, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, type MapRelayFailureCtx, type MigrateOrchestrationError, type MigrateOrchestrationErrorCode, type MigrationAction, type MigrationAllowanceCheckError, type MigrationAllowanceCheckErrorCode, type MigrationApproveError, type MigrationApproveErrorCode, type MigrationCreateIntentError, type MigrationCreateIntentErrorCode, type MigrationDirection, type MigrationError, type MigrationErrorCode, type MigrationLookupError, type MigrationLookupErrorCode, type MigrationOp, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConstructorParams, type MigrationTokens, MintPositionEventAbi, type MintPositionEventLog, type MoneyMarketAction, type MoneyMarketAllowanceCheckError, type MoneyMarketAllowanceCheckErrorCode, type MoneyMarketAllowanceParams, type MoneyMarketApproveActionParams, type MoneyMarketApproveError, type MoneyMarketApproveErrorCode, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowActionParams, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketCreateIntentError, type MoneyMarketCreateIntentErrorCode, MoneyMarketDataService, type MoneyMarketDataServiceConstructorParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketGasEstimationError, type MoneyMarketGasEstimationErrorCode, type MoneyMarketOrchestrationError, type MoneyMarketOrchestrationErrorCode, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayActionParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConstructorParams, type MoneyMarketSupplyActionParams, type MoneyMarketSupplyParams, type MoneyMarketWithdrawActionParams, type MoneyMarketWithdrawParams, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, ORACLE_CANDLE_INTERVALS, type OnDemandBtcPayload, type OnDemandRelayData, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OracleCandle, type OracleCandleInterval, type OracleCandlesResponse, type OracleMarketInterval, type OracleMarketsResponse, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, type PartnerFeeClaimCancelAction, type PartnerFeeClaimCancelParams, PartnerFeeClaimService, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapAction, type PartnerFeeClaimSwapParams, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, Permit2Service, type PermitBatch, type PermitDetails, type PermitSingle, type PoolBaseCurrencyHumanized, type PoolData, type PoolRewardConfig, type PoolSpokeAssets, type PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RELAY_REQUEST_TIMEOUT_MS, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, type RadfiProviderOptions, type RadfiResponseEnvelope, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawDestinationParams, type RecoveryAction, type RecoveryError, type RecoveryErrorCode, RecoveryService, type RecoveryServiceConstructorParams, type RelayAction, type RelayAndWaitParams, type RelayCode, type RelayErrorCode, type RelayExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayWrappedErrorCode, type RequestConfig, type RequestOverrideConfig, type RequestTrustlineParams, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResolvedAnalytics, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SPEED_TIER_SECONDS, SPEED_TIER_THRESHOLDS, SPONSOR_CONFIG_TTL_MS, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxPhase, SolanaSpokeService, SolverApiService, SonicSpokeService, type SpokeApproveParams, type SpokeApproveParamsEvmSpoke, type SpokeApproveParamsHub, type SpokeApproveParamsStellar, type SpokeIsAllowanceValidParams, type SpokeIsAllowanceValidParamsEvmSpoke, type SpokeIsAllowanceValidParamsHub, type SpokeIsAllowanceValidParamsOther, type SpokeIsAllowanceValidParamsStellar, SpokeService, type SpokeServiceConstructorParams, type SpokeServiceType, type SponsorFailureAction, type SponsorFailureClass, type SponsoringAction, SponsoringApiService, type SponsoringApiServiceOptions, type SponsoringConfigError, type SponsoringConfigErrorCode, type SponsoringLookupError, type SponsoringLookupErrorCode, type SponsoringOrchestrationError, type SponsoringOrchestrationErrorCode, SponsoringService, StacksSpokeService, type StakeAction, type StakeOrchestrationError, type StakeOrchestrationErrorCode, type StakeParams, type StakingActionType, type StakingActionUnion, type StakingAllowanceCheckError, type StakingAllowanceCheckErrorCode, type StakingApproveError, type StakingApproveErrorCode, type StakingConfig, type StakingCreateIntentError, type StakingCreateIntentErrorCode, type StakingError, type StakingErrorCode, type StakingInfo, type StakingInfoFetchError, type StakingInfoFetchErrorCode, StakingLogic, type StakingOrchestrationError, type StakingOrchestrationErrorCode, type StakingParamsUnion, StakingService, type StakingServiceConstructorParams, type State, type StellarAccountStatus, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiGrpcTransport, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, type SwapSpeedTier, type SwapSpeedTierParams, type SwapSpeedTierResult, SwapsApiService, type SwapsApiServiceOptions, type TokenSpenderPair, type TokenWithConversion, type TxHashPair, type TxStatus, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UiPoolDataProviderServiceConstructorParams, type UnifiedBnUSDMigrateAction, type UnifiedBnUSDMigrateParams, type UnstakeAction, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type VaultSwapActionParams, type VaultSwapResponse, type VerifySimulationParams, type VerifyTxHashParams, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitForTxReceiptParams, type WaitForTxReceiptReturnType, type WaitUntilIntentExecutedPayload, type WalletBalanceMap, type WalletMode, type WalletSimulationParams, type WithdrawHubAssetAction, type WithdrawHubAssetParams, type WithdrawInfo, adjustAmountByFee, allowanceCheckFailed, approveFailed, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bridgeInvariant, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createBalanceCollector, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, estimateSwapSpeedTier, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getCompoundedBalance, getConnectionIdl, getConnectionProgram, getEvmViemChain, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, intentCreationFailed, isApprovalSupportedChainKeyType, isAuthFailure, isAuthStatus, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isFillEvent, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinTransfer, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isOracleCandleInterval, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, leverageYieldInvariant, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, retry, reverseEncodeAddress, robinhoodChain, serializeAddressData, settleWalletBalances, silentLogger, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, sponsoringInvariant, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, toCreateBridgeIntentParamsV2, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
|
19605
|
+
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type ActivateStellarAccountParams, type ActivateStellarAccountResult, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type AnalyticsActionData, type ApiResponse, type ApprovalTxs, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, type BackendApiServiceOptions, BackendHttpError, type BalanceCollector, type BalanceReadContext, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, type BitcoinBoundExtras, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, BridgeApiService, type BridgeApiServiceOptions, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, type BridgeExtras, type BridgeLookupError, type BridgeLookupErrorCode, type BridgeOrchestrationError, type BridgeOrchestrationErrorCode, type BridgeParams, BridgeService, type BridgeServiceConstructorParams, type BtcPayload, CREATE_INTENT_CODES, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelIntentActionParams, type CancelIntentParams, type CancelUnstakeAction, type CancelUnstakeParams, type ClClaimRewardsParams, type ClDecreaseLiquidityParams, type ClGetPoolDataParams, type ClIncreaseLiquidityParams, type ClLiquidityClaimRewardsAction, type ClLiquidityDecreaseLiquidityAction, type ClLiquidityIncreaseLiquidityAction, type ClLiquidityWithdrawAction, type ClMintPositionEventLog, type ClPositionInfo, ClService, type ClServiceConstructorParams, type ClSupplyAction, type ClSupplyParams, type ClWithdrawParams, type ClaimAction, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, type ConcentratedLiquidityParams, type ConcentratedLiquidityTokenInfo, ConfigService, type ConfigServiceConstructorParams, type ConnMsg, type CreateAssetDepositParams, type CreateAssetWithdrawParams, type CreateBridgeIntentParams, type CreateIntentErrorCode, type CreateIntentParams, type CreateIntentResult, type CreateLimitOrderParams, type CreateSonicSwapIntentParams, type CreateVaultIntentResult, type CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, DETAILED_STATUS_NOT_DELIVERED, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DetailedStatusError, type DetailedStatusErrorCode, type DetailedSwapStatus, type DetailedSwapStatusKey, type DexApproveError, type DexApproveErrorCode, type DexCreateIntentError, type DexCreateIntentErrorCode, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApprovalPlan, type Erc20ApprovalPlanReason, type Erc20ApproveParams, type Erc20GetAllowanceParams, type Erc20IsAllowanceParams, type Erc20PlanApprovalParams, Erc20Service, type Erc20Token, Erc4626Service, type EstimateGasParams, EvmAssetManagerService, type EvmDepositToDataParams, EvmHubProvider, type EvmHubProviderConstructorParams, EvmSolverService, EvmSpokeService, EvmVaultTokenService, type EvmWithdrawAssetDataParams, type ExecuteMsg, type FeatureInvariant, type FeeData, type FeeTokenApproveAction, type FeeTokenApproveParams, type FetchHubAssetBalancesParams, type FillEvent, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, GAS_ESTIMATION_CODES, type GasEstimationErrorCode, type GetBalanceParams, type GetBalancesParams, type GetDepositParams, type GetIntentSubmitTxExtraDataParams, type GetPacketParams, type GetPacketResponse, type GetQuoteParams, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserIntentParams, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HookRequest, HookService, HttpRelayError, type HubAssetBalance, type HubProvider, type IconJsonRpcVersion, IconSpokeService, type IcxCreateRevertMigrationParams, type IcxMigrateAction, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRevertMigrationAction, type IcxRevertMigrationParams, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, type InjectiveBalance, InjectiveSpokeService, type InstantUnstakeAction, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapResult, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentData, IntentDataService, IntentDataType, type IntentDeliveryInfo, IntentFilledEventAbi, type IntentFilledEventLog, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentTxResult, IntentsAbi, type JsonRpcPayloadResponse, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, type LendingPoolServiceConstructorParams, type LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, LeverageYieldApiService, type LeverageYieldApiServiceOptions, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, type LeverageYieldQuoteParams, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, type MapRelayFailureCtx, type MigrateOrchestrationError, type MigrateOrchestrationErrorCode, type MigrationAction, type MigrationAllowanceCheckError, type MigrationAllowanceCheckErrorCode, type MigrationApproveError, type MigrationApproveErrorCode, type MigrationCreateIntentError, type MigrationCreateIntentErrorCode, type MigrationDirection, type MigrationError, type MigrationErrorCode, type MigrationLookupError, type MigrationLookupErrorCode, type MigrationOp, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConstructorParams, type MigrationTokens, MintPositionEventAbi, type MintPositionEventLog, type MoneyMarketAction, type MoneyMarketAllowanceCheckError, type MoneyMarketAllowanceCheckErrorCode, type MoneyMarketAllowanceParams, type MoneyMarketApproveActionParams, type MoneyMarketApproveError, type MoneyMarketApproveErrorCode, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowActionParams, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketCreateIntentError, type MoneyMarketCreateIntentErrorCode, MoneyMarketDataService, type MoneyMarketDataServiceConstructorParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketGasEstimationError, type MoneyMarketGasEstimationErrorCode, type MoneyMarketOrchestrationError, type MoneyMarketOrchestrationErrorCode, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayActionParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConstructorParams, type MoneyMarketSupplyActionParams, type MoneyMarketSupplyParams, type MoneyMarketWithdrawActionParams, type MoneyMarketWithdrawParams, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, ORACLE_CANDLE_INTERVALS, type OnDemandBtcPayload, type OnDemandRelayData, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OracleCandle, type OracleCandleInterval, type OracleCandlesResponse, type OracleMarketInterval, type OracleMarketsResponse, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, type PartnerFeeClaimCancelAction, type PartnerFeeClaimCancelParams, PartnerFeeClaimService, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapAction, type PartnerFeeClaimSwapParams, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, Permit2Service, type PermitBatch, type PermitDetails, type PermitSingle, type PoolBaseCurrencyHumanized, type PoolData, type PoolRewardConfig, type PoolSpokeAssets, type PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RELAY_REQUEST_TIMEOUT_MS, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, type RadfiProviderOptions, type RadfiResponseEnvelope, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawDestinationParams, type RecoveryAction, type RecoveryError, type RecoveryErrorCode, RecoveryService, type RecoveryServiceConstructorParams, type RelayAction, type RelayAndWaitParams, type RelayCode, type RelayErrorCode, type RelayExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayWrappedErrorCode, type RequestConfig, type RequestOverrideConfig, type RequestTrustlineParams, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResolvedAnalytics, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SPEED_TIER_SECONDS, SPEED_TIER_THRESHOLDS, SPONSOR_CONFIG_TTL_MS, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxPhase, SolanaSpokeService, SolverApiService, SonicSpokeService, type SpokeApproveParams, type SpokeApproveParamsEvmSpoke, type SpokeApproveParamsHub, type SpokeApproveParamsStellar, type SpokeIsAllowanceValidParams, type SpokeIsAllowanceValidParamsEvmSpoke, type SpokeIsAllowanceValidParamsHub, type SpokeIsAllowanceValidParamsOther, type SpokeIsAllowanceValidParamsStellar, SpokeService, type SpokeServiceConstructorParams, type SpokeServiceType, type SponsorFailureAction, type SponsorFailureClass, type SponsoringAction, SponsoringApiService, type SponsoringApiServiceOptions, type SponsoringConfigError, type SponsoringConfigErrorCode, type SponsoringLookupError, type SponsoringLookupErrorCode, type SponsoringOrchestrationError, type SponsoringOrchestrationErrorCode, SponsoringService, StacksSpokeService, type StakeAction, type StakeOrchestrationError, type StakeOrchestrationErrorCode, type StakeParams, type StakingActionType, type StakingActionUnion, type StakingAllowanceCheckError, type StakingAllowanceCheckErrorCode, type StakingApproveError, type StakingApproveErrorCode, type StakingConfig, type StakingCreateIntentError, type StakingCreateIntentErrorCode, type StakingError, type StakingErrorCode, type StakingInfo, type StakingInfoFetchError, type StakingInfoFetchErrorCode, StakingLogic, type StakingOrchestrationError, type StakingOrchestrationErrorCode, type StakingParamsUnion, StakingService, type StakingServiceConstructorParams, type State, type StellarAccountStatus, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiGrpcTransport, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, type SwapSpeedTier, type SwapSpeedTierParams, type SwapSpeedTierResult, SwapsApiService, type SwapsApiServiceOptions, type TokenSpenderPair, type TokenWithConversion, type TxHashPair, type TxStatus, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UiPoolDataProviderServiceConstructorParams, type UnifiedBnUSDMigrateAction, type UnifiedBnUSDMigrateParams, type UnstakeAction, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type VaultSwapActionParams, type VaultSwapResponse, type VerifySimulationParams, type VerifyTxHashParams, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitForTxReceiptParams, type WaitForTxReceiptReturnType, type WaitUntilIntentExecutedPayload, type WalletBalanceMap, type WalletMode, type WalletSimulationParams, type WithdrawHubAssetAction, type WithdrawHubAssetParams, type WithdrawInfo, adjustAmountByFee, allowanceCheckFailed, approveFailed, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bridgeInvariant, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, canonicalizeBitcoinAddress, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createBalanceCollector, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, encodeTokenIdentifier, erc20Abi, erc4626Abi, estimateBitcoinTxSize, estimateSwapSpeedTier, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getCompoundedBalance, getConnectionIdl, getConnectionProgram, getEvmViemChain, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, intentCreationFailed, isApprovalSupportedChainKeyType, isAuthFailure, isAuthStatus, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isFillEvent, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinTransfer, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isOracleCandleInterval, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidBitcoinAddress, isValidInjectiveAddress, isValidNearAccountId, leverageYieldInvariant, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, retry, reverseEncodeAddress, robinhoodChain, serializeAddressData, settleWalletBalances, silentLogger, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, sponsoringInvariant, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, toCreateBridgeIntentParamsV2, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|